808D ADV FCT Man 0718 en-US

Download as pdf or txt
Download as pdf or txt
You are on page 1of 422

SINUMERIK

SINUMERIK 808D ADVANCED


Function Manual

Legal information
Warning notice system
This manual contains notices you have to observe in order to ensure your personal safety, as well as to prevent damage 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
indicates that minor personal injury can result if proper precautions are not taken.

NOTICE
indicates that property damage can result if proper precautions are not taken.
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 product/system described in this documentation may be operated only by personnel qualified for the specific task in accordance with
the relevant documentation, in particular its warning notices and safety instructions. Qualified personnel are those who, based on their
training and experience, are capable of identifying risks and avoiding potential hazards when working with these products/systems.

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 complied with. The information in the relevant documentation must be observed.

© Siemens AG 2018. All rights reserved


6FC5397-7EP40-0BA4, 07/2018 1
Preface
Applicable products
This manual is valid for the following control systems:
Control system Software version
SINUMERIK 808D ADVANCED T (Turning) V4.90: PPU16x.3/PPU15x.3 with spindle/feed servo system
SINUMERIK 808D ADVANCED M (Milling)

Documentation components and target audience


End-user documentation Target audience
Programming and Operating Manual (Turning) Programmers and operators of turning machines
Programming and Operating Manual (Milling) Programmers and operators of milling machines
Programming and Operating Manual (ISO Turning/Milling) Programmers and operators of turning/milling machines
Programming and Operating Manual (Manual Machine Plus Programmers and operators of turning machines
(MM+), Turning)
Diagnostics Manual Mechanical and electrical designers, commissioning engi-
neers, machine operators, and service and maintenance
personnel
Manufacturer/service documentation Target audience
Commissioning Manual Installation personnel, commissioning engineers, and ser-
vice and maintenance personnel
Function Manual Mechanical and electrical designers, technical professionals
Parameter Manual Mechanical and electrical designers, technical professionals
Service Manual Mechanical and electrical designers, technical profession-
als, commissioning engineers, and service and maintenance
personnel
Readme file
Third-party software - Licensing terms and copyright information

My Documentation Manager (MDM)


Under the following link you will find information to individually compile your documentation based on the Siemens content:
www.siemens.com/mdm

Standard scope
This manual only describes the functionality of the standard version. Extensions or changes made by the machine tool
manufacturer are documented by the machine tool manufacturer.

Technical support
Country Hotline 1) Further service contact information:
Germany +49 911 895 7222 • Worldwide Web site:
China +86 400 810 4288 https://support.industry.siemens.com/cs/ww/en/
• Chinese Web site:

http://www.siemens.com.cn/808D
1) You can find more hotline information at the worldwide Web site given above.

EC Declaration of Conformity
The EC Declaration of Conformity for the EMC Directive can be found on the Internet at
https://support.industry.siemens.com/cs/ww/en/.
Here, enter the number "59843164" as the search term or contact your local Siemens office.

Function Manual
2 6FC5397-7EP40-0BA4, 07/2018
Table of contents
Preface................................................................................................................................................................... 2
1 Fundamental safety instructions ............................................................................................................................ 11
1.1 General safety instructions .................................................................................................................... 11
1.2 Warranty and liability for application examples ...................................................................................... 12
1.3 Industrial security .................................................................................................................................. 12
2 Introduction........................................................................................................................................................... 13
3 Various interface signals (A2) ................................................................................................................................ 14
3.1 General.................................................................................................................................................. 14
3.2 Signals from PLC to NCK ...................................................................................................................... 15
3.2.1 Access authorization ............................................................................................................................. 15
3.2.2 General signals ..................................................................................................................................... 15
3.2.3 Signals for digital drives, to axis/spindle ................................................................................................ 17
3.3 Signals from NCK to PLC ...................................................................................................................... 17
3.3.1 General signals ..................................................................................................................................... 17
3.3.2 Signals for digital drives, from axis/spindle ............................................................................................ 18
3.4 Signals from PLC to HMI ....................................................................................................................... 18
3.5 Signals from HMI to PLC ....................................................................................................................... 19
3.6 User interface ........................................................................................................................................ 20
3.6.1 General (OF) ......................................................................................................................................... 20
3.6.2 PI service ASUP .................................................................................................................................... 21
3.6.3 Reading variables from the NCK area ................................................................................................... 21
3.6.4 Writing variables from the NCK area ..................................................................................................... 22
3.7 NC variable............................................................................................................................................ 23
3.8 Signals from PLC .................................................................................................................................. 25
4 Axis monitoring (A3).............................................................................................................................................. 26
4.1 Overview of monitoring functions .......................................................................................................... 26
4.2 Running monitoring ............................................................................................................................... 26
4.2.1 Contour monitoring ................................................................................................................................ 26
4.2.2 Position monitoring ................................................................................................................................ 27
4.2.3 Standstill monitoring .............................................................................................................................. 28
4.2.4 Clamping monitoring.............................................................................................................................. 28
4.2.5 Speed setpoint monitoring ..................................................................................................................... 29
4.2.6 Actual velocity monitoring ...................................................................................................................... 30
4.3 Static limitation monitoring..................................................................................................................... 30
4.3.1 Limit switch monitoring .......................................................................................................................... 30
4.3.2 Hardware limit switches ......................................................................................................................... 31
4.3.3 Software limit switches .......................................................................................................................... 31
4.4 Supplementary conditions ..................................................................................................................... 32
4.5 Data table .............................................................................................................................................. 32
4.5.1 Machine data ......................................................................................................................................... 32
4.5.2 Interface signals .................................................................................................................................... 33
5 Continuous path mode, exact stop, and LookAhead (B1) ....................................................................................... 33
5.1 Brief description ..................................................................................................................................... 33
5.2 General.................................................................................................................................................. 34
5.3 Exact stop.............................................................................................................................................. 34
5.4 Continuous path mode .......................................................................................................................... 35
5.4.1 General.................................................................................................................................................. 35
5.4.2 Velocity reduction according to overload factor ..................................................................................... 36
5.4.3 Jerk limiting along the path through velocity reduction .......................................................................... 37
5.4.4 Machine axis-specific jerk limiting ......................................................................................................... 37

Function Manual
6FC5397-7EP40-0BA4, 07/2018 3
5.5 Compressor functions ........................................................................................................................... 37
5.6 LookAhead ............................................................................................................................................ 39
5.7 Data table.............................................................................................................................................. 41
5.7.1 Machine data ........................................................................................................................................ 41
5.7.2 Setting data ........................................................................................................................................... 41
5.7.3 Interface signals .................................................................................................................................... 41
6 Acceleration (B2)...................................................................................................................................................42
6.1 Acceleration profiles .............................................................................................................................. 42
6.2 Jerk limitation on interpolator level ........................................................................................................ 42
6.3 Jerk limitation in JOG mode .................................................................................................................. 42
6.4 Data table.............................................................................................................................................. 43
7 Gantry axes (G1) (PPU16x.3 only) .........................................................................................................................43
7.1 Brief description .................................................................................................................................... 43
7.2 "Gantry axes" function........................................................................................................................... 43
7.3 Referencing and synchronizing gantry axes ......................................................................................... 46
7.3.1 Introduction ........................................................................................................................................... 46
7.3.2 Automatic synchronization .................................................................................................................... 50
7.3.3 Points to note ........................................................................................................................................ 51
7.4 Start-up of gantry axes .......................................................................................................................... 52
7.5 PLC interface signals for gantry axes.................................................................................................... 55
7.6 Miscellaneous points regarding gantry axes ......................................................................................... 56
7.7 Example ................................................................................................................................................ 56
7.7.1 Creating a gantry grouping.................................................................................................................... 56
7.7.2 Setting of NCK PLC interface ................................................................................................................ 57
7.7.3 Commencing start-up ............................................................................................................................ 58
7.7.4 Setting warning and trip limits ............................................................................................................... 60
7.8 Data table.............................................................................................................................................. 60
7.8.1 Machine data ........................................................................................................................................ 60
7.8.2 Interface signals .................................................................................................................................... 61
8 Axis couplings (M3) ...............................................................................................................................................62
8.1 Coupled motion ..................................................................................................................................... 62
8.1.1 Brief description .................................................................................................................................... 62
8.1.1.1 Function ................................................................................................................................................ 62
8.1.1.2 Preconditions ........................................................................................................................................ 62
8.1.2 General functionality ............................................................................................................................. 62
8.1.3 Programming ........................................................................................................................................ 64
8.1.3.1 Definition and switch on of a coupled axis group (TRAILON) ............................................................... 64
8.1.3.2 Switch off (TRAILOF) ............................................................................................................................ 65
8.1.4 Effectiveness of PLC interface signals .................................................................................................. 65
8.1.5 Status of coupling.................................................................................................................................. 66
8.1.6 Dynamics limit ....................................................................................................................................... 66
8.1.7 Supplementary conditions ..................................................................................................................... 67
8.1.8 Examples .............................................................................................................................................. 67
8.2 Dynamic response of the coupled-motion axis ...................................................................................... 68
8.2.1 Parameterized dynamic limits ............................................................................................................... 68
8.2.2 Programmed dynamic limits .................................................................................................................. 68
8.2.2.1 Programming (VELOLIMA, ACCLIMA) ................................................................................................. 68
8.2.2.2 System variables ................................................................................................................................... 69
8.3 Data table.............................................................................................................................................. 69
8.3.1 Machine data ........................................................................................................................................ 69
8.3.2 Interface signals .................................................................................................................................... 69
9 Manual operation and handwheel traversal (H1).....................................................................................................70
9.1 General characteristics of traversing in JOG......................................................................................... 70

Function Manual
4 6FC5397-7EP40-0BA4, 07/2018
9.2 Continuous travel .................................................................................................................................. 72
9.3 Incremental travel (INC) ........................................................................................................................ 73
9.4 Handwheel traversal in JOG.................................................................................................................. 74
9.5 Fixed point approach in JOG ................................................................................................................. 76
9.5.1 Introduction............................................................................................................................................ 76
9.5.2 Functionality .......................................................................................................................................... 76
9.5.3 Parameter setting .................................................................................................................................. 78
9.5.4 Programming ......................................................................................................................................... 78
9.5.5 Supplementary Conditions .................................................................................................................... 78
9.5.6 Application example .............................................................................................................................. 79
9.6 Data table .............................................................................................................................................. 79
9.6.1 Machine data ......................................................................................................................................... 79
9.6.2 Setting data ........................................................................................................................................... 80
9.6.3 Interface signals .................................................................................................................................... 80
10 Auxiliary function outputs to PLC (H2) ................................................................................................................... 81
10.1 Brief description ..................................................................................................................................... 81
10.2 Programming of auxiliary functions ....................................................................................................... 82
10.3 Transfer of values and signals to the PLC interface .............................................................................. 82
10.4 Grouping of auxiliary functions .............................................................................................................. 83
10.5 Block-search response .......................................................................................................................... 84
10.6 Description of auxiliary functions ........................................................................................................... 84
10.6.1 M function .............................................................................................................................................. 84
10.6.2 T function............................................................................................................................................... 85
10.6.3 D function .............................................................................................................................................. 85
10.6.4 H function .............................................................................................................................................. 85
10.6.5 S function .............................................................................................................................................. 85
10.7 Data table .............................................................................................................................................. 85
10.7.1 Machine data ......................................................................................................................................... 85
10.7.2 Interface signals .................................................................................................................................... 86
11 Operating modes, program operation (K1) ............................................................................................................. 87
11.1 Brief description ..................................................................................................................................... 87
11.2 Operating modes ................................................................................................................................... 87
11.2.1 Operating modes ................................................................................................................................... 87
11.2.2 Mode change......................................................................................................................................... 88
11.2.3 Functional possibilities in the individual modes ..................................................................................... 88
11.2.4 Monitoring functions in the individual modes ......................................................................................... 89
11.2.5 Interlocks in the individual modes .......................................................................................................... 90
11.3 Processing a part program .................................................................................................................... 90
11.3.1 Program mode and part program selection ........................................................................................... 90
11.3.2 Start of part program or part program block .......................................................................................... 91
11.3.3 Part program interruption....................................................................................................................... 91
11.3.4 RESET command .................................................................................................................................. 92
11.3.5 Program control ..................................................................................................................................... 92
11.3.6 Program status ...................................................................................................................................... 93
11.3.7 Channel status ...................................................................................................................................... 93
11.3.8 Event-driven program calls .................................................................................................................... 94
11.3.9 Asynchronous subroutines (ASUPs) ..................................................................................................... 99
11.3.10 Responses to operator or program actions ......................................................................................... 101
11.3.11 Example of a timing diagram for a program run .................................................................................. 102
11.4 Program test ........................................................................................................................................ 102
11.4.1 General information on the program test ............................................................................................. 102
11.4.2 Program processing without axis movements (PRT) ........................................................................... 103
11.4.3 Program processing in single block mode (SBL) ................................................................................. 103
11.4.4 Program processing with dry run feedrate (DRY) ................................................................................ 104
11.4.5 Block search: Processing of certain program sections ........................................................................ 104
11.4.6 Skip part program blocks (SKP) .......................................................................................................... 106
11.4.7 Graphic simulation ............................................................................................................................... 107

Function Manual
6FC5397-7EP40-0BA4, 07/2018 5
11.5 Timers for program execution time...................................................................................................... 108
11.6 Workpiece counter .............................................................................................................................. 109
11.7 Data table............................................................................................................................................ 110
11.7.1 Machine data ...................................................................................................................................... 110
11.7.2 Setting data ......................................................................................................................................... 111
11.7.3 Interface signals .................................................................................................................................. 111
12 Compensation (K3) ............................................................................................................................................. 113
12.1 Brief description .................................................................................................................................. 113
12.2 Backlash compensation ...................................................................................................................... 114
12.3 Interpolatory compensation ................................................................................................................. 115
12.3.1 General ............................................................................................................................................... 115
12.3.2 LEC ..................................................................................................................................................... 116
12.3.3 Angularity error compensation ............................................................................................................ 118
12.3.4 Direction-dependent leadscrew error compensation ........................................................................... 121
12.3.4.1 Description of functions ....................................................................................................................... 121
12.3.4.2 Commissioning ................................................................................................................................... 121
12.3.4.3 Example .............................................................................................................................................. 124
12.4 Following error compensation (feedforward control) ........................................................................... 126
12.4.1 General ............................................................................................................................................... 126
12.4.2 Speed feedforward control .................................................................................................................. 127
12.5 Friction compensation (quadrant error compensation) ........................................................................ 127
12.5.1 General function description ............................................................................................................... 127
12.5.2 Supplementary conditions ................................................................................................................... 128
12.5.3 Friction compensation with a constant compensation value ............................................................... 128
12.5.3.1 Function activation .............................................................................................................................. 128
12.5.3.2 Commissioning ................................................................................................................................... 128
12.5.4 Friction compensation with acceleration-dependent compensation value........................................... 132
12.5.4.1 Description of functions ....................................................................................................................... 132
12.5.4.2 Function activation .............................................................................................................................. 132
12.5.4.3 Commissioning ................................................................................................................................... 133
12.5.5 Compensation value for short traversing blocks ................................................................................. 133
12.6 Data table............................................................................................................................................ 133
12.6.1 Machine data ...................................................................................................................................... 133
12.6.2 Setting data ......................................................................................................................................... 134
12.6.3 Interface signals .................................................................................................................................. 134
13 Kinematic transformation (M1) ............................................................................................................................. 134
13.1 Brief description .................................................................................................................................. 134
13.2 TRANSMIT .......................................................................................................................................... 135
13.2.1 Overview ............................................................................................................................................. 135
13.2.2 TRANSMIT configuration .................................................................................................................... 136
13.3 TRACYL .............................................................................................................................................. 139
13.3.1 Overview ............................................................................................................................................. 139
13.3.2 TRACYL configuration ........................................................................................................................ 141
13.3.3 Programming example, TRACYL ........................................................................................................ 144
13.4 Special features of TRANSMIT and TRACYL ..................................................................................... 145
13.5 Data table............................................................................................................................................ 146
13.5.1 Machine data ...................................................................................................................................... 146
13.5.2 Interface signals .................................................................................................................................. 146
14 Measurement (M5) .............................................................................................................................................. 146
14.1 Brief description .................................................................................................................................. 146
14.2 Hardware requirements....................................................................................................................... 147
14.2.1 Probes that can be used ..................................................................................................................... 147
14.2.2 Probe connection ................................................................................................................................ 148
14.3 Channel-specific measuring ................................................................................................................ 148
14.3.1 Measuring mode ................................................................................................................................. 148
14.3.2 Measurement results........................................................................................................................... 148

Function Manual
6 6FC5397-7EP40-0BA4, 07/2018
14.4 Measurement accuracy and functional testing .................................................................................... 149
14.4.1 Measuring accuracy ............................................................................................................................ 149
14.4.2 Probe functional test ............................................................................................................................ 149
14.5 Tool measuring in JOG........................................................................................................................ 150
14.6 Data table ............................................................................................................................................ 152
14.6.1 Machine data ....................................................................................................................................... 152
14.6.2 Interface signals .................................................................................................................................. 152
15 Manual tool measurement (with the Y axis).......................................................................................................... 153
15.1 Introduction.......................................................................................................................................... 153
15.2 Preparations for measuring the tool manually (with the Y axis) ........................................................... 153
15.3 Measuring the tool manually (with the Y axis) ..................................................................................... 155
16 EMERGENCY OFF (N2) ..................................................................................................................................... 158
16.1 Brief description ................................................................................................................................... 158
16.2 EMERGENCY STOP sequence .......................................................................................................... 158
16.3 EMERGENCY STOP acknowledgment ............................................................................................... 159
16.4 Data table ............................................................................................................................................ 160
16.4.1 Machine data ....................................................................................................................................... 160
16.4.2 Interface signals .................................................................................................................................. 160
17 Reference point approach (R1) ........................................................................................................................... 160
17.1 Fundamentals ...................................................................................................................................... 160
17.2 Referencing with incremental measuring systems .............................................................................. 162
17.3 Secondary conditions for absolute encoders ....................................................................................... 164
17.3.1 Calibrating absolute encoders ............................................................................................................. 164
17.3.2 Reference point approach with absolute encoders .............................................................................. 165
17.4 Data table ............................................................................................................................................ 165
17.4.1 Machine data ....................................................................................................................................... 165
17.4.2 Interface signals .................................................................................................................................. 166
18 Spindle (S1)........................................................................................................................................................ 166
18.1 Brief description ................................................................................................................................... 166
18.2 Spindle modes ..................................................................................................................................... 167
18.2.1 Spindle modes ..................................................................................................................................... 167
18.2.2 Spindle control mode ........................................................................................................................... 168
18.2.3 Spindle oscillation mode ...................................................................................................................... 169
18.2.4 Spindle positioning mode .................................................................................................................... 170
18.3 Synchronization ................................................................................................................................... 173
18.4 Gear stage change .............................................................................................................................. 174
18.5 Programming ....................................................................................................................................... 177
18.6 Spindle monitoring ............................................................................................................................... 178
18.6.1 Spindle monitoring ............................................................................................................................... 178
18.6.2 Axis/spindle stationary ......................................................................................................................... 178
18.6.3 Spindle in setpoint range ..................................................................................................................... 178
18.6.4 Maximum spindle speed ...................................................................................................................... 179
18.6.5 Minimum/maximum speed for gear stage............................................................................................ 179
18.6.6 Max. encoder limit frequency............................................................................................................... 179
18.6.7 Target point monitoring........................................................................................................................ 180
18.7 Analog spindle ..................................................................................................................................... 180
18.8 Data table ............................................................................................................................................ 181
18.8.1 Machine data ....................................................................................................................................... 181
18.8.2 Setting data ......................................................................................................................................... 182
18.8.3 Interface signals .................................................................................................................................. 182
19 Feedrates (V1).................................................................................................................................................... 183

Function Manual
6FC5397-7EP40-0BA4, 07/2018 7
19.1 Path feedrate F ................................................................................................................................... 183
19.1.1 Path feedrate F ................................................................................................................................... 183
19.1.2 Feedrate with G33, G34, G35 (thread cutting) .................................................................................... 184
19.1.3 Feedrate for G63 (tapping with compensation chuck) ......................................................................... 185
19.1.4 Feedrate for G331, G332 (tapping without compensation chuck) ....................................................... 186
19.1.5 Feedrate for chamfer/rounding: FRC, FRCM ...................................................................................... 186
19.2 Rapid traverse G0 ............................................................................................................................... 187
19.3 Feedrate control .................................................................................................................................. 187
19.3.1 Overview ............................................................................................................................................. 187
19.3.2 Feedrate disable and feedrate/spindle stop ........................................................................................ 188
19.3.3 Feedrate override via a machine control panel ................................................................................... 188
19.4 Data table............................................................................................................................................ 189
19.4.1 Machine/setting data ........................................................................................................................... 189
19.4.2 Interface signals .................................................................................................................................. 190
20 Tool: tool compensation (W1) .............................................................................................................................. 190
20.1 Tool and tool compensation overview ................................................................................................. 190
20.2 Tool ..................................................................................................................................................... 191
20.3 Tool offset ........................................................................................................................................... 191
20.4 Special handling of tool compensation ................................................................................................ 192
20.5 Data table............................................................................................................................................ 193
20.5.1 Machine data ...................................................................................................................................... 193
20.5.2 Interface signals .................................................................................................................................. 193
21 Contour handwheel ............................................................................................................................................. 194
22 Tool parameter: clearance angle.......................................................................................................................... 197
23 PLC axis control .................................................................................................................................................. 198
23.1 Brief description .................................................................................................................................. 198
23.2 Function interface................................................................................................................................ 198
23.2.1 User interface: Preparing the NC axis as PLC axis ............................................................................. 198
23.2.2 User interface: Functionality................................................................................................................ 199
23.2.3 Spindle positioning .............................................................................................................................. 200
23.2.4 Rotate spindle ..................................................................................................................................... 201
23.2.5 Oscillate spindle .................................................................................................................................. 202
23.2.6 Indexing axis ....................................................................................................................................... 204
23.2.7 Positioning axis metric ........................................................................................................................ 205
23.2.8 Positioning axis inch............................................................................................................................ 206
23.2.9 Positioning axis metric with handwheel override ................................................................................. 207
23.2.10 Positioning axis inch with handwheel override .................................................................................... 208
23.2.11 Rotate spindle with automatic gear stage selection ............................................................................ 209
23.2.12 Rotate spindle with constant cutting rate [m/min] ................................................................................ 210
23.2.13 Rotate spindle with constant cutting rate [feet/min] ............................................................................. 211
23.2.14 Error messages ................................................................................................................................... 212
23.3 Examples for positioning a PLC axis ................................................................................................... 213
24 Positioning axes (P2) (PPU16x.3 only)................................................................................................................. 215
24.1 Product brief........................................................................................................................................ 215
24.2 Positioning axis ................................................................................................................................... 217
24.3 Motion behavior and interpolation functions ........................................................................................ 218
24.3.1 Path interpolator and axis interpolator................................................................................................. 218
24.3.2 Autonomous singleaxis operations ..................................................................................................... 219
24.4 Positioning axis dynamic response ..................................................................................................... 222
24.5 Programming ...................................................................................................................................... 223
24.5.1 General ............................................................................................................................................... 223
24.5.2 Revolutional feed rate in external programming.................................................................................. 225
24.6 Block change ...................................................................................................................................... 225
24.6.1 Block change ...................................................................................................................................... 225

Function Manual
8 6FC5397-7EP40-0BA4, 07/2018
24.6.2 Settable block change time ................................................................................................................. 227
24.6.3 End of motion criterion with block search ............................................................................................ 230
24.7 Control by the PLC .............................................................................................................................. 230
24.8 Response with special functions ......................................................................................................... 231
24.8.1 Dry run (DRY RUN) ............................................................................................................................. 231
24.8.2 Single block ......................................................................................................................................... 231
24.9 Examples............................................................................................................................................. 231
24.10 Data table ............................................................................................................................................ 232
24.10.1 Machine data ....................................................................................................................................... 232
24.10.2 Setting data ......................................................................................................................................... 232
24.10.3 Interface signals .................................................................................................................................. 232
25 Synchronous spindle (S3) ................................................................................................................................... 233
25.1 Brief description ................................................................................................................................... 233
25.1.1 Function............................................................................................................................................... 233
25.1.2 Synchronous mode.............................................................................................................................. 234
25.1.3 Prerequisites for synchronous mode ................................................................................................... 238
25.1.4 Selecting synchronous mode for a part program ................................................................................. 239
25.1.5 Deselecting the synchronous mode for the part program .................................................................... 240
25.1.6 Controlling synchronous spindle coupling via PLC .............................................................................. 241
25.1.7 Monitoring of synchronous operation................................................................................................... 243
25.2 Programming ....................................................................................................................................... 244
25.2.1 Definition (COUPDEF)......................................................................................................................... 244
25.2.2 Switch the coupling (COUPON, COUPONC, COUPOF) on and off .................................................... 246
25.2.3 Axial system variables for synchronous spindle .................................................................................. 247
25.2.4 Automatic selection and deselection of position control ...................................................................... 248
25.3 Configuration ....................................................................................................................................... 248
25.3.1 Response of the synchronous-spindle coupling for NC Start .............................................................. 249
25.3.2 Behavior of the synchronous-spindle coupling for reset ...................................................................... 250
25.4 Points to note ...................................................................................................................................... 250
25.4.1 Special features of synchronous mode in general ............................................................................... 250
25.4.2 Restore synchronism of the coupled-motion spindle ........................................................................... 251
25.4.3 Synchronous mode and NC/PLC interface signals .............................................................................. 253
25.4.4 Differential speed between leading and coupled-motion spindles ....................................................... 255
25.4.5 Behavior of synchronism signals during synchronism correction ........................................................ 259
25.4.6 Delete synchronism correction and NC reset ...................................................................................... 259
25.4.7 Special points regarding start-up of a synchronous spindle coupling .................................................. 259
25.5 Boundary conditions ............................................................................................................................ 262
25.6 Examples............................................................................................................................................. 263
25.7 Data table ............................................................................................................................................ 263
25.7.1 Machine data ....................................................................................................................................... 263
25.7.2 Setting data ......................................................................................................................................... 264
25.7.3 Interface signals .................................................................................................................................. 264
26 Safety Integrated ................................................................................................................................................ 265
26.1 Standards and regulations................................................................................................................... 265
26.1.1 General information ............................................................................................................................. 265
26.1.1.1 Aims .................................................................................................................................................... 265
26.1.1.2 Functional safety ................................................................................................................................. 265
26.1.2 Safety of machinery in Europe ............................................................................................................ 265
26.1.2.1 Machinery Directive ............................................................................................................................. 266
26.1.2.2 Harmonized European Standards ....................................................................................................... 266
26.1.2.3 Standards for implementing safety-related controllers......................................................................... 267
26.1.2.4 DIN EN ISO 13849-1 ........................................................................................................................... 268
26.1.2.5 EN 62061 ............................................................................................................................................ 268
26.1.2.6 Series of standards EN 61508 (VDE 0803) ......................................................................................... 269
26.1.2.7 Risk analysis/assessment ................................................................................................................... 270
26.1.2.8 Risk reduction...................................................................................................................................... 271
26.1.2.9 Residual risk ........................................................................................................................................ 271
26.1.3 Machine safety in the USA .................................................................................................................. 271
26.1.3.1 Minimum requirements of the OSHA ................................................................................................... 271

Function Manual
6FC5397-7EP40-0BA4, 07/2018 9
26.1.3.2 NRTL listing ........................................................................................................................................ 272
26.1.3.3 NFPA 79 ............................................................................................................................................. 272
26.1.3.4 ANSI B11 ............................................................................................................................................ 272
26.1.4 Machine safety in Japan ..................................................................................................................... 273
26.1.5 Equipment regulations ........................................................................................................................ 273
26.2 General information about SINAMICS Safety Integrated .................................................................... 273
26.3 System features .................................................................................................................................. 274
26.3.1 Certification ......................................................................................................................................... 274
26.3.2 Safety instructions ............................................................................................................................... 274
26.3.3 Probability of failure of the safety function (PFH value)....................................................................... 275
26.3.4 Response time .................................................................................................................................... 275
26.3.5 Residual risk ....................................................................................................................................... 275
26.4 Safety Integrated basic functions ........................................................................................................ 276
26.4.1 Safe Torque Off (STO) ........................................................................................................................ 276
26.4.2 Forced dormant error detection ........................................................................................................... 278
27 Special functions ................................................................................................................................................. 278
27.1 Multi-language support for the machine manufacturer's HMI data ...................................................... 278
27.2 Calling an online help .......................................................................................................................... 280
27.2.1 The help system .................................................................................................................................. 280
27.2.2 Calling a machine manufacturer's help and manual............................................................................ 282
27.3 Calling a standard cycle with auxiliary functions ................................................................................. 286
27.4 Display function ................................................................................................................................... 287
27.5 Prog_Event function ............................................................................................................................ 289
27.6 Fast I/O ............................................................................................................................................... 290
27.7 Creating user cycles............................................................................................................................ 291
27.7.1 Creating the extended user text file..................................................................................................... 291
27.7.2 Creating the user cycle softkey index file ............................................................................................ 291
27.7.3 Creating the user cycle parameter file................................................................................................. 292
27.7.4 Creating the user cycle file .................................................................................................................. 293
27.7.5 Creating the user cycle alarm file ........................................................................................................ 295
27.7.6 Creating the user cycle bitmap file ...................................................................................................... 295
27.7.7 Transferring the desired files to the control system ............................................................................. 295
27.7.8 Calling the created user cycle ............................................................................................................. 298
27.7.9 Editing the user cycle screens ............................................................................................................ 300
27.8 Using the machine manufacturer's machine data descriptions ........................................................... 300
27.9 Using the machine manufacturer's R variable names ......................................................................... 301
27.10 Generating user dialogs using customized EasyXLanguage scripts ................................................... 302
27.10.1 Scope of functions............................................................................................................................... 302
27.10.2 Fundamentals of configuration ............................................................................................................ 303
27.10.3 Configuration files (EasyXLanguage scripts) ...................................................................................... 304
27.10.4 Structure of configuration file .............................................................................................................. 306
27.10.5 Language dependency........................................................................................................................ 306
27.10.6 XML identifier ...................................................................................................................................... 306
27.10.6.1 General structure ................................................................................................................................ 306
27.10.6.2 Instruction/identifier description ........................................................................................................... 307
27.10.6.3 System variables ................................................................................................................................. 328
27.10.6.4 Color coding ........................................................................................................................................ 329
27.10.6.5 Special XML syntax............................................................................................................................. 329
27.10.6.6 Operators ............................................................................................................................................ 329
27.10.6.7 Generating softkey menus and dialog forms ....................................................................................... 330
27.10.7 Generating user menus....................................................................................................................... 355
27.10.7.1 Creating processing cycle forms ......................................................................................................... 355
27.10.7.2 Substitution characters........................................................................................................................ 357
27.10.8 Addressing components...................................................................................................................... 358
27.10.8.1 PLC addressing .................................................................................................................................. 358
27.10.8.2 Addressing NC variables..................................................................................................................... 359
27.10.8.3 Generating NC/PLC addresses during the runtime ............................................................................. 360
27.10.8.4 Addressing drive components ............................................................................................................. 360
27.10.8.5 Addressing machine and setting data ................................................................................................. 361

Function Manual
10 6FC5397-7EP40-0BA4, 07/2018
27.10.8.6 Addressing the user data..................................................................................................................... 361
27.10.8.7 Creating typical menus in user dialogs by addressing components .................................................... 362
27.10.9 Predefined functions ............................................................................................................................ 368
27.11 Hot keys .............................................................................................................................................. 394
27.12 Playing a slide show ............................................................................................................................ 395
27.13 Defining the service planner ................................................................................................................ 397
27.14 Using the machine manufacturer's startup screen and machine logo ................................................. 399
27.15 Configuring the operating area after startup ........................................................................................ 402
27.16 CNC lock function ................................................................................................................................ 402
27.16.1 Function overview................................................................................................................................ 402
27.16.2 Requirements ...................................................................................................................................... 403
27.16.3 Restrictions.......................................................................................................................................... 403
27.16.4 Protection from manipulation ............................................................................................................... 404
27.16.5 Creating the activation file ................................................................................................................... 404
27.16.6 Importing the activation file .................................................................................................................. 405
27.16.7 Extending the CNC lock function ......................................................................................................... 407
27.16.8 Deactivating the CNC lock function ..................................................................................................... 408
27.16.9 Replacing a defective control system hardware (PPU) and/or CF card ............................................... 409
27.16.10 OEM PIN forgotten .............................................................................................................................. 410
27.16.11 Other information ................................................................................................................................. 411
27.17 Switching geometry axes..................................................................................................................... 412
27.18 Cycle protection ................................................................................................................................... 413
27.18.1 Encrypting cycle file(s)......................................................................................................................... 414
27.18.2 Handling the encrypted cycles............................................................................................................. 416
28 Licensing in the SINUMERIK 808D ADVANCED .................................................................................................. 417
28.1 Activating the optional functions .......................................................................................................... 417
28.2 Internet links ........................................................................................................................................ 419
28.3 Important licensing terms .................................................................................................................... 419
A Appendix ............................................................................................................................................................ 420

1 Fundamental safety instructions


1.1 General safety instructions
WARNING
Danger to life if the safety instructions and residual risks are not observed
If the safety instructions and residual risks in the associated hardware documentation are not observed, accidents involving
severe injuries or death can occur.
• Observe the safety instructions given in the hardware documentation.
• Consider the residual risks for the risk evaluation.

WARNING
Malfunctions of the machine as a result of incorrect or changed parameter settings
As a result of incorrect or changed parameterization, machines can malfunction, which in turn can lead to injuries or death.
• Protect the parameterization (parameter assignments) against unauthorized access.
• Handle possible malfunctions by taking suitable measures, e.g. emergency stop or emergency off.

Function Manual
6FC5397-7EP40-0BA4, 07/2018 11
1.2 Warranty and liability for application examples
Application examples are not binding and do not claim to be complete regarding configuration, equipment or any eventuality
which may arise. Application examples do not represent specific customer solutions, but are only intended to provide
support for typical tasks.
As the user you yourself are responsible for ensuring that the products described are operated correctly. Application
examples do not relieve you of your responsibility for safe handling when using, installing, operating and maintaining the
equipment.

1.3 Industrial security


Note
Industrial security
Siemens provides products and solutions with industrial security functions that support the secure operation of plants,
systems, machines and networks.
In order to protect plants, systems, machines and networks against cyber threats, it is necessary to implement – and
continuously maintain – a holistic, state-of-the-art industrial security concept. Siemens’ products and solutions constitute one
element of such a concept.
Customers are responsible for preventing unauthorized access to their plants, systems, machines and networks. Such
systems, machines and components should only be connected to an enterprise network or the Internet if and to the extent
such a connection is necessary and only when appropriate security measures (e.g. firewalls and/or network segmentation)
are in place.
For additional information on industrial security measures that may be implemented, please visit:
Industrial security (http://www.siemens.com/industrialsecurity)
Siemens’ products and solutions undergo continuous development to make them more secure. Siemens strongly
recommends that product updates are applied as soon as they are available and that the latest product versions are used.
Use of product versions that are no longer supported, and failure to apply the latest updates may increase customer’s
exposure to cyber threats.
To stay informed about product updates, subscribe to the Siemens Industrial Security RSS Feed at:
Industrial security (http://www.siemens.com/industrialsecurity)

Further information is provided on the Internet:


Industrial Security Configuration Manual (https://support.industry.siemens.com/cs/ww/en/view/108862708)

WARNING
Unsafe operating states resulting from software manipulation
Software manipulations (e.g. viruses, trojans, malware or worms) can cause unsafe operating states in your system that
may lead to death, serious injury, and property damage.
• Keep the software up to date.
• Incorporate the automation and drive components into a holistic, state-of-the-art industrial security concept for the
installation or machine.
• Make sure that you include all installed products into the holistic industrial security concept.
• Protect files stored on exchangeable storage media from malicious software by with suitable protection measures, e.g.
virus scanners.
• Protect the drive against unauthorized changes by activating the "know-how protection" drive function.

Function Manual
12 6FC5397-7EP40-0BA4, 07/2018
2 Introduction
Notations
The following notation and abbreviations are used in this documentation:
● Programmable logic control (PLC) interface signals -> IS "Signal name" (signal data)
Example: IS "Feedrate override" (DB380x.DBB0)
The variable byte is located in the "to axis" range, x stands for the axis:
– 0: axis 1
– 1: axis 2
– n: axis n+1.
● Machine data -> MD MD_NR MD_NAME (description)
e.g.: MD30300 IS_ROT_AX (rotary axis)
● Setting data -> SD SD_NR SD_NAME (description)
e.g.: SD41200 JOG_SPIND_SET_VELO (JOG velocity for the spindle)
The machine and setting data are divided into the following areas:
Range Data area Meaning
200 - 9999 $MM_ Display machine data
10,000 - 19,999 $MN_ General machine data
20,000 - 28,999 $MC_ Channel-specific machine data
30,000 - 38,999 $MA_ Axis-specific machine data
41,000 - 41,999 $SN_ General setting data
42,000 - 42,999 $SC_ Channel-specific setting data
43,000 - 43,999 $SA_ Axis-specific setting data

Explanations for the technical data


Data types:
The following data types are used in the control:
● DOUBLE
Floating-point value (64-bit value)
Input limits from +/-4.19*10-307 to +/-1.67*10308
● DWORD
Integer values (32-bit values)
Input limits from -2,147,483,648 to +2,147,483,648 (decimal); as hexadecimal value: 0000 through FFFF
● BYTE
Integer values (8-bit values)
Input limits from -128 to +127 (decimal); as hexadecimal value: 00 through FF
● BOOLEAN
Boolean value: TRUE (1) or FALSE (0)
● STRING
Consisting of max. 16 American Standard Code for Information Interchange (ASCII) characters (upper-case letters,
numbers and underscore)

Detailed explanations
● Detailed explanations for the machine/setting data and interface signals used can be found in the SINUMERIK 808D
ADVANCED Parameter Manual.
● Detailed explanations of the alarms which may occur can be found in the SINUMERIK 808D ADVANCED Diagnostics
Manual.

Function Manual
6FC5397-7EP40-0BA4, 07/2018 13
3 Various interface signals (A2)
3.1 General
Brief description
This chapter describes the functionality of various interface signals which are of general relevance, but are not described in
the function-specific chapters.

Interfaces
The exchange of signals and data between the PLC user program and the NCK (numerical control kernel) or HMI (display
unit) is performed via various data areas. The PLC user program does not have to handle the exchange of data and signals.
From the user's point of view, this takes place automatically.
PLC/NCK interface:

Cyclic signal exchange


The control and status signals of the PLC/NCK interface are updated cyclically.
The signals can be subdivided into the following groups (see previous figure):
● General signals
● Operating mode signals
● Channel signals
● Axis/spindle signals

Notes on the PLC interface signal address representation


Currently, PLC interface signal addresses are represented by the V structure on the HMI while the manual shows them by
the DB structure.

Function Manual
14 6FC5397-7EP40-0BA4, 07/2018
See the following table for the relationship between the two representations.
V Structure DB Structure
Access Example Example Access
Bit V38000002.1 DB3800.DBX2.1 Bit
Byte VB38000002 DB3800.DBB2 Byte
Word VW38000002 DB3800.DBW2 Word
Double Word VD38000004 DB3800.DBD4 Double word

3.2 Signals from PLC to NCK


3.2.1 Access authorization

Access authorization
Access to programs, data, and functions is user-oriented and controlled via protection levels. The control system provides a
concept of access levels for enabling data areas. You can view such information from the table below:
Access level Default password Target group
Siemens (level 0) - Reserved for Siemens
Manufacturer (level 1) SUNRISE Machine manufacturers
Reserved (level 2) - -
End user (levels 3-6) CUSTOMER End users
No password (level 7) - End users
This provides a multi-level safety concept for controlling access rights.
Reference:
SINUMERIK 808D ADVANCED Commissioning Manual, Section: Setting the password

3.2.2 General signals

Delete distance-to-go (DB3200.DBX6.2)


IS "Delete distance-to-go (channel specific)" is only active for path axes.
With the rising edge of the interface signal, the distances-to-go of all axes in the geometry grouping are deleted and thus
brought to a standstill with ramp stop. Then the next program block is started.

Axis/spindle disable (DB380x.DBX1.3)


IS "Axis/spindle disable" can be used for test purposes.
Axis disable (for axis):
If IS "Axis disable" is output - for this axis - no more position partial setpoints are output to the position controller; the axis
travel is therefore disabled. The position control loop 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. IS "RESET" (DB3000.DBX0.7) sets
the position actual value display 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 cancelled 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.
Spindle disable (for spindle):
If IS "Spindle disable" is set, no more speed setpoints are output to the speed controller in openloop 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. The spindle disable is cancelled via "Reset" or
program end (M2) and program restart. If interface signal "Spindle disable" is set while a spindle is turning, the spindle is
stopped according to its acceleration characteristic.

Function Manual
6FC5397-7EP40-0BA4, 07/2018 15
Deactivation:
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 present). The new movement begins with new specified setpoints. (E.g. new program
block with movement specifications in "AUTO" operating mode.)
Note: actual values vary between simulated and real axis!

Follow-up mode (DB380x.DBX1.4)


If an axis/spindle is operating in follow-up mode, its setpoint position is made to track the current actual value position. The
position setpoint in follow-up mode is not defined by the interpolator but derived from the actual position value. Since
recording of the actual position value of the axis continues, it is not necessary to re-home the axis when follow-up mode is
cancelled.
Standstill, clamping and positioning monitoring are not effective in follow-up mode.
Effect:
The IS "Follow-up mode" is only of relevance if the drive controller enable has been removed (e.g. by IS "drive enable" = 0
signal or because of a fault in the control system), or because drive enable is being re-issued.
IS "Follow-up mode" = 1:
If "Drive enable" is removed the position setpoint of the relevant axis is continuously corrected to the actual value. This state
is signaled to the PLC by means of IS "Follow-up mode active" (DB390x.DBX1.3). If the "drive enable" is enabled again and
a part program is active, a control internal re-positioning operation is initiated (REPOSA: linear approach with all axes) to the
last programmed position. Otherwise, the axis movement starts at the new actual position (which may have changed).
IS "Follow-up mode" = 0:
If "Drive enable" is removed, the old position setpoint is maintained. If the axis is pushed out of position, a following error
between position setpoint and actual value results which is corrected when IS "drive enable" is set. The axis movement
starts from the setpoint position valid before the "drive enable" was removed. IS "Followup mode active" (DB390x.DBX1.3) is
set to 0 signal during the "Hold" state. Clamping or standstill monitoring is active.

Position measuring system 1 (DB380x.DBX1.5)


A position measuring system may be connected to the spindle. In this case the signal for the spindle has to be set.
Axes always require this signal. In this case, a position measuring system must be installed.

Drive enable (DB380x.DBX2.1)


When the drive enable is activated for the drive, the position control loop of the axis/spindle is closed. The axis/spindle is
then subject to position control.
When the drive enable is removed the position control loop and, with a delay, the speed control loop of the axis/spindle are
opened.
IS "Position controller active" (DB390x.DBX1.5) is set to 0 signal (checkback).
Activation:
The drive enable for the drive can be set and removed from the following places:
1. From the PLC user program with interface signal "Drive enable" (in normal cases)
Application: Removal of drive enable before clamping an axis/spindle.
2. The drive enable is cancelled internally by the control when certain faults occur in the machine, the drive, the position
measuring system or the control (when faults occur)
Application: The traversing axes must be brought to a standstill by a rapid stop due to a fault.
3. By the control if the following event occurs: IS "EMERGENCY STOP" (DB2600.DBX0.1) is active
Removal of drive enable for a moving axis/spindle:
● The spindle is braked to standstill with rapid stop taking account of MD36610 AX_EMERGENCY_STOP_TIME (duration
of the braking ramp in error states). Alarm 21612 "Controller enable reset during movement" is then triggered.
● The position control loop of the axis/spindle is opened. Checkback signal to PLC with IS "Position controller active"
(DB390x.DBX1.5) = 0 state. The timer for the drive enable delay time (MD36620 SERVO_DISABLE_DELAY_TIME
(shutdown delay of drive enable)) is also started.

Function Manual
16 6FC5397-7EP40-0BA4, 07/2018
● As soon as the actual speed has reached the zero speed range, the drive controller enable is removed. Checkback
signal to PLC with IS "Speed controller active" (DB390x.DBX1.6) = 0 state. The drive enable of the drive is removed at
the latest after the time set in MD36620 SERVO_DISABLE_DELAY_TIME has expired.
● Notice: If the setting for the drive enable shutdown delay is too small the drive enable will be removed even though the
axis/spindle is still moving. The axis/spindle is then stopped abruptly with setpoint 0.
● The actual position value of the axis/spindle continues to be acquired by the control.
This axis/spindle state cannot be changed until after "Reset".
Interpolatory axis grouping:
All the axes traversing within the interpolatory axis grouping are stopped as soon as the drive enable signal is cancelled for
one of the axes.
The axes are brought to a standstill as described above. All axes in the geometry grouping are brought to a standstill with
rapid stop. Alarm 21612 "Controller enable reset during movement" is also triggered. Continued processing of the NC
program after this event is no longer possible.

3.2.3 Signals for digital drives, to axis/spindle

Speed controller integrator disabled (DB380x.DBX4001.6)


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.

Pulse enable (DB380x.DBX4001.7)


The PLC user program enables the pulses for the axis/spindle. However, the pulse enable is only activated for the drive
module if all the enable signals are present.

3.3 Signals from NCK to PLC


3.3.1 General signals

Drives in cyclic operation (DB2700.DBX2.5)


The PLC is signaled via the NCK by means of a cyclical exchange of data that the available drives have reached ramp-up
status.

Drive ready (DB2700.DBX2.6)


The PLC is signaled via NCK that all available drives are ready to operate. IS "Drive Ready" (group signal) is active on all
axes and spindles.

NCK alarm is active (DB2700.DBX3.0)


The control sends this signal to the PLC to indicate that at least one NCK alarm is active. An enquiry can be made via the
channel-specific interface (DB3300.DBX4.7) as to whether a processing stop has been triggered.

Ambient temperature alarm (DB2700.DBX3.6)


The ambient temperature or fan monitoring function has responded.

NCK alarm channel-specific active (DB3300.DBX4.6)


The control system sends this signal to the PLC to indicate that at least one NCK alarm is active for the channel. To what
extent this may influence whether the current program run will be interrupted or aborted can be determined from IS "NCK
alarm with processing stop is active" (DB3300.DBX4.7).

External language mode active (DB3300.DBX4001.0)


The control system sends this signal to the PLC to indicate that the active program language used for the part program is not
a SIEMENS language. A language changeover has been made with G291.

Function Manual
6FC5397-7EP40-0BA4, 07/2018 17
NCK alarm with processing stop present (DB3300.DBX4.7)
The control 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 active for the channel.

Follow-up active (DB390x.DBX1.3)


Follow-up mode for this axis is active.
See Section: Signals from PLC to NCK, follow-up mode (Page 15) (DB380x.DBX1.4)

Axis/spindle stationary (DB390x.DBX1.4)


The current velocity of the axis or actual speed of the spindle is within the range which is defined as standstill. This range is
defined with MD36060 STANDSTILL_VELO_TOL (maximum velocity/speed for signal "Axis/spindle stationary").

Position control active (DB390x.DBX1.5)


The position control loop for the axis/spindle is closed; the position control function is active.
For details, see Controller enable (Page 15).

Speed control active (DB390x.DBX1.6)


The speed control loop for the axis/spindle is closed; the speed control function is active.
For details, see Controller enable (Page 15).

Current control active (DB390x.DBX1.7)


The current control loop for the axis/spindle is closed; the current control function is active.

Lubrication pulse (DB390x.DBX1002.0)


The IS "Lubrication pulse" is sent by the NCK and changes status once the axis/spindle has traveled a greater distance than
that set in MD33050 LUBRICATION_DIST (travel distance for lubrication from PLC)

3.3.2 Signals for digital drives, from axis/spindle

Drive ready (DB390x.DBX4001.5)


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

Integrator for n-controller disabled (DB390x.DBX4001.6)


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

Pulse enabled (DB390x.DBX4001.7)


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

Ramp-up procedure completed (DB390x.DBX4002.2)


This signal confirms that the actual speed value has reached the new setpoint allowing for the tolerance band set in the drive.
The ramp-up procedure is thus completed. Any subsequent speed fluctuations due to load changes will not affect the
interface signal.

3.4 Signals from PLC to HMI


OP key disable (DB1900.DBX5000.2)
IS "OP key disable" can be applied to disable (1 signal) or enable (0 signal) the connected keyboard.

Program number (DB1700.DBB1000)


A declared program number is transferred from the PLC to HMI if an NC program is selected by the PLC. The current NC
program selected can be stored via the command interface (see DB1700.DBB1001) and also selected again.

Function Manual
18 6FC5397-7EP40-0BA4, 07/2018
A program with the program name (STRING) is administered. In the assignment list, the names for a maximum of 255
programs can be declared and assigned.
The use of the numbers is divided into the protection areas of the programs:
● 1 to 100: User area (end user protection level)
● 101 to 200: Machine manufacturer (machine manufacturer protection level)
● 201 to 255: SIEMENS (SIEMENS protection level)
"Program number" (DB1700.DBB1000) corresponds to the following IS:
● "Program has been selected" (DB1700.DBX2000.0)
● "Program selection error" (DB1700.DBX2000.1).
When a program number > 0 is written, the program selection is started by the PLC. As soon as the HMI detects a program
number > 0, it begins with the internal processing of this job and sets the program number (DB1700.DBB1000) to 0.
PLC waits until the acknowledgement signal from HMI is received: DB1700.DBX2000.0 or DB1700.DBX2000.1 and
evaluates this immediately. The acknowledge signals are available for one PLC cycle once they have been received and are
then automatically deleted by the PLC operating system.

Command (DB1700.DBB1001)
A command job is transferred from the PLC to the HMI.
Command Action
0 None
1 Save name of the selected program
2 Select program with saved program name
"Command" (DB1700.DBB1001) corresponds to the following IS:
● "Execute command" (DB1700.DBX2001.0)
● "Command execution error" (DB1700.DBX2001.1)
When a command > 0 is written, the job is started by the PLC. As soon as the HMI detects a command > 0, it begins with
the internal processing of this job and sets the command (DB1700.DBB1001) to 0.
PLC waits until the acknowledgement signal has been reached by HMI: DB1700.DBX2001.0 or DB1700.DBX2001.1 and
evaluates this immediately. The acknowledgement signals are available for one PLC cycle once they have been received
and are then automatically deleted by the PLC operating system.

3.5 Signals from HMI to PLC


Program has been selected (DB1700.DBX2000.0)
Successful selection of the required NC program is signaled back from the HMI to the PLC. This signal is available for one
PLC cycle. It corresponds with DB1700.DBB1000.

Program selection error (DB1700.DBX2000.1)


Failed selection of the required NC program is signaled back from the HMI to the PLC. This signal is available for one PLC
cycle. It corresponds with DB1700.DBB1000.

Execute command (DB1700.DBX2001.0)


Successful execution of the required command is signaled back from the HMI to the PLC. This signal is available for one
PLC cycle. It corresponds with DB1700.DBB1001.

Command execution error (DB1700.DBX2001.1)


Failed execution of the required command is signaled back from the HMI to the PLC. This signal is available for one PLC
cycle. It corresponds with DB1700.DBB1001.

Function Manual
6FC5397-7EP40-0BA4, 07/2018 19
3.6 User interface
3.6.1 General (OF)
Communication jobs can be performed via the "NC services" PLC/NCK interface. The following services are available for
this:
● Start program invocation services (PI services) in the NCK area (e.g. asynchronous subroutine (ASUP))
● Read variables from the NCK area
● Write variables from the NCK area
The activation of the respective service is performed via the global part of the interface. The parameterization of the
individual services is described below.

Job, global part


Only one service can run at a time. The service is selected via DB1200.DBX0.1 and DB1200.DBX0.2:
Service DB1200.DBX0.2 DB1200.DBX0.1
Start PI service in the NCK area 1 0
Read variables from the NCK area 0 0
Write variables from the NCK area 0 1
Start:
A job is started by setting the signal DB1200.DBX0.0 = 1. A new job can only be started if the previous job has been
completed, i.e. the acknowledgement signals ("Job completed" DB1200.DBX2000.0 and "Error in job" DB1200.DBX2000.1)
must be zero.
The execution of a job may take several PLC cycles and vary depending on the utilization; thus, this function is not real-time-
capable.

Note
A job already started cannot be cancelled. If the "Start" signal is inadvertently reset before receiving the acknowledgement,
the result signals for this job are not refreshed; the job, however, is executed.

Job, global part


The results are written by the PLC operating system; therefore, these signals can only be written by the user.
If the job was completed without errors, the "Job completed" signal DB1200.DBX2000.0 is set to 1. If an error occurs while
executing a read/write job, the "error in job" signal DB1200.DBX2000.1 is set.
The result signals in DB1200.DBB2000 are global bits for the whole job. Possible error causes can be here, e.g.:
● Number of variables (DB1200.DBX1) outside of the valid range
● Variable index (DB1200.DBX1000) outside of the valid range
After evaluating the result, the "Start" signal (DB1200.DBX0.0) is reset by the user. The PLC operating system then resets
"Job completed" or "Error in job".
Pulse diagram:

Function Manual
20 6FC5397-7EP40-0BA4, 07/2018
Explanations regarding the pulse diagram:
1. Starting of the job by setting "Start" ("Job completed" and "Error in job" must be reset)
2. Job completed without errors (the results of the individual variables must still be evaluated)
3. Resetting "Start" after receiving the result
4. Signal change by PLC operating system
5. If the "Start" signal is reset inadvertently before receiving the result, the output signals are not refreshed without influence
on the internal execution of the function triggered
6. Error in job

3.6.2 PI service ASUP


The PI service ASUP function means the execution of PLCASUP1.SPF or PLCASUP2.SPF called by the PLC. The control
system provides two default ASUPs for the PLC.

Initialization
You can also customize these two ASUPs by assigning the interrupt numbers 1 and 2 fixed program names from the PLC.
Prerequisite for this is the existence of the PLCASUP1_SPF or PLCASUP2_SPF programs in the CMA directory.
PI index Function
DB1200.DBB4001 = 1 Assignment of Interrupt 1 to the CMA_DIR/PLCASUP1_SPF program.
The interrupt has Priority 1.
DB1200.DBB4001 = 2 Assignment of Interrupt 2 to the CMA_DIR/PLCASUP2_SPF program.
The interrupt has Priority 2.
The following must be taken into account during the initialization:
● The PI service ASUP requires executing only once after a restart and is then retained.
● An initialization may only be performed when the channel is not active.
● If a "Ramp-up" program event has been configured, the initialization may only be started after the end of the program
event.

Relevant interface signals


Address Name Valid values
Job DB1200.DBX4000.0 Start 0/1
DB1200.DBX4000.1 Write variable 0
DB1200.DBX4000.2 PI service 1
DB1200.DBB4001 PI index 1,2
Result DB1200.DBX5000.0 Request completed 0/1
DB1200.DBX5000.1 Error in job 0/1

3.6.3 Reading variables from the NCK area


1 to 8 values can be read with a read job (variable x: 0...7). There is a variable-specific part of the interface for this:
● Job: DB120x.DBB1000
● Result: DB120x.DBB3000

Job, variable-specific part


NC variable:
The NC variable is selected in the variable index (DB120x.DBB1000) (see Section "NC variable (Page 23)").
Area number, column / line index (DB120x.DBB1001 ... DB120x.DBB1005)
Various variables are declared as fields. For flexible addressing, the relevant field index must be specified as a column
and/or line index (e.g. R parameter no.).

Function Manual
6FC5397-7EP40-0BA4, 07/2018 21
Values:
The range DB120x.DBB1008 ... 11 is not relevant for reading.

Result, variable-specific part


A result is reported for each variable in the job.
If the read process was successful, "Variable valid" (DB120x.DBX3000.0) is set to 1; the access result DB120x.DBB3001 is
0.
When reading, the data from DB120x.DBB3004 are entered type-specifically.
In case of error, DB120x.DBX3000.0 remains "0", and an entry is made in the access result DB120x.DBB3001:
● 0: No error
● 3: Illegal access to object
● 5: Invalid address
● 10: Object does not exist
Values:
When reading, the read data are in the range DB120x.DBB3004...7, in the data type specific for the respective variable (if
required, the values are converted from 64-bit to 32-bit REAL).

Relevant interface signals


Address Name Valid values
Job, global part DB1200.DBX0.0 Start 0/1
DB1200.DBX0.1 Write variable 0
DB1200.DBX0.2 PI service 0
DB1200.DBB1 Number of variables 1 ... 8
Job, variable-specific part DB120x.DBB1000 Variable index See Section "NC
DB120x.DBB1001 Area number variable (Page 23)"

DB120x.DBB1002 Line index, NCK variable


DB120x.DBB1004 Column index, NCK variable
Job, global part DB1200.DBX2000.0 Request completed 0/1
DB1200.DBX2000.1 Error in job 0/1
Result, variable-specific part DB120x.DBX3000.0 Invalid variable 0/1
DB120x.DBB3001 Access result 0/3/5/10
DB120x.DBB3004/ Value of NCK variable, data type de- See Section "NC
DB120x.DBW3004/ pends on variable index variable (Page 23)"
DB120x.DBD3004

3.6.4 Writing variables from the NCK area


1 to 8 values can be written with a write job (variable x: 0...7). There is a variable-specific part of the interface for this:
● Job: DB120x.DBB1000
● Result: DB120x.DBB3000

Job, variable-specific part


NC variable:
The NC variable is selected in the variable index (DB120x.DBB1000) (see Section "NC variable (Page 23)").
Area number, column / line index (DB120x.DBB1001 ... DB120x.DBB1005)
Various variables are declared as fields. For flexible addressing, the relevant field index must be specified as a column
and/or line index (e.g. R parameter no.).

Function Manual
22 6FC5397-7EP40-0BA4, 07/2018
Values:
The values to be written must be entered in the range DB120x.DBB1008...11 in the data type specific for the appropriate
variable.
If necessary, the values are converted (e.g. NCL floating-point values (64-bit) into the PLC format (32-bit) and vice versa). A
loss of accuracy results from the conversion from 64-bit to 32-bit REAL. The maximum accuracy of 32-bit REAL numbers is
approximately 107.

Result, variable-specific part


A result is reported for each variable in the job.
If the read process was successful, "Variable valid" (DB120x.DBX3000.0) is set to 1; the access result DB120x.DBB3001 is
0.
When reading, the data as of DB120x.DBB3004 is entered type-specifically.
In case of error, DB120x.DBX3000.0 remains "0", and an entry is made in the access result DB120x.DBB3001:
● 0: No error
● 3: Illegal access to object
● 5: Invalid address
● 10: Object does not exist
Values:
The range DB120x.DBB3004...07 is not relevant for writing.

Relevant interface signals


Address Name Valid values
Job, global part DB1200.DBX0.0 Start 0/1
DB1200.DBX0.1 Write variable 1
DB1200.DBX0.2 PI service 0
DB1200.DBB1 Number of variables 1 ... 8
Job, variable-specific part DB120x.DBB1000 Variable index See Section "NC
DB120x.DBB1001 Area number variable (Page 23)"

DB120x.DBB1002 Line index, NCK variable


DB120x.DBB1004 Column index, NCK variable
DB120x.DBB3004/ Value of NCK variable, data type de-
DB120x.DBW3004/ pends on variable index
DB120x.DBD3004
Job, global part DB1200.DBX2000.0 Request completed 0/1
DB1200.DBX2000.1 Error in job 0/1
Result, variable-specific part DB120x.DBX3000.0 Invalid variable 0/1
DB120x.DBB3001 Access result 0/3/5/10

3.7 NC variable
Variable cuttEdgeParam
Compensation value parameters and cutting edge list with D numbers for a tool.
The meanings of the individual parameters depend on the type of the tool in question. Currently, totally 25 parameters are
reserved for each tool edge (but only a part of them is loaded with values). To be able to remain flexible for future extensions,
it is not recommended to use a fixed value of 25 parameters for calculation, but the variable value 'numCuttEdgeParams'
(variable index 2).

Function Manual
6FC5397-7EP40-0BA4, 07/2018 23
For a detailed description of the tool parameters, please refer to Chapter "Tool Offset (Page 191)".
Variable cuttEdgeParam [r/w]
DB120x.DBB1000 1
DB120x.DBB1001 -
DB120x.DBW1002 (EdgeNo - 1) * numCuttEdgeParams + ParameterNo (WORD)
DB120x.DBW1004 T number (1...32000) (WORD)
DB120x.DBD1008 Write: Data to NCK variable x (data type of the variables: REAL)
DB120x.DBD3004 Read: Data from NCK variable x (data type of the variables: REAL)

Variable numCuttEdgeParams
Number of P elements of an edge
Variable numCuttEdgeParams [r]
DB120x.DBB1000 2
DB120x.DBB1001 -
DB120x.DBW1002 -
DB120x.DBW1004 -
DB120x.DBD1008 -
DB120x.DBW3004 Read: Data from NCK variable x (data type of the variables: WORD)
Variable linShift
Translation of a settable work offset (channel-specific settable frames)
They only exist if MD18601 MM_NUM_GLOBAL_USER_FRAMES > 0.
There are the frame indices:
● 0: ACTFRAME = current resulting work offset
● 1: IFRAME = current settable work offset
● 2: PFRAME = current programmable work offset
● 3: EXTFRAME = current external work offset
● 4: TOTFRAME = current total work offset = total of ACTFRAME and EXTFRAME
● 5: ACTBFRAME = current total base frame
● 6: SETFRAME = current 1st system frame (PRESET, scratching)
● 7: EXTSFRAME = current 2nd system frame (PRESET, scratching)
● 8: PARTFRAME = current 3rd system frame (TCARR and PAROT with orientable tool carrier)
● 9: TOOLFRAME = current 4th system frame (TOROT and TOFRAME)
● 10: MEASFRAME = result frame for workpiece and tool gauging
● 11: WPFRAME = current 5th system frame (workpiece reference points)
● 12: CYCFRAME = current 6th system frame (cycles)
The max. frame index is 12.
The value of numMachAxes is contained in the variable with variable index 4.
Variable linShift [r]
DB120x.DBB1000 3
DB120x.DBB1001 -
DB120x.DBW1002 Frame index * numMachAxes + axis number
DB120x.DBW1004 -
DB120x.DBD1008 -
DB120x.DBD3004 Read: Data from NCK variable x (data type of the variables: REAL)

Function Manual
24 6FC5397-7EP40-0BA4, 07/2018
Variable numMachAxes
No. of the highest existing channel axis
If there are no gap between channels, this corresponds to the number of existing axes in the channel.
Variable numMachAxes [r]
DB120x.DBB1000 4
DB120x.DBB1001 -
DB120x.DBW1002 -
DB120x.DBW1004 -
DB120x.DBD1008 -
DB120x.DBW3004 Read: Data from NCK variable x (data type of the variables: WORD)

Variable rpa
R parameters
Variable rpa [r/w]
DB120x.DBB1000 5
DB120x.DBB1001 -
DB120x.DBW1002 R number + 1
DB120x.DBW1004 -
DB120x.DBD1008 Write: Data to NCK variable x (data type of the variables: REAL)
DB120x.DBD3004 Read: Data from NCK variable x (data type of the variables: REAL)

Variable actLineNumber
Line number of the current NC block:
● 0: Prior to program start
● -1: Not available due to error
● -2: Not available due to DISPLOF
Variable actLineNumber [r]
DB120x.DBB1000 6
DB120x.DBB1001 -
DB120x.DBW1002 -
DB120x.DBW1004 -
DB120x.DBD1008 -
DB120x.DBD3004 Read: Data from NCK variable x (data type of the variables: DINT)

3.8 Signals from PLC


Commissioning mode
The ramp-up modes are signaled via bit 0 and bit 1 (DB1800.DBB1000) in the user interface.
Commissioning mode DB1800.DBX1000.1 DB1800.DBX1000.0
Normal rampup 0 0
Ramp-up with default values 0 1
Ramp-up with saved data 1 0

Function Manual
6FC5397-7EP40-0BA4, 07/2018 25
4 Axis monitoring (A3)
4.1 Overview of monitoring functions
Overview of monitoring functions
● Motion monitoring functions
– Contour monitoring
– Position monitoring
– Standstill monitoring
– Clamping monitoring
– Speed setpoint monitoring
– Actual velocity monitoring
– Encoder monitoring functions
● Monitoring of static limits
– Limit switch monitoring

4.2 Running monitoring


4.2.1 Contour monitoring

Function
The principle on which the contour monitoring function works is the constant comparison of the measured actual position
value with that calculated from the NC position setpoint. For the precalculation of the following error, a model is used that
simulates the dynamics of the position control including feedforward control.
So that the monitoring function does not respond incorrectly on slight speed fluctuations (caused by changes of load) a
tolerance band is allowed for the max. contour deviation.
If the permissible actual value deviation entered in MD36400 CONTOUR_TOL (tolerance band contour monitoring) is
exceeded, an alarm is signaled and the axes are stopped.

Effectiveness
Contour monitoring is active for axes and position-controlled spindles.

Effect
If the contour deviation is too large, this has the following effect:
● Alarm 25050 "Contour monitoring" is triggered
● The axis/spindle is brought to a standstill via a speed setpoint ramp with rapid stop (with open position control loop).
The braking ramp time is set in MD36610 AX_EMERGENCY_STOP_TIME (braking ramp time for error states).
● If the axis/spindle is involved in interpolation with other axes/spindles, these are brought to a standstill with rapid stop
with following error reduction (position setpoint = 0).

Remedy
● Increase tolerance band of monitoring in MD36400
● The actual "servo gain factor" must correspond to the desired servo gain factor set via MD32200 POSCTRL_GAIN
(servo gain factor). With analog spindles: MD32260 RATED_VELO (rated motor speed) and MD32250 RATED_OUTVAL
(rated output voltage) must be checked.
● Check optimization of the speed controller
● Check smooth running of the axes
● Check machine data for traversing movements (feed override, acceleration, max. speeds, ... )

Function Manual
26 6FC5397-7EP40-0BA4, 07/2018
4.2.2 Position monitoring

Function
In order to ensure that an axis reaches the required position within the specified time, the timer that can be configured in
MD36020 POSITIONING_TIME (time delay exact stop
fine) is started at the end of each motion block (setpoint has reached target) and, when the timer runs out, a check made to
ascertain whether the axis has reached its setpoint within
the tolerance of MD36010 STOP_LIMIT_FINE (exact stop fine).
For details on "Exact stop coarse and fine" see Chapter "Continuous Path Mode, Exact Stop and Look-Ahead (Page 33)"
Relation between position, standstill, and clamping monitoring:

Effectiveness
Positioning monitoring is always activated after the termination of motion blocks "according to the setpoint" (setpoint has
reached destination).
Position monitoring is active for axes and position-controlled spindles.

Deactivation
When the programmed "Exact stop limit fine" has been reached or a new setpoint has been output (e.g. for positioning
according to "Exact stop coarse" followed by a block change), the position monitoring is deactivated.

Effect
If the limit value for "Exact stop fine" has not yet been reached when the positioning monitoring time has elapsed, the
following action is performed:
● Output of alarm 25080 "Positioning monitoring"
● The affected axis/spindle is brought to a standstill using a rapid stop (with open position control loop) along a speed
setpoint ramp.
The braking ramp duration is set in
MD36610 AX_EMERGENCY_STOP_TIME (braking ramp duration for error states).
● If the axis/spindle is involved in interpolation with other axes/spindles, these are stopped using a rapid stop with following
error reduction (default for partial position setpoint = 0).

Cause of error/Remedy
● Position controller gain too low --> change machine data for position controller gain
MD32200 POSCTRL_GAIN (servo gain factor)

Function Manual
6FC5397-7EP40-0BA4, 07/2018 27
● Positioning window (exact stop fine), position monitoring time, and position controller gain have not been coordinated -->
change machine data:
MD36010 STOP_LIMIT_FINE (exact stop fine),
MD36020 POSITIONING_TIME (exact stop fine delay time),
MD32200 POSCTRL_GAIN (servo gain factor)

Rule of thumb
● Positioning window large --> max. position monitoring time can be set to a relatively short value
● Positioning window small --> max. position monitoring time must be set to a relatively long value
● Position controller gain low --> max. position monitoring time must be set to a relatively long value
● Position controller gain high --> max. position monitoring time can be set to a relatively short value

Note
The size of the positioning window affects the block change time. The smaller the tolerances that are selected, the longer
the positioning action will take, which in turn means a longer time before the next command can be executed.

4.2.3 Standstill monitoring

Function
At the end of a motion block (position setpoint has reached target), a check is made as to whether the axis is not more than
the distance specified in MD36060 STANDSTILL_POS_TOL (standstill tolerance) away from its setpoint after the
configurable delay time in MD36040 STANDSTILL_DELAY_TIME (standstill monitoring delay time) has expired. Otherwise,
an alarm will be triggered.

Effectiveness
Standstill monitoring is always active after "Standstill monitoring delay time" active has expired, as long as no new travel
command is present.
Standstill monitoring is active on axes and position-controlled spindles.

Effect
When the monitoring function responds, it has the following effects:
● Alarm 25040 "Standstill monitoring" is triggered
● The affected axis/spindle is brought to a standstill with rapid stop (with open position control loop) along a speed setpoint
ramp. The braking ramp time is set in
MD36610 AX_EMERGENCY_STOP_TIME (duration of the braking ramp for error states).
● If the axis/spindle is involved in interpolation with other axes/spindles, these are stopped by rapid stop with following
error reduction (default for position partial setpoint = 0).

Cause of error / remedy


● Position control gain too high (control loop oscillation) --> change machine data for control gain MD32200
POSCTRL_GAIN (servo gain factor)
● Standstill window too small --> change machine data
MD36030 STANDSTILL_POS_TOL (standstill tolerance)
● Axis is mechanically "pushed" out of position --> eliminate cause

4.2.4 Clamping monitoring

Function
If the axis must be clamped once it has been positioned, the clamping monitoring function can be activated via IS "Clamping
in progress" (DB380x.DBX2.3).
This may be necessary as the axis can be forced further from the setpoint than the standstill tolerance permits during the
clamping process. The amount by which the axis may leave the command position is specified in MD36050
CLAMP_POS_TOL (clamping tolerance for interface signal "Clamping active").

Function Manual
28 6FC5397-7EP40-0BA4, 07/2018
Effectiveness
Clamping monitoring is activated by the interface signal "Clamping active". It replaces standstill monitoring during clamping.
Clamping monitoring is active on axes and position-controlled spindles.

Effect
If the axis is pushed out of position beyond the clamping tolerance during clamping the following occurs:
● Alarm 26000 "Clamping monitoring" is triggered
● The affected axis/spindle is brought to a standstill with rapid stop (with open position control loop) along a speed setpoint
ramp. The braking ramp time is set in
MD36610 AX_EMERGENCY_STOP_TIME (duration of the braking ramp for error states).
● If the axis/spindle is assigned to an interpolatory grouping with other axes/spindles, then these are also braked by rapid
stop with following error reduction (default for partial position setpoint = 0).

4.2.5 Speed setpoint monitoring

Function
Speed setpoint monitoring checks whether the setpoint specification does not exceed the maximum permissible drive speed
in MD 36210 CTRLOUT_LIMIT (maximum speed setpoint). If required, the speed is limited to this value and the axis/spindle
stopped and an alarm output.
The maximum speed for the axes (in percent) exceeds the speed at which the velocity in MD32000 MAX_AX_VELO is
reached (100%). This also determines the control margin.
On an analog spindle the maximum speed that can be output must not exceed the speed reached at the maximum setpoint
output voltage of 10 V (100%).
The speed setpoint consists of the speed setpoint of the position controller and the feedforward control parameter (if
feedforward control is active).
Speed setpoint calculation:

Effectiveness
Speed setpoint monitoring is always active for axes and spindles.

Effect
The following occurs if the maximum speed setpoint value is exceeded:
● Alarm 25060 "Speed setpoint limiting" is triggered
● The affected axis/spindle is brought to a standstill using a rapid stop (with open position control loop) along a speed
setpoint ramp.
The braking ramp duration is set in MD36610 AX_EMERGENCY_STOP_TIME (braking ramp duration for error states).
● If the axis/spindle is involved in interpolation with other axes/spindles, these are stopped using a rapid stop with following
error reduction (default for partial position setpoint = 0).

Function Manual
6FC5397-7EP40-0BA4, 07/2018 29
Note
In the machine manufacturer protection level, MD36220 CTRLOUT_LIMIT_TIME can be used to set a delay time, after
the expiration of which an alarm is output and the axes are brought to a standstill. The default value of this time is zero.

Using speed setpoint limiting will turn the control loop into a non-linear control loop. This generally causes contour deviations
if speed setpoint limiting is continued for an axis. A control margin must therefore be set.

Causes of errors
● A measuring circuit error or drive error is present.
● Setpoints are too high (accelerations, velocities, reducing factors).
● Obstacle in work area (e.g. positioning on a working table)
● Tachogenerator compensation has not been performed correctly for an analog spindle, or a measuring circuit error or
drive error is present.

4.2.6 Actual velocity monitoring

Function
This function monitors whether the actual velocity exceeds a permissible limit entered in MD36200 AX_VELO_LIMIT
(threshold value for velocity monitoring).

Effectiveness
The actual velocity monitor is operative whenever the active measuring circuit activated via "Position measuring system 1"
interface signal (DB380x.DBX1.5) is supplying actual values, i.e. still operating below the limit frequency.
The actual velocity monitoring is active for axes and spindles.

Effect
If the "Threshold for velocity monitoring" is exceeded the following occurs:
● Alarm 25030 "Actual velocity alarm limit" is triggered
● The affected axis/spindle is brought to a standstill with rapid stop (with open position control loop) along a speed setpoint
ramp. The braking ramp time is set in MD36610 AX_EMERGENCY_STOP_TIME (duration of the braking ramp for error
states).
● If the axis/spindle is assigned to an interpolatory grouping with other axes/spindles, then these are also braked by rapid
stop with following error reduction (default for partial position setpoint = 0).

Troubleshooting tips
● Check actual values
● Check position control direction (control sense)
● Check MD36200 AX_VELO_LIMIT (threshold value for velocity monitoring)
● Check signal setpoint cable for analog spindles

4.3 Static limitation monitoring


4.3.1 Limit switch monitoring
Overview of travel limits of a linear axis:

Function Manual
30 6FC5397-7EP40-0BA4, 07/2018
4.3.2 Hardware limit switches

Function
Every axis has a hardware (HW) limit switch for each traversing direction, which prevents the slide from moving out of the
slide bed.
If the hardware limit switch is crossed, the PLC signals this to the NC via IS "Hardware limit switch plus/minus"
(DB380x.DBX1000.1 or .0) and the movement of all axes is stopped. The braking method can be specified via MD36600
BRAKE_MODE_CHOICE (braking behavior at hardware limit switch).

Effectiveness
HW limit switch monitoring is active after the control has started up in all modes.

Effect
● When a hardware limit switch is passed in either direction, alarm 21614 "Hardware limit switch + or -" is triggered.
● The axis is stopped according to the setting in MD36600 BRAKE_MODE_CHOICE (braking behavior at hardware limit
switch).
● If the axis is assigned to an interpolatory grouping with other axes, then these are also stopped according to the method
selected in MD36600 BRAKE_MODE_CHOICE (braking behavior at hardware limit switch).
● The direction keys in the approach direction are disabled.

Remedy
● Reset
● Move in the opposite direction (in "JOG" mode)
● Correct the program

4.3.3 Software limit switches

Function
They are used to limit the maximum traversing range on each individual axis.
There are two pairs of software limit switches for each machine axis. They are defined in the machine axis system using the
following machine data:
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)

Effectiveness
● Software (SW) limit switch monitoring is activated after reference point approach in all modes.
● The position of the software limit switch can be approached.
● The 2nd software limit switch can be activated via the "2nd software limit switch plus/minus" interface signal
(DB380x.DBX1000.3 or .2) from the PLC. The change becomes active immediately. The 1st software limit switch
plus/minus is then de-activated.
● The SW limit switch monitoring does not function for endlessly turning rotary axes, i.e. if MD30310 ROT_IS_MODULO =
1. (Modulo conversion for rotary axis and spindle)

Effect/reactions
Based on the mode, different responses to an attempted software limit switch violation are possible:
AUTO, MDA:
● The block that would violate the software limits switches is not started. The previous block is terminated properly.

Function Manual
6FC5397-7EP40-0BA4, 07/2018 31
● Program execution is terminated.
● Alarm 10720 "Software limit switch + or -" is signaled.
JOG:
● The axis stops at the software limit switch position.
● Alarm 10621 "Axis at software limit switch + or -" is signaled.
● The direction keys in the approach direction are disabled.

Note
Switching over the software limit switch:
If the current position lies behind the new software limit switch when the software limit switch is switched over, the axis is
decelerated with the maximum permissible axial acceleration. If an axis is involved in interpolation with other axes, these are
also decelerated. Then a contour violation may occur.

Remedy
● Reset
● Move in the opposite direction (in "JOG" mode)
● Correct the program

4.4 Supplementary conditions


To ensure that the monitoring functions respond correctly, it is important that the correct values are entered in the following
machine data:
General:
● MD31030 LEADSCREW_PITCH (leadscrew pitch)
● Gear ratio (load gearbox):
MD31050 DRIVE_AX_RATIO_DENOM (load gearbox denominator)
MD31060 DRIVE_AX_RATIO_NUMERA (load gearbox numerator)
Gear ratio (encoder), possibly for spindle:
MD31070 DRIVE_ENC_RATIO_DENOM (measuring gearbox denominator)
MD31080 DRIVE_ENC_RATIO_NUMERA (measuring gearbox numerator)
● MD32810 EQUIV_SPEEDCTRL_TIME
(Equivalent time constant speed control loop for feedforward control)
● Encoder resolution
MD31020 ENC_RESOL[0] (encoder pulses per revolution)
For analog spindle only:
● Output voltage / output speed relation
MD32260 RATED_VELO (rated motor speed)
MD32250 RATED_OUTVAL (rated output voltage)

4.5 Data table


4.5.1 Machine data
Number Identifier Name
Axis/spindle-specific
30310 ROT_IS_MODULO Modulo conversion for rotary axis and spindle
32000 MAX_AX_VELO Maximum axis velocity
32200 POSCTRL_GAIN [n] Servo gain factor Kv
32250 RATED_OUTVAL Rated output voltage

Function Manual
32 6FC5397-7EP40-0BA4, 07/2018
Number Identifier Name
32260 RATED_VELO Rated motor speed
32300 MAX_AX_ACCEL Axis acceleration
32810 EQUIV_SPEEDCTRL_TIME [n] Equivalent time constant speed control loop for feedforward
control
36000 STOP_LIMIT_COARSE Exact stop coarse
36010 STOP_LIMIT_FINE Exact stop fine
36020 POSITIONING_TIME Time delay exact stop fine
36030 STANDSTILL_POS_TOL Standstill tolerance
36040 STANDSTILL_DELAY_TIME Delay time standstill monitoring
36050 CLAMP_POS_TOL Clamping tolerance with "Clamping active" interface signal
36060 STANDSTILL_VELO_TOL Maximum velocity/speed "Axis/spindle stationary"
36100 POS_LIMIT_MINUS 1. Minus software limit switch
36110 POS_LIMIT_PLUS 1. Plus software limit switch
36120 POS_LIMIT_MINUS2 2. Minus software limit switch
36130 POS_LIMIT_PLUS2 2. Plus software limit switch
36200 AX_VELO_LIMIT [n] Threshold value for velocity monitoring
36210 CTRLOUT_LIMIT[n] Maximum speed setpoint
36300 ENC_FREQ_LIMITn Encoder frequency limit
36302 ENC_FREQ_LIMIT_LOW Encoder limit frequency resynchronization
36310 ENC_ZERO_MONITORING [n] Zero mark monitoring
36400 CONTOUR_TOL Tolerance band contour monitoring
36500 ENC_CHANGE_TOL High backlash values /
Maximum tolerance for actual position value changeover
36600 BRAKE_MODE_CHOICE Braking behavior at hardware limit switch
36610 AX_EMERGENCY_STOP_TIME Length of the braking ramp for error states
36620 SERVO_DISABLE_DELAY_TIME Cutout delay controller enable

4.5.2 Interface signals


Number .Bit Name
Axis/spindle-specific
DB380x.DBX1 .5 Position measuring system 1
DB380x.DBX2 .3 Clamping in progress
DB380x.DBX1000 .0 / .1 Hardware limit switch minus / hardware limit switch plus
DB380x.DBX1000 .2 / .3 2. Software limit switch minus / software limit switch plus
DB390x.DBX0 .2 Encoder limit frequency exceeded 1
DB390x.DBX0 .4 Referenced/synchronized 1

5 Continuous path mode, exact stop, and LookAhead (B1)


5.1 Brief description
For continuous path control, the CNC processes a part program block by block. Only when the functions of the current block
have been completed, is the next block processed. Various requirements with respect to machining or positioning require
different block change criteria. There are two ways that the path axes can behave at block boundaries.
The first way is called "exact stop" and means that all path axes must have reached the set target position depending on an
exact-stop criterion before the next block change is initiated. To be able to fulfill the criterion, the path axes must reduce the
path velocity at every block change which, however, delays the block change.

Function Manual
6FC5397-7EP40-0BA4, 07/2018 33
The second way is called "continuous path mode" and it attempts to avoid deceleration of the path velocity at the block
boundary in order to change to the next block with as little change of path velocity as possible.
"LookAhead" is a procedure in continuous path mode that achieves velocity control with LookAhead over several NC part
program blocks.

5.2 General
Machine axes that are related interpolatively must have the same dynamic response, i.e. the same following error at any
given velocity.
The term path axes refer to all machining axes which are controlled by the interpolator calculating the path points in such a
manner that:
● All the axes involved start at the same time
● All the axes involved travel with the correct velocity ratios
● All the axes reach the programmed target position at the same time
The acceleration rates of the individual axes may vary depending on the path, e.g. circular path.
Path axes can be geometry axes and special axes (e.g. workpiece turning axes that are involved in the workpiece machining
process).

Velocity for zero cycle blocks


The term zero cycle is applied to blocks whose path length is shorter than the distance that can be traveled on the basis of
the programmed set feedrate and the interpolator cycle (time). For reasons of precision the velocity is reduced until at least
one interpolator cycle is required for the distance. The velocity is then equal to or less than the quotient of the path length of
the block and the interpolator (IPO) cycle.

Stop for synchronization


Regardless of whether exact stop or continuous path mode is selected, the block change can be delayed by synchronization
processes which can stop the path axes. In exact stop mode, the path axes are stopped at the end of the current block. In
continuous path mode, the path axes are stopped at the next block end point at which they can be decelerated without
violating their deceleration limits. The following synchronization processes cause axes to stop.
● PLC acknowledgment
If acknowledgment by the PLC is required for an auxiliary function that is output before or after the end of motion, the
axes stop at the end of the block.
● Missing following blocks
If following blocks are conditioned too slowly (e.g. "External processing") the axes stop at that last possible block
boundary.
● Emptying of the buffer
If the NC part program requests that the run-in be synchronized with the main run (empty the buffer, e.g. STOPRE), this
involves an implicit block-related velocity reduction or exact stop.
Stopping because of synchronization does not cause contour violations. However, stopping is undesirable, especially in
continuous path mode because it can cause backing off.

5.3 Exact stop


With the exact stop function (G60, G9), all the path axes must reach the programmed block end point. Only when all path
axes have reached the exact stop criterion is the block change performed. The velocity at the block transition is practically
zero.
That is:
● The path axes at the block end point are decelerated almost to rest without overshoot.
● The delay for fulfilling the exact stop criterion prolongs the machining time.
● The delay for fulfilling the exact stop criterion can cause backing off.
The use of the exact stop function is suitable for precise traversing of contours.

Function Manual
34 6FC5397-7EP40-0BA4, 07/2018
Exact stop is not suitable if
● Exact traversing of the contour on the basis of the criterion (e.g. exact stop fine) can deviate from the programmed
contour in order to achieve faster machining.
● An absolutely constant velocity is required.

Activate exact stop


The "Exact stop" function can be selected in the NC part program by command G60 or G9. G60 is modal, G9 is non-modal.
G9 is used if continuous path mode is to be interrupted. Both exact stop functions only function with the selected exact stop
criterion (G601, G602). The "exact stop" function is de-selected with the continuous path mode function (G64).

Exact-stop criteria
● Exact stop fine: G601
This criterion is applied to monitor whether the actual/setpoint position deviation of the axis has remained within a
specific distance. The value of the permissible distance is stored in MD36010 STOP_LIMIT_FINE (exact stop fine)
● Exact stop coarse: G602
Functions as exact stop fine, although the monitoring window is stored in MD36000 STOP_LIMIT_COARSE (exact stop
coarse). To permit a faster block change than with the exact stop fine criterion, the exact stop coarse criterion is set to be
larger than the exact stop fine criterion.
Block change depending on exact-stop criteria:

Interpolator end
Interpolator end is achieved when the interpolator has calculated the setpoint velocity of the axes from zero for an
interpolation cycle. However, the actual positions of the path axes have not reached the target (following error).
Irrespective of continuous-path mode or the active exact-stop criteria for the exact-stop function, "interpolator end" transfers
the auxiliary functions present in the block to the PLC if they are to be output after the end of motion.

5.4 Continuous path mode


5.4.1 General
In 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 continuous path mode (G64) is selected.
Continuous path mode causes:
● Rounding of the contour.
● Shorter machining times through elimination of braking and acceleration processes that are required to comply with the
exact-stop criterion.
● Improved cutting conditions as the velocity is more uniform.
The continuous-path mode is suitable if a contour is to be traversed as quickly as possible.
Continuous-path mode is suitable if:
● A contour is to be traversed precisely.
● An absolutely constant velocity is required.

Function Manual
6FC5397-7EP40-0BA4, 07/2018 35
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 contains no travel information for the path axes, the previous block is terminated on reaching the
selected exact stop criterion.
● A block is terminated on interpolator end if the following block contains the changeover of the acceleration profile
BRISK/SOFT.
● If the function "Empty buffer" (STOPRE) 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:
● The time taken to position a spindle programmed with SPOS is longer than the travel time of the path axes. The block
change is carried out when the "exact stop fine" of the positioning spindle is reached.
● A synchronization process needs to be carried out (see Section "General (Page 34)").

Auxiliary function output during traversal


If the traversal time is not sufficient due to the programmed path length and velocity of the block with auxiliary function output,
the path velocity for the block is reduced such that the acknowledgment of the auxiliary function can arrive with a PLC cycle
time.
If the acknowledgment is not received within one PLC cycle time, the following prepared block cannot be processed and the
axes are braked to rest with setpoint = 0 (without considering the acceleration limits).
If the acknowledgment is not received by the end of the block in long blocks in which the velocity has not needed to be
reduced on account of the PLC acknowledgment time, the velocity is maintained until the end of the block and then reduced
as described above.
If the acknowledgment arrives while the axis is decelerating, the axis is not accelerated back up to the requested velocity.

5.4.2 Velocity reduction according to overload factor

Function
This function lowers the path velocity in continuous path mode until the nontangential block transition can be traversed in
one interpolation cycle whilst respecting the deceleration limit and taking an overload factor into account. With the reduced
velocity, axis-specific jumps in velocity are produced with a nontangential contour at the block transition. 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. With a
practically tangential block transition, the path velocity is not reduced if the permissible axial accelerations are not exceeded.
In this way, very small angular changes in the contour can be overtraveled directly.

Overload factor
The overload factor restricts step changes in the machine axis velocity at the block transition. 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, which is set in MD32300 MAX_AX_ACCEL (axis
acceleration), may be exceeded for an IPO cycle.
The velocity jump is the product of: axis acceleration * (overload factor-1) * interpolator cycle. The overload factor is 1.2.
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.

Function Manual
36 6FC5397-7EP40-0BA4, 07/2018
Selection and deselection of velocity reduction
Continuous-path mode with velocity reduction according to overload factor can be selected modally in every NC part
program block by means of program code G64 (BRISK active, not SOFT).
Continuous path mode G64 can be
● interrupted non-modally when exact stop G9 is selected,
● de-selected when exact stop G60 is selected.

5.4.3 Jerk limiting along the path through velocity reduction

Introduction
With the jerk limiting along the path, another method of influencing the continuous-path mode is introduced. While the
"Velocity reduction according to overload factor" function limits the rate of velocity change, the "Jerk limitation on path"
function described here limits the acceleration changes (jerks).
When sections of the contour consisting of blocks (e.g. circle straight line transitions) are machined, step changes in the
acceleration rate occur at the block transition in continuous path mode.

Reducing jerk
The severity of such jerks can be reduced by decreasing the path velocity at transitions between blocks containing different
degrees of curvature. A smoother transition is thus achieved between the contour sections.

Jerk limit
The user specifies the maximum jerk, which may occur on a path axis during a block transition, with MD32432
PATH_TRANS_JERK_LIM (maximum axis-specific jerk of a path axis at the block transition).

Activating
Jerk limiting at block transitions becomes active if continuous path mode is programmed with G64 and SOFT acceleration
characteristics. MD32432 PATH_TRANS_JERK_LIM must contain a positive value.

5.4.4 Machine axis-specific jerk limiting

Function
The axis-specific machine data MD32431 MAX_AX_JERK[..] can be used to set individual changes in acceleration for each
machine axis, like those that can already be set for acceleration limits in machine data MD32300 MAX_AX_ACCEL.
MD32431 MAX_AX_JERK acts on the axes interpolated by the path if SOFT (smooth acceleration curve) is active within a
block.
A basic distinction is made between the axis acceleration curve within a block and at the transition between two blocks.

Advantages
The deployment of axis-specific machine data for the path offers the following advantages:
● Immediate allowance is made in the interpolation for the dynamic response of the axes, which can then be fully utilized
for each axis.
● Jerk limitation for separate axes is performed not just in linear blocks, but also in curved contours.
Please refer to Chapter "Acceleration (Page 42)" for more information on the subject of "jerk limiting".

5.5 Compressor functions


Function
COMPON, COMPCURV
The compressor functions COMPON and COMPCURV generate one polynomial block from up to ten consecutive linear blocks of
the form: "G01 X... Y... Z... F...". The polynomial blocks of the compressor functions have the following properties:
● COMPON: Continuous velocity block transitions
● COMPCURV: Continuous velocity and acceleration block transitions

Function Manual
6FC5397-7EP40-0BA4, 07/2018 37
COMPCAD
The compressor function COMPCAD can generate one polynomial block from theoretically any number of linear and circular
blocks. The polynomial blocks have constant velocity and acceleration at the block transitions. Corners that are desirable are
identified as such and taken into account.
The maximum tolerable deviation of the calculated path to the programmed points can be specified using machine data for
all compressor functions. In contrast to COMPON and COMPCURV, the specified tolerances are not used in different directions in
neighboring paths with COMPCAD. In fact, COMPCAD attempts to achieve - under similar conditions - also similar deviations from
the programmed points.
The common objective of compressor functions is to optimize the surface quality and machining speed by achieving
continuous block transitions and increasing the path length for each block.
COMPCAD is very CPU time and memory-intensive. It is recommended that COMPCAD is only used there where surface
improvements were not successful using measures in the CAD/CAM program.
General
● The position data in the blocks to be compressed can be realized as required, e.g. X100, X=AC(100), X=R1*(R2+R3)
● The compression operation is then interrupted by every other command, e.g. auxiliary function output, in and between
the blocks to be compressed.

Availability
NC block compression is only available for the milling versions of the control system.

Parameterization
The following machine and setting data must be set for the parameterization of the NC block compression:
Channel-specific machine data
Number Identifier $MC_ Meaning
MD20170 COMPRESS_BLOCK_PATH_LIMIT Maximum traversing length of NC block for compression
MD20172 COMPRESS_VELO_TOL Maximum permissible deviation from path feed for compression
MD20482 COMPRESSOR_MODE Setting the mode of operation of the compressor
Channel-specific setting data
Number Identifier $SC_ Meaning
SD42470 CRIT_SPLINE_ANGLE Corner limit angle for COMPCAD
SD42475 COMPRESS_CONTUR_TOL Maximum permissible contour deviation with compression

Note
Corner limit angle and compressor function COMPCAD
The corner limit angle for COMPCAD set via the setting data SD42470 $SC_CRIT_SPLINE_ANGLE is only used as an
approximate measure for corner detection. By evaluating the plausibility, the compressor can also identify flatter block
transitions as corners and larger angles as outliers.

Axial machine data


Number Identifier $MA_ Meaning
MD33100 COMPRESS_POS_TOL Maximum permissible path deviation with compression

Function Manual
38 6FC5397-7EP40-0BA4, 07/2018
Recommended settings for retroactive machine data
When using the compressor function, the following settings are recommended for the retroactive machine data on the
compressor function:
Number Identifier Recommended value
MD18360 $MN_MM_EXT_PROG_BUFFER_SIZE 100
(FIFO buffer size for execution from external source)
MD20490 $MC_IGNORE_OVL_FACTOR_FOR_ADIS 1
(G641/G642 irrespective of the overload factor)
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)
MD28540 $MC_MM_ARCLENGTH_SEGMENTS 10
(number of memory elements for displaying the arc length function)
MD28060 $MC_MM_IPO_BUFFER_SIZE 100
(number of NC blocks for the block preparation)
MD28070 $MC_MM_NUM_BLOCKS_IN_PREP 60
(number of blocks for the block preparation)
MD32310 $MA_MAX_ACCEL_OVL_FACTOR <Value for G64 opera-
(overload factor for axial velocity jumps) tion>

Programming
Switch on
Compressor functions are activated using the modal G commands COMPON, COMPCURV or COMPCAD.
To further improve the surface quality, the functions G642 (rounding function) and SOFT (jerk limitation) can be used. The
commands must be written together at the beginning of the program.
Example:
Program code Comment
PROC ...
N10 COMPCAD SOFT G642 ; Activating the COMPCAD compressor
N20 G01 X... Y... Z... F... ; Traversing blocks 1 ... n
...
N1000 COMPOF ; Deactivation of the compressor
N1010 RET
Deactivation
All compressor functions are deactivated using the COMPOF command.

References
The programming of the compressor functions is described in:
SINUMERIK 808D ADVANCED Programming and Operating Manual (Milling)

5.6 LookAhead
Function
LookAhead is a procedure in continuous path mode (G64) that achieves velocity control with LookAhead over several NC
part program blocks beyond the current block.
Without LookAhead: If the program blocks only contain very small paths, a velocity per block is achieved that permits
deceleration of the axes at the block end point without violating acceleration limits. This means that the programmed velocity
was not actually reached although a sufficient number of prepared blocks with virtually tangential path transitions were
available.

Function Manual
6FC5397-7EP40-0BA4, 07/2018 39
With the LookAhead function: It is possible to plan the acceleration and deceleration phase with approximately tangential
path transitions over several blocks in order to achieve a higher feedrate with shorter distances. Deceleration to velocity
limits is possible with LookAhead such that violation of the acceleration and velocity limit is prevented.
Comparison of the G60 and G64 velocity behavior with short travels in the blocks:

LookAhead takes plannable velocity limits into consideration such as:


● Velocity limit in the block
● Acceleration limit in the block
● Velocity limit on block transition
● Synchronization with block change at block transition
● Exact stop at block end during termination

Operating principle
LookAhead functionality is available only for path axes, but not for the spindle.
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
sawtooth-shaped velocity profile which can be avoided by reducing the set velocity for the number of blocks considered by
the LookAhead function (fixed value).

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.

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.

Selection and deselection of LookAhead


If the continuous-path mode (G64) is selected LookAhead is called and de-selected/interrupted with G60/G9.

Function Manual
40 6FC5397-7EP40-0BA4, 07/2018
5.7 Data table
5.7.1 Machine data
Number Identifier Name
General
18360 MM_EXT_PROG_BUFFER_SIZE FIFO buffer size for execution from external source (DRAM)
Channel-specific
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
20482 COMPRESSOR_MODE Compressor mode
20490 IGNORE_OVL_FACTOR_FOR_ADIS G641/G642 independent of the overload factor
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
28540 MM_ARCLENGTH_SEGMENTS Number of storage elements for arc length function representation
per block
29000 LOOKAH_NUM_CHECKED_BLOCKS Number of blocks considered by the LookAhead function
Axis/spindle-specific
32310 MAX_ACCEL_OVL_FACTOR Overload factor for axial velocity jumps
32431 MAX_AX_JERK Maximum axis-specific jerk for path movement
32432 PATH_TRANS_JERK_LIM Maximum axis-specific jerk for path movement at block transition
33100 COMPRESS_POS_TOL Maximum deviation with compensation
36000 STOP_LIMIT_COARSE Exact stop coarse
36010 STOP_LIMIT_FINE Exact stop fine
36020 POSITIONING_TIME Delay time exact stop fine

5.7.2 Setting data


Number Identifier Name
General information
42470 CRIT_SPLINE_ANGLE Core limit angle, compressor
42475 COMPRESS_CONTUR_TOL Maximum contour deviation in the compressor

5.7.3 Interface signals


Number Bit Name
Channel-specific
DB3300.DBX0004 .3 All axes stationary
Axis/spindle-specific
DB390x.DBX0000 .6 Position reached with exact stop coarse
DB390x.DBX0000 .7 Position reached with exact stop fine

Function Manual
6FC5397-7EP40-0BA4, 07/2018 41
6 Acceleration (B2)
6.1 Acceleration profiles
Abrupt acceleration changes
With the v/t-linear control of the axis velocity that is normally applied, the motion is controlled such that the acceleration rate
changes abruptly over time. With the discontinuous, stepped acceleration, jerk-free starting and braking of the axes is not
possible, but a time optimized velocity/time profile can be implemented.

Acceleration with jerk limitation


The jerk is the change of acceleration over time. For jerk-limited acceleration the maximum acceleration is not abrupt, but is
specified by a ramp. Because of the softer acceleration progression, the traverse time is longer than with abrupt acceleration
for the same distance, velocity and acceleration. This time loss can be compensated for by setting a higher acceleration for
the axes.
However, it has the following advantages:
● Reduced wear to mechanical parts of the machine
● Reduction of the excitation of high frequency, difficult to control vibrations of the machine.

6.2 Jerk limitation on interpolator level


Selection and deselection of jerk-limited acceleration
MD32431 MAX_AX_JERK (maximum axis-specific jerk during path motion) can limit the change in acceleration per machine
axis individually. It only acts on the axes interpolated by the path when SOFT is active. Jerk limitation is implemented
entirely on the interpolator level.
Acceleration with jerk limitation is activated by:
The program code SOFT in the part program. SOFT is modal and causes deselection of the abrupt acceleration profile
(BRISK). If SOFT is programmed in a block with path axes, the previous block is ended with exact stop.
Acceleration with jerk limitation (SOFT) is deactivated by:
The program code BRISK in the part program. BRISK is modal. If path axes are programmed in a block with BRISK, the
previous block is ended with exact stop. BRISK activates the profile with abrupt acceleration changes associated with v/t--
linear velocity control.

Applicability
Path-related jerk limitation is available for interpolating path axes in operating modes "AUTO" and "MDA". The SOFT and
BRISK acceleration profiles can be used in traverse modes exact stop G9, G60, continuous path modes G64, and with
LookAhead. The profiles are also active with the dry run feedrate function. With alarms that trigger a rapid stop, both
acceleration profiles are inactive.
Further information about velocity, acceleration and jerk whilst traversing in continuous path mode and at block transitions
can be found in Chapter "Continuous Path Mode, Exact Stop and LookAhead (B1)".

Note
We recommend setting the following machine data for each axis with the same values: MD32431 MAX_AX_JERK and
MD32432 PATH_TRANS_JERK_LIM (maximum axis-specific jerk for path movement at block transition)

6.3 Jerk limitation in JOG mode


The jerk limitation is active for axes in "JOG" mode during
● jogging
● handwheel jogging
● repositioning.
The jerk limitation is not active during reference point approach with alarms that initiate a rapid stop.

Function Manual
42 6FC5397-7EP40-0BA4, 07/2018
Jerk limitation can be determined for specific axes. The acceleration response corresponds with the SOFT acceleration
profile of path-related jerk limitation. This limitation cannot be deselected for the axes in the relevant modes.
The axes for which jerk limitation is to be programmed can be selected with MD32420 JOG_AND_POS_JERK_ENABLE.
The permissible axis-specific maximum jerk is stored in MD32430 JOG_AND_POS_MAX_JERK.

6.4 Data table


Number Identifier Name
Axis-specific
32300 MAX_AX_ACCEL Axis acceleration
32420 JOG_AND_POS_JERK_ENABLE Enabling axis-specific jerk limitation
32430 JOG_AND_POS_MAX_JERK Axis-specific jerk
32431 MAX_AX_JERK Maximum axis-specific jerk during path movement
32432 PATH_TRANS_JERK_LIM Maximum axis-specific jerk during path movement at
the block transition

7 Gantry axes (G1) (PPU16x.3 only)


7.1 Brief description
Note
If the corresponding option is activated without a valid license, alarm 8081 "%1 option(s) that has (have) not been licensed
using a license key was (were) set" is output. It will not be possible to operate the machine as normal.
For information on operations relating to "Setting (an) option(s)", please refer to the chapter titled "Licensing in the
SINUMERIK 808D ADVANCED (Page 417)".

Gantry axes
Gantry axes are mechanically grouped machine axes. Because of this mechanical coupling, gantry axes are always
traversed in unison. The control occurs through the "gantry axes" function.
The machine axis that is directly traversed is called the leading axis. The machine axis that is traversed in synchronism with
it is called the synchronized axis. Together, the leading axis and synchronized axis form a gantry axis grouping.
The difference between the actual positions of the leading axis and synchronized axis is monitored continuously. When the
actual position value of the synchronized axis deviates too much from that of the leading axis, the control automatically
brings all axes in the gantry grouping to a standstill in order to prevent any damage to the machines.

Application
Two feed drives are required to traverse the gantry on large gantry-type milling machines, i.e. one drive with its own position
measuring system on each side. Owing to the mechanical forced coupling, both drives must be operated in absolute
synchronism to prevent canting of mechanical components.

Configuration
A gantry axis grouping consisting of a leading axis and synchronized axis can be defined.

7.2 "Gantry axes" function


Application
On large gantry-type milling machines, various axis units (e.g. gantry or crossbeam) are moved by a number of drives, which
are mutually independent. Each drive has its own measuring system and thus constitutes a complete axis system. When
these mechanically rigidly-coupled axes are traversed, both drives must be operated in absolute synchronism in order to
prevent canting of mechanical components (resulting in power/torque transmission).

Function Manual
6FC5397-7EP40-0BA4, 07/2018 43
Example: Gantry-type milling machine with a gantry axis grouping (X and X1)

The purpose of the "gantry axes" function is to control and monitor machine axes which are rigidly coupled in this way.

Terms
The following terms are frequently used in this functional description:
Gantry axes
Gantry axes comprise one pair of axes, the leading axis and the synchronized axis. As these axes are mechanically coupled,
they must always be traversed simultaneously by the NC. The difference between the actual positions of the axes is
monitored continuously. The axes in a gantry grouping are either all linear axes or all rotary axes.
Gantry axis grouping
A total of one gantry connection can be defined. Each gantry grouping consists of one leading axis and one synchronized
axis.
The gantry axis grouping defines which synchronized axis is controlled by which leading axis, based on machine data
settings. The leading axis and synchronized axis cannot be traversed separately.
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. The axis name of the leading axis identifies all axes in the gantry axis grouping.
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".

Conditions for a gantry grouping


● A gantry grouping must not contain a spindle.
● A synchronized axis must not be addressed by a transformation.
● A synchronized axis must not be the slave axis in another type of axis coupling.
● A synchronized axis must not be defined as the leading axis in another axis grouping.

Note
Each axis in the gantry grouping must be set so that it can take over the function of the leading axis at any time, i.e.
matching velocity, acceleration and dynamic response settings.

The control performs a plausibility check on the axis definition.

Function Manual
44 6FC5397-7EP40-0BA4, 07/2018
Components
The "gantry axes" function can be subdivided into the following functional units:
● Setpoint generation of synchronized axis
● Monitoring of actual value difference
● Referencing and synchronizing the leading axis and synchronized axis

Setpoint generation of synchronized axis


From the point of view of the operator, all coupled gantry axes are traversed as if only one axis, i.e. the leading axis, were
programmed in the NC. Analogously, only the leading axis is programmed in the part program. The commands and traverse
requests from the operator, the PLC interface or via the part program therefore apply in equal measure to all axes in the
gantry grouping.
When the "gantry axes" function is active, the synchronized axis setpoint is generated directly from the setpoint of the
leading axis in all operating modes.
Note
The dynamic control response settings for the leading and synchronized axes must be identical.

Monitoring the actual value difference


The position actual values of the leading and synchronized axes are continuously compared with one another in the
interpolation clock cycle and monitored to check that they are still within the permissible tolerance range.
Machine data can be set to specify the following limit values for alarm output and termination of the traversing motion for
specific axes:
Gantry warning limit
The "Warning limit exceeded" warning will be relayed to the operator when the actual position value difference exceeds the
gantry warning limit:
MD37110 GANTRY_POS_TOL_WARNING (gantry warning limit)
In addition, the following interface signal will be output to the PLC:
DB390x.DBX5005.3 (gantry warning limit exceeded)
When below the warning limit, the message and interface signal will automatically be cancelled.
When MD37110 = 0 the message will be disabled.
Gantry trip limit
Alarm 10653 "Error limit exceeded" will be signaled when the machine's maximum permissible actual position value
deviation is exceeded:
MD37120 GANTRY_POS_TOL_ERROR (gantry trip limit)
In order to prevent any damage to the machines, the gantry axes will be immediately shut down via the break ramp.
The value of MD37120 is applied when the gantry grouping is synchronized.
The alarm must be acknowledged with "RESET".
In addition, the following interface signal will be output to the PLC:
DB390x. DBX5005.2 (gantry trip limit exceeded)
If the gantry axis grouping has not yet been synchronized, the limit value for the gantry trip limit is derived from the following
machine data:
MD37130 GANTRY_POS_TOL_REF (gantry trip limit for referencing)

The "Gantry trip limit exceeded" IS is also output if the gantry grouping is jammed (no servo enable, gantry grouping in
"Hold" state).
The monitoring functions are deactivated while the grouping is operating in "Follow-up" mode.

Function Manual
6FC5397-7EP40-0BA4, 07/2018 45
Extended monitoring
An extended monitoring function can be activated with the following machine data:
MD37150 GANTRY_FUNCTION_MASK (gantry functions)

Referencing and synchronization of gantry axes


As the example "Gantry-type milling machine" shows, the forced coupling between gantry axes must remain intact in all
operating modes as well as immediately after power ON. In cases where an incremental measuring system is being used for
the leading or the synchronized axis, the reference point must be approached while maintaining the axis coupling
immediately after machine power ON.
After every axis in the gantry grouping has approached its reference point, any misalignment that may exist between the
axes must be eliminated (this is known as the gantry synchronization process). As soon as this has been carried out, the
following interface signal is sent to the PLC: DB390x.DBX5005.5 (gantry grouping is synchronized)
The operational sequence for referencing and synchronizing gantry axes is described in detail under Section "Referencing
and synchronizing gantry axes (Page 46)".

Closed-loop control
The dynamic control response settings for the coupled gantry axes must be identical (see Section "Start-up of gantry axes
(Page 52)"). This ensures that in normal operation, the leading and synchronized axes move in positional synchronism, even
during acceleration and braking.
Load effects are compensated by the appropriate drive of the leading or synchronized axis.

Disturbance characteristic
When a disturbance occurs which causes shutdown of one gantry axis owing, for example, to cancellation of the controller
enabling signal (example: EMERGENCY OFF), the coupled gantry axes are also shut down.

Separation of forced coupling


In certain situations (e.g. one gantry axis is no longer referenced owing to an encoder failure), it may be necessary to correct
or reduce the misalignment between the gantry axes prior to referencing. To do this, it must be possible to traverse the
leading or the synchronized axis manually in the uncoupled state.
The forced coupling between the gantry axes can be separated by making the following MD setting and then performing a
RESET:
MD37140 GANTRY_BREAK_UP = 1 (break up gantry grouping)
The gantry axes can then be traversed separately by hand; the monitoring of the warning and trip limits is not operative in
this state.

NOTICE
Mechanical coupling of gantry axes
If the gantry axes remain mechanically coupled, there is a risk of damage to the machine when the leading or synchronized
axes are traversed in this operating state!

7.3 Referencing and synchronizing gantry axes


7.3.1 Introduction

Misalignment after starting


Immediately after the machine is switched on, the leading and synchronized axes may not be ideally positioned in relation to
one another (e.g. misalignment of a gantry). Generally speaking, this misalignment is relatively small so that the gantry axes
can still be referenced.
In special cases (e.g. gantry axes were brought to a standstill because of a disturbance, power failure, or EMERGENCY
OFF), before the axes can be traversed the dimensional offset must be checked for permissible tolerance values and a
compensatory motion executed if necessary.
To execute this compensatory motion, the gantry grouping must be separated by means of the following machine data:
MD37140 GANTRY_BREAK_UP (break up gantry grouping)

Function Manual
46 6FC5397-7EP40-0BA4, 07/2018
Gantry synchronization
All gantry axes must first be referenced and then synchronized after the control system is switched on. During gantry
synchronization, all gantry axes approach the reference position of the gantry grouping in the decoupled state.
The reference position of the gantry grouping for referencing the gantry axes corresponds to the reference position of the
leading axis:
MD34100 REFP_SET_POS (reference point value/destination point for distance-coded system)
Otherwise, the reference position is the current actual position of the leading axis.
These operations for referencing and synchronizing the gantry axes are executed automatically in accordance with a special
flowchart.

Referencing process
The flowchart for referencing gantry axes using an incremental measuring system is as follows:
Section 1:
Referencing of the leading axis
Axis-specific referencing of the gantry axes is started by the active machine function REF when the leading axis interface
signal is sent from the PLC user program:
DB380x.DBX0004.7/.6 (traversing key plus/minus)
The leading axis approaches the reference point (operational sequence as for reference point approach).
The appropriate synchronized axis traverses in synchronism with the leading axis. Interface signal
"Referenced/synchronized" of the leading axis is output to indicate that the reference point has been reached.
Section 2:
Referencing the synchronized axis
As soon as the leading axis has approached its reference point, the synchronized axis is automatically referenced (as for
reference point approach).
The dependency between the leading axis and synchronized axis is inverted in the control for this phase so that the leading
axis now traverses in synchronism with the synchronized axis. IS "Referenced/synchronized" of the synchronized axis is
output to indicate that the reference point has been reached. The gantry axis dependency then reverts to its previous status.
Section 3:
Gantry synchronization
Once all axes in the gantry grouping have been referenced, they must be synchronized with the defined reference position.
The actual position of each gantry axis is first compared to the defined reference position of the leading axis.
The next step in the operating sequence depends on the difference calculated between the actual values of the leading and
synchronized axes:
● difference is smaller than the gantry warning limit:
Gantry synchronization is started automatically (provided that IS "Automatic synchronization locking" has not been set).
The message "Synchronization in progress gantry grouping x" is output during this process.
All gantry axes traverse at a specific position value in the decoupled state at the velocity set in the machine data:
MD34040 REFP_VELO_SEARCH_MARKER (shutdown speed)
The position value is defined by the leading axis:
MD34100 REFP_SET_POS (reference point for incremental system)
The absolute encoders and distanced-coded encoders of the leading axis will be set to the current actual position of the
leading axis or to the reference point by the following machine data:
MD34330 REFP_STOP_AT_ABS_MARKER (distancecoded linear measuring system without destination point)
For this operation, the axes traverse at the same velocity as set for reference point approach:
MD34070 REFP_VELO_POS (reference point positioning velocity)
As soon as all gantry axes have reached their target position (ideal position), IS "Gantry grouping is synchronized" is set
to "1" followed by reactivation of the gantry axis coupling. The position actual value of all axes in the gantry grouping
must now be identical. The gantry synchronization process is now complete.
● Difference is higher than the gantry warning limit for the synchronized axis:
IS "Gantry synchronization read to start" is set to "1" and the message "Wait for synchronization start of gantry grouping
x" is output. The gantry synchronization process is not started automatically in this case, but must be started explicitly by

Function Manual
6FC5397-7EP40-0BA4, 07/2018 47
the operator or from the PLC user program. The process is initiated by IS "Start gantry synchronization" on the leading
axis. The signal is set on the leading axis. The operational sequence is then the same as that described above.
The following flowchart illustrates the referencing and synchronization processes.

Function Manual
48 6FC5397-7EP40-0BA4, 07/2018
Synchronization process
A synchronization process is always required in the following cases:
● after the reference point approach of all axes included in a grouping,
● if the axes become desynchronized (see below).

Operational sequence failure


If the referencing process described above is interrupted as a result of disturbances or a RESET, proceed as follows:
● Abort within section 1 or 2:
Restart reference point with leading axis (see section 1)
● Abort in section 3:
In cases where the gantry axes have not yet been referenced (IS "Referenced/Synchronized" = 1), the gantry
synchronization process can be started again with IS "Synchronize gantry grouping".

Restart gantry synchronization


Synchronization of the gantry axes can be started with IS "Start gantry synchronization" under the following conditions only:
● "REF.POINT" mode must be active. The following interface signal must be set:
DB3100.DBX0001.2 (active machine function REF)
● DB390x.DBX5005.5 = 0 (gantry grouping is synchronized)
● All grouping axes operate within the tolerance windows:
DB390x.DBX5005.4 = 1 ("Gantry synchronization ready to start")
● Axis is not referenced in the NC channel
DB3300.DBX0001.0 = 0 (referencing active)
If gantry synchronization is not started from the referencing process by means of IS "Start gantry synchronization", then the
current actual position of the leading axis - rather than the referencing position from MD34100 - will be specified as the
target position and approached in the decoupled state.

Note
Automatic synchronization can be locked by the leading axis by means of the following interface signal:
DB380x.DBX5005.5 (automatic synchronization locking)
This always makes sense if no axis enabling signal has yet been issued for the axes. In this case, the synchronization
process should also be started explicitly with the interface signal:
DB380x.DBX5005.4 = 1 (start gantry synchronization)

Loss of synchronization
The gantry grouping becomes desynchronized (DB390x.DBB5005 = 0) if:
● The gantry axes were in "Follow-up" mode
● The reference position of a gantry axis is lost, e.g. during "Parking" (no measuring system active)
● A gantry axis is re-referenced (DB390x.DBB0000 = 0)
● The gantry grouping was separated (MD37140 = 1)
In cases where the gantry grouping has lost synchronization during operation as the result of a disturbance, then the gantry
synchronization process can be restarted directly by means of IS "Start gantry synchronization" (condition:
DB390x.DBB0000 = 1 for all axes in the gantry grouping). In this case, the synchronizing axes traverse the current actual
position of the leading axis in the decoupled state.
If an EMERGENCY OFF occurs while a gantry grouping is moving, and is then rescinded, and both axes have drifted apart
less than the standstill tolerance of the following axis, then the gantry grouping will automatically synchronize. It no longer
needs to go in the BA REF.

Reference point selection


To ensure that the shortest possible paths are traversed when the gantry axes are referenced, the reference point values for
the leading and synchronized axes should be the same (MD34100).

Function Manual
6FC5397-7EP40-0BA4, 07/2018 49
Allowance for deviations in distance between the zero mark and the reference point must be made for specific axes via the
machine data:
● MD34080 REFP_MOVE_DIST (reference point distance)
● MD34090 REFP_MOVE_DIST_CORR (reference point offset/absolute offset)

Referencing direction selection


The zero mark leveling function of the following axis can be defined using the following machine data:
MD37150 GANTRY_FUNCTION_MASK bit 1
Bit Value Meaning
1 0 The zero mark leveling function of the following axis is similar to
MD34010 REFP_CAM_DIR_IS_MINUS.
1 The zero mark leveling function of the master axis is the same as the slave axis
During referencing, the reference point value of the leading axis is specified as the target position for all axes in the grouping
for the synchronization compensatory motion. This position is then approached without axis coupling. The absolute encoders
and distance-coded encoders of the leading axis will be set to the current actual position of the leading axis or to the
reference point value; either of these options is set using the following machine data:
MD34330 REFP_STOP_AT_ABS_MARKER
(distance-coded linear measuring system without destination point)
If only one reference cam is used for the leading and synchronized axes, then this must be taken into account in the PLC
user program.

7.3.2 Automatic synchronization


Automatic synchronization can take place:
● In "REF.POINT" mode (see the section titled "Introduction (Page 46)")
● In the manner described below
If a gantry grouping is switched to follow-up mode, monitoring of the actual values between the leading and synchronized
axes is deactivated. The grouping is no longer synchronized as a result. The leading axis sets IS "Gantry grouping is
synchronous" to "0" regardless of the positions of the axes.
If the gantry grouping is switched from follow-up mode to position control mode, axis synchronism is automatically restored,
provided the actual-value monitoring function does not detect a difference between the positions of the leading and
synchronized axes that is greater than the setting in MD36030.
In this case, a new setpoint is specified for the synchronized axis without interpolation. The positional difference detected
earlier is then corrected by the position controller. The correction causes only the synchronized axis to move.
The motion sequence of the synchronized axis is similar to the situation in which the grouping switches from the "Hold" state
to position control mode. In this case, the position specified by the position controller before the grouping is halted is set
again on condition that the zero speed monitor has not activated alarm 25040 (with follow-up as alarm reaction) in the
meantime.
The same tolerance window is used for this type of automatic synchronization as for the standstill monitoring function:
MD36030 STANDSTILL_POS_TOL (standstill tolerance)
Parameter set-dependent loading takes place with the following machine data:
MD36012 STOP_LIMIT_FACTOR (exact stop coarse/fine factor and standstill)

Note
The following interface signal blocks automatic synchronization in all modes except "REF.POINT" mode:
DB380x.DBX5005.5 (automatic synchronization locking)
If automatic synchronization is to be activated, DB380x.DBX5005.5 must be set to "0".
Following this, one of the axes in the gantry grouping must be switched from follow-up mode to position-controlled mode.
This is achieved with the interface signals:
DB380x.DBX0001.4 = 1 (follow-up mode)
DB380x.DBX0002.1 = 1 (servo enable)

Function Manual
50 6FC5397-7EP40-0BA4, 07/2018
7.3.3 Points to note

Channelspecific referencing
Gantry axes can also be referenced on a channel-specific basis:
DB3200. DBX0001.0 (activate referencing)
The value of the leading axis machine data is used for the axis sequence during channel-specific referencing:
MD34110 REFP_CYCLE_NR (axis sequence for channel-specific referencing)
After the reference point of the leading axis has been reached, the synchronized axis is referenced first as described above.

Referencing from part program with G74


The referencing and synchronization process for gantry axes can also be initiated from the part program by means of
command G74. In this case, only the axis name of the leading axis may be programmed. The operational sequence is
analogous to that described for axis-specific referencing.

Position measuring system with distancecoded reference marks


In order to ensure that large distances do not need to be traversed while approaching the reference point, it is possible to
use a position measuring system with distance-coded reference markers as the only measuring system for gantry axes. In
this way the measuring system is referenced after traversal of a short path (e.g. 20 mm). The procedure for referencing the
gantry axes is the same as that described for the normal incremental measuring system.

Absolute encoder
During the synchronization compensatory motion, all the axes in the gantry axis grouping (in the decoupled state) also
traverse to the reference point value of the leading axis, which is defined in the following machine data:
MD34100 REFP_SET_POS (reference point value/destination point for distance-coded system)
The absolute encoders and distance-coded encoders of the leading axis will be set to the current actual position of the
leading axis or to the reference point value; either of these options is set using the following machine data:
MD34330 REFP_STOP_AT_ABS_MARKER
(distance-coded linear measuring system without destination point)

Activation of axis compensations


Compensation functions can be activated for both the leading axis and the synchronized axis. Compensation values are
applied separately for each individual gantry axis. These values must therefore be defined and entered for the leading axis
and the synchronized axes during start-up.
The compensations do not become operative internally in the control until the axis is referenced or the gantry grouping is
synchronized. The following applies:
Compensation type Takes effect when PLC interface signal
Backlash compensation Axis is referenced "Referenced/Synchronized"
LEC Axis is referenced "Referenced/synchronized"
Sag compensation Gantry grouping is synchronized "Gantry grouping is synchronized"
If active compensation causes the synchronized axis to move, a traverse command is displayed for the synchronized axis,
independently of the leading axis.

Monitoring functions effective


Analogous to normal NC axes, the following monitoring functions do not take effect for gantry axes until the reference point
is reached (IS "Referenced/Synchronized"):
● Working area limits
● Software limit switch
● Protection zones
The axial machine data values are used as monitoring limit values for the synchronized axis as well.

Function Manual
6FC5397-7EP40-0BA4, 07/2018 51
7.4 Start-up of gantry axes
General information
Owing to the forced coupling which is normally present between leading and synchronized gantry axes, the gantry axis
grouping must be commissioned as if it were an axis unit. For this reason, the axial machine data for the leading and
synchronized axes must always be defined and entered jointly.
If the synchronized axis is being overloaded by the leading axis due to reduced dynamics, this is acknowledged with alarm
10656.
Special points to be noted with regard to starting up gantry axes are described below.

Axis traversing direction


As part of the start-up procedure, a check must be made to ensure that the direction of rotation of the motor corresponds to
the desired traversing direction of the axis. Correct by means of axial machine data:
MD32100 AX_MOTION_DIR (traversing direction)

Activation of the axis grouping


MD37100 GANTRY_AXIS_TYPE[a,b] (gantry axis definition)
This machine data is determined for the following gantry axis:
● Which gantry grouping (1) the axis is to be assigned to
● Whether it is to act as a leading or synchronized axis
For possible values for MD37100, see the table below:
a b Gantry axis Gantry grouping
- 0 None -
0 1 Leading axis 1
1 1 Synchronized axis 1
For commissioning purposes, the axes in a gantry grouping must be defined as either all linear axes or all rotary axes:
MD30300 IS_ROT_AX (rotary axis/spindle)

Entering gantry trip limits


For the monitoring of the actual position values of the synchronized axis in relation to the actual position of the leading axis,
the limit values for termination, as well as for the leading and synchronized axes, should be entered corresponding to the
specifications of the machine manufacturer:
MD37120 GANTRY_POS_TOL_ERROR (gantry trip limit)
MD37130 GANTRY_POS_TOL_REF (gantry trip limit for referencing)

Note
The control must then be switched off and then on again because the gantry axis definition and the trip limit values only take
effect after power ON.

Response to setpoint changes and disturbances


The gantry axes can only operate in exact synchronism if the parameters for the control circuits of the leading and
synchronized axes are set to the same dynamic response value.
The axial control loops (position, speed and current controllers) should each be set to the optimum value so that
disturbances can be eliminated as quickly and efficiently as possible. The dynamic response adaptation function in the
setpoint branch is provided to allow differing dynamic responses of axes to be matched without loss of control quality.
The following control parameters must be set to the optimum axial value for both the leading axis and the synchronized axis:
● MD32200 POSCTRL_GAIN (servo gain factor)
● MD32620 FFW_MODE (precontrol parameter)
● MD32610 VELO_FFW_WEIGHT (precontrol factor for acceleration/speed precontrol)

Function Manual
52 6FC5397-7EP40-0BA4, 07/2018
● MD32810 EQUIV_SPEEDCTRL_TIME (equivalent time constant speed control loop for precontrol)
The following control parameters must be set to the same value for the leading axis and synchronized axis:
● MD32400 AX_JERK_ENABLE (axial jerk limitation)
● MD32410 AX_JERK_TIME (time constant for the axial jerk filter)
● MD32420 JOG_AND_POS_JERK_ENABLE (basic setting for axial jerk limitation)
● MD32430 $MA_JOG_AND_POS_MAX_JERK (axial jerk)

Dynamics matching
The leading axis and the coupled synchronized axis must be capable of the same dynamic response to setpoint changes.
The same dynamic response means: The following errors are equal in magnitude when the axes are operating at the same
speed.
The dynamic response adaptation function in the setpoint branch makes it possible to obtain an excellent match in the
response to setpoint changes between axes, which have different dynamic characteristics (control loops). The difference in
equivalent time constants between the dynamically "weakest" axis and the other axis in each case must be specified as the
dynamic response adaptation time constant.

Example
When the speed feedforward control is active, the dynamic response is primarily determined by the equivalent time constant
of the "slowest" speed control loop.
Leading axis:
MD32810 EQUIV_SPEEDCTRL_TIME [n] = 5 ms
Synchronized axis:
MD32810 EQUIV_SPEEDCTRL_TIME [n] = 3 ms
Time constant of dynamic response adaptation for synchronized axis:
MD32910 DYN_MATCH_TIME [n] = 5 ms - 3 ms = 2 ms
(time constant of dynamic response adaptation)
Dynamic response adaptation must be activated axially with the following machine data:
MD32900 DYN_MATCH_ENABLE (dynamic response adaptation)

Note
Checking dynamic response adaptation:
For the purpose of fine tuning, it may be necessary to adjust servo gain factors or feedforward control parameters slightly to
achieve an optimum result.

Referencing gantry axes


The positions of the reference points for the leading and synchronized axes must first be set to almost identical values.
To ensure that the synchronization compensatory motion of the gantry axes is not started automatically, during first
commissioning the gantry warning limit must be set to 0 before referencing:
MD37100 GANTRY_POS_TOL_WARNING (gantry axis definition)
This will prevent a warning message being output during traversing motion.
In cases where an excessively high additional torque is acting on the drives due to misalignment between the leading and
synchronized axes, the gantry grouping must be aligned before the axes are traversed. After this, the gantry axes must be
referenced as outlined in the section titled "Referencing and synchronizing gantry axes":
Once the leading and synchronized axes have been referenced, the difference between them must be determined by
comparing the actual position value display on the corresponding screen:

+ → →
This difference must be applied as the reference point offset:
MD34080 REFP_MOVE_DIST (reference point distance)
MD34090 REFP_MOVE_DIST_CORR (reference point offset/absolute offset)

Function Manual
6FC5397-7EP40-0BA4, 07/2018 53
Synchronizing gantry axes
The gantry synchronization process must be activated with IS "Start gantry synchronization" (see Section "Referencing and
synchronizing gantry axes (Page 46)"). Once the axes have been synchronized (IS "Gantry grouping is synchronized" = 1),
the dimensional offset between the leading and synchronized axes must be checked to ensure that it equals 0. Corrections
may need to be made in the machine data mentioned above.

Input of gantry warning limit


Once the reference point values for the leading and synchronized axes have been optimized so that the gantry axes are
perfectly aligned with one another after synchronization, the warning limit values for all axes must be entered in the following
machine data:
MD37110 GANTRY_POS_TOL_WARNING (gantry warning limit)
To do this, the value must be increased incrementally until the value is just below the alarm (limit exceeded) response limit.
It is particularly important to check the acceleration phases.
This limit value also determines the position deviation value at which gantry synchronization is automatically started in the
control.

Calculating and activating compensations


In cases where the gantry axes require compensation (sag or leadscrew error), the compensation values for the leading axis
and the synchronized axis must be calculated and entered in the appropriate parameters or tables.
Refer to Section titled "Compensation (K3) (Page 113)".

Function generator/measuring function


The activation of the function generator and measuring function using the startup tool will be aborted on the synchronized
axis with an error message.
When an activation of the synchronized axis is absolutely necessary (e.g. to calibrate the machine), the leading and
synchronized axes must be temporarily interchanged.

Note
Generally, the start of the function generator, measuring functions and AM setup triggers the virtual axes to abort upon error
recognition.

Special cases
If individual axes have to be activated, the gantry groups must be temporarily canceled. As the second axis no longer travels
in synchronism with the first axis, the activated axis must not be allowed to traverse beyond the positional tolerance.
If the gantry grouping is canceled, the following points must be noted:
● Always activate the traversing range limits and set them to the lowest possible values (position tolerance)
● Synchronize the gantry grouping first if possible and then execute a POWER-ON-RESET without referencing the axes
again. This ensures that the traversing range limits always refer to the same position (i.e. that which was valid on power
ON).
● Avoid using the step-change function. Position step changes are only permissible if they stay within the permitted
tolerance.
● Always use an offset of 0 for the function generator and measuring function in contrast to the recommendations for
normal axes.
● Set the amplitudes for function generator and measuring function to such low values that the activated axis traverses a
shorter distance than the position tolerance allows. Always activate the traversing range limits as a check (see above).

Note
As a supplement to the more general description given here of features of start-up and dynamic control response of
drives, a complete example of a concrete constellation defined on the basis of its machine data can be found in Chapter
"Example (Page 56)".

Function Manual
54 6FC5397-7EP40-0BA4, 07/2018
Start-up support for gantry groupings
The commissioning functions of the function generator and measuring functions are assigned parameters via PI services. All
parameterized axes commence traversing when the following key on the MCP panel is pressed in "JOG" mode:

A window is displayed in the "Measuring function and function generator in gantry grouping" operator interface. Two
amplitude values, each with an offset and bandwidth, must be entered in this window. The first amplitude value applies to
the measuring axis and the second to the other coupled axes.

7.5 PLC interface signals for gantry axes


Special IS for gantry axes
The special PLC interface signals of the coupled gantry axes are taken via the axial PLC interface of the leading or
synchronized axes. Table below shows all special gantry-PLC interface signals along with their codes and indicates whether
the IS is evaluated on the leading axis or the synchronized axis.
PLC interface signal PLC ↔ NCK Address Leading axis Synchronized axis
Start gantry synchronization → DB380x.DBX5005.4 x
Automatic synchronization locking → DB380x.DBX5005.5 x
Gantry axis ← DB390x.DBX5005.7 1 1
Gantry leading axis ← DB390x.DBX5005.6 1 0
Gantry grouping is synchronized ← DB390x.DBX5005.5 x
Gantry synchronization ready to start ← DB390x.DBX5005.4 x
Gantry warning limit exceeded ← DB390x.DBX5005.3 x
Gantry trip limit exceeded ← DB390x.DBX5005.2 x
x: relevant for ...

Effect of axial interface signals on gantry axes


a) Axial interface signals from PLC to axis (PLC → NCK)
The axial interface signals from the PLC to the axis are always referred to all gantry axes in the grouping. In this case, all
gantry axes (leading and synchronized axis) have equal priority.
For example, all axes in the gantry groupings will be simultaneously shut down when the following interface signal is set to
"0" from the leading axis:
DB380x.DBX0002.1 (servo enable)
The following table shows the effect of individual interface signals (from PLC to axis) on gantry axes:
PLC interface signal Address Effect on
Leading axis Synchronized axis
Axis/spindle disable DB380x.DBX0001.3 On all axes in gantry No effect
grouping
Position measuring system 1 DB380x.DBX0001.4 Axial Axial
Controller enable DB380x.DBX0002.1 On all axes in gantry grouping
Delete distance to go (axial) DB380x.DBX0002.2 Axial No effect
Clamping in progress DB380x.DBX0002.3 Axial Axial
Feed stop DB380x.DBX0004.4 On all axes in gantry grouping
Hardware limit switch minus/plus DB380x.DBX1000.0/.1 Axial alarm: Brake request on all axes in gantry
grouping
2. Hardware limit switch minus/plus DB380x.DBX1000.2/.3 Axial Axial
Select drive parameter set DB380x.DBX4001.0 - .2 Axial Axial
Enable Pulses DB380x.DBX4001.7 Axial Axial

Function Manual
6FC5397-7EP40-0BA4, 07/2018 55
Either the "Follow-up" state (IS of one gantry axis = 1) or the "Stop" state (IS of all gantry axes = 0) is activated for all gantry
axes, depending on interface signal:
DB380x.DBX0001.4 (follow-up mode)
b) Axial interface signals from axis to PLC (NCK → PLC)
Each of the axial, axis-to-PLC interface signals for the synchronized axis and the leading axis is always set on an axis-
specific basis and output to the PLC.
Exception:
When the leading axis is being traversed, the interface signals are also set for the synchronized axis:
DB390x.DBX0004.6/.7 (traverse command minus/plus)

7.6 Miscellaneous points regarding gantry axes


Manual travel
It is not possible to traverse a synchronized axis directly by hand in "JOG" mode. Traverse commands entered via the
traversing keys of the synchronized axis are ignored internally in the control. Rotation of the handwheel for the synchronized
axis has no effect either.

Handwheel override
An overriding motion by means of the handwheel can only be applied to the leading axis in coupled axis mode. In this case,
the synchronized axes traverse in synchronism with the leading axis.

Programming in part program


Only the leading axis of a gantry axis grouping may be programmed in the part program. An alarm is generated while
programming a synchronized axis, even when a gantry axis grouping is separated.

PRESET
The PRESET function can only be applied to the leading axis. All axes in the gantry grouping are reevaluated internally in
the control when PRESET is activated. The gantry axis then loses their reference and synchronization:
DB390x.DBX5005.5 = 0 (gantry grouping is synchronized)

Default for RESET


In an active gantry grouping, the following MD parameterization is ignored for the synchronized axes:
MD30450 IS_CONCURRENT_POS_AX=1 (reset default: neutral axis/channel axis)
The state of the leading axis is assumed. The user is informed about the inappropriate configuration with display alarm 4300.

Position display
The position actual value display shows the actual values of both the leading axis and the synchronized axes. The same
applies to the service display values in the system data operating area.

Software limit switch


The SW limit switch monitor is processed for the leading axis only. If the leading axis crosses the limit switch, all axes in the
gantry grouping are braked to a standstill.

7.7 Example
7.7.1 Creating a gantry grouping

Introduction
The individual steps involved in the process are explained below using an example constellation:
● Setting up a gantry grouping
● Referencing its axes

Function Manual
56 6FC5397-7EP40-0BA4, 07/2018
● Aligning any offsets
● Synchronizing the axes involved

Constellation
Machine axis 1 = gantry leading axis, incremental measuring system
Machine axis 3 = gantry synchronized axis, incremental measuring system
The following MD describes the output values. Individual settings must be corrected or added later according to the
information below.

Gantry machine data


Axis 1:
MD37100 GANTRY_AXIS_TYPE = 1
MD37110 GANTRY_POS_TOL_WARNING = 0
MD37120 GANTRY_POS_TOL_ERROR = 1 mm
MD37130 GANTRY_POS_TOL_REF = 100 mm (max. misalignment)
MD37140 GANTRY_BREAK_UP = 0
Axis 3:
MD37100 GANTRY_AXIS_TYPE = 11
MD37110 GANTRY_POS_TOL_WARNING = 0
MD37120 GANTRY_POS_TOL_ERROR = 1 mm
MD37130 GANTRY_POS_TOL_REF = 100 mm (max. misalignment)
MD37140 GANTRY_BREAK_UP = 0

Reference point machine data


The MD values specified apply for the first encoder in both axis 1 and axis 3.
MD34000 REFP_CAM_IS_ACTIVE = TRUE
MD34010 REFP_CAM_DIR_IS_MINUS = e.g. FALSE
MD34020 REFP_VELO_SEARCH_CAM =
MD34030 REFP_MAX_CAM_DIST = corresponds to max. distance traversed
MD34040 REFP_VELO_SEARCH_MARKER =
MD34050 REFP_SEARCH_MARKER_REVERSE = e.g. FALSE
MD34060 REFP_MAX_MARKER_DIST = difference btw. cam edge and 0 mark
MD34070 REFP_VELO_POS =
MD34080 REFP_MOVE_DIST = 0
MD34090 REFP_MOVE_DIST_CORR = 0
MD34092 REFP_CAM_SHIFT = 0
MD34100 REFP_SET_POS = 0
MD34200 ENC_REFP_MODE = 1

7.7.2 Setting of NCK PLC interface

Introduction
An automatic synchronization process during axis referencing must first be disabled in order to prevent any damage to
grouping axes that are misaligned.

Function Manual
6FC5397-7EP40-0BA4, 07/2018 57
Disabling of automatic synchronization
The PLC user program sets the following IS:
● For the leading axis (axis 1):
NCK-PLC interface DB380x.DBB5005 relative to leading axis:

● For the synchronized axis (axis 3):


NCK-PLC interface DB380x.DBB5005 relative to synchronized axis:

The NCK sets the following IS as a confirmation:


● For the leading axis (axis 1):
NCK-PLC interface DB390x.DBB5005 relative to leading axis:

● For the synchronized axis (axis 3):


NCK-PLC interface DB390x.DBB5005 relative to synchronized axis:

7.7.3 Commencing start-up

Referencing
The following steps must be taken:
● Select "REF.POINT" operating mode
● Start referencing for the leading axis (axis 1)
● Wait until message "10654 Channel 1 Waiting for synchronization start" appears.
At this point, the NCK has prepared the leading axis for synchronization.

Function Manual
58 6FC5397-7EP40-0BA4, 07/2018
NCK-PLC interface DB390x.DBB5005: Leading axis ready for synchronization:

In addition, the following steps must be taken:


● RESET
● Read off values in machine coordinate system:
e.g.
X = 0.941
Y = 0.000
XF = 0.000
● Enter the X value of the leading axis (axis 1) with inverted sign in the machine data of the synchronized axis (axis 3):
MD34090 REFP_MOVE_DIST_CORR = - 0.941

Note
This MD is effective after POWER ON. To avoid having to perform a POWER ON in advance, this value can also be
entered in the following machine data:
MD34080 REFP_MOVE_DIST (reference point distance)
The MD is then valid after a RESET.

● Start referencing again for axis 1 with the modified machine data
● Wait until message "10654 Channel 1 Waiting for synchronization start" appears
● At this point, the NCK has prepared axis 1 for synchronization and sends the same interface signal as shown in the
image above:
● Examine actual positions of machine. Case A or B might apply:
Possible results of referencing the leading axis:

If Case A applies, the synchronization process can be started immediately. See step "Start synchronization". If Case B
applies, the offset "diff" must be calculated and taken into account:
● Measuring of diff
● By using two appropriate, right-angled reference points R and R" in the machine bed (at the right of the image), the
difference in position can be traversed in JOG. The diff offset can then be read as the difference in the position display.
The diff offset must be entered in the machine data of axis 3 (synchronized axis):
MD34100 REFP_SET_POS
Continue with Step 1 (see above).
● Start gantry synchronization. PLC sets:
DB380x.DBX5005.4 = 1 (start gantry synchronization)

Function Manual
6FC5397-7EP40-0BA4, 07/2018 59
7.7.4 Setting warning and trip limits
As soon as the gantry grouping is set and synchronized, the following machine data must still be set to correspond:
MD37110 GANTRY_POS_TOL_WARNING (gantry warning limit)
MD37120 GANTRY_POS_TOL_ERROR (gantry trip limit)

Proceed as follows
● Set the machine data for all axes with a large value to begin with:
MD37120 GANTRY_POS_TOL_ERROR (gantry trip limit)
● Set a very small value in the machine data:
MD37110 GANTRY_POS_TOL_WARNING (gantry warning limit)
When you put a heavy, dynamic strain on the axes, always be careful to re-enter the self-canceling alarm "10652
channel %1 axis %2 gantry warning limit exceeded".
● Now increase MD37110.
Do this until the alarm no longer appears. The interface indicates the status specified below. (That must occur in the
appropriate window, according to production.)
● Enter the value calculated for the warning limit + a small buffer value for safety purposes in machine data MD37120:

Error limit values


Values are entered in the following machine data:
MD37110 GANTRY_POS_TOL_WARNING (gantry warning limit)
MD37120 GANTRY_POS_TOL_ERROR (gantry trip limit)
MD37130 GANTRY_POS_TOL_REF (gantry trip limit for referencing)
These should have the following scales of magnitude at the end of the customizing process:
MD37110 < MD37120 < MD37130

Note
The same procedure must be followed when commissioning a gantry grouping in which the axes are operated by linear
motors and associated measuring systems.
The error limits entered into machine data MD37110 and MD37120 are considered to be additional tolerance values for the
actual-value difference of the leading axis and following axis if the IS "Gantry is synchronous" is not present (e.g. to be
resynchronized after canceling alarms without the gantry grouping).

7.8 Data table


7.8.1 Machine data
Number Identifier Name
Axis-specific
30300 IS_ROT_AX Rotary axis
32200 POSCTRL_GAIN[0]...[5] KV factor
32400 AX_JERK_ENABLE Axial jerk limitation
32410 AX_JERK_TIME Time constant for axis jerk filter
32420 JOG_AND_POS_JERK_ENABLE Initial setting for axial jerk limitation
32430 JOG_AND_POS_MAX_JERK Axial jerk
32610 VELO_FFW_WEIGHT[0]...[5] Feedforward control factor for speed feedforward control
32620 FFW_MODE Feedforward control mode
32810 EQUIV_SPEEDCTRL_TIME[0]...[5] Equivalent time constant speed control loop for precontrol
32900 DYN_MATCH_ENABLE Dynamic response adaptation
32910 DYN_MATCH_TIME[0]...[5] Time constant for dynamic response adaptation

Function Manual
60 6FC5397-7EP40-0BA4, 07/2018
Number Identifier Name
34040 REFP_VELO_SEARCH_MARKER[0] Creep velocity
34070 REFP_VELO_POS Reference point start velocity
34080 REFP_MOVE_DIST[0] Reference point approach distance
34090 REFP_MOVE_DIST_CORR[0] Home position offset
34100 REFP_SET_POS[0]...[3] Reference point value
34110 REFP_CYCLE_NR Axis sequence for channel-specific referencing
34330 REFP_STOP_AT_ABS_MARKER[0] Distancecoded linear measuring system without destination
point
36012 STOP_LIMIT_FACTOR[0]...[5] Exact stop coarse/fine factor and zero speed
36030 STANDSTILL_POS_TOL Zero speed tolerance
37100 GANTRY_AXIS_TYPE Gantry axis definition
37110 GANTRY_POS_TOL_WARNING Gantry warning limit
37120 GANTRY_POS_TOL_ERROR Gantry trip limit
37130 GANTRY_POS_TOL_REF Gantry trip limit for referencing
37140 GANTRY_BREAK_UP Invalidate gantry axis grouping

7.8.2 Interface signals


Number Bit Name Leading axis Synchronized axis
Mode-specific
DB3100.DBX0001 .2 Active machine function REF - -
Channel-specific
DB3300.DBX0001 .0 Referencing active - -
Axis-specific
DB380x.DBX5005 .4 Start gantry synchronization x -
DB380x.DBX5005 .5 Automatic synchronization locking x -
DB390x.DBX0000 .4 Referenced/synchronized 1 - -
DB390x.DBX5005 .2 Gantry trip limit exceeded - x
DB390x.DBX5005 .3 Gantry warning limit exceeded - x
DB390x.DBX5005 .4 Gantry synchronization ready to start x -
DB390x.DBX5005 .5 Gantry grouping is synchronized x -
DB390x.DBX5005 .6 Gantry leading axis 1 0
DB390x.DBX5005 .7 Gantry axis 1 1
x: relevant for ...

Function Manual
6FC5397-7EP40-0BA4, 07/2018 61
8 Axis couplings (M3)
8.1 Coupled motion
8.1.1 Brief description

8.1.1.1 Function
The "coupled motion" function enables the definition of simple axis links between a leading axis and a coupled-motion axis,
taking into consideration a coupling factor.
Coupled motion has the following features:
● Any axis of the NC can be defined as a leading axis.
● Any axis of the NC can be defined as a coupled-motion axis with a specific coupling factor.
● The leading axis and coupled-motion axis or axes together form a coupled axis group.
● Any number of coupled-motion axes can be assigned to a leading axis.
● Traversing movements of the leading axis are executed in synchronism on all coupled-motion axes based on the
coupling factor.
● Coupled-motion axes can be moved independently of the leading axis while the coupling is active.
● With programming instructions in the part program, the leading and coupled-motion axes of a coupled axis group are
defined and the coupling switch on/switch off is performed.
● Coupled motion is also possible in some manual modes such as JOG, REF.POINT, and JOG INC.

8.1.1.2 Preconditions
The "Coupled motion" function is a fixed component of the NC software.
For this function, the following restrictions apply:
● The maximum number of coupled axis groups, which is specified in MD18450 and MD18452, is limited to four.
● A coupled axis group can consist of any combination of linear and rotary axes or a combination of spindles.
● No more than one leading axes can be assigned to each coupled-motion axis.
● A coupled-motion axis cannot be the leading axis of a further coupled axis group.

8.1.2 General functionality


The "Coupled motion" function allows the definition of simple axis couplings. Coupling is performed from one leading axis to
one or more coupled-motion axes. A separate coupling factor can be specified for each coupled-motion axis.

Coupled axis group


The leading axis and all the coupled-motion axes assigned to it together form a coupled axis group. If the leading axis is
traversed, all coupled-motion axes traverse in accordance with their coupling factors.
A coupled axis group can consist of any combination of linear and rotary axes or a combination of spindles.

Leading axes
Any axis of the NC, including simulated axes, can be used as the leading axis.

Coupled-motion axes
Any axis of the NC can be used as the coupled-motion axis.

Coupling factor
The ratio in which the coupled-motion axis moves in relation to the leading axis is specified via the coupling factor.
Coupling factor K = motion of the coupled-motion axis / motion of the leading axis

Function Manual
62 6FC5397-7EP40-0BA4, 07/2018
Negative coupling factors (motion of the coupled-motion axis in the opposite direction) are also permitted.

Dependent coupled-motion axis


A coupled-motion axis is a "dependent coupled-motion axis" when it traverses as a result of a leading axis movement.

Independent coupled-motion axis


A coupled-motion axis is an "independent coupled-motion axis" when it traverses as a result of a direct traverse instruction.
The traversing movement resulting from the coupled-motion axis is then the sum total of the traversing movements as a
"dependent" and an "independent" coupled-motion axes.

Coordinate system
The motion of a coupled-motion axis is executed in the machine coordinate system (MCS) or in a coordinate system derived
from a kinematic transformation of the MCS.

Activating/deactivating
Coupled motion can be activated/deactivated only via the part programs, as shown below:
Activate: Part program → Deactivate: Part program

Operating modes
Coupled motion is effective in "AUTO", "MDA" and "JOG" modes.

Reference point approach


The following applies for referencing of axes of a coupled axis group:
● Leading axes
When referencing the leading axis of a coupled axis group, the coupling to all coupled-motion axes is retained. The
coupled motion axes move in synchronism with the leading axis, as a function of their coupling factors.
● Coupled-motion axis: "REF.POINT" mode
When referencing a coupled-motion axis of a coupled axis group, the coupling to the leading axis is cancelled. If the
coupling is canceled, the following alarm is displayed:
Alarm 16772 "Channel Channel No. block Block No. Axis Axis No. is following axis, coupling is opened."
The coupling is not activated again until "REF.POINT" mode is cancelled.

Function Manual
6FC5397-7EP40-0BA4, 07/2018 63
CAUTION
Danger of injury due to no coupling of the coupled-motion axis
When the coupled-motion axis is referenced, the coupling to the leading axis is cancelled. If you execute referencing
immediately with the leading axis, that is, without changing "REF.POINT" mode, the coupled-motion axis does not
traverse with the leading axis, which can result in the danger of injury to unprotected persons or damage to unsecured
objects.
• Make sure that you cancel the coupling to the leading axis before executing referencing with the coupled-motion
axis.

● Coupled-motion axis: Part program command G74


It is not possible to reference a coupled-motion axis of a coupled axis group using the G74 programming instruction.

Distance-to-go: Coupled-motion axis


The distance-to-go of a coupled-motion axis refers to the total residual distance to be traversed from dependent and
independent traversing.

Delete distance-to-go: Coupled-motion axis


Delete distance-to-go for a coupled-motion axis only results in aborting of the independent traversing movement of the
leading axis.

Response to NC Start
The behavior of the coupled axis groups during NC Start depends on the setting in the machine data:
MD20112 $MC_START_MODE_MASK (definition of initial control settings for NC Start)
Bit Value Meaning
8 0 Coupled axis groups are maintained in NC Start.
1 Coupled axis groups are phased out in NC Start.

Response to RESET/part program end


The behavior of the coupled axis groups during RESET/part program end depends on the setting in the machine data:
MD20110 $MC_RESET_MODE_MASK (Definition of basic setting of control after part program start)
Bit Value Meaning
8 0 Coupled-axis groups are invalidated on RESET/part program end.
1 Coupled-axis groups remain active even beyond RESET/part program end.

8.1.3 Programming

8.1.3.1 Definition and switch on of a coupled axis group (TRAILON)


Definition and switch on of a coupled axis group take place simultaneously with the TRAILON part program command.

Programming
Syntax: TRAILON(<coupled-motion axis>, <leading axis>, [<coupling factor>])

Effectiveness: modal
Parameters:
Coupled-motion axis: Type: AXIS
Range of values: All defined axis and spindle names in the channel
Leading axis: Type: AXIS
Range of values: All defined axis and spindle names in the channel

Function Manual
64 6FC5397-7EP40-0BA4, 07/2018
Coupling factor: The ratio of the traversing movement of the coupled-motion axis to the leading axis is speci-
fied via the optional coupling factor:
Coupling factor = Path of the coupled-motion axis / path of the leading axis
A negative coupling factor results in motion in opposite directions for the leading and cou-
pled-motion axis.

Type: REAL
Range of values: ± (2,2 * 10-308 … 1,8 * 10+308)
Default value: +1.0

Note
Coupled-motion spindle failing to reach the set speed
When the "Coupled motion" function is used for spindles, the speed of the leading spindle is limited to MD35130 (maximum
speed in the speed control mode); the speed of the coupled-motion spindle is limited to MD35135 (maximum speed in the
position control mode). The default value 0 of MD35135 indicates that 90% of the value of MD35130 becomes the maximum
speed in the position control mode. As a result, when the coupling factor is greater than 0.9, the coupled-motion spindle
cannot reach the set speed due to the speed limit specified in MD35135.
• In this case, set MD35135 to an appropriate value to reach the desired speed of the coupled-motion spindle.

Example:
Program code Comment
TRAILON(V,Y,2) ; Definition and switch on of the coupling of the
coupled-motion axis V with leading axis Y. The
coupling factor is 2.

8.1.3.2 Switch off (TRAILOF)


Switch off of the coupling of a coupled-motion axis with a leading axis takes place through the TRAILOF part program
command.

Programming
Syntax: TRAILON(<coupled-motion axis>, <leading axis>)
TRAILOF(<coupled-motion axis>)
Effectiveness: modal
Parameters:
Coupled-motion axis: Type: AXIS
Range of values: All defined axis and spindle names in the channel
Leading axis: Type: AXIS
Range of values: All defined axis and spindle names in the channel
Example:
Program code Comment
TRAILOF(V,Y) ; Deactivation of the coupling of the coupled-motion axis V to leading
axis Y.

8.1.4 Effectiveness of PLC interface signals

Independent coupled-motion axis


All the associated channel and axis specific interface signals of the coupled-motion axis are effective for the independent
motion of a coupled-motion axis, for example:
● DB3200.DBX0.3 (activate DRF)
● DB380x.DBB0 (feedrate override)
● DB380x.DBX1.3 (axis disable)
● DB380x.DBX2.1 (controller enable)

Function Manual
6FC5397-7EP40-0BA4, 07/2018 65
● DB380x.DBX4.0/1 (activate handwheel)
● DB380x.DBX4.3 (feed stop)
● …
This allows the speed to be changed for the independent motion of a coupled-motion axis using a feedrate override or a
DRF offset to be defined using the handwheel in "AUTO" and "MDA" modes.

Dependent coupled-motion axis


With respect to the motion of a coupled-motion axis, which is dependent on the leading axis, only the coupled-motion axis
interface signals that effect termination of the motion (e.g. axis-specific feed stop, axis inhibit, control system enable, etc.)
are effective.

Leading axis
When a coupled axis group is active, the interface signals (IS) of the leading axis are applied to the appropriate coupled-
motion axis via the axis coupling, that is
● A position offset or feed control action of the leading axis is applied via the coupling factor to effect an appropriate
position offset or feed control action in the coupled-motion axis.
● Shutdown of the leading axis as the result of an interface signal (for example, axis-specific feed stop, axis inhibit, servo
enable, etc.) causes the corresponding coupled-motion axis to shut down.

Position measuring system 1/2 (DB380x.DBX1.5/1.6)


Switch-over of the position measuring system for the leading and coupled-motion axes is not inhibited for an active coupled
axis group. The coupling is not canceled.
You are recommended to perform the switch-over when the coupling is deactivated.

Tracking (DB380x.DBX1.4)
Activation of tracking for an axis is done via the PLC program by setting the following NC/PLC interface signals:
DB380x.DBX2.1 = 0 (controller enable)
DB380x.DBX1.4 == 1 (tracking mode)
When activating the tracking mode for a coupled axis group, the specified NC/PLC interface signals must be set
simultaneously for all axes (leading and coupled-motion axes) of the coupled axis group.
If the tracking mode is activated for the leading axis only, a permanent offset results within the coupling.
Whether and which axis is a leading or a coupled-motion axis can be seen from the following NC/PLC interface signals and
system variables:
DB390x.DBX5003.0 (leading axis/spindle active)
DB390x.DBX5003.1 (coupled-motion axis/spindle active)
$AA_COUP_ACT [axis name] (See Section "Status of coupling (Page 66)")

8.1.5 Status of coupling


The coupling status of an axis can be determined using the following system variables:
$AA_COUP_ACT [axis name]
Value Meaning
0 No coupling active
8 Coupled motion active

8.1.6 Dynamics limit


After the coupled axis group is activated in the part program, the dynamic response of all coupled-motion axes is taken into
account during traversing of the leading axis to avoid overloading the coupled-motion axes.

Function Manual
66 6FC5397-7EP40-0BA4, 07/2018
8.1.7 Supplementary conditions

Control system dynamics


You are recommended to align the position control parameters of the leading axis and the coupled-motion axis within a
coupled axis group.

Note
Alignment of the position control parameters of the leading axis and the coupled-motion axis can be performed via a
parameter set changeover.

8.1.8 Examples

Application example: two-sided machining

Example 1
Example of an NC part program for the axis constellation shown in the above figure:
Program code Comment
TRAILON(W,Z,-1) ; Activation of the coupled axis group
G0 Z10 ; Infeed Z and W axes in opposite axial directions
TRAILOF(W,Z) ; Deactivation of the coupled axis group

Example 2
The dependent and independent movement components of a coupled-motion axis are added together for the coupled
motion. The dependent component can be regarded as a coordinate offset with reference to the coupled-motion axis.
Program code Comment
N01 G90 G0 X100 U100 ;
N02 TRAILON(U,X,1) ; Activation of the coupled axis group
N03 G1 F2000 X200 ; Dependent movement of U, Upos=200, UTrail=100
N04 U201 ; Independent movement, Upos=U201, UTrail=100
N05 X250 ; Dependent movement of U, Upos=U251, UTrail=150
N06 G91 U100 ; Independent movement, Upos=U351, UTrail=150
N07 G90 X0 ; Dependent movement of U, Upos=U101, UTrail=-100
N10 TRAILOF(U,X)

Function Manual
6FC5397-7EP40-0BA4, 07/2018 67
8.2 Dynamic response of the coupled-motion axis
8.2.1 Parameterized dynamic limits
The dynamics of the coupled-motion axis is limited with the following machine data values:
MD32000 $MA_MAX_AX_VELO (maximum axis velocity)
MD32300 $MA_MAX_AX_ACCEL (Maximum axis acceleration)

8.2.2 Programmed dynamic limits

8.2.2.1 Programming (VELOLIMA, ACCLIMA)

Reducing dynamics limits


The dynamic limits of the coupled-motion axis, also named following axis (FA), specified through MD32000 and MD32300
can be reduced from the part program:
Command Meaning
VELOLIMA[FA] Reducing the maximum Axis velocity
ACCLIMA[FA] Reducing the maximum Axis acceleration
The values specified during the programming of VELOLIMA[FA] and ACCLIMA[FA]are process values. They define the
proportion with which the parameterized dynamic limits (MD32000 and MD32300) are to be considered:
Range of values Meaning
1 ≤ value < 100 Effects a Reduction in the dynamic limit
100 ≤ value < 200 Reserved
The dynamic limits for the velocity and acceleration of the coupled-motion axis are then calculated as follows:
Maximum axis velocity = MD32000 $MA_MAX_AX_VELO * VELOLIMA[FA]
Maximum axis acceleration = MD32300 $MA_MAX_AX_ACCEL * ACCLIMA[FA]

Note
The reduction is effected on the overall dynamics of the axis, that is, on the sum of the axis component from overlay and
coupling.

POWER ON
During POWER ON the values of VELOLIMA and ACCLIMA are initialized to 100%.

Mode change
The dynamic offsets remain valid only on transition from "AUTO" to "JOG" mode.

RESET
The validities of the (VELOLIMA and ACCLIMA) dynamic offsets after RESET depend on the setting in the channel-specific
machine data:
MD22410 $MC_F_VALUES_ACTIVE_AFTER_RESET (F Function is active even after RESET)
Value Meaning
0 The values of VELOLIMA[FA] and ACCLIMA[FA] are set to 100% after RESET.
1 The last programmed values of VELOLIMA[FA] and ACCLIMA[FA] are also active after RESET.

Function Manual
68 6FC5397-7EP40-0BA4, 07/2018
8.2.2.2 System variables
For the geometry axis, channel axis, machine axis and spindle, the following readable system variables are available in the
part program:
Identifier Data type Description Unit

Preprocessing
$PA_ACCLIMA[n] REAL Acceleration offset set with ACCLIMA[Ax] %
$PA_VELOLIMA[n] REAL Velocity offset set with VELOLIMA[Ax] %

Main run
$AA_ACCLIMA[n] REAL Acceleration offset set with ACCLIMA[Ax] %
$AA_VELOLIMA[n] REAL Velocity offset set with VELOLIMA[Ax] %

Note
Reading the main run variables, implicitly triggers a preprocessing stop.

8.3 Data table


8.3.1 Machine data
Number Identifier Name
NC-specific
18450 MM_NUM_CP_MODULES Maximum number of allowed CP coupling modules
18452 MM_NUM_CP_MODUL_LEAD Maximum number of allowed CP master values
Channel-specific
20110 RESET_MODE_MASK Definition of the control basic settings after POWER ON and
RESET/part program end
20112 START_MODE_MASK Definition of control basic setting after POWER ON and RESET
22620 START_MODE_MASK_PRT Definition of the control basic settings for special start
22621 ENABLE_START_MODE_MASK_PRT Activation of MD22620
Axis/spindle-specific
30130 CTRLOUT_TYPE Setpoint output type
30455 MISC_FUNCTION_MASK Axis functions
35040 SPIND_ACTIVE_AFTER_RESET Own spindle RESET

8.3.2 Interface signals


Number Bit Name
Signals to the channel
DB3200.DBX0000 .3 Activate DRF
Signals to axis/spindle
DB380x.DBB0000 - Feedrate override
DB380x.DBX1000 .3 Axis disable
DB380x.DBX2000 .1 Controller enable
DB380x.DBX4000 .0/.1 Activate handwheel
DB380x.DBX4000 .3 Feed stop
DB380x.DBX5002 .4 Enable coupled-motion axis overlay
Signals from axis/spindle
DB390x.DBX2001 .1 Limiting of differential speed

Function Manual
6FC5397-7EP40-0BA4, 07/2018 69
Number Bit Name
DB390x.DBX2001 .5 Spindle in setpoint range, differential speed
DB390x.DBX2001 .6 Speed limit exceeded, total speed
DB390x.DBX2001 .7 Actual direction of rotation clockwise, total speed
DB390x.DBX5002 .2 Actual value coupling
DB390x.DBX5002 .4 Overlaid movement
DB390x.DBX5002 .5 Velocity warning threshold
DB390x.DBX5002 .6 Acceleration warning threshold
DB390x.DBX5003 .0 Leading axis/spindle active
DB390x.DBX5003 .1 Coupled-motion axis/spindle active
DB390x.DBX5003 .3 Coupled-motion axis accelerated
DB390x.DBX5003 .5 Maximum velocity reached
DB390x.DBX5003 .6 Maximum acceleration reached

9 Manual operation and handwheel traversal (H1)


9.1 General characteristics of traversing in JOG
"JOG" mode
Axes/spindles can be traversed manually in "JOG" mode. The active mode is transmitted to the PLC via the IS "Active mode:
JOG" (DB3100.DBX0000.2) and is visible in the display, see also Chapter "Operating modes, program operation (K1)
(Page 87)".

Traversing possibilities
Traversing the axes can be done via the traverse keys of a connected machine control panel (manual travel) or via
connected handwheels (handwheel jogging).
All machine axes can be traversed simultaneously using keys (with an appropriate version of a user-specific machine control
panel) or via handwheel, depending on the number of handwheels connected. If several machine axes are moved
simultaneously, there is no interpolatory relation.

Coordinate systems
The user has the option of traversing axes in the coordinate systems:
● Machine coordinate system (MCS); machine axes manually traversable
● Workpiece coordinate system (WCS); geometry axes manually traversable

Machine functions
Variants exist for manual traverse (the so-called machine functions):
● Continuous traversal
● Incremental traversing (INC, preset number of traversing increments). An increment is evaluated with 0.001 mm if the
basic system setting is metric.
The PLC user program transfers a user-specific machine function queued at the machine control interface to the relevant
PLC/NCK interface. Here the axis-specific NCK/PLC interface should be used for a machine axis/spindle, and the channel-
specific NCK/PLC interface should be used for a geometry axis or valid for all axes/spindles and geometry axes: Signals in
the operating mode range (see also following section).

Handwheel jogging
The axes can also be traversed via the handwheel in MCS or WCS. Incremental traversing (INC...) must be set to evaluate
the handwheel pulses (see Section "Handwheel traversal in JOG (Page 74)").

Function Manual
70 6FC5397-7EP40-0BA4, 07/2018
Traversing the geometry axes
If workpieces whose workpiece coordinate system is not parallel to the machine coordinate system are being machined
(inclined clamping, programmed rotation active in the contour), traversing can be done along the axes of the workpiece
coordinate system via the traverse keys or handwheel. In the stopped state, switch from operating mode "AUTO" to "JOG"
and traverse a geometry axis instead of a machine axis. Depending on the active rotation of the workpiece coordinate
system, between one and three machine axes move.
If a machine axis is traversed, this cannot also be moved via the traverse keys of a geometry axis. The traversing motion of
the machine axis must first have been completed - otherwise alarm 20062 "Axis already active" is output. Two geometry
axes can be traversed simultaneously with the handwheels 1 and 2.

Note
A separate, channel-specific PLC interface supplies geometry axes.

Transverse axis in "turning" technology


A geometry axis is defined as a transverse axis. If radius programming (DIAMOF) is selected instead of diameter
programming (DIAMON), the following must be noted when traversing in JOG:
● Continuous traversing: There are no differences when a transverse axis is traversed continuously.
● Incremental traversing: Only half the distance of the selected increment size is traversed.
● Traversing with the handwheel: As for incremental travel, with the handwheel only half the distance is traversed per
handwheel pulse.

Spindle manual travel


The spindle can also be traversed manually in "JOG" mode. Essentially the same conditions apply as for manual traverse of
machine axes. With JOG, the spindle can be traversed via the traverse keys/ IS "continuous" or "INC...". The mode is
selected and activated via the axis-/spindle-specific PLC interface as for the axes.
Spindle manual travel is possible in positioning mode (spindle in position control) or in open-loop control mode. The
parameter set (machine data) of the current gear stage applies.

Velocity
The velocity of the axes/spindle during manual traverse in JOG is defined by the following default values:
● For linear axes with the general SD41110 JOG_SET_VELO (JOG velocity with G94) or for rotary axes with SD41130
JOG_ROT_AX_SET_VELO (JOG velocity for rotary axes) or SD41200 JOG_SPIND_SET_VELO (JOG velocity for the
spindle).
● If the corresponding SD is zero, the appropriate axis-specific MD32020 JOG_VELO (conventional axis velocity) applies.
In this case, the value of the assigned machine axis is used for geometry axes: X->X1, Y->Y1, Z->Z1 (for default setting).

Rapid traverse override


If in the case of machine axes the rapid traverse override key is pressed at the same time as the traversing keys, then the
movement is executed at the rapid traverse velocity set in axis-specific MD32010 JOG_VELO_RAPID (axis velocity in "JOG"
mode with rapid traverse override).
The value of the assigned machine axis is used for geometry axes: X->X1, Y->Y1, Z->Z1 (for default setting). The separate
PLC interface area of the geometry axes must be used for control.

Velocity override
The velocity at which axes traverse in JOG can also be influenced by the axis-specific feedrate override switch for machine
axes, provided that axis-specific IS "Override active" (DB380x.DBX0001.7) is set. If the switch is set at 0%, the axis is not
traversed - even if IS "Override active" is not set.
The channel-specific feedrate override switch applies to geometry axes, or, in the case of rapid traverse override, the rapid
traverse override switch.
The activated spindle override switch applies to the spindle.

Function Manual
6FC5397-7EP40-0BA4, 07/2018 71
Acceleration
The maximum axis acceleration is defined with the axis-specific MD32300 MAX_AX_ACCEL. The acceleration can also be
set via a preset characteristic curve in "JOG" mode. The possible settings are described in Chapter "Acceleration (B2)
(Page 42)".

PLC interface
A separate PLC interface (DB3200.DBB1000, ff or DB3300.DBB1000, ff ) exists for geometry axes (axes in WCS) that
contains the same signals as the axis-specific PLC interface.
When the spindle is traversed manually, the PLC interface signals between the NCK and PLC have the same effect as for
machine axes. Interface signals "Position reached with fine or coarse exact stop" are only set if the spindle is in position
control.
In the case of interface signals that are only spindle-specific, while the spindle is traversing in JOG, the following should be
noted:
● The following PLC interface signals to the spindle have no effect:
– IS "Invert M3/M4" (DB380x.DBX2001.6)
– IS "Set direction of rotation ccw" or "Set direction of rotation cw" (DB380x.DBX2002.7 or .6)
– IS "Oscillation speed" (DB380x.DBX2001.5)
● The following PLC interface signals from the spindle are not set:
– IS "Actual speed cw" (DB390x.DBX2001.7)
– IS "Spindle in setpoint range" (DB390x.DBX2001.5)

Note
A reset causes the manual traverse motion (axis/spindle) to be terminated with brake ramp.

Limitations
The following limitations are active for manual travel:
● Software limit switches 1 or 2 (axis must be referenced)
● Hardware limit switches
The control ensures that the traversing movement is aborted as soon as the first valid limitation has been reached. Velocity
control ensures that deceleration is initiated early enough for the axis to stop exactly at the limit position (e.g. software limit
switch). Only when the hardware limit switch is triggered does the axis stop abruptly with "rapid stop".
An alarm is output when the corresponding limit is reached. The control automatically prevents further movement in this
direction. The traversing keys and the handwheel have no effect in this direction.

Note
The software limit switches are only active if the axis has previously been referenced.

Note
The function for retracting an axis that has approached the limit position depends on the machine manufacturer. For more
details, see the machine manufacturer's documentation.

For further information on working area limits and hardware and software limit switches see Chapter "Axis monitoring (A3)
(Page 26)".

9.2 Continuous travel


Selection
When "JOG" mode is selected, the active machine function "continuous" interface signal is set automatically:
● For geometry axes: DB3300.DBX1001.6, DB3300.DBX1005.6, DB3300.DBX1009.6
● For machine axes/spindle: DB390x.DBX0005.6

Function Manual
72 6FC5397-7EP40-0BA4, 07/2018
Continuous mode in "JOG" mode can also be selected via the PLC interface (IS "Machine function: continuous"). The PLC
defines via the "INC inputs in mode group range active" interface signal (DB2600.DBX0001.0) the signal range within which
INC/continuous signals are delivered to the NCK:
DB2600.DBX0001.0 = 1 → in the operating mode range: DB3000.DBB0002,
valid for all axes
DB2600.DBX0001.0 = 0 → in the geometry axis / axis range:
DB3200.DBB1001, DB3200.DBB1005,
DB3200.DBB1009, DB380x.DBB0005

Traversing keys +/-


The plus and minus traversing keys are selected to move the relevant axis in the appropriate direction.
Traverse key signals PLC to NCK IS:
● For geometry axes (traverse in WCS):
DB3200.DBX1000.7/.6, DB3200.DBX1004.7/.6, DB3200.DBX1008.7/.6
● For machine axes / spindle (traverse in MCS): DB80x.DBX004.7/.6
If both traversing keys of an axis are pressed simultaneously, there is no traversing movement, or, if an axis is in motion, it is
stopped.

Motion command +/-


As soon as a traverse request for an axis/spindle is active (e.g. after selection of a traverse key), the IS "Travel command+"
or "Travel command-" is sent to the PLC (depending on selected traverse direction):
● For geometry axes: DB3300.DBX1000.7/.6, DB3300.DBX1004.7/.6, DB3300.DBX1008.7/.6
● For machine axes / spindle: DB390x.DBX004.7 /.6

Continuous travel in "JOG" mode


The axis traverses for as long as the traverse key is held down if no axis limit is reached first. When the traversing key is
released, the axis is decelerated to standstill and the movement comes to an end.

9.3 Incremental travel (INC)


Programming increments
The path to be traversed by the axis is defined by so-called increments (also called "incremental dimensions"). The required
increment must be set by the machine user before the axis is traversed.
The setting is made on the machine control panel, for example. After the corresponding logic operation, the IS "Machine
function: INC1 to INCvar" associated with the required increment must be set by the PLC user program after it has been
correctly linked. The PLC defines via the "INC inputs in mode group range active" interface signal (DB2600.DBX0001.0) the
signal range within which INC signals are delivered to the NCK:
DB2600.DBX0001.0 = 1 → in the operating mode range: DB3000.DBB0002,
valid for all axes
DB2600.DBX0001.0 = 0 → in the geometry axis / axis range:
DB3200.DBB1001, DB3200.DBB1005,
DB3200.DBB1009, DB380x.DBB0005
The active machine function IS "INC... " is signaled by the NCK to the PLC:
● For geometry axes: DB3300.DBX1001.0, DB3300.DBX1005.0, DB3300.DBX1009.0 to .5
● For machine axes / spindle: DB390x.DBX0005.0 to .5

Settable increments
The operator can set different increment sizes:
● Fixed increments whose increment sizes are common to all axes: INC1, INC10, INC100, INC1000 (only via IS:
INC10000).

Function Manual
6FC5397-7EP40-0BA4, 07/2018 73
● A variable increment (INCvar). The increment setting for the variable increment can also be made for all axes using
general SD41010 JOG_VAR_INCR_SIZE (size of the variable increment for INC/handwheel).

Traverse keys and travel command


As for continuous traversing (see Section "Continuous travel (Page 72)")

Abort traversing movement


If you do not want to traverse the whole increment, the traverse movement can be aborted with RESET or "Delete distance-
to-go" interface signal (DB380x.DBX0002.2).

9.4 Handwheel traversal in JOG


Selection
"JOG" mode must be active. The user must also set the increment INC1, INC10, etc., which applies to handwheel travel.
Up to 2 handwheels can be connected. This means that up to 2 axes can be traversed by handwheel simultaneously and
independently.
A handwheel is assigned to the geometry or machine axes (WCS or MCS) via interface signals.
The axis to be moved as a result of rotating handwheel 1 to 2 can be set:
● Via the PLC user interface with IS "Activate handwheel 1 to 2"
– For machine axis (traverse in MCS): DB380x.DBX0004.0 to .2
– For geometry axis (traverse in WCS): DB3200.DBX1000.0 to .2, DB3200.DBX1004.0 to .2, DB3200.DBX1008.0 to .2.
The assignment is linked to the PLC interface through the PLC user program. Only here can several machine axes be
assigned to one handwheel simultaneously.
● Using menu-assisted operation (HMI).
Pressing the following softkey in "JOG" mode displays the "Handwheel" window:

This enables an axis (WCS or MCS) to be assigned to each handwheel.


A separate user interface between the HMI and PLC is provided to allow activation of the handwheel from the operator panel
(HMI). This interface that the basic PLC program supplies for handwheels 1 to 2 contains the following information:
● The axis numbers assigned to the handwheel IS "Axis number handwheel n"
(DB1900.DBB1003, ff)
● Additional information on the machine or geometry axis
IS "Machine axis" (DB1900.DBB1003.7, ff)
The "Activate handwheel" interface signal is either set to "0" (disable) or to "1" (enable) by the PLC user program for the
defined axis.

Settings as path or velocity


When the electronic handwheel is turned, the assigned axis is traversed either in the positive or negative direction
depending on the direction of rotation.
The general MD11346 HANDWH_TRUE_DISTANCE (handwheel path or velocity specification) can be used to set the
setting type of the handwheel motion and thus adapted to the intended use.
● MD value = 0 (default):
The settings from the handwheel are velocity specifications. When the handwheel is stationary, braking is realized along
the shortest path.
● MD value = 1:
The settings from the handwheel are path specifications. No pulses are lost. Limiting the velocity to the maximum
permissible value can cause the axes to overtravel. Particular care should be taken in the case of a high weighting of the
handwheel pulses. Further variants of the path or speed setting are possible with the value = 2 or 3.

Function Manual
74 6FC5397-7EP40-0BA4, 07/2018
Evaluation
The traversing path/velocity produced by rotation of the handwheel is dependent on the following factors:
● Number of handwheel pulses received at the interface
● Active increment (machine function INC1, INC10, INC100, ... )
An increment is evaluated with 0.001 mm if the basic system setting is metric.
● Pulse weighting of the handwheel using general MD11320 HANDWH_IMP_PER_LATCH (handwheel pulses per locking
position)

Motion command +/-


While the axis is moving, the "Travel command+" or "Travel command-" interface signal is transmitted to the PLC depending
on the direction of motion.
● For geometry axes: DB3300.DBX1000.7/.6, DB3300.DBX1004.7/.6, DB3300.DBX1008.7/.6
● For machine axes / spindle: DB390x.DBX004.7/.6.
If the axis is already being moved using the traversing keys, the handwheel cannot be used. Alarm 20051 "Jogging with the
handwheel not possible" is output.

Velocity
The velocity results from the pulses generated by the handwheel and the pulse evaluation: Traverse path per time unit. This
velocity is limited by the value in the axis-specific MD32000 MAX_AX_VELO.

Abortion/interruption of traversing movement


The traversing movement is aborted as the result of a RESET or the axis-specific IS "Deletion of distance-to-go"
(DB380x.DBX0002.2). The setpoint/actual-value difference is deleted.
NC STOP only interrupts the traversing movement. NC START releases the handwheel motion again.

Movement in the opposite direction


Depending on MD11310 HANDWH_REVERSE, the behavior when the traversing direction is reversed is as follows:
● MD value = 0:
If the handwheel is moved in the opposite direction, the resulting distance is computed and the calculated end point is
approached as fast as possible: If this end point is located before the point where the moving axis can decelerate in the
current direction of travel, the unit is decelerated and the end point is approached by moving in the opposite direction. If
this is not the case, the newly calculated end point is approached immediately.
● MD value > 0:
If the handwheel is moved in the opposite direction by at least the number of pulses indicated in the machine data, the
axis is decelerated as fast as possible and all pulses received until the end of interpolation are ignored. That means,
another movement takes place only after standstill (setpoint side) of the axis (new function).

Response at software limit switches


When axes are traversed in "JOG" mode, they can traverse only up to the first active limitation before the corresponding
alarm is output.
Depending on the machine data MD11310 HANDWH_REVERSE, the behavior is as follows (as long as the axis on the
setpoint side has not yet reached the end point):
● MD value = 0:
The distance resulting from the handwheel pulses forms a fictitious end point which is used for the subsequent
calculations: If this fictitious end point is positioned, for example, 10 mm behind the limitation, these 10 mm must be
traversed in the opposite direction before the axis traverses again. If a movement in the opposite direction is to be
performed immediately after a limit, the fictitious distance-to-go can be deleted via IS "Delete distance-to-go"
(DB380x.DBX0002.2) or by deselecting of the handwheel assignment.
● MD value > 0:
All handwheel pulses leading to an end point behind the limitation are ignored. Any movement of the handwheel in the
opposite direction leads to an immediate movement in the opposite direction, i.e. away from the limitation.

Function Manual
6FC5397-7EP40-0BA4, 07/2018 75
9.5 Fixed point approach in JOG
9.5.1 Introduction

Function
The machine user can use the "Approach fixed point in JOG" function to approach axis positions defined using machine data
by actuating the traversing keys of the Machine Control Panel or by using the handwheel. The traveling axis comes to a
standstill automatically on reaching the defined fixed point.

Applications
Typical applications are, for example:
● Approaching a basic position before starting an NC program.
● Travel towards tool change points, loading points and pallet change points.

Requirements
● The "Approaching fixed point in JOG" can be activated only in "JOG" mode.
The function cannot be enabled in "JOG-REPOS" and JOG-REF sub-modes and in JOG in "AUTO" mode.
● The axis to be traversed must be referenced.
● A kinematic transformation may not be active.
● The axis to be traversed must not be a synchronized axis of an active coupling.
● No ASUPs are executed.

Approaching a fixed point with G75


The process for approaching defined fixed points can be activated from the part program too using the G75 command.
For more information on approaching fixed points with G75, refer to the SINUMERIK 808D ADVANCED Programming and
Operating Manual, Section: "Fixed point approach".

9.5.2 Functionality

Procedure
Procedure in "Approaching fixed point in JOG"
● Selection of "JOG" mode
● Enabling the "Approach fixed point in JOG" function
● Traversing of the machine axis with traverse keys or handwheel

Activation
The PLC sets the interface signal after the "Approach fixed point in JOG" function is selected:
"JOG - Approach fixed point" (DB380x.DBX1001.0-2)
The number of the fixed point to be approached is output using bit 0 - 2 in binary code. The NC confirms activation with the
following interface signal as soon as the function takes effect:
"JOG - Approaching fixed point active" (DB390x.DBX1001.0-2)

Sequence
The actual traversing is started with the traverse keys or the handwheel in the direction of the approaching fixed point.
The selected machine axis traverses till it comes to an automatic standstill at the fixed point.
The corresponding NC/PLC interface signal is sent on reaching the fixed point with "Exact stop fine":
"JOG - Approaching fixed point reached" (DB390x.DBX1001.3-5)
This display signal is also reported if the axis reaches the fixed point position in the machine coordinate system using other
methods (e.g. NC program, synchronized action) at the setpoint end, and comes to a standstill at the actual-value end within
the "Exact stop fine" tolerance window (MD36010 STOP_LIMIT_FINE)

Function Manual
76 6FC5397-7EP40-0BA4, 07/2018
Movement in the opposite direction
The response while traversing in the opposite direction (i.e. in the opposite direction to the one used when approaching the
fixed point) depends on the setting of bit 2 in the following machine data:
MD10735 JOG_MODE_MASK (settings for "JOG" mode)
Traversing in the opposite direction is only possible if bit 2 is set.
Traversing in the opposite direction is blocked if bit 2 is not set, and the following channel status message is output if an
attempt is made (using the traversing keys or the handwheel) to traverse in the opposite direction to the one used when
approaching the fixed point:
"JOG: <Axis> direction blocked"

Approaching other fixed point


If a different fixed point is set during the fixed-point approach, the axis motion is stopped and the following alarm is signaled:
Alarm 17812 "Channel %1 axis %2 fixed-point approach in JOG: Fixed point changed"
The message signal "JOG - Approaching fixed point active" displays the number of the newly selected fixed point. The JOG
traverse must be triggered again to continue traversing.

Note
To avoid the alarm message, the machine user should proceed as follows:
1. Cancel the current traverse movement with residual distance deletion.
2. Activate fixed point approach for another fixed point and start the operation after the axis comes to a standstill.

Withdrawal from fixed point / deactivation


To withdraw from a fixed position, you must deactivate the "Approaching fixed point in JOG" function. This is done by
resetting the activation signal to "0".
DB380x.DBX1001.0-2 = 0
The message signals "JOG - Approaching fixed point active" and "JOG - Approaching fixed point reached" are canceled on
leaving the fixed-point position.

Special case: Axis is already on fixed point


The axis cannot be moved if, while starting the fixed point traverse, the axis is already at the position of the fixed point to be
approached. This is displayed through the following channel status message:
"JOG: <Axis> position reached"
To withdraw from the fixed position, you must deactivate the "Approaching fixed point in JOG" function.

Special features of incremental travel


If, during incremental travel, the fixed point is reached before the increment is completed, then the increment is considered
to have been completed fully. This is the case even when only whole increments are traveled.
MD11346 HANDWH_TRUE_DISTANCE = 2 or 3

Features of modulo rotary axes


Modulo rotary axes can approach the fixed point in both directions (bit 2 of MD10735 has no significance for them). No
attempt is made to follow the shortest path (DC) during the approach.

Features of spindles
A spindle changes to the positioning mode on actuating the "Approaching fixed point in JOG" function. The closed loop
position control is active and the axis can traverse to the fixed point.
If a zero mark has not been detected, the following alarm message is output (as with axis operation):
Alarm 17810 "Channel %1 axis %2 not referenced"
As a spindle must also be a modulo rotary axis at all times, the same conditions apply for direction observation as for
modulo rotary axes (refer to the paragraph "Features of modulo rotary axes")

Function Manual
6FC5397-7EP40-0BA4, 07/2018 77
9.5.3 Parameter setting

Movement in the opposite direction


The response while traversing in the opposite direction, i.e., against the direction of the approaching fixed point depends on
the setting of Bit 2 in the machine data:
MD10735 JOG_MODE_MASK (settings for "JOG" mode)
Bit Value Description
2 0 Travel in the opposite direction is not possible (default setting).
1 Movement in the opposite direction is possible.

Fixed point positions


A maximum of 4 fixed point positions can be defined for each axis via the following machine data:
MD30600 FIX_POINT_POS[n]

Number of valid fixed point positions


The number of valid fixed point positions of an axis is defined via the machine data:
MD30610 NUM_FIX_POINT_POS

Note
"Approaching fixed point with G75" constitutes an exception here. In this case, it is also possible to approach two fixed-point
positions with one setting (MD30610 = 0).

9.5.4 Programming

System variables
The following system variables that can be read in the part program and in the synchronous actions for the "Approach fixed
point" function are available.
System variable Description
$AA_FIX_POINT_SELECTED [<Axis>] Number of fixed point to be approached
$AA_FIX_POINT_ACT [<Axis>] Number of the fixed point on which the axis is currently
located

9.5.5 Supplementary Conditions

Axis is indexing axis


The axis is not traversed and an alarm is output if the axis to be traversed is an indexing axis and the fixed point position to
be approached does not match an indexing position.

Frames active
All active frames are ignored. Traversing is performed in the machine coordinate system.

Offset values active


Active compensation values (external work offset, synchronized action offset $AA_OFF, online tool offset) are also applied.
The fixed point is a position in the machine coordinates system.
An alarm is signaled if an offset movement (external work offset, synchronized action offset $AA_OFF, online tool offset) is
made during a fixed-point approach in JOG. The position of the fixed point to be approached in the machine coordinates
system is not reached; instead a position that would have been reached without active offset movement is reached. The
NC/PLC interface signal "JOG - Approaching fixed point reached" (DB390x.DBX1001.3-5) is not signaled.

Function Manual
78 6FC5397-7EP40-0BA4, 07/2018
9.5.6 Application example

Target
A rotary axis (machine axis 4 [AX4]) is to be moved to Fixed Point 2 (90 degrees) with the "Approaching fixed point in JOG"
function.

Parameter setting
The machine data for the "Approaching fixed point" function of machine axis 4 are parameterized as follows:
MD30610 NUM_FIX_POINT_POS[AX4] = 4 4 fixed points are defined for machine axis 4.
MD30600 FIX_POINT_POS[0,AX4] = 0 1st Fixed point of AX4 = 0 degree
MD30600 FIX_POINT_POS[1,AX4] = 90 2nd Fixed point of AX4 = 90 degree
MD30600 FIX_POINT_POS[2,AX4] = 180 3rd Fixed point of AX4 = 180 degree
MD30600 FIX_POINT_POS[3,AX4] = 270 4th Fixed point of AX4 = 270 degree

Initial situation
Machine axis 4 is referred and is in Position 0 degree. This corresponds to the 1st fixed point and is output via the following
NC/PLC interface signal:
DB390x.DBX1001.0 = 1 (bit 0 - 2 = 1)

Approaching fixed point 2


The control system is switched in"JOG" mode.
The "Approaching fixed point" procedure for fixed point 2 is activated via the following NC/PLC interface signal:
DB380x.DBX1002.1 = 1 (bit 0 - 2 = 2)
Activation is confirmed by the following NC/PLC interface signal:
DB390x.DBX1001.1 = 1 (bit 0 - 2 = 2)
The Plus traverse key in the machine control table is used to traverse continuously to approach Fixed Point 2.
The machine axis 4 stops at the 90 degree position. This is signaled via the following NC/PLC interface signal:
DB390x.DBX1001.4 = 1 (bit 3 - 5 = 2)

9.6 Data table


9.6.1 Machine data
Number Identifier Name
General information
10000 AXCONF_MACHAX_NAME_TAB[n] Machine axis name [n = axis index]
10735 JOG_MODE_MASK Settings for "JOG" mode
11310 HANDWH_REVERSE Defines movement in the opposite direction
11320 HANDWH_IMP_PER_LATCH[0]...[2] Handwheel pulses per locking position
11346 HANDWH_TRUE_DISTANCE Handwheel path or velocity specification
Channel-specific
20060 AXCONF_GEOAX_NAME_TAB[n] Geometry axis in channel [n = geometry axis index]
20100 DIAMETER_AX_DEF Geometry axes with transverse axis functions
Axis/spindle-specific
30600 FIX_POINT_POS[n] Fixed-point positions for the axis
30610 NUM_FIX_POINT_POS Number of fixed-point positions for an axis
32000 MAX_AX_VELO Maximum axis velocity
32010 JOG_VELO_RAPID Rapid traverse in "JOG" mode
32020 JOG_VELO JOG axis velocity
32300 MAX_AX_ACCEL Axis acceleration

Function Manual
6FC5397-7EP40-0BA4, 07/2018 79
Number Identifier Name
32420 JOG_AND_POS_JERK_ENABLE Enable for axis-spec. jerk limitation
32430 JOG_AND_POS_MAX_JERK Axis-specific jerk
35130 GEAR_STEP_MAX_VELO_LIMIT[0]...[5] Maximum velocity for gear stage/spindle

9.6.2 Setting data


Number Identifier Name
General information
41010 JOG_VAR_INCR_SIZE Size of variable increment for INC/handwheel
41110 JOG_SET_VELO JOG velocity for linear axes
41130 JOG_ROT_AX_SET_VELO JOG speed for rotary axes
41200 JOG_SPIND_SET_VELO JOG velocity for the spindle

9.6.3 Interface signals


Number Bit Name
Signals from HMI to PLC
DB1900.DBX1003 .0 to .2 Axis number for handwheel 1
DB1900.DBX1004 .0 to .2 Axis number for handwheel 2
NCK-specific
DB2600.DBX0001 .0 INC inputs in operating mode range active
Specific to operating mode
DB3000.DBX0000 .2 "JOG" mode
DB3000.DBX0002 .0 to .6 Machine function INC1 up to continuous in operating mode range
DB3100.DBX0000 .2 Active "JOG" mode
Channel-specific
DB3200.DBX1000 .1, .0 Activate handwheel (2, 1) for geometry axis 1
DB3200.DBX1004 .1, .0 for geometry axis 2
DB3200.DBX1008 .1, .0 for geometry axis 3
DB3200.DBX1000 .4 Traversing-key lock for geometry axis 1
DB3200.DBX1004 .4 for geometry axis 2
DB3200.DBX1008 .4 for geometry axis 3
DB3200.DBX1000 .5 Rapid traverse override for geometry axis 1
DB3200.DBX1004 .5 for geometry axis 2
DB3200.DBX1008 .5 for geometry axis 3
DB3200.DBX1000 .7 or .6 Traversing keys plus or minus for geometry axis 1
DB3200.DBX1004 .7 or .6 for geometry axis 2
DB3200.DBX1008 .7 or .6 for geometry axis 3
DB3200.DBX1000 .0 to .6 Machine function INC1 to continuous for geometry axis 1
DB3200.DBX1004 .0 to .6 for geometry axis 2
DB3200.DBX1008 .0 to .6 for geometry axis 3
DB3300.DBX1000 .1, .0 Handwheel active (2, 1) for geometry axis 1
DB3300.DBX1004 .1, .0 for geometry axis 2
DB3300.DBX1008 .1, .0 for geometry axis 3
DB3300.DBX1000 .7 or .6 Traverse command plus or minus for geometry axis 1
DB3300.DBX1004 .7 or .6 for geometry axis 2
DB3300.DBX1008 .7 or .6 for geometry axis 3
Active machine function INC1 to continuous
DB3300.DBX1001 .0 to .6 for geometry axis 1
DB3300.DBX1005 .0 to .6 for geometry axis 2
DB3300.DBX1009 .0 to .6 for geometry axis 3

Function Manual
80 6FC5397-7EP40-0BA4, 07/2018
Number Bit Name
Axis/spindle-specific
DBB380x.DBX0000 - Feed override
DB380x.DBX0000 .7 Override active
DB380x.DBX0002 .2 Delete distance-to-go
DB380x.DBX0004 .1, .0 Activate handwheel (2, 1)
DB380x.DBX0004 .4 Traversing-key lock
DB380x.DBX0004 .5 Rapid traverse override
DB380x.DBX0004 .7 or .6 Traversing keys plus or minus
DB380x.DBX0005 .0 to .6 Machine function INC1 up to continuous in axis range
DB380x.DBX1002 .0 to .2 Activated fixed-point approach in JOG (binary coded: fixed point 1 to 4)
DB390x.DBX0000 .7/.6 Position reached with coarse/fine exact stop
DB390x.DBX0004 .1, .0 Handwheel active (2, 1)
DB390x.DBX0004 .7 or .6 Traverse command plus or minus
DB390x.DBX0005 .0 to .6 Active machine function INC1 to continuous
DB390x.DBX1001 .0 to .2 Fixed-point approach in JOG active (binary coded)
DB390x.DBX1001 .3 to .5 Fixed point reached (binary coded)

10 Auxiliary function outputs to PLC (H2)


10.1 Brief description
Auxiliary functions
For the purpose of workpiece machining operations, it's possible to program process-related functions (feedrate, spindle
speed, or gear stages) and functions for controlling additional devices on the machine tool (sleeve forward, gripper open,
clamp chuck) in the part program in addition to axis positions and interpolation methods. This is performed with the "auxiliary
functions" as collective term for various types.
The following types of auxiliary functions are available:
● Miscellaneous function M
● Spindle function (S)
● Auxiliary function (H)
● Tool number T
● Tool offset D
● Feed F (for the SINUMERIK 808D ADVANCED, there is no output from F to PLC)

Output of auxiliary functions to PLC


The auxiliary function output sends information to the PLC indicating, for example, when the NC program needs the PLC to
perform specific switching operations on the machine tool. The auxiliary functions are output, together with their parameters,
to the PLC.
The values and signals must be processed by the PLC user program. The following section describes the various methods
of configuring and programming auxiliary functions as well as their operating principles.

Auxiliary function groups


Auxiliary functions can be combined to form groups.

Function Manual
6FC5397-7EP40-0BA4, 07/2018 81
10.2 Programming of auxiliary functions
General structure of an auxiliary function
Letter[address extension]=Value
The letters which can be used for auxiliary functions are: M, S, H, T, D, F.
The address extension must be an integer. The square brackets can be omitted when an address extension is specified
directly as a numeric value.
The value is defined differently for the individual auxiliary functions:
● INT= integer
● REAL= fractional decimal number (floating point)
The table below introduces the programming of auxiliary functions:
Func- Address extension Value Explanation Number
tion (integer) per block
Meaning Area Area Type Meaning max
M Spindle no. 1-2 0-99 INT Function Specific numbers are 5
assigned a fixed func-
tion.
S Spindle no. 1-2 0-±3.4028 ex 38 REAL Spindle 1
speed
H Any 0 - 99 ±3.4028 ex 38 REAL Any Functions have no 3
effect in the NCK; only
to be implemented on
the PLC
T - - 0-32000 INT Tool selection 1
D - - 0-9 INT Tool offset D0 deselection, default 1
selection D1
F - - 0,001-999 999,999 REAL Path feedrate 1
A maximum total of 10 auxiliary functions may be programmed in one block. Alarm 14770 "Auxiliary function incorrectly
programmed" is output when the specified length for address extension of value is exceeded or when the wrong data type is
used. The following table shows some programming examples for H functions.
If the admissible number of auxiliary functions per block is exceeded, alarm 12010 is issued.
For the programming examples of H functions, see the table below:
Programming Output of H function to the PLC
H5 H0=5.0
H=5.379 H0=5.379
H17=3.5 H17=3.5
H5.3=21 Error, alarm 14770

Block change
A new auxiliary function output from the NCK to the PLC is only possible after the PLC has acknowledged all transferred
auxiliary functions. Auxiliary functions are present in the user interface for at least one PLC cycle. A block is considered as
completed when the programmed movement has been completed and the auxiliary function has been acknowledged. To do
so, the NCK stops the part program processing if necessary to ensure that no auxiliary functions are lost from the PLC user
program's point of view.

10.3 Transfer of values and signals to the PLC interface


Time of transfer
In the case of auxiliary functions which are output at the end of a block (e.g. M2), the output is only made after all axis
movements and the SPOS movement of the spindle have been completed.

Function Manual
82 6FC5397-7EP40-0BA4, 07/2018
If several auxiliary functions with different output types (prior, during, at end of motion) are programmed in one motion block,
then they are output individually according to their output type.
In a block without axis movements or SPOS movement of the spindle, the auxiliary functions are all output immediately in a
block.

Continuous-path mode
A path movement can only remain continuous if auxiliary function output takes place during the movement and is
acknowledged by the PLC before the path end is reached, see Chapter "Continuous Path Mode (Page 35)".

Interface signals
Transfer of the signals from NCK to the PLC.

10.4 Grouping of auxiliary functions


Functionality
The auxiliary functions of the types M, H, D, T, and S that are to be issued can be grouped to auxiliary function groups
through the machine data.
An auxiliary function can only be assigned to one group.
Only one auxiliary function of a group can be programmed per block. Otherwise, alarm 14760 is issued.

Configuration
You can define a maximum of 64 auxiliary function groups. A maximum of 64 auxiliary functions can be assigned to these 64
auxiliary function groups. This number does not include auxiliary functions (group 1 to 3) that are pre-assigned as standard.
The actual number of auxiliary functions that are to be assigned must be entered in the NCK-specific MD11100
AUXFU_MAXNUM_GROUP_ASSIGN (number of the auxiliary functions distributed to the AUXFU groups). To do so, the
password for protection level 1 must be set. Then, the control must be turned off and on again. Now, the subsequent
machine data with an index n greater than zero are available and additional values can be entered.
An allocated auxiliary function is defined in the following machine data:
● MD22000 AUXFU_ASSIGN_GROUP[n] (auxiliary function group)
● MD22010 AUXFU_ASSIGN_TYPE[n] (auxiliary function type)
● MD22020 AUXFU_ASSIGN_EXTENSION[n] (auxiliary function extension)
● MD22030 AUXFU_ASSIGN_VALUE[n] (auxiliary function value)

Predefined auxiliary function groups


Group 1:
The auxiliary functions M0, M1, and M2 (M17, M30) are, by default, allocated to group 1. The output is always made at the
end of the block.
Group 2:
The M functions M3, M4, and M5 (M70) are, by default, allocated to group 2. The output is always made before the
movement.
Group 3:
The S function is, by default, contained in group 3. The output is made with the movement.

User-defined groups
The other (user-defined) groups are issued with the movement.

Ungrouped auxiliary functions


The output of auxiliary functions that are not assigned to groups is made with the movement.

Function Manual
6FC5397-7EP40-0BA4, 07/2018 83
Configuring example:
Distribute 8 auxiliary functions to 7 groups:
Group 1: M0, M1, M2 (M17, M30) - by default, should be kept
Group 2: M3, M4, M5 (M70) - by default, should be kept
Group 3: S functions - by default, should be kept
Group 4: M78, M79
Group 5: M80, M81
Group 6: H1=10, H1=11, H1=12
Group 7: all T functions
Password for protection level 1 is set.
Make entry in MD11100 AUXFU_MAXNUM_GROUP_ASSIGN=8.
Then turn off the control and turn it on again or perform the control start-up through the softkey and define the remaining
machine data with a subsequent restart of the control.
The table below shows the examples of entries into the machine data:
Index n MD22000 MD22010 MD22020 MD22030
(GROUP) (TYPE) (EXTENSION) (VALUE)
0 4 M 0 78
1 4 M 0 79
2 5 M 0 80
3 5 M 0 81
4 6 H 1 10
5 6 H 1 11
6 6 H 1 12
7 7 T 0 -1

10.5 Block-search response


Block search with calculation
For the block search with calculation all auxiliary functions that are assigned to a group are collected and are issued at the
end of the block search before the actual re-entry block (except for group 1: M0, M1,...). The last auxiliary function of a group
is issued.
All collected auxiliary functions are issued in a separate block as regular auxiliary functions and before the movement.

Note
If the auxiliary functions are to be collected during the block search, they must be assigned to an auxiliary function group!

10.6 Description of auxiliary functions


10.6.1 M function

Application
You can use the M functions to enable the various switching operations on the machine per part program.

Scope of functions
● Five M functions per part program block are possible.
● Value range of M functions: 0 to 99; integer number

Function Manual
84 6FC5397-7EP40-0BA4, 07/2018
● Permanent functions have already been assigned to some of the M functions by the control manufacturer (see the
SINUMERIK 808D ADVANCED Programming and Operating Manual). The functions not yet assigned fixed functions are
reserved for free use of the machine manufacturer.

10.6.2 T function

Application
The T function can be used to make the tool required for a machining operation available through the PLC. Whether a tool
change is to be performed directly with the T command or with a subsequent M6 command can be set in
MD22550 TOOL_CHANGE_MODE.
The programmed T function can be interpreted as tool number or as location number.

Scope of functions
One T function per part program block is possible.

Peculiarity
T0 is reserved for the following function: remove the current tool from the tool holder without loading a new tool.

10.6.3 D function
The D function is used to select the tool offset for the active tool. Tool offsets are described in detail under:
Reference:
SINUMERIK 808D ADVANCED Programming and Operating Manual

10.6.4 H function

Application
The H functions can be used to transfer different values from the part program to the PLC. The meaning can be chosen by
the user.

Scope of functions
● Three H functions per part program block are possible.
● Value range of the H functions: Floating data (as calculating parameter R)
● Address extension 0 to 99 (H0=... to H99=...) possible

10.6.5 S function
The S function is used to determine the speed for the spindle with M3 or M4. For turning machines with G96 (constant
cutting speed) the cutting value is specified.
Reference:
SINUMERIK 808D ADVANCED Programming and Operating Manual

10.7 Data table


10.7.1 Machine data
Number Identifier Name
General
11100 AUXFU_MAXNUM_GROUP_ASSIGN Number of auxiliary functions distributed among the
AUXFU groups
Channel-specific
22000 AUXFU_ASSIGN_GROUP[n] Auxiliary function groups
22010 AUXFU_ASSIGN_TYPE[n] Auxiliary function types

Function Manual
6FC5397-7EP40-0BA4, 07/2018 85
Number Identifier Name
22020 AUXFU_ASSIGN_EXTENSION[n] Auxiliary function extensions
22030 AUXFU_ASSIGN_VALUE[n] Auxiliary function values

10.7.2 Interface signals


Number Bit Name
Channel-specific
DB2500.DBX0000 .0 to .4 M function 1 change to M function 5 change
DB2500.DBX0006 .0 S function 1 change
DB2500.DBX0008 .0 T function 1 change
DB2500.DBX0010 .0 D function 1 change
DB2500.DBX0012 .0 to .2 H function 1 change to H function 3 change
DB2500.DBD2000 T function 1 (DINT)
DB2500.DBD3000 M function 1 (DINT)
DB2500.DBB3004 Extended address of M function 1 (BYTE)
DB2500.DBD3008 M function 2 (DINT)
DB2500.DBB3012 Extended address of M function 2 (BYTE)
DB2500.DBD3016 M function 3 (DINT)
DB2500.DBB3020 Extended address of M function 3 (BYTE)
DB2500.DBD3024 M function 4 (DINT)
DB2500.DBB3028 Extended address of M function 4 (BYTE)
DB2500.DBD3032 M function 5 (DINT)
DB2500.DBB3036 Extended address of M function 5 (BYTE)
DB2500.DBD4000 S function 1 (REAL format)
DB2500.DBB4004 Extended address of S function 1 (BYTE)
DB2500.DBD4008 S function 2 (REAL format)
DB2500.DBB4012 Extended address of S function 2 (BYTE)
DB2500.DBD5000 D function 1 (DINT)
DB2500.DBW6004 Extended address of H function 1 (Word)
DB2500.DBD6000 H function 1 (REAL format)
DB2500.DBW6012 Extended address of H function 2 (Word)
DB2500.DBD6008 H function 2 (REAL format)
DB2500.DBW6020 Extended address of H function 3 (Word)
DB2500.DBD6016 H function 3 (REAL format)
DB2500.DBX1000 .0 - .7 Decoded M signals: M00 - M07
DB2500.DBX1001 .0 - .7 Decoded M signals: M08 - M15
DB2500.DBX1012 .0 - .7 Decoded M signals: M96 - M99
DB370x.DBD0000 - M function for the spindle (DINT), axis-specific
DB370x.DBD0004 - S function for the spindle (REAL), axis-specific

Function Manual
86 6FC5397-7EP40-0BA4, 07/2018
11 Operating modes, program operation (K1)
11.1 Brief description
Program operation
The execution of part programs or part program blocks in "AUTO" or "MDA" mode is referred to as program operation.
During execution, the program sequence can be controlled by PLC interface signals and commands.

Channel
A channel constitutes a unit in which a part program can be executed.
A channel is assigned an interpolator with program processing by the system. A certain mode is valid for it.
The SINUMERIK 808D ADVANCED control system has one channel.

11.2 Operating modes


11.2.1 Operating modes

Activating
The required operating mode is activated by the interface signals in the DB3000.DBB0000. If several modes are selected at
the same time the priority of the operating modes is as follows:
● JOG (high priority): The axes can be traversed manually with the handwheel or the traversing keys. Channel-specific
signals and interlocks are not observed.
● MDA: Program blocks can be processed
● AUTO (lower priority): Automatic processing of part programs

Feedback signal
The active operating mode is displayed by the interface signals in the DB3100.DBB0000.

Possible machine functions in JOG


The following machine function can be selected in "JOG" operating mode:
REF (reference point approach)
The required machine function is activated with IS "REF" (DB3000.DBX0001.2). The display is visible in the IS "active
machine function REF" (DB3100.DBX0001.2).

Stop
A stop signal can be issued with the following interface signals
● IS "NC stop" (DB3200.DBX0007.3)
● IS "NC stop axes plus spindles" (DB3200.DBX0007.4)
● IS "NC stop at block limit" (DB3200.DBX0007.2)
Depending on the interface signal used, either only the axes or in addition the spindles of the channels are stopped or the
axes at block end.

RESET
The active part program is aborted by the IS "Reset" (DB3000.DBX0000.7).
The following actions are executed when the IS "Reset" is triggered:
● Part program preparation is stopped immediately.
● Axes and spindles are stopped.
● Any auxiliary functions of the current block not yet output, are no longer output.

Function Manual
6FC5397-7EP40-0BA4, 07/2018 87
● The block indicator is reset to the beginning of the relevant part program.
● All Reset alarms are deleted from the display.
● The reset is complete as soon as IS "Channel status Reset" (DB3300.DBX0003.7) is set.

Ready
Ready to run is displayed by IS "808D Ready" (DB3100.DBX0000.3).

11.2.2 Mode change

General
A changeover to another operating mode is requested and activated via the interface.

Note
The mode is not changed internally until the IS "Channel status active" (DB3300.DBX0003.5) is no longer present.

In the "Channel status Reset" (IS: DB3300.DBX0003.7, e.g. after pressing the "Reset key") one can switch from any
operating mode into another.
In the "Channel status interrupted" (IS: DB3300.DBX0003.6) only a conditional changeover is possible (see following table).
If one leaves AUTO to change to JOG, one must return to AUTO again or press "Reset". Thus a change AUTO-JOG-MDA is
made impossible. The same applies for MDA from which one may change neither directly nor indirectly to AUTO, provided
the Reset state is present.
The table shows the possible operating mode changes depending on the current operating mode and the channel state
("Channel in reset" or "Channel interrupted").
From AUTO JOG MDA
AUTO MDA pre-
previously viously
To Reset Interrupt Reset Interrupt Interrupt Reset Interrupt
AUTO X X X
JOG X X X X
MDA X X X
Possible mode changes are shown by an "X".

Error on operating mode changeover


A corresponding error message is output if a mode change request is rejected by the system. This error message can be
cleared without changing the channel status.

Mode change disable


Changeover between operating modes can be inhibited by means of IS "Mode group changeover disable"
(DB3000.DBX000.4). This suppresses the mode change request.

11.2.3 Functional possibilities in the individual modes

Overview of the functions


You see from the following table which function can be selected in which operating mode and in which operating state.
Mode of operation AUTO JOG MDA
Functions 1 2 3 1 3 4 3 5 3 1 2 3 6 7
Loading a part program from out- sb sb sb sb sb sb sb sb
side through "Services"
Processing a part program/block s s b s s b
Block search s s b

Function Manual
88 6FC5397-7EP40-0BA4, 07/2018
Mode of operation AUTO JOG MDA
Functions 1 2 3 1 3 4 3 5 3 1 2 3 6 7
Reference point approach via part sb sb
program command (G74)
s: Function can be started in this status
b: Function can be processed in this status
1: Channel in reset
2: Channel interrupted
3: Channel active
4: Channel interrupted JOG during AUTO interruption
5: Channel interrupted JOG during MDA interruption
6: Channel active JOG in MDA during MDA interruption
7: Channel active JOG in MDA

11.2.4 Monitoring functions in the individual modes

Overview of monitoring functions


Different monitoring functions are active in individual operating modes.
For monitoring functions and interlocks, see the tables below:
Mode of operation AUTO JOG MDA
Functions 1 2 3 1 3 4 3 5 3 1 2 3 6 7
Axis-specific monitoring functions or when positioning the spindle
SW limit switch + x x x x x x x
SW limit switch – x x x x x x x
HW limit switch + x x x x x x x x x x x x x x
HW limit switch – x x x x x x x x x x x x x x
Exact stop coarse/fine x x x x x x x x x x x x x x
Clamping tolerance x x x x x x x x x x x x x x
DAC limit x x x x x x x x x x x x x x
(analog spindle)
Contour monitoring x x x x x x x

Spindle-specific monitoring functions


Speed limit exceeded x x x x x x
Spindle is stationary x x x x x x x x x x x x x x
Spindle synchronized x x x x x x
Speed in setpoint range x
Maximum permissible speed x x x x x x
Encoder frequency limit x x x x x x
x: Monitoring is active in this status
1: Channel in reset
2: Channel interrupted
3: Channel active
4: Channel interrupted JOG during AUTO interruption
5: Channel interrupted JOG during MDA interruption
6: Channel active JOG in MDA during MDA interruption
7: Channel active JOG in MDA

Function Manual
6FC5397-7EP40-0BA4, 07/2018 89
11.2.5 Interlocks in the individual modes

Overview of interlocks
Different interlocks can be active in the different operating modes.
The following table shows which interlocks can be activated in which operating mode and in which operating state.
Mode of operation AUTO JOG MDA
Functions 1 2 3 1 3 4 3 5 3 1 2 3 6 7
General interlocks
808D Ready x x x x x x x x x x x x x x
Mode change disable x x x x x x x x x x x x x x
Channel-specific interlocks
Feed stop x x x x x x x
NC Start disable x x x x x x x x x x x x x x
Read-in disable x x x x x x x x x x x x x x
Axis-specific interlocks
Spindle disable x x x x x x x x x x x x x x
Controller disable x x x x x x x x x x x x x x
Axis disable x x x x x x x x x x x x x x
Spindle-specific interlocks
Controller disable x x x x x x x x x x x x x x
Spindle disable x x x x x x x x x x x x x x
x: Interlock can be activated in this status
1: Channel in reset
2: Channel interrupted
3: Channel active
4: Channel interrupted JOG during AUTO interruption
5: Channel interrupted JOG during MDA interruption
6: Channel active JOG in MDA during MDA interruption
7: Channel active JOG in MDA

11.3 Processing a part program


11.3.1 Program mode and part program selection
Definition
Program mode applies if a part program is processed in "AUTO" mode or program blocks are processed in "MDA" mode.

Channel control
The Program mode can be controlled even while being executed via interface signals from the PLC. These can be either
mode group specific or channel specific interface signals.
The channel reports its current program operation status to the PLC with interface signals.

Selection
A part program can be selected only if the relevant channel is in the Reset state.
The part program can be selected via:
● Operator input (machining/program management operating area)
● PLC
– Selection of a program via the program number in "Program list" (see the SINUMERIK 808D ADVANCED
Programming and Operating Manual)
– Reselection of an active program via the PLC-HMI interface (see Section "Signals from HMI to PLC (Page 19)")

Function Manual
90 6FC5397-7EP40-0BA4, 07/2018
11.3.2 Start of part program or part program block

START command, channel status


The channel-specific IS "NC start" (DB3200.DBX0007.1), which is usually controlled via the following hardkey, starts
program processing.

The START command can only be executed in "AUTO" and "MDA" modes. For this purpose, the channel must be in the
"Channel status reset" (DB3300.DBX0003.7) or "Channel status interrupted" (DB3300.DBX0003.6).

Required signal states


The selected part program can now be enabled for processing with the START command. The following enable signals are
relevant:
IS "808D Ready" (DB3100.DBX0000.3) must be set
IS "Activate program test" (DB3200.DBX0001.7) may not be set
IS "NC Start disable" (DB3200.DBX0007.0) may not be set
IS "NC Stop at block limit" (DB3200.DBX0007.2) may not be set
IS "NC stop" (DB3200.DBX0007.3) may not be set
IS "NC Stop axes plus spindle" (DB3200.DBX0007.4) may not be set
IS "EMERGENCY STOP" (DB2700.DBX0000.1) may not be set
Axis or NCK alarm may not be present

Execution of command
The part program or part program block is automatically processed and IS "Channel status active" (DB3300.DBX0003.5)
and IS "Program status running" (DB3300.DBX0003.0) are set.
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.

Interrupts
The START command is not effective if the prerequisite is not fulfilled. Then one of the following interrupts occurs: 10200,
10202, 10203

11.3.3 Part program interruption

Channel status
The STOP command is executed only if the channel concerned is in the "Channel active" status (DB3300.DBX0003.5).

STOP commands
There are various commands which stop processing of the program and set the channel status to "interrupted":
● IS "NC Stop at block limit" (DB3200.DBX0007.2)
● IS "NC stop" (DB3200.DBX0007.3)
● IS "NC Stop axes plus spindle" (DB3200.DBX0007.4)
● IS "Single block" (DB3200.DBX0000.4)
● Programming command "M0" or "M1" and corresponding activation

Execution of command
After execution of the STOP command, IS "Program status stopped" (DB3300.DBX0003.2) and the IS "Channel status
interrupted" (DB3300.DBX0003.6) are set. Processing of the interrupted part program can continue from the point of
interruption with another START command.

Function Manual
6FC5397-7EP40-0BA4, 07/2018 91
The following actions are executed when the STOP command is triggered:
● Part program processing is stopped at the next block limit (with NC stop at block limit, M0/M1 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 are stopped with subsequent stop of the part program processing.
● The block indicator stops at the point of interruption.

11.3.4 RESET command

Function
The RESET command (IS "Reset" (DB3000.DBX000.7)) can be executed in every channel state. This command is aborted
by another command.
A RESET command can be used to interrupt an active part program or part program blocks. After execution of the Reset
command, IS "Channel status reset" (DB3300.DBX0003.7) and the IS "Program status aborted" (DB3300.DBX0003.4) are
set.
The part program cannot be continued at the point of interruption. All axes in the channel are at exact stop.
The following actions are executed when the RESET command is triggered:
● Part program preparation is stopped immediately.
● All axes and if appropriate spindles are braked.
● 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 alarms are cleared from the display if they are not POWER ON alarms.

11.3.5 Program control

Selection/activation
The user can control part program processing via the user interface. In "AUTO" operating mode, certain functions can be
selected after you perform the following operations, whereby some functions act on interface signals of the PLC.


These signals are merely selection signals from the user interface. They do not activate the selected function.
These signal states must be transferred from the PLC user program to another area of the data block to activate the
selected functions. With program control by the PLC the signals are to be set directly (see the table below).
Function Selection signal Activation signal Checkback signal
SKP skip block DB1700.DBX0001.0 DB3200.DBX0002.0
DRY dry run feedrate DB1700.DBX0000.6 DB3200.DBX0000.6
ROV rapid traverse override DB1700.DBX0001.3 DB3200.DBX0006.6
Preselection:
SBL -single block coarse - -
SBL -single block fine - -
Single block User-specific DB3200.DBX0000.4
M1 programmed stop DB1700.DBX0000.5 DB3200.DBX0000.5 DB3300.DBX0000.5
PRT program test DB1700.DBX0000.7 DB3200.DBX0001.7 DB3300.DBX0001.7

Function Manual
92 6FC5397-7EP40-0BA4, 07/2018
11.3.6 Program status

Program states
The status of the selected program is displayed in the interface in "AUTO" and "MDA" operating modes. If "JOG" operating
mode is selected when the program is stopped, then the "interrupted" program status is displayed there or on reset also
"aborted".
The following program states are available in the control system:
● IS "Program status aborted" (DB3300.DBX0003.4)
● IS "Program status interrupted" (DB3300.DBX0003.3)
● IS "Program status stopped" (DB3300.DBX0003.2)
● IS "Program status running" (DB3300.DBX0003.0)

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 state when these signals are set (status before the signal is set -> Program status running).
Program execution states
Commands
Aborted Interrupted Stopped 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, channel-sp." X
IS "Feed stop, axis-sp." X
Feed override = 0% X
IS "Spindle stop" X
M2 in the block X
M0/M1 in the block X
IS "Single block" X
Auxiliary functions output to PLC but not X
yet acknowledged

11.3.7 Channel status

Channel status
The current channel status is signaled at the interface for the channel. 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.
The following channel status are available:
● IS "Channel status reset" (DB3300.DBX0003.7)
● IS "Channel status interrupted" (DB3300.DBX0003.6)
● IS "Channel status active" (DB3300.DBX0003.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.

Function Manual
6FC5397-7EP40-0BA4, 07/2018 93
For the effect on channel status, see the table below:
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, channel-sp." X
IS "Feed stop, axis-sp." X
Feed override = 0 %
IS "Spindle stop" X
M2 in the block X
M0/M1 in the block X
IS "Single block" X
Auxiliary functions output to PLC but not yet X
acknowledged

11.3.8 Event-driven program calls

Application
In the case of certain events, an implied user program is to start. This allows the user to activate the initial settings of
functions or carry out initialization routines by part program command.

Note
The call of this user program in the SW version 4.6 (in this manual) is not compatible with that in the SW version 4.4.

Event selection
MD20108 PROG_EVENT_MASK (event-driven program call) can be used to specify which of the following events is to
enable the user program:
● Bit0 = 1: Part program start
● Bit1 = 1: Part program end
● Bit2 = 1: Operator panel reset
● Bit3 = 1: Power up (of the NC control)

Request which start event


In the user program, the system variable $P_PROG_EVENT can be used to request the event, which enabled the part
program.
Event
Part program start
For the sequence during starting a part program, see the table below:
Sequence Command Boundary conditions Comments
(must be satisfied before the
command)
1 Channel selection: Reset status None Select channel and mode
Operating mode selection: AUTO or
AUTO and overstoring or
MDA
2 NC Start None NCK start

Function Manual
94 6FC5397-7EP40-0BA4, 07/2018
Sequence Command Boundary conditions Comments
(must be satisfied before the
command)
3 MD20112 START_MODE_MASK Initialization sequence with
evaluation
4 /_N_CMA_DIR/CYCPE1MA.SPF and as a subroutine Implied call of the path name as
/_N_CMA_DIR/CYCPE_MA.SPF a subroutine
5 None Processing of the data part of
the main program
6 None Processing of the program part
of the main program
Event
Part program end
For the sequence at part program end, see the table below:
Sequence Command Boundary conditions Comments
(must be satisfied before the
command)
1 Channel selection: Reset status None Select channel and mode
Operating mode selection: AUTO or
AUTO and overstoring or
MDA
2 NC Start Block with end of part program Block is changed
3 MD20110 RESET_MODE_MASK, Control activated:
MD20150 GCODE_RESET_VALUES, Reset sequence with evaluation
MD20152 GCODE_RESET_MODE
4 /_N_CMA_DIR/CYCPE1MA.SPF and as an ASUP Implied call of the path name
/_N_CMA_DIR/CYCPE_MA.SPF as an ASUP
5 MD20110 RESET_MODE_MASK, Control activated: The G code reset position
MD20150 GCODE_RESET_VALUES, Reset sequence with evaluation continues to be specified with
MD20152 GCODE_RESET_MODE machine data
Event
Operator panel reset
For the processing sequence in operator panel reset, see the table below:
Se- Command Boundary conditions Comments
quence (must be satisfied before the
command)
1 Selection of channel and mode: Initial state: Any mode, any Select mode / channel status
any channel status from
any state
2 Reset
3 MD20110 RESET_MODE_MASK, Control activated:
MD20150 GCODE_RESET_VALUES, Reset sequence with evaluation
MD20152 GCODE_RESET_MODE
4 /_N_CMA_DIR/CYCPE1MA.SPF and as an ASUP Implied call of the path name as
/_N_CMA_DIR/CYCPE_MA.SPF an ASUP
5 MD20110 RESET_MODE_MASK, Control activated: The G code reset position con-
MD20150 GCODE_RESET_VALUES, Reset sequence with evaluation tinues to be specified with ma-
MD20152 GCODE_RESET_MODE chine data

Function Manual
6FC5397-7EP40-0BA4, 07/2018 95
Event
Startup
For the sequence with power up, see the table below:
Sequence Command Boundary conditions Comments
(must be satisfied before the
command)
1 Reset after power up
2 MD20110 RESET_MODE_MASK, Control activated
MD20150 GCODE_RESET_VALUES, after ramp up:
MD20152 GCODE_RESET_MODE Reset sequence with evaluation
3 /_N_CMA_DIR/CYCPE1MA.SPF and as an ASUP Implied call of the path name
/_N_CMA_DIR/CYCPE_MA.SPF as an ASUP
4 MD20110 RESET_MODE_MASK, Control activated: The G code reset position
MD20150 GCODE_RESET_VALUES, Reset sequence with evaluation continues to be specified with
MD20152 GCODE_RESET_MODE machine data

Note
You must put the manufacturer cycles CYCPE1MA.SPF and CYCPE_MA.SPF in the folder CMA.DIR.
The two manufacturer cycles are corresponding jump markers prepared; therefore CYCPE1MA is jumped to at the
beginning of PROG_EVENT.SPF and CYCPE_MA is jumped to at the end.

Chronological sequences
For part program start and part program end:
Time sequence of VDI signals DB3300.DBB0003 ("Program status" and "Channel status") when processing a part program
with an event-driven program call for part program start and part program end:
Time sequence of the interface signals for program status and channel status (1):

With operator panel reset:


Time sequence of VDI signals DB3300.DBB0003 ("Program status" and "Channel status") when processing with an event-
driven program call:

Function Manual
96 6FC5397-7EP40-0BA4, 07/2018
Time sequence of the interface signals for program status and channel status (2):

Note
IS DB3300.DBX0003.4 ("Program status aborted") and DB3300.DBX0003.7 ("Channel status reset") are only received if
CYCPE1MA.SPF and CYCPE_MA.SPF have been completed.
Neither IS DB3300.DBX0003.4 ("Program status aborted") nor DB3300.DBX0003.7 ("Channel status reset") are received
between the program end and the start of the program event.
This is also the case between an operator panel reset and the start of the program event.

Special points to be noted


The following must be noted for user programs CYCPE1MA.SPF and CYCPE_MA.SPF:
● It is run with the lowest priority and can, therefore, be interrupted by the user ASUP.
● The PLC can be advised of the processing status of CYCPE1MA.SPF and CYCPE_MA.SPF via user M functions.
● The triggering event can be defined at the interface via the PLC program:
DB3300.DBB4004 offers the information below:
0 No active event
Bit 0 = 1 Part program start from channel status RESET
Bit 1 = 1 Part program end
Bit 2 = 1 Operator panel reset
Bit 3 = 1 Ramp-up
Bit 4 = 1 First start after the search run
Bit 5-7 reserved, currently always 0
With the general request to 0, it is possible to determine whether an event is present. If a running event disappears upon
RESET, the associated display bit in the interface extinguishes. For very brief events, the corresponding bit remains for
at least the duration of a complete PLC cycle.
● Each time MD20108 PROG_EVENT_MASK is reconfigured, /_N_CMA_DIR/CYCPE1MA.SPF and
/_N_CMA_DIR/CYCPE_MA.SPF must be loaded or enabled. Otherwise, the alarm 14011 "Program
_N_PROG_EVENT_SPF does not exist or not enabled for execution" is output.
● The display can be suppressed in the current block display using the DISPLOF attribute in the PROC statement.
● A single block stop can be disabled with SBLOF attribute command or via
MD10702 IGNORE_SINGLEBLOCK_MASK (prevent single block stop) with Bit 0.

Function Manual
6FC5397-7EP40-0BA4, 07/2018 97
The response to read-in disable and single-block processing can be controlled separately through the machine data
MD20106 PROG_EVENT_IGN_SINGLEBLOCK (Prog events ignore the single block) and
MD20107 PROG_EVENT_IGN_INHIBIT (Prog events ignore the read-in disable).
MD20106 PROG_EVENT_IGN_SINGLEBLOCK:
CYCPE1MA.SPF and CYCPE_MA.SPF cause a block change despite single block without a further start when
Bit 0 = 1 is set, after Part program start event
Bit 1 = 1 is set, after Part program end event
Bit 2 = 1 is set, after Operator panel reset event
Bit 3 = 1 is set, after Ramp-up event
Bit 4 = 1 is set, after First start after search run event
MD 20107: PROG_EVENT_IGN_INHIBIT:
CYCPE1MA.SPF and CYCPE_MA.SPF cause a block change despite read-in disable when
Bit 0 = 1 is set, after Part program start event
Bit 1 = 1 is set, after Part program end event
Bit 2 = 1 is set, after Operator panel reset event
Bit 3 = 1 is set, after Ramp-up event
Bit 4 = 1 is set, after First start after search run event
The following constraint applies for Bit 0 == 1 (program event after part program start):
If the program event ends with the part program command "RET", then RET always leads to an executable block
(analogous to M17).
There is no new behavior for Bit 0 == 0, i.e. RET is interpreted in the interpreter and does not lead to an "executable
block".
No sequences for start/end of part program are passed:
● If a user ASUP is started from the reset status, the described sequences for the event for start/end of part program are
not passed.
● Settable Prog-Event properties
Machine data MD20109 PROG_EVENT_MASK_PROPERTIES can be used to define further properties of "event-driven
program calls" for specific channels:
– Bit0 = 0: An ASUP started from the RESET channel state is followed by an "event-driven program call" as in earlier
versions
– Bit0 = 1: An ASUP started from the RESET channel state is not followed by an "event-driven program call"
With the Part program start:
/_N_CMA_DIR/CYCPE1MA.SPF and /_N_CMA_DIR/CYCPE_MA.SPF are executed as subroutines. CYCPE1MA.SPF and
CYCPE_MA.SPF must be ended with M17 or RET. A return by means of REPOS command is not permitted and triggers
alarm 16020 "Repositioning not possible".
Error with operator panel reset or after ramp-up:
If EMERGENCY STOP or an operating mode / NCK error is still present when the operator panel is reset or after rampup,
then CYCPE1MA.SPF and CYCPE_MA.SPF will only be processed after EMERGENCY STOP has been acknowledged or
the error has been acknowledged in the channel.

Assignment example
MD20106 PROG_EVENT_IGN_SINGLEBLOCK = 'H1F'
MD20107 PROG_EVENT_IGN_INHIBIT = 'HC'
MD20109 PROG_EVENT_MASK_PROPERTIES = 'H1'

Event programs
Example for call by all events
MD20108 PROG_EVENT_MASK = 'H0F' (event-driven program call),
i.e. call of CYCPE1MA.SPF and CYCPE_MA.SPF during part program start, part program end, operator panel reset and
ramp-up:
Sequence for part program start
IF ($P_PROG_EVENT == 1)
N 10 R100 = 0 ; Transfer parameters for machining cycles

Function Manual
98 6FC5397-7EP40-0BA4, 07/2018
N 20 M17
ENDIF
Sequence for part program end and operator panel reset
IF ($P_PROG_EVENT == 2) OR ($P_PROG_EVENT == 3)
N10 R20 = 5
N20 ENDIF
N30 M17
ENDIF
Sequence for powerup
IF ($P_PROG_EVENT == 4)
N10 $SA_SPIND_S[Ax4] = 0 ; Speed for spindle start through virtual interface
N20 ENDIF
N30 M17
ENDIF
M17

Start with RESET key


One of the following part programs is automatically started with the RESET key:
● /_N_CMA_DIR/CYCPE1MA.SPF
● /_N_CMA_DIR/CYCPE_MA.SPF
Control via MD20107 PROG_EVENT_IGN_INHIBIT
If the following machine data settings are present:
MD20107 PROG_EVENT_IGN_INHIBIT= 'H04F'
MD20108 PROG_EVENT_MASK= 'H04F'
The program started with the RESET key is executed right up to the end independently of a possibly set read-in disable.

Note
Recommendation for MD11450 with block search:
MD11450 SEARCH_RUN_MODE = ’H7’ (search parameterization)
Bit 0 = 1:
With the loading of the last action block after block search, the processing is stopped and the VDI signal "Last action block
active" is set. Alarm 10208 is not output until the PLC requests this by setting the VDI signal "PLC action ended".
Application: PLC starts an ASUP after block search.
Bit 1 = 1:
Automatic ASUP start after output of the action blocks. Alarm 10208 is not output until the ASUP is completed.
Bit 2 = 1:
Output of the auxiliary functions is suppressed in the action blocks. The spindle programming that accumulated during the
block search can be output at a later point in time (e.g. in an ASUP).
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

11.3.9 Asynchronous subroutines (ASUPs)

Function
It is possible to activate two different ASUPs (PLCASUP1_SPF and PLCASUP2_SPF) from the PLC via the ASUP interface
area. Before an asynchronous subroutine (ASUP) can be started from the PLC, it must have been assigned to an interrupt
number by an NC program or by the PI service ASUP (see DB1200.DBB4000).
Once prepared in this way, it can be started at any time from the PLC. The NC program running is interrupted by the ASUP.

Function Manual
6FC5397-7EP40-0BA4, 07/2018 99
Only one ASUP can be started at one time. If the start signal for both ASUPs is to be set to logical 1 in a PLC cycle, the
ASUPs are started in the sequence INT1 and then INT2.
The start signal must be set to logical 0 by the user once the ASUP has been completed or if an error has occurred.
The control system provides two default ASUPs for the PLC. ASUP1 is used for manual tool changing and ASUP2 is used
for the manual machine of the workpiece on a turning machine with the Manual Machine Plus function.
You can also use your own ASUPs as required. To do so, you must first place your programs (PLCASUP1.SPF and
PLCASUP2.SPF) in the manufacturer cycle directory (N:\CMA), and then set "PI index" (DB1200.DBB4001) to 1 (ASUP1)/2
(ASUP2).

Note
The call of the ASUP PI service must have been completed before an ASUP may be started.

Initialization
The initialization is performed via the ASUP PI service.

Starting an ASUP
The time sequence of an ASUP is shown in the following pulse diagram in the example of PLCASUP1.SPF. You can see
from the table which interface signals are of relevance for PLCASUP2.SPF.
For the assignment of the signals to the pulse diagram, see the table below:
Signal Address - PLCASUP1_SPF Address - PLCASUP2_SPF
Start DB3400.DBX0000.0 DB3400.DBX0001.0
Being executed DB3400.DBX1000.1 DB3400.DBX1001.1
Completed DB3400.DBX1000.0 DB3400.DBX1001.0
Error DB3400.DBX1000.3 DB3400.DBX1001.3
Interrupt no. not allocated DB3400.DBX1000.2 DB3400.DBX1001.2
Pulse diagram for PLCASUP1_SPF:

① Function activation via positive edge of Start


② ASUP is being executed
③ Positive acknowledgment: ASUP ended
④ Reset function activation after receipt of acknowledgment
⑤ Signal change through PLC
⑥ 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
⑦ Negative acknowledgment: Error has occurred

Configuration
The behavior of the ASUP can be influenced via the following standard machine data.
● MD11602 ASUP_START_MASK (ignore stop reasons for ASUP)
The machine data specifies which stop reasons are to be ignored for an ASUP start.
Recommended: MD11602 = 'H7'

Function Manual
100 6FC5397-7EP40-0BA4, 07/2018
● MD11604 ASUP_START_PRIO_LEVEL (priority, as of which MD11602 is effective)
This machine data specifies the ASUP priority as of which machine data MD11602 ASUP_START_MASK is to be
applied. MD11602 is applied from the level specified here up to the highest ASUP priority level 1.
Recommended: MD11604 = 2
● MD20116 IGNORE_INHIBIT_ASUP (execute interrupt program in spite of read-in disable)
In spite of set read-in disable, an assigned user ASUP is processed completely for the interrupt channel with the set bit.
Bit 0 is assigned to interrupt channel 1 (PLCASUP1)
Bit 1 is assigned to interrupt channel 2 (PLCASUP2)
The machine data is effective only if MD11602 ASUP_START_MASK Bit2 = 0
● MD20117 IGNORE_SINGLEBLOCK_ASUP (execute interrupt program completely in spite of single block)
In spite of selected SBL processing mode, an assigned user ASUP is processed completely
for the interrupt channel with the set bit.
Bit 0 is assigned to interrupt channel 1 (PLCASUP1)
Bit 1 is assigned to interrupt channel 2 (PLCASUP2)
The machine data is effective only if
MD10702 IGNORE_SINGLE_BLOCK_MASK Bit1 = 0

11.3.10 Responses to operator or program actions

Responses
The following table shows the channel and program states that result after certain operator and program actions.
The left-hand side of the table shows the channel and program states 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.
Situation Channel status Program status Active mode Operator or program action
(Situation after the action)
R U A N U Switchgear A A M J
protection
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)

Function Manual
6FC5397-7EP40-0BA4, 07/2018 101
Description
Channel status: Program status: Operating modes:
R: aborted N: aborted A: AUTO
U: interrupted U: interrupted M: MDA
A: running S: stopped J: JOG
A: running

11.3.11 Example of a timing diagram for a program run


Examples of signals during a program run:

11.4 Program test


11.4.1 General information on the program test

Purpose
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. It is possible to activate several program test functions simultaneously.
The following test options are described here:
● Program processing without axis movements
● Program processing in single-block mode
● Program processing with dry run feedrate
● Processing of certain program sections
● Skipping certain program parts
● Graphic simulation

Function Manual
102 6FC5397-7EP40-0BA4, 07/2018
11.4.2 Program processing without axis movements (PRT)

Functionality
The part program can be started and processed with active "Program test" function via the IS "NC Start"
(DB3200.DBX0007.1), i.e. with auxiliary function outputs, dwell times. Only the axes/spindles are simulated. The software
limit switch safety function continues to be valid.
The position control is not interrupted, so the axes do not have to be referenced when the function is switched off.
The user can check the programmed axis positions and auxiliary function outputs of a part program.

Note
Program processing without axis motion can also be activated with the function "Dry run feedrate".

Selection/activation
This function is selected via the following softkey on the HMI:

IS "Program test selected" (DB1700.DBX0001.7) is set on selection of the function.


The PLC user program must activate the function via the IS "Activate program test" (DB3200.DBX0001.7).

Display
As a checkback for the active program test, "PRT" is displayed in the status line on the user interface and the IS "Program
test active" (DB3300.DBX0001.7) is set in the PLC.

11.4.3 Program processing in single block mode (SBL)

Functionality
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/she can call the next block. The program is advanced to the next
part program block via IS "NC Start" (DB3200.DBX0007.1).
When the function "single block" is activated, the part program stops after every program block during processing. In this
case the activated single block type must be observed.

Single-block type
The following different types of single block are provided:
● Single block, coarse
With this type of single block, the blocks that initiate actions (traversing motions, auxiliary function outputs, etc.) are
processed individually. If tool radius compensation is active (G41,G42), processing stops after every intermediate block
inserted by the control. Processing is however not stopped at calculation blocks as these do not trigger actions.
● Single block, fine
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.
"Single block coarse" is the default setting after switching on.

Note
In a series of G33 blocks single block is effective only if "dry run feedrate" is selected.

Selection/activation
The selection signal normally comes from a user machine control panel.
This function must be activated by the PLC user program via the IS "Activate single block" (DB3200.DBX0000.4).

Function Manual
6FC5397-7EP40-0BA4, 07/2018 103
The preselection whether "Single block coarse" or "Single block fine" type is made in the user interface in the "Program
control" menu.

Display
The checkback signal that single block mode is active is displayed in the relevant "SBL" field 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 signals are set:
– IS "Channel status interrupted" (DB3300.DBX0003.6)
– IS "Program status stopped" (DB3300.DBX0003.2)
● The following interface signals are reset:
– IS "Channel status active" (DB3300.DBX0003.5)
– IS "Program status running" (DB3300.DBX0003.0)

11.4.4 Program processing with dry run feedrate (DRY)

Functionality
The part program can be started via IS "NC Start" (DB3200.DBX0007.1). When the function is active, the traversing
velocities programmed in conjunction with G1, G2, G3, CIP, and CT are replaced by the feed value stored in SD42100
DRY_RUN_FEED. The dry run feedrate also replaces the programmed revolutional feedrate in program blocks with G95.
However, if the programmed feedrate is larger than the dry run feedrate, then the larger value is used.

NOTICE
Damage to the workpiece or machine tool
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/activation
Operation with dry run feedrate is selected via the following operations in the "AUTO" mode:

->
IS "Dry run feedrate" (DB1700.DBX0000.7) is set on selection of the function. In addition, the required dry run feedrate must
be entered via the following softkey on the HMI:

This does not activate the function.


This function is activated via the IS "Activate dry run feedrate" (DB3200.DBX0000.4) and is evaluated at NC start.
The dry run feedrate must be entered before program start in SD42100 DRY_RUN_FEED.

Display
The checkback signal that dry run feedrate is active is displayed in the relevant "DRY" status line on the user interface.

11.4.5 Block search: Processing of certain program sections

Functionality
To set the program run to a certain block (target block) of a part program, the block search function can be used. It can be
selected whether or not the same calculations are to be performed during the block search up to the target block as would
be performed during normal program operation.

Function Manual
104 6FC5397-7EP40-0BA4, 07/2018
After the target block is reached, the part program can be started via IS "NC Start" (give 2x) (DB3200.DBX0007.1). If
necessary there is an automatic compensating movement of the axes to start or end positions of the target block. Execution
of the remaining program then continues.

Note
Pay attention to a collision-free start position and appropriate active tools and other technological values! If necessary, a
collisionfree start position must be approached manually with JOG. Select the target block considering the selected block
search type.

Selection/activation
The block search is selected in "AUTO" mode on the user interface.
The search run can be activated with corresponding softkey for the following functions:
● Block search with calculation to contour
Is used in any circumstances in order to approach the contour. 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.
● Block search with calculation to block end point
Is used in any circumstances in order to approach a target position (e.g. tool change position). 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.
● Block search without calculation.
Is used for a quick search in the main program. No calculations are performed. The internal controller values indicate the
status valid before the search. Whether the program can be executed subsequently depends on the program and must
be decided by the operator. This search run is suitable for a fast syntax check of a new program.

Interface signal
In the PLC, the following interface signals are set according to a time sequence (see figure):
● "Block search active" (DB3300.DBX0001.4)
● "Action block active" (DB3300.DBX0001.3)
● "Approach block active" (DB3300.DBX0000.4)

Note
The "Approach block active" is only enabled with "Block search with calculation on 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).

● "Last action block active" (DB3300.DBX0000.6)


Chronological order of interface signals:

Function Manual
6FC5397-7EP40-0BA4, 07/2018 105
After "Block search with calculation at block end point", automatic repositioning is not performed between "Last action block
active" and continuation of part program processing by NC Start. The start point of the approach movement is the current
axis position on NC Start; the end point results from the processing of the part program.

Action blocks
Action blocks contain the actions accumulated during "block search with calculation", e.g. auxiliary function outputs, and tool
(T, D), spindle (S) and feed 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
The action blocks also activate the accumulated spindle programming (S value, M3/M4/M5, SPOS). The PLC user program
must ensure that the tool can be operated and, if necessary, the spindle programming is reset via the IS "Spindle reset"
(DB380x.DBX0002.2).

PLC actions after block search


There is the IS "Last action block active" to enable activation of PLC actions after block search. The signal indicates that all
action blocks have been executed and it is now possible to perform PLC actions or operator actions (e.g. mode change).
This allows the PLC to perform another tool change, for example, before the start of the movement.
The alarm 10208 is also output per default at this time. It should indicate to the operator that an NC start is still necessary to
continue program processing.

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

Note
For further information about the block search function, refer to the SINUMERIK 808D ADVANCED Programming and
Operating Manual.

11.4.6 Skip part program blocks (SKP)

Functionality
When testing or breaking in new programs, it is useful to be able to disable or skip certain part program blocks during
program execution.
Skipping part program blocks:

Function Manual
106 6FC5397-7EP40-0BA4, 07/2018
Selection/activation
The skip function is selected through the user interface in the following menu:

IS "Skip block selected" (DB1700.DBX0002.0) is set when the function is selected. In addition, a slash "/" must be written
before the blocks to be skipped (see figure). This however does not activate the function.
This function is activated via IS "Activate skip block" (DB3200.DBX0002.0).

Display
The checkback signal that the "Skip block" function is active is displayed in the relevant "SKP" status line on the user
interface.

11.4.7 Graphic simulation

Function
In "AUTO" operating mode a selected and opened program can be simulated graphically on the screen of the control unit.
The movements of the programmed axes are recorded as line diagram after an NC start.

Selection/deselection
The graphic simulation can be reached for the selected program through the following operations:

→ Open a program →
Here the IS "Simulation active" (DB1900.DBX0000.6) is set and reset again on leaving the program editing operating area or
via the following softkey on the HMI:

Display
Due to numerous operating possibilities a complete workpiece, or else only enlarged details of it, can be displayed on the
screen.
Reference:
SINUMERIK 808D ADVANCED Programming and Operating Manual

PLC user program


The PLC user program must itself influence the required behavior of the control system in simulation, for example:
● Stop axes/spindle by transition into the program test: set IS "Activate program test" (DB3200.DBX0001.7).
● Abort the running program if the following menu is exited by setting IS "Reset" (DB3000.DBX0000.7), etc.

Display machine data


A number of display machine data (MD283 to MD292) is available for the user-specific configuration of the graphic
simulation.
Reference:
SINUMERIK 808D ADVANCED Parameter Manual

Function Manual
6FC5397-7EP40-0BA4, 07/2018 107
11.5 Timers for program execution time
Function
Timers are provided under the "program execution time" function and these can be used for monitoring technological
processes in the program or only in the display. These timers are read-only.
There are timers that are always active. Others can be deactivated via machine data.

Timers - always active


● Time since the last "Control powerup with default values" (in minutes):
$AN_SETUP_TIME
The timer is automatically reset to zero in the case of "Control power-up with default values".
● Time since the last control powerup (in minutes):
$AN_POWERON_TIME
It is reset to zero automatically with each power-up of the control system.

Timers that can be deactivated


The following timers are activated via the machine data (default setting). The start is timer-specific. Each active run-time
measurement is automatically interrupted in the stopped program state or for feedrate-override = zero.
The behavior of the activated timers for active dry run feedrate and program testing can be specified with machine data.
● Total execution time in seconds of NC programs in "AUTO" mode (in seconds):
$AC_OPERATING_TIME
In "AUTO" mode, the runtime periods of all programs between NC start and end of program/RESET are summed up. The
timer is zeroed with each power-up of the control system.
● Runtime of the selected NC program (in seconds):
$AC_CYCLE_TIME
The runtime period between NC Start and End of program/Reset is measured in the selected NC program. The timer is
reset with the start of a new NC program.
● Tool action time (in seconds):
$AC_CUTTING_TIME
The runtime period of the path axes is measured in all NC programs between NC START and end of program/RESET
without rapid traverse active and with the tool active. The measurement is interrupted when the dwell time is active. The
timer is automatically reset to zero in the case of control power-up with default values.

Display
The contents of the timers are visible on the screen after you perform the following operations:

→ → →

● Run time = $AC_OPERATING_TIME


● Cycle time = $AC_CYCLE_TIME
● Cutting time = $AC_CUTTING_TIME
● Setup time = $AN_SETUP_TIME

Function Manual
108 6FC5397-7EP40-0BA4, 07/2018
● Power on time = $AN_POWERON_TIME
The cycle time is also visible in the information line of the "AUTO" window of the machining operating area.
Reference:
SINUMERIK 808D ADVANCED Programming and Operating Manual

11.6 Workpiece counter


Function
The "workpiece counter" function provides counters for counting workpieces. These counters can be read and written by the
program or HMI operation.
The following display machine data can be used to set the protection level for counter writing:
● MD9020 USER_CLASS_WRITE_WPC_COUNT (write protection level of workpiece counters)
This parameter ranges from 0 to 7, which corresponds to the eight protection levels of the control system respectively.
You can write the counters only with the password of a protection level higher than or equal to the setting value of
MD9020.

Note
You can input values ranging from 0 to 999999999 in the workpiece counters.
All the input values become valid only after you confirm them with the following hardkey:

The following channel-specific machine data can be used to control counter activation, counter reset timing, and counting
algorithm.
● MD27880 PART_COUNTER (activation of workpiece counters)
● MD27882 PART_COUNTER_MCODE (workpiece counting with user-defined M command)

Counter
● Number of workpieces required (workpiece target):
$AC_REQUIRED_PARTS
In this counter, you can define the number of workpieces at which the actual workpiece counter $AC_ACTUAL_PARTS is
reset to zero.
MD27880 PART_COUNTER (Bit 0) can be used to generate display alarm 21800 "Required number of workpieces
reached" and to output IS "Required number of workpieces reached" (DB3300.DBX40001.1).
● Total number of workpieces produced (total actual):
$AC_TOTAL_PARTS
The counter specifies the total number of all workpieces produced since the start time.
● Number of actual workpieces (current actual):
$AC_ACTUAL_PARTS
This counter registers the number of all workpieces produced since the start time. The counter is automatically reset to
zero (on condition that $AC_REQUIRED_PARTS is not equal to 0) when the required number of workpieces
($AC_REQUIRED_PARTS) has been reached.
● Number of workpieces specified by the user:
$AC_SPECIAL_PARTS
This counter allows the user to make workpiece counting in accordance with their own definition. The alarm output can
be defined for the case of identity with $AC_REQUIRED_PARTS (workpiece target). The user must reset the counter.
The first output of the M command for counting after the user reset the counter applies as the start point. This M command is
set in MD27880 PART_COUNTER or MD27882 PART_COUNTER_MCODE for the relevant counter.

Function Manual
6FC5397-7EP40-0BA4, 07/2018 109
Display
The contents of the counters are visible on the screen after you perform the following operations:

-> -> ->

● Part total = $AC_TOTAL_PARTS


● Part required = $AC_REQUIRED_PARTS
● Part count = $AC_ACTUAL_PARTS
($AC_SPECIAL_PARTS not available for display)
The part count is also visible in the information line of the "AUTO" window of the machining operating area.
References:
SINUMERIK 808D ADVANCED Programming and Operating Manual

11.7 Data table


11.7.1 Machine data

NC-specific machine data


Number Identifier Name
General
10702 IGNORE_SINGLEBLOCK_MASK Prevent single-block stop
11450 SEARCH_RUN_MODE Block search parameter settings
11602 ASUP_START_MASK Ignore stop conditions for ASUP
11604 ASUP_START_PRIO_LEVEL Priorities for ASUP_START_MASK

Basic machine data of the channel


Number Identifier Name
Channel-specific
20050 AXCONF_GEOAX_ASSIGN_TAB[n] Assignment between geometry axis and channel axis
[GEOaxis no.]: 0...2
20060 AXCONF_GEOAX_NAME_TAB[n] Geometry axis name in channel [GEOaxis no.]: 0...2
20070 AXCONF_MACHAX_USED[n] Machine axis number valid in channel [channel axis
no.]: 0...4
20080 AXCONF_CHANAX_NAME_TAB[n] Channel axis name in channel [channel axis no.]: 0...4
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 Eventdriven program calls
20109 PROG_EVENT_MASK_PROPERTIES Prog event properties
20110 RESET_MODE_MASK Initial setting at RESET
20112 START_MODE_MASK Initial setting at special NC Start after power-up and at
RESET

Function Manual
110 6FC5397-7EP40-0BA4, 07/2018
Number Identifier Name
20116 IGNORE_INHIBIT_ASUP Execute user ASUPs completely in spite of reading
disable
20117 IGNORE_SINGLEBLOCK_ASUP Process user ASUPs completely in spite of single-block
processing
20700 REFP_NC_START_LOCK NC-Start disable without reference point
21000 CIRCLE_ERROR_CONST Circle end point monitoring constant
20150 GCODE_RESET_VALUES Reset G groups
20152 GCODE_RESET_MODE G code basic setting at RESET

Auxiliary function settings of the channel


Number Identifier Name
Channel-specific
22000 AUXFU_ASSIGN_GROUP[n] Auxiliary function group [aux. func. no. in chan-
nel]: 0...63
22010 AUXFU_ASSIGN_TYPE[n] Auxiliary function type [aux. func. no. in channel]: 0...63
22020 AUXFU_ASSIGN_EXTENSION[n] Auxiliary function extension [aux. func. no. in channel]:
0...63
22030 AUXFU_ASSIGN_VALUE[n] Auxiliary function value [aux. func. no. in channel]:
0...63
22550 TOOL_CHANGE_MODE New tool offset for M function

Timers and counters of the channel


Number Identifier Name
Channel-specific
27860 PROCESSTIMER_MODE Activation of the program runtime measurement
27880 PART_COUNTER Activation of the workpiece counters
27882 PART_COUNTER_MCODE[n] Workpiece counting via M command, n = 0 ... 2

Display machine data


Number Identifier Name
283 ... 292 Setting of the display for the graphic simulation

11.7.2 Setting data


Number Identifier Name
Channel-specific
42000 THREAD_START_ANGLE Start angle for thread
42010 THREAD_RAMP_DISP Starting and deceleration distance of feed axis in thread
cutting G33
42100 DRY_RUN_FEED Dry run feedrate

11.7.3 Interface signals

Operating mode signals


Number Bit Name
PLC to NCK
DB3000.DBX0000 .0 "AUTO" mode
DB3000.DBX0000 .1 "MDA" mode
DB3000.DBX0000 .2 "JOG" mode

Function Manual
6FC5397-7EP40-0BA4, 07/2018 111
Number Bit Name
DB3000.DBX0000 .4 Mode change disable
DB3000.DBX0000 .7 RESET
DB3000.DBX0001 .2 Machine function REF
NCK to PLC
DB3100.DBX0000 .0 Active mode "AUTO"
DB3100.DBX0000 .1 Active mode "MDA"
DB3100.DBX0000 .2 Active "JOG" mode
DB3100.DBX0000 .3 808D READY
DB3100.DBX0001 .2 Active machine function REF

Channel signals
Number Bit Name
PLC to NCK
DB3200.DBX0000 .4 Activate single block
DB3200.DBX0000 .5 Activate M01
DB3200.DBX0000 .6 Activate dry run feed
DB3200.DBX0001 .0 Activate referencing
DB3200.DBX0001 .7 Activate program test
DB3200.DBX0002 .0 Block skip
DB3200.DBX0006 .0 Feed disable
DB3200.DBX0006 .1 Read-in disable
DB3200.DBX0006 .2 Delete distance-to-go
DB3200.DBX0006 .3 Delete UP number of passes
DB3200.DBX0006 .4 Program level abort
DB3200.DBX0006 .6 Rapid traverse override active
DB3200.DBX0006 .7 Feed rate override active
DB3200.DBX0007 .0 NC Start disable
DB3200.DBX0007 .1 NC Start
DB3200.DBX0007 .2 NC Stop at block limit
DB3200.DBX0007 .3 NC stop
DB3200.DBX0007 .4 NC Stop axes plus spindles
DB3200.DBX0007 .7 Reset
NCK to PLC
DB3300.DBX0000 .3 Action block active
DB3300.DBX0000 .4 Approach block active
DB3300.DBX0000 .5 M00/M01 active
DB3300.DBX0000 .6 Last action block active
DB3300.DBX0001 .0 Referencing active
DB3300.DBX0001 .4 Block search active
DB3300.DBX0001 .5 M2 / M30 active
DB3300.DBX0001 .7 Program test active
DB3300.DBX0003 .0 Program status: Running
DB3300.DBX0003 .2 Program status: Stopped
DB3300.DBX0003 .3 Program status: Interrupted
DB3300.DBX0003 .4 Program status: Aborted

Function Manual
112 6FC5397-7EP40-0BA4, 07/2018
Number Bit Name
DB3300.DBX0003 .5 Channel status: Active
DB3300.DBX0003 .6 Channel status: Interrupted
DB3300.DBX0003 .7 Channel status: Reset
DB3300.DBX4001 .1 Workpiece target reached
HMI to PLC
DB1700.DBX0000 .5 M01 selected
DB1700.DBX0000 .6 Dry run feed rate selected
DB1700.DBX0001 .3 Feed rate override selected for rapid traverse
DB1700.DBX0001 .7 Program test selected
DB1700.DBX0002 .0 Skip-block selected
DB1900.DBX0000 .6 Simulation active

ASUP signals
Number Bit Name
PLC to NCK
DB3400.DBX0000 .0 INT1 Start
DB3400.DBX0001 .0 INT2 Start
DB3400.DBX1000 .0 ASUP ended INT1
DB3400.DBX1000 .1 ASUP is being executed
DB3400.DBX1000 .2 Interrupt no. not allocated
DB3400.DBX1000 .3 ASUP version not possible
DB3400.DBX1001 .0 ASUP ended INT2
DB3400.DBX1001 .1 ASUP is being executed
DB3400.DBX1001 .2 Interrupt no. not allocated
DB3400.DBX1001 .3 ASUP version not possible

12 Compensation (K3)
12.1 Brief description
Compensations
The following axis-specific compensation functions can be activated for the control system:
● Backlash compensation
● Interpolatory compensation
– leadscrew error and measuring system error compensation (LEC)
● Following error compensation (speed feedforward control)
● Friction compensation (quadrant error compensation)
These compensation functions can be set for each machine individually with axis-specific machine data.

Function Manual
6FC5397-7EP40-0BA4, 07/2018 113
Position display
The normal actual-value and setpoint position displays ignore the compensation values and show the position values of an
ideal machine. To view the compensation values, perform the following operations:

+ → →
Then navigate to the item "Abs. compens. value meas. system 1".

12.2 Backlash compensation


Effect
In the case of axes/spindle with indirect measuring systems, mechanical backlash results in corruption of the traverse path,
causing an axis, for example, to travel too much or too little by the amount of the backlash when the direction of movement
is reversed (see following figure).

Compensation
To compensate for backlash, the axis-specific actual value is corrected by the amount of backlash every time the
axis/spindle changes direction.
This quantity can be entered for each axis/spindle at the commissioning phase in MD32450 BACKLASH (backlash
compensation)

Effectiveness
Backlash compensation is always active in all operating modes after reference point approach.

Positive backlash
The encoder leads the machine part (e.g. table). Since the actual position acquired by the encoder also leads the real actual
position of the table, the table travels too short a distance (see diagram below). The backlash compensation value must be
entered as a positive value here (= normal case).
Positive backlash (normal case):

Negative backlash
The encoder lags behind the machine part (e.g. table); the table then travels too far. The correction value entered is negative.

High backlash compensation values


The user has the option of applying the backlash compensation value gradually in several increments when the relevant axis
reverses direction. This prevents an excessive setpoint step change from causing specific axis errors.
The contents of the axis-specific MD36500 ENC_CHANGE_TOL determine the increment with which the backlash
compensation value (MD32450 BACKLASH) is applied. Please note that the backlash compensation is fully calculated only
after n servo cycles (n=MD32450/MD36500). An excessive time span can cause the triggering of standstill monitoring
alarms. If MD36500 is greater than MD32450, the compensation is performed in a servo cycle.

Function Manual
114 6FC5397-7EP40-0BA4, 07/2018
12.3 Interpolatory compensation
12.3.1 General

Terminology
Compensation value: The difference between the axis position measured by the position actual-value encoder and the
required programmed axis position (= axis position of the ideal machine). The compensation value is often also referred to
as the correction value.
Interpolation point: A position of the axis and the corresponding offset value.
Offset table: Table containing interpolation points

Compensation table
Because dimensional deviations between the leadscrew pitch and the measuring system directly affect the accuracy of
workpiece machining, they must be compensated for by the relevant position-dependent compensation values. The
compensation values are derived from measured error curves and entered in the control in the form of compensation tables
during installation. A separate table must be created for each compensation relation.
The compensation values and additional table parameters are entered in the compensation tables using special system
variables.

Entry of compensation table


Compensation tables can be loaded to the backed up NC user memory by two different methods.
● The compensation values are loaded when an NC program tables is started. with the compensation
● The compensation values can also be loaded by transferring the tables from a personal computer (PC) through the serial
interface on the HMI.

Note
The compensation tables can be output via the serial interface on the HMI through the following operations, and then
loaded back following editing:

+ -> -> -> ->

Linear interpolation between interpolation points


The traversing path to be compensated - defined using the start and end positions - is divided up into several (number
depends on error curve shape) path segments of equal size (see figure below). The actual positions that limit these sub-
paths are designated "interpolation points". A compensation value must be entered for each interpolation point (actual
position) during commissioning. The compensation value applied between two interpolation points is generated on the basis
of linear interpolation using the compensation values for the adjacent interpolation points (i.e. adjacent interpolation points
are linked along a line).

Function Manual
6FC5397-7EP40-0BA4, 07/2018 115
Linear interpolation between the interpolation points:

Compensation value at reference point


The compensation table should be structured such that the compensation value at the reference point is "zero". This
prevents position jumps occurring when the LEC is activated (after reference point approach).

12.3.2 LEC

Function
The leadscrew error compensation / measuring system error compensation (LEC) is an axis-specific compensation.
The principle of the LEC is to modify the axis-specific position actual value by the assigned compensation value in the
interpolation cycle and to apply this value to the machine axis for immediate traversal. A positive compensation value causes
the corresponding machine axis to move in the negative direction.
The magnitude of the compensation value is not limited and is not monitored. In order to avoid impermissibly high velocities
and accelerations caused by compensation, small compensation values must be selected. Large compensation values can
cause other axis monitoring functions to output alarms (e.g. contour monitoring, velocity setpoint limitation).

Effectiveness
● The compensation values are stored in the NC user memory and active (after POWER ON).
● The function has been activated for the relevant machine axis
(MD32700 ENC_COMP_ENABLE [0] = 1).
● The axis has been referenced (IS "Referenced/synchronized 1" DB390x.DBX0.4 set).
As soon as these conditions have been fulfilled, the axis-specific actual value is altered by the compensation value in all
modes and traversed by the machine axis immediately.
If the reference is then lost, e.g. because the encoder frequency has been exceeded (IS "Referenced/synchronized 1" =0),
compensation processing is de-activated.

Compensation table
The position-related compensation values are stored in the form of system variables for the relevant axis in the
compensation table. Up to 200 interpolation points (N = 0...199) are possible.
The following measuring-system-specific parameters must be set for the table (see figure "Compensation table parameters
(system variables for LEC)"):
● Compensation value for interpolation point N in compensation table:
$AA_ENC_COMP [0,N,AXi]= ...
where: AXi = machine axis name, e.g. X1, Y1, Z1; N = interpolation point index
For every individual interpolation point (axis position) the compensation value must be entered in the table. The
magnitude of the compensation value is not limited.

Function Manual
116 6FC5397-7EP40-0BA4, 07/2018
Note
The first and last compensation values remain active over the entire traversing range; i.e. these values should be set to
"0" if the compensation table does not cover the entire traversing range.

● Distance between interpolation points: $AA_ENC_COMP_STEP[0,AXi]= ...


The distance between interpolation points defines the distance between the compensation values in the relevant
compensation table (see above for AXi).
● Starting position: $AA_ENC_COMP_MIN[0,AXi]= ...
The starting position is the axis position at which the compensation table for the relevant axis begins (interpolation point
0).
The compensation value for the starting position is $AA_ENC_COMP[0,0,AXi].
The compensation value of interpolation point 0 is used for all positions smaller than the starting position (exception:
table with modulo function).
● End position: $AA_ENC_COMP_MAX[0,AXi]= ...
The end position is the axis position at which the compensation table for the relevant axis ends (interpolation point k <
125).
The compensation value for the end position is $AA_ENC_COMP[0,k,AXi]
The compensation value of interpolation point k is used for all positions larger than the end position (exception: table with
modulo function). Compensation values which are greater than k are inactive.
● Compensation with modulo function: $AA_ENC_COMP_IS_MODULO[0,AXi] = 1
When compensation with modulo function is activated, the compensation table is repeated cyclically; i.e. the
compensation value at position $AA_ENC_COMP_MAX (interpolation point $AA_ENC_COMP[0,k,AXi]) is immediately
followed by the compensation value at position $AA_ENC_COMP_MIN (interpolation point $AA_ENC_COMP[0,0,AXi]).
For rotary axes with modulo 360° it is therefore suitable to program 0° ($AA_ENC_COMP_MIN) as the starting position
and 360° ($AA_ENC_COMP_MAX) as the end position. In this case both compensation values must be entered directly.

Note
When the compensation values are entered, it is important that all interpolation points within the defined range be
assigned a compensation value (i.e. there should be no gaps). Otherwise, the compensation value that was left over
from previous entries at these positions is used for these interpolation points.

Note
Table parameters that contain position data are interpreted through MD10240 SCALING_SYSTEM_IS_METRIC=0 in
inches.
The position data can be automatically re-calculated by performing a manual switchover.
The compensation table can only be loaded when MD32700 ENC_COMP_ENABLE=0 has been set. The value "1"
causes the compensation to be activated and write protection to be applied (output alarm 17070).

Example
The following example shows compensation value inputs for machine axis X1 as a program.
%_N_AX_EEC_INI
CHANDATA(1)
$AA_ENC_COMP[0,0,X1]=0.0 ; 1st compensation value (interpolation point 0) +0 mm
$AA_ENC_COMP[0,1,X1] = 0.01 ; 2nd compensation value (interpolation point 1) +10 mm
$AA_ENC_COMP[0,2,X1]=0.012 ; 3rd compensation value (interpolation point 2) +12 mm
...
$AA_ENC_COMP[0,120,X1]=0.0 ; last compensation value (interpolation point 120)

$AA_ENC_COMP_STEP[0,X1]=2.0 ; distance between interpolation points 2.0 mm


$AA_ENC_COMP_MIN[0,X1]=-200.0 ; compensation starts at -200.0 mm
$AA_ENC_COMP_MAX[0,X1] = 40.0 ; compensation ends at +40.0 mm
$AA_ENC_COMP_IS_MODULO[0,X1]=0 ; compensation without modulo function M17

Values for more than 125 interpolation points result in alarm 12400 "Element does not exist".

Function Manual
6FC5397-7EP40-0BA4, 07/2018 117
Compensation table parameters (system variables for LEC):

12.3.3 Angularity error compensation

Function
The angularity error compensation is a main-spindle-specific compensation used for the rotary positioning angle on lathes.
The magnitude of the compensation value is not limited and is not monitored. In order to avoid impermissibly high velocities
and accelerations caused by compensation, small compensation values must be selected. Large compensation values can
cause other axis monitoring functions to output alarms (e.g. contour monitoring, velocity setpoint limitation).

Effectiveness
● The compensation values are stored in the NC user memory and active (after POWER ON).
● The function has been activated for the main spindle (MD32700 ENC_COMP_ENABLE [0] = 1).
● The main spindle has been referenced (IS "Referenced/synchronized 1" DB390xDBX0.4 set).
As soon as these conditions have been fulfilled, the main-spindle-specific actual value is altered by the compensation value
in all modes and traversed by the main spindle immediately.
If the reference is then lost, e.g. because the encoder frequency has been exceeded (IS "Referenced/synchronized 1" =0),
compensation processing is deactivated.

Compensation table
The position-related compensation values are stored in the form of system variables for the main spindle in the
compensation table. Up to 200 interpolation points (N = 0...199) are possible.

Note
The maximum possible interpolation points are entered in the axis-specific machine data MD38000
MM_ENC_ENC_COMP_MAX_POINTS[0] .

The following measuring-system-specific parameters must be set for the table:


● Compensation value for interpolation point N in compensation table:
$AA_ENC_COMP [0,N,AXi]= ...
where: AXi = machine axis name, e.g. X1, Y1, Z1; N = interpolation point index
For every individual interpolation point (axis position) the compensation value must be entered in the table. The
magnitude of the compensation value is not limited.

Note
The first and last compensation values remain active over the entire traversing range; i.e. these values should be set to
"0" if the compensation table does not cover the entire traversing range.

Function Manual
118 6FC5397-7EP40-0BA4, 07/2018
● Distance between interpolation points: $AA_ENC_COMP_STEP[0,AXi]= ...
The distance between interpolation points defines the distance between the compensation values in the relevant
compensation table.
● Starting position: $AA_ENC_COMP_MIN[0,AXi]= ...
The starting position is the main spindle position at which the compensation table for the main spindle begins
(interpolation point 0).
The compensation value for the starting position is $AA_ENC_COMP[0,0,AXi].
The compensation value of interpolation point 0 is used for all positions smaller than the starting position (exception:
table with modulo function).
● End position: $AA_ENC_COMP_MAX[0,AXi]= ...
The end position is the main spindle position at which the compensation table for the main spindle ends (interpolation
point k < 200).
The compensation value for the end position is $AA_ENC_COMP[0,k,AXi)]
The compensation value of interpolation point k is used for all positions larger than the end position (exception: table with
modulo function). Compensation values which are greater than k are inactive.
● Compensation with modulo function: $AA_ENC_COMP_IS_MODULO[0,AXi] = 1
When compensation with modulo function is activated, the compensation table is repeated cyclically; that is, the
compensation value at position $AA_ENC_COMP_MAX (interpolation point $AA_ENC_COMP[0,k,AXi]) is immediately
followed by the compensation value at position $AA_ENC_COMP_MIN (interpolation point $AA_ENC_COMP[0,0,AXi]).
For the main spindle it is therefore suitable to program 0° ($AA_ENC_COMP_MIN) as the starting position and 360°
($AA_ENC_COMP_MAX) as the end position. In this case both compensation values must be entered directly.

Note
When the compensation values are entered, it is important that all interpolation points within the defined range be
assigned a compensation value (i.e. there should be no gaps). Otherwise, the compensation value that was left over
from previous entries at these positions is used for these interpolation points.

Note
Table parameters that contain position data are interpreted with MD10240 SCALING_SYSTEM_IS_METRIC=0 in inches.
The position data can be automatically re-calculated by performing a manual switchover.
The compensation table can only be loaded when MD32700 ENC_COMP_ENABLE=0 has been set. The value "1"
causes the compensation to be activated and write protection to be applied (output alarm 17070).

Example
The following example shows the position value sampling with a laser interferometer as an automatic positioning program
executed on the main spindle.
Prerequisites:
● Angularity error compensation range: 0° to 360°
● Interval between interpolation points: 30°
SPOS=0 ; spindle rotary to 0 degree position
M01 ; wait for start
SPOS=355 ; spindle rotary to 355 degree position
G4F1 ; wait for 1 second
SPOS=0 ; spindle rotary to 0 degree position
G4F5 ; wait for 5 second
SPOS=30 ; spindle rotary to 30 degree position
G4F5 ; wait for 5 second
SPOS=60 ; spindle rotary to 60 degree position
G4F5 ; wait for 5 second
SPOS=90 ; spindle rotary to 90 degree position
G4F5 ; wait for 5 second
SPOS=120 ; spindle rotary to 120 degree position
G4F5 ; wait for 5 second
SPOS=150 ; spindle rotary to 150 degree position
G4F5 ; wait for 5 second
SPOS=180 ; spindle rotary to 180 degree position

Function Manual
6FC5397-7EP40-0BA4, 07/2018 119
G4F5 ; wait for 5 second
SPOS=210 ; spindle rotary to 210 degree position
G4F5 ; wait for 5 second
SPOS=240 ; spindle rotary to 240 degree position
G4F5 ; wait for 5 second
SPOS=270 ; spindle rotary to 270 degree position
G4F5 ; wait for 5 second
SPOS=300 ; spindle rotary to 300 degree position
G4F5 ; wait for 5 second
SPOS=330 ; spindle rotary to 330 degree position
G4F5 ; wait for 5 second
SPOS=IC(30) ; spindle rotary 30 degree
G4F1 ; wait for 1 second
SPOS=IC(5) ; spindle rotary 5 degree
G4F1 ; wait for 1 second
SPOS=IC(-5) ; spindle rotary -5 degree
G4F1 ; wait for 1 second
SPOS=330 ; spindle rotary to 330 degree position
G4F1 ; wait for 1 second
SPOS=300 ; spindle rotary to 300 degree position
G4F1 ; wait for 1 second
SPOS=270 ; spindle rotary to 270 degree position
G4F1 ; wait for 1 second
SPOS=240 ; spindle rotary to 240 degree position
G4F1 ; wait for 1 second
SPOS=210 ; spindle rotary to 210 degree position
G4F1 ; wait for 1 second
SPOS=180 ; spindle rotary to 180 degree position
G4F1 ; wait for 1 second
SPOS=150 ; spindle rotary to 150 degree position
G4F1 ; wait for 1 second
SPOS=120 ; spindle rotary to 120 degree position
G4F1 ; wait for 1 second
SPOS=90 ; spindle rotary to 90 degree position
G4F1 ; wait for 1 second
SPOS=60 ; spindle rotary to 60 degree position
G4F1 ; wait for 1 second
SPOS=30 ; spindle rotary to 30 degree position
G4F1 ; wait for 1 second
SPOS=0 ; spindle rotary to 0 degree position
G4F1 ; wait for 1 second
M30 ; program finish

The following example shows compensation value inputs for the main spindle as a program MSP_COM.mpf.
;Machine axis 4 ; main spindle address
$AA_ENC_COMP[0,0,AX4]=0 ; compensation value (minimum angle 0°)
$AA_ENC_COMP[0,1,AX4]=0.03666666 ; compensation value (minimum angle 0° + 1 angle interval)
$AA_ENC_COMP[0,2,AX4]=0.02861111 ; compensation value (minimum angle 0° + 2 angle intervals)
$AA_ENC_COMP[0,3,AX4]=0.01638888 ; compensation value (minimum angle 0° + 3 angle intervals)
$AA_ENC_COMP[0,4,AX4]=0.04361111 ; compensation value (minimum angle 0° + 4 angle intervals)
$AA_ENC_COMP[0,5,AX4]=0.02833333 ; compensation value (minimum angle 0° + 5 angle intervals)
$AA_ENC_COMP[0,6,AX4]=0.00833333 ; compensation value (minimum angle 0° + 6 angle intervals)
$AA_ENC_COMP[0,7,AX4]=0.02527777 ; compensation value (minimum angle 0° + 7 angle intervals)
$AA_ENC_COMP[0,8,AX4]=0.01055555 ; compensation value (minimum angle 0° + 8 angle intervals)
$AA_ENC_COMP[0,9,AX4]=-0.00311111 ; compensation value (minimum angle 0° + 9 angle intervals)
$AA_ENC_COMP[0,10,AX4]=0.02194444 ; compensation value (minimum angle 0° + 10 angle intervals)
$AA_ENC_COMP[0,11,AX4]=0.01194444 ; compensation value (minimum angle 0° + 11 angle intervals)
$AA_ENC_COMP[0,12,AX4]=0 ; compensation value (minimum angle 0° + 12 angle intervals)
$AA_ENC_COMP_STEP[0,AX4]=30 ; angle interval between interpolation points 30°
$AA_ENC_COMP_MIN[0,AX4]=0 ; compensation starts at 0°
$AA_ENC_COMP_MAX[0,AX4]=360 ; compensation ends at 360°
$AA_ENC_COMP_IS_MODULO[0,AX4]=1 ; compensation with modulo function

Function Manual
120 6FC5397-7EP40-0BA4, 07/2018
Note
Make sure that you execute the above part program for compensation value inputs in "AUTO" mode on the control system.
Restarting the control system and then approaching the reference point after the part program is executed completely makes
the compensation values effective.
The part program can only be executed when MD32700 ENC_COMP_ENABLE=0 has been set. The value "1" causes the
compensation to be activated and write protection to be applied (output alarm 17070).

12.3.4 Direction-dependent leadscrew error compensation

12.3.4.1 Description of functions


If the direction-dependent differences at the compensation points are excessively high, for an inconsistent backlash or for
extremely high demands placed on the precision, then it may be necessary to apply direction-dependent compensation of
the leadscrew error or measuring system error (for direct position sensing).

Direction-dependent leadscrew error compensation


For the "direction-dependent leadscrew error compensation" ("direction-dependent LEC" or also "Bidirectional LEC") , two
compensation tables are used for each axis. One compensation table for the positive and one compensation table for the
negative traversing direction. The deviation at the particular compensation point is entered as difference between the ideal
setpoint and measured actual value in the compensation tables. The control automatically calculates compensation values
of intermediate values using linear interpolation.

Preconditions/activation
The "direction-dependent LEC" function does not become active until the following conditions are fulfilled:
● The function has been activated for the relevant machine axis (compensation axis):
MD32710 $MA_CEC_ENABLE[<AXi>] = 1
● The compensation values are stored in the static user memory and are active (after POWER ON).
● Evaluation of the relevant compensation table has been enabled:
SD41300 $SN_CEC_TABLE _ENABLE[<t>] = 1
● The current measuring system of the base and compensation axes has been referenced:
DB31, ... DBX60.4 or 60.5 =1 (referenced/synchronized 1 or 2)
As soon as these conditions have been fulfilled the setpoint position of the compensation axis is altered in all modes with
reference to the setpoint position of the base axis and the corresponding compensation value and is then immediately
traversed by the machine axis.
If the reference is then lost, e.g. because the encoder frequency has been exceeded (DB31, ... DBX60.4 or 60.5 = 0),
compensation processing is deactivated.
The activation of the compensation can be checked using a reference measurement, e.g. using the laser interferometer or in
the simplest case, using the service display of the particular axis.

12.3.4.2 Commissioning

Measuring the error or compensation values


When commissioning the "direction-dependent LEC" - just the same as when commissioning the "unidirectional LEC" -
direction-dependent error curves for each axis are determined using a suitable measuring device (e.g. laser interferometer).
A part program with measurement points and wait times should be generated in order to perform the measurement (see
section "Example (Page 124)": Program "BI_SSFK_MESS_AX1_X.MPF").
Because the various measuring devices offer different support options for the practical implementation in conjunction with a
SINUMERIK control, this process is only generally described in the following referred to a control.

Note
The measurement for determining the leadscrew error should only be carried out during the first commissioning if, in the
machine data, the traversing directions of the axes in relation to the machine coordinate system have been correctly set.

Function Manual
6FC5397-7EP40-0BA4, 07/2018 121
Carrying out commissioning
1. Specify the number of compensation interpolation points
Each axis should be assigned to one compensation table each for the positive and negative traversing directions. The
number of compensation interpolation points is defined using the following machine data:
MD18342 $MN_MM_CEC_MAX_POINTS[<t>] (maximum number of interpolation points for sag compensation)
with: <t> = Index of compensation table
Permissible range: 0 ≤ t < 7

CAUTION
User data loss
ALARM 4400 is output when changing MD18342:
"Reorganization of the buffered memory!"
In order that an automatic memory configuration is possible but keeping all of the data that has been entered up until
now, no system boot (POWER ON) must be executed without first performing a series machine startup.

Example:
MD18342 [0] = 11; 11 interpolation points for the 1st table, e.g. positive traversing direction, X axis
MD18342 [1] = 11; 11 interpolation points for the 2nd table, e.g. negative traversing direction, X axis
MD18342 [2] = 21; 21 interpolation points for the 3rd table, e.g. positive traversing direction, Y axis
MD18342 [3] = 21; 21 interpolation points for the 4th table, e.g. positive traversing direction, Y axis

MD18342 [61] = ...; number of interpolation points for the 62nd table
2. Perform the series machine startup:
– Generate an NC archive with the entries in MD18342 [<t>].
– Read-in the generated NC archive.
Note: The NC memory is configured as a result.
The compensation tables are now available.
3. Generate the tables with compensation values for the particular axes and traversing directions as part program (see
section "Example (Page 124)": Program "BI_SSFK_MESS_AX1_X.MPF").
4. Execute the part program with compensation values in the control.
"AUTO" mode > select program > cycle start
Note
Each time before reading-in the compensation tables, the following parameters should always be set to 0 and then to
activate, always be set to 1:
MD32710 $MA_CEC_ENABLE[<AXi>] (enable sag compensation) = 0 → 1
SD41300 $SN_CEC_TABLE _ENABLE[<t>] (enable the compensation table) = 0 → 1
The backlash should always be set to 0:
MD32450 $MA_BACKLASH [<e>] (backlash) = 0
with: <e> = Position measuring system
The use of the program template "BI_SSFK_TAB_AX1_X.MPF" (see section "Example (Page 124)") automates these
tasks. When manually entering machine data, the generally applicable "Activate MD" or "Reset" should be observed.

5. POWER ON (warm restart).


6. Now, comparative measurements can be made using the laser interferometer.
7. To further improve the compensation results, it is also conceivable to correct individual compensation values in the
program. A POWER ON is no longer necessary when reading-in the table again.

Note
As described in step 5, the compensation table is downloaded into the program memory as an executable program and is
then transferred into the previously configured memory area of the control using cycle start. This procedure can be repeated
for each table to ensure transparency. However, it is also possible to download all tables in an initialization step. The
compensation values become active after MD32710[<AXi>] = 1 and a mandatory power POWER ON.

Function Manual
122 6FC5397-7EP40-0BA4, 07/2018
Table parameters
The position-related compensations for the particular direction as well as additional table parameters in the form of system
variables should be saved in the compensation table:
● $AN_CEC[<t>,<N>] (compensation value for interpolation point <N> of compensation table [<t>])
● $AN_CEC_INPUT_AXIS[<t>] (basic axis)
● $AN_CEC_OUTPUT_AXIS[<t>] (compensation axis)

Note
For the "direction-dependent LEC", the basis and compensation axis are identical.

● $AN_CEC_STEP[<t>] (interpolation point distance)


● $AN_CEC_MIN[<t>] (initial position)
● $AN_CEC_MAX[<t>] (end position)
● $AN_CEC_DIRECTION[<t>] (direction-dependent compensation)
This system variable is used to set whether the compensation table [<t>] should apply to both positive and negative
traversing directions of the basic axis:
– $AN_CEC_DIRECTION[<t>] = 1:
Table applies only to the positive traversing direction of the basic axis
– $AN_CEC_DIRECTION[<t>] = -1:
Table applies only to the negative traversing direction of the basic axis
Note
The setting $AN_CEC_DIRECTION[<t>] = 0 (table is effective for both traversing directions of the basic axis) is not
relevant for the "direction-dependent LEC".

● $AN_CEC_IS_MODULO[<t>] (compensation with modulo function)

System of units
Table parameters containing position information are automatically converted when the system of units is changed (change
from MD10240 $MN_SCALING_SYSTEM_IS_METRIC).
The position information is always interpreted in the current measuring system. Conversion must be implemented externally.
Automatic conversion of the position data can be configured as follows:
● MD10260 $MN_CONVERT_SCALING_SYSTEM = 1
With this setting, the following axial machine data is activated:
● MD32711 $MA_CEC_SCALING_SYSTEM_METRIC (measuring system for sag compensation)
The measuring system for all tables effective for this axis is set in this machine data. Hereby, all position entries are
interpreted together with the calculated total compensation value in the configured measuring system. External conversions
of position information are no longer necessary with a measuring system change.

Monitoring
To avoid excessive velocities and acceleration rates on the machine axis as a result of applying sag compensation, the total
compensation value is monitored and limited to a maximum value.
The maximum possible total compensation value for sag compensation is defined on an axis-for-axis basis using the
machine data:
● MD32720 $MA_CEC_MAX_SUM (maximum compensation value for sag compensation)
If the determined total compensation value is greater than the maximum value, then a corresponding alarm is output.
Program processing is not interrupted. The compensation value output as an additional setpoint is limited to the maximum
value.
Further, changing the total compensation value is also axially limited:
● MD32730 $MA_CEC_MAX_VELO (velocity change for sag compensation)
The specified value acts as a factor and is referred to the maximum axis velocity (MD32000 $MA_MAX_AX_VELO).
An appropriate alarm is signaled when the limit value is exceeded. Program processing is not interrupted. The path not
covered because of the limitation is made up as soon as the compensation value is no longer subject to limitation.

Function Manual
6FC5397-7EP40-0BA4, 07/2018 123
12.3.4.3 Example
The direction-dependent compensation tables of the X axis are shown in detail for a three-axis machine in the following
example:

Configuring
Number of compensation interpolation points:
MD18342 $MN_MM_CEC_MAX_POINTS[0] = 11 (Table 1: Axis X, positive traversing direction)
MD18342 $MN_MM_CEC_MAX_POINTS[1] = 11 (Table 2: Axis X, negative traversing direction)

Interpolation points
Table <t> [0,<N>]
Number of interpola- MD18342 $MN_MM_CEC_MAX_POINTS[0] = 11
tion points
Interpolation point 0 1 2 3 4 5 6 7 8 9 10
<N>
Position X -585 -527 -469 -411 -353 -295 -237 -179 -121 -63 -5

Measurement
Setpoint posi- Deviation Checking measurement
tion
Position Comp. No. Measurement Direction + Direction - Direction + Direction -
position [mm] [mm] [mm] [mm]
[mm]
$AN_CEC_MIN[<t>] -585 0 -585 0.0000 0.0020 0.0000 -0.0008
1 -527 0.0010 0.0017 -0.0005 -0.0001
2 -469 0.0040 0.0053 -0.0001 -0.0009
3 -411 0.0034 0.0061 0.0001 -0.0009
4 -353 0.0013 0.0030 -0.0005 -0.0006
5 -295 0.0004 0.0016 -0.0002 -0.0003
6 -237 0.0016 0.0027 -0.0004 -0.0007
7 -179 0.0026 0.0043 -0.0004 -0.0004
8 -121 -0.0010 0.0026 0.0000 -0.0011
9 -63 -0.0023 0.0000 -0.0011 -0.0003

$AN_CEC_MAX[<t>] -5 10 -5 -0.0031 -0.0012 -0.0001 -0.0012

Function Manual
124 6FC5397-7EP40-0BA4, 07/2018
Programming
The following program "BI_SSFK_TAB_AX1_X.MPF" includes the value assignments for the parameters of the two
compensation tables (positive and negative traversing direction) of the X axis:
;direction-dependent LEC
;1st axis MX1
;Table 1 - positive traversing direction
;Table 2 - negative traversing direction
;--------------------------------------------------------------------------------------
CHANDATA(1)
$MA_CEC_ENABLE[AX1]=0 ;compensation OFF
$SN_CEC_TABLE_ENABLE[0]=0 ;lock Table 1
$SN_CEC_TABLE_ENABLE[1]=0 ;lock Table 2
NEWCONF
;--------------------------------------------------------------------------------------
$AN_CEC[0,0]=0 ;1st compensation value (interpolation point 0)
$AN_CEC[0,1]=0.001 ;2nd compensation value (interpolation point 1)
$AN_CEC[0,2]=0.004 ;3rd compensation value (interpolation point 2)
$AN_CEC[0,3]=0.0034 ;4th compensation value (interpolation point 3)
$AN_CEC[0,4]=0.0013 ;5th compensation value (interpolation point 4)
$AN_CEC[0,5]=0.0004 ;6th compensation value (interpolation point 5)
$AN_CEC[0,6]=0.0016 ;7th compensation value (interpolation point 6)
$AN_CEC[0,7]=0.0026 ;8th compensation value (interpolation point 7)
$AN_CEC[0,8]=-0.001 ;9th compensation value (interpolation point 8)
$AN_CEC[0,9]=-0.0023 ;10th compensation value (interpolation point 9)
$AN_CEC[0,10]=-0.0031 ;last compensation value (interpolation point 10)
$AN_CEC_INPUT_AXIS[0]=(AX1) ;basic axis
$AN_CEC_OUTPUT_AXIS[0]=(AX1) ;compensation axis
$AN_CEC_STEP[0]=58.0 ;interpolation point distance
$AN_CEC_MIN[0]=-585.0 ;compensation starts
$AN_CEC_MAX[0]=-5.0 ;compensation ends
$AN_CEC_DIRECTION[0]=1 ;Table applies for positive traversing directions
$AN_CEC_MULT_BY_TABLE[0]=0 ;no multiplication (not relevant here)
$AN_CEC_IS_MODULO[0]=0 ;compensation without modulo function
;--------------------------------------------------------------------------------------
$AN_CEC[1,0]=0.002 ;(interpolation point 0)
$AN_CEC[1,1]=0.0017 ;(interpolation point 1)
$AN_CEC[1,2]=0.0053 ;(interpolation point 2)
$AN_CEC[1,3]=0.0061 ;(interpolation point 3)
$AN_CEC[1,4]=0.003 ;(interpolation point 4)

Function Manual
6FC5397-7EP40-0BA4, 07/2018 125
$AN_CEC[1,5]=0.0016 ;(interpolation point 5)
$AN_CEC[1,6]=0.0027 ;(interpolation point 6)
$AN_CEC[1,7]=0.0043 ;(interpolation point 7)
$AN_CEC[1,8]=0.0026 ;(interpolation point 8)
$AN_CEC[1,9]=0.000 ;(interpolation point 9)
$AN_CEC[1,10]=-0.0012 ;(interpolation point 10)
$AN_CEC_INPUT_AXIS[1]=(AX1) ;basic axis
$AN_CEC_OUTPUT_AXIS[1]=(AX1) ;compensation axis
$AN_CEC_STEP[1]=58. ;interpolation point distance
$AN_CEC_MIN[1]=-585.0 ;compensation starts
$AN_CEC_MAX[1]=-5.0 ;compensation ends
$AN_CEC_DIRECTION[1]=-1 ;Table applies for negative traversing directions
$AN_CEC_MULT_BY_TABLE[1]=0 ;no multiplication (not relevant here)
$AN_CEC_IS_MODULO[1]=0 ;compensation without modulo function (only for rotary axes)
;--------------------------------------------------------------------------------------
$MA_CEC_ENABLE[AX1]=1 ;compensation ON
$SN_CEC_TABLE_ENABLE[0]=1 ;enable Table 1
$SN_CEC_TABLE_ENABLE[1]=1 ;enable Table 2
NEWCONF
M17

Additional tables can be set-up, e.g. for axes Y and Z:


MD18342 $MN_MM_CEC_MAX_POINTS[2] = 90 (Table 3: Axis Y, positive traversing direction)
MD18342 $MN_MM_CEC_MAX_POINTS[3] = 90 (Table 4: Axis Y, negative traversing direction)
MD18342 $MN_MM_CEC_MAX_POINTS[4] = 50 (Table 5: Axis Z, positive traversing direction)
MD18342 $MN_MM_CEC_MAX_POINTS[5] = 50 (Table 6: Axis Z, negative traversing direction)

12.4 Following error compensation (feedforward control)


12.4.1 General
Axis-specific following error
The following error can be reduced to almost zero with the help of the feedforward control. This feedforward control is
therefore also called "following error compensation".
Particularly during acceleration in contour curvatures, e.g. circles and corners, this following error leads to undesirable,
velocity-dependent contour violations. The control system is equipped with the "Speed feedforward control" feedforward
control type.
Activation/deactivation in part program
The feedforward control can be activated and de-activated by means of the following high-level language elements in the
part program:
● FFWON - Feedforward control ON
● FFWOF - Feedforward control OFF (activation setting)
With MD32630 FFW_ACTIVATION_MODE, the activation (via FFWON) or de-activation (via FFWOF) of a specific axis can
be determined:
● FFWON and FFWOF are used to activate and de-activate respectively the feedforward control of all axes/spindles for
which MD32630=1 is set.
● MD 32630 should therefore have identical settings for axes that interpolate with each other.
The feedforward control should only be switched on or off while the axis/spindle is stationary to prevent jerk. This is the
responsibility of the programmer.
Conditions
The following points should be noted before the feedforward control is applied:
● Rigid machine behavior
● Precise knowledge about the machine dynamic response
● No sudden changes in the position and speed setpoints

Function Manual
126 6FC5397-7EP40-0BA4, 07/2018
Optimization of control loop
The feedforward control is set on an axis/spindle-specific basis. First of all, the current control loop, speed control loop and
position control loop must be set to an optimum for the axis/spindle.

Parameter assignments
The feedforward control parameters must then be assigned to the relevant axis/spindle and then entered in the machine
data (see next section).

12.4.2 Speed feedforward control


In the case of speed feedforward control, a velocity setpoint is also applied directly to the input of the speed controller (see
figure below).

Parameters
In order to achieve a correctly set speed feedforward control, the equivalent time constant of the speed control loop must be
determined exactly and entered as machine data MD32810 EQUIV_SPEEDCTRL_TIME (equivalent time constant of the
closed speed control loop) during commissioning.

12.5 Friction compensation (quadrant error compensation)


12.5.1 General function description
In addition to the mass inertia and the machining forces, the frictional forces in the gearing and guideways of the machine
influence the behavior of a machine axis. During the acceleration of an axis from standstill, especially the transition from
static friction to the significantly smaller sliding friction has a negative affect with regard to the contour accuracy.
The sudden change in the friction force results in a briefly increased following error. With interpolating axes (path axes), this
results in significant contour violations. For circles, the contour violations occur especially at the quadrant transitions due to
the standstill of one of the involved axis at the direction reversal.
Therefore, an additional setpoint pulse is injected as a compensation value for this friction or quadrant error compensation
when the axis accelerates from standstill, i.e. at the transition from static to sliding friction. In this way, contour violations can
be almost completely avoided at the quadrant transitions of circular contours.
Acceleration-dependent friction compensation
In most cases, a compensation value independent of the axial acceleration with constant amplitude is sufficient for the
quadrant error compensation. However, if the compensation value is dependent on the acceleration, an adaptation
characteristic can be activated via the "friction compensation with adaptation" in order to model this behavior.
Circularity test
The easiest way to commission the friction compensation is with the circularity test. A circle is traversed and the circular
contour generated on the machine based on the actual position values of the involved machine axes and the deviations to
the programmed ideal circular contour, especially at the quadrant transitions, displayed in graphical form.

Function Manual
6FC5397-7EP40-0BA4, 07/2018 127
12.5.2 Supplementary conditions
Note
Switch off setpoint-related compensations
The following compensations affect the position setpoint and must be switched off before the measurement of the axes
involved in the circularity test:
Direction-dependent leadscrew error compensation:
MD32710 $MA_CEC_ENABLE[ <axis> ] = 0

12.5.3 Friction compensation with a constant compensation value

12.5.3.1 Function activation

Enable
The general enabling of the friction compensation is via:
MD32490 $MA_FRICT_COMP_MODE[ <axis> ] = 1

Activation
The activation of the friction compensation with constant compensation value is via:
● MD32500 FRICT_COMP_ENABLE[ <axis> ] = 1 (friction compensation ON)
● MD32510 $MA_FRICT_COMP_ADAPT_ENABLE[ <axis> ] = 0 (adaptation OFF)

Parameters
The following parameters are calculated for friction compensation with constant compensation value:
● MD32520 $MA_FRICT_COMP_CONST_MAX (maximum compensation value)
For friction compensation with constant compensation value, the parameterized value is injected as compensation value.
● MD32540 $MA_FRICT_COMP_TIME (friction compensation time constant)
The compensation value is injected via a DT1 filter. The compensation value decays according to the parameterized time
constants.

12.5.3.2 Commissioning

Circularity test
It is recommended that the circularity test be used for the commissioning of the friction compensation with constant injected
value, as described above. The commissioning sequence is divided into the following steps:
1. Perform circularity test without friction compensation
2. Perform circularity test with friction compensation and initial parameter values
3. Perform circularity tests with friction compensation and modified parameter values
4. Complete circularity tests with friction compensation and optimized parameter values

Circularity test without friction compensation


A circularity test without friction compensation should be performed to determine the initial quality of the circular contour at
the quadrant transitions. To do this, switch off the friction compensation temporarily:
MD32500 FRICT_COMP_ENABLE[ <axis> ] = 0

Function Manual
128 6FC5397-7EP40-0BA4, 07/2018
The following figure shows a typical example of quadrant transitions without friction compensation:

Then switch on the friction compensation with constant compensation value:


MD32500 FRICT_COMP_ENABLE[ <axis> ] = 1

Circularity test with friction compensation and initial parameter values


It is recommended that a relatively small compensation value, as well as a time constant of just a few position control cycles,
be set as initial parameter values, e.g.:
● MD32520 $MA_FRICT_COMP_CONST_MAX[ <axis> ] = 10 [mm/min]
● MD32540 $FRICT_COMP_TIME[ <axis> ] = 0.008 [ms]
The circularity test performed with these parameter values provides an initial assessment of the friction compensation.
Compensation value too small
Too small a compensation value (MD32520) in the circularity test is indicated by insufficient compensation of the contour
deviations at the quadrant transitions.

Function Manual
6FC5397-7EP40-0BA4, 07/2018 129
Compensation value too large
Too large a compensation value (MD32520) in the circularity test is indicated by overcompensation of the contour deviations
at the quadrant transitions.

Time constant too small


Too small a time constant (MD32540) in the circularity test is indicated by short-time compensation of the contour deviations
at the quadrant transitions which immediately increase thereafter.

Function Manual
130 6FC5397-7EP40-0BA4, 07/2018
Time constant too large
Too large a time constant (MD32540) in the circularity test compensates the contour deviations at the quadrant transitions.
(Requirement: The optimum compensation value has already been determined.) However, with too large a time constant,
the compensation value applies too long and results in an overcompensation at the next circular contour.

Optimization of the compensation parameters


To optimize the compensation parameters, the circularity test must be repeated several times and the values changed in
small increments. It is recommended that the optimization be performed with different values for radius and path velocity that
are typical for the machining operations performed on the machine.
Each effect of a parameter change should be checked with a subsequent circularity test and documented.
Mean value generation
If different parameter values result for different radii and path velocities, the best values should be determined via mean
value generation.
Good friction compensation setting
With a good friction compensation setting, "no" contour violations can be detected at the quadrant transitions.

Function Manual
6FC5397-7EP40-0BA4, 07/2018 131
Acceleration-dependent compensation value
If the compensation value proves to be acceleration-dependent, the "friction compensation and adaptation" described below
can be injected in a following step.

12.5.4 Friction compensation with acceleration-dependent compensation value

12.5.4.1 Description of functions


If the compensation value is highly dependent on the acceleration, normally a smaller compensation value must be injected
for optimum compensation with larger accelerations than for smaller accelerations. This dependency can be modeled via the
following adaptation characteristic.

Δnmax Maximum compensation value


Δnmin Minimum compensation value
a1 Acceleration value 1
a2 Acceleration value 2
a3 Acceleration value 3
Bn Acceleration range with n = 1, 2, ... 4
with: Accelerations: a1 < a2 < a3
Compensation values: Δnmax > Δnmin, in special cases also Δnmax < Δnmin
The compensation value Δn is calculated according to the respective acceleration range B1 to B4 as follows:
Range With acceleration a ⇒ Compensation value Δn
B1 a < a1 Δn = Δnmax * a / a1
B2 a1 ≤ a ≤ a2 Δn = Δnmax
B3 a2 < a < a3 Δn = Δnmax + [(Δnmin - Δnmax) / (a3 - a2)] * (a - a2)
B4 a ≥ a3 Δn = Δnmin

12.5.4.2 Function activation

Enable
The general enabling of the friction compensation is via:
MD32490 $MA_FRICT_COMP_MODE[ <axis> ] = 1

Activation
The activation of the friction compensation with adaptation characteristic is performed via:
● MD32500 FRICT_COMP_ENABLE[ <axis> ] = 1 (friction compensation ON)
● MD32510 $MA_FRICT_COMP_ADAPT_ENABLE[ <axis> ] = 1 (adaptation characteristic OFF)

Function Manual
132 6FC5397-7EP40-0BA4, 07/2018
12.5.4.3 Commissioning
To determine the characteristic parameters, the optimum compensation value Δnopt must be determined at various operating
points of the specified dynamic response range. See Section "Commissioning (Page 128)". A sufficiently large number of
measured values for large path velocities and small circle radii is particularly important.
For the evaluation of the determined value pairs, it is recommended that these are displayed graphically:
Δnopt = f(a), with Δnopt = optimum compensation value and a = acceleration at the quadrant transitions.
The parameters of the adaptation characteristic determined from the measurement results must then be entered in the
machine data.

Characteristic parameters
Acceleration values
The acceleration which arises at the quadrant transitions of the axis changing direction is calculated as follows:
a = v2 / r, with v = path velocity and r = circle radius

Note
The path velocity and therefore the axial acceleration a can be varied simply via the feedrate override switch.

The acceleration values a1, a2 and a3 determined as characteristic parameters must be entered in the following machine
data. The following condition must be satisfied: a1 < a2 < a3
● MD32550 $MA_FRICT_COMP_ACCEL1 (acceleration value 1)
● MD32560 $MA_FRICT_COMP_ACCEL2 (acceleration value 2)
● MD32570 $MA_FRICT_COMP_ACCEL3 (acceleration value 3)
Compensation values
The compensation values Δnmin, Δnmax determined as characteristic parameters must be entered in the following machine
data:
● MD32520 $MA_FRICT_COMP_CONST_MAX (maximum compensation value)
● MD32530 $MA_FRICT_COMP_CONST_MIN (minimum compensation value)

Note
If satisfactory results cannot be obtained for very small path velocities, the computational resolution may have to be
increased:
• MD10200 $MA_INT_INCR_ PER_MM (computational resolution for linear positions)
• MD10210 $MA_INT_INCR_PER_DEG (computational resolution for angular positions)

12.5.5 Compensation value for short traversing blocks


The compensation value determined for the quadrant error compensation can lead to overcompensation in short traversing
blocks. The overcompensation can be avoided by reducing the compensation value specifically for traversing blocks that are
traversed within one interpolation cycle. However, the size of the reduction is a value that must be determined empirically as
it depends to a large extent for every axis on the particular situation at the machine. A percentage of the compensation value
determined in the circularity test is set via the machine data:
MD32580 $MA_FRICT_COMP_INC_FACTOR (compensation value for short traversing blocks)

12.6 Data table


12.6.1 Machine data
Number Identifier Name
General
10200 INT_INCR_PER_MM Computational resolution for linear positions
10210 INT_INCR_PER_DEG Computational resolution for angular positions

Function Manual
6FC5397-7EP40-0BA4, 07/2018 133
Number Identifier Name
18342 MM_CEC_MAX_ POINTS[t] Maximum number of interpolation points of sag compen-
sation
Axis-specific
32450 BACKLASH[0] Backlash
32490 FRICT_COMP_MODE Type of friction compensation
32500 FRICT_COMP_ENABLE Friction compensation active
32510 FRICT_COMP_ADAPT_ENABLE Friction compensation adaptation active
32520 FRICT_COMP_CONST_MAX Maximum friction compensation value
32530 FRICT_COMP_CONST_MIN Minimum friction compensation value
32540 FRICT_COMP_TIME Friction compensation time constant
32550 FRICT_COMP_ACCEL1 Adaptation acceleration value 1
32560 FRICT_COMP_ACCEL2 Adaptation acceleration value 2
32570 FRICT_COMP_ACCEL3 Adaptation acceleration value 3
32580 FRICT_COMP_INC_FACTOR Weighting factor for friction compensation value for short
traversing motion
32630 ACTIVATION_MODE Feedforward control can be activated from the program
32700 ENC_COMP_ENABLE[0] Interpolatory compensation active
32710 CEC_ENABLE Enabling of sag compensation
32810 EQUIV_SPEEDCTRL_TIME[0]...[5] Equivalent time constant of the speed control loop
36500 ENC_CHANGE_TOL Backlash compensation partial section
38000 MM_ENC_COMP_MAX_POINTS[0] Interpolation points for encoder/spindle compensation
(LEC ) (for display only)

12.6.2 Setting data


Number Identifier Name
General
41300 CEC_TABLE_ENABLE[t] Enable evaluation of beam sag compensation table

12.6.3 Interface signals


Number Bit Name
Axis/spindle-specific
DB390x.DBX0000 .4 Referenced/synchronized 1

13 Kinematic transformation (M1)


13.1 Brief description
Application range
The control transforms the programmed traversing instructions from a Cartesian coordinate system into a real machine axis
system.
The TRANSMIT transformation is used for the face-end milling of turned parts on lathes (without any Y machine axis).
The TRACYL transformation is used to machine the peripheral surfaces of cylindrical bodies. The main application is the
milling of grooves. A TRACYL variant is provided for lathes. A second variant is provided for lathes with an additional Y
machine axis or for milling machines with a suitable rotary table.

Function Manual
134 6FC5397-7EP40-0BA4, 07/2018
Machine prerequisite
The lathe must be equipped with a C axis-capable main spindle. A second spindle must be able to drive the milling tool.
When used with TRACYL, the milling machine must be equipped with a rotary table that is capable of interpolating with the
other axes.

Availability
The TRANSMIT and TRACYL functions are configured using separate machine data sets and switched on or off by means
of special instructions in the program.
With the SINUMERIK 808D ADVANCED, a maximum of two kinematic transformations (TRANSMIT, TRACYL) may be
configured and one of them may be activated using the program.

13.2 TRANSMIT
13.2.1 Overview
Face-end milling of turned parts with TRANSMIT:

X, Y, Z Cartesian coordinate system for programming of the face-end machining


ASM Second spindle (work spindle for milling tool, drill)
ZM Z machine axis (linear)
XM X machine axis (linear)
CM C axis (main spindle as rotary axis)

Required machine kinematics


The two linear axes (XM, ZM) must be mutually perpendicular. The rotary axis (CM) must travel parallel to the linear axis ZM
(rotating around ZM). The linear axis XM intersects the rotary axis CM (center of rotation).

Activation/de-activation of TRANSMIT
The TRANSMIT function is activated in the program with
● TRANSMIT in a separate block and de-activated with
● TRAFOOF in a separate block
TRAFOOF deactivates any active transformation function.

Programming - principle
N10 G0 X... Z... SPOS=... ; starting positions, spindle in position control
N20 G17 G94 T... ; plane, feed type, select milling tool
N30 SETMS(2) ; switchover: master spindle is now the milling spindle
N40 TRANSMIT ; switch on TRANSMIT
N50 G1 G41 F200 X... Y... Z... M3 S... ; milling of the face with milling tool radius compensa-

Function Manual
6FC5397-7EP40-0BA4, 07/2018 135
tion
...
N90 G40 ...
N100 TRAFOOF ; switch off TRANSMIT
N110 G18 G95 T... ; switch back to turning
N120 SETMS ; master spindle is main spindle

Explanation:
The movement of the machine axes XM and CM produces the contour on the face-end of the turned part with the milling
cutter in accordance with the X-Y path programmed (straight or circular path). The programmed Z axis (infeed) continues to
be traversed as the Z axis.

13.2.2 TRANSMIT configuration

Machine data
The names of the machine data, channel axes and geometry axes from the general machine data ($MN_AXCONF...) and
channel-specific machine data ($MC_AXCONF...) are also used for a transformation.
The geometry axis assignments specified in MD20050 AXCONF_GEOAX_ASSIGN_TAB only apply when the transformation
is de-activated. Additional assignments are specified for a transformation.

Note
The assigned machine axis names, channel axis names and geometry axis names must differ:
• MD10000 AXCONF_MACHAX_NAME_TAB,
• MD20080 AXCONF_CHANAX_NAME_TAB,
• MD20060 AXCONF_GEOAX_NAME_TAB.
Exception for TRANSMIT:
The axis names of MD20060 and MD20080 (geometry and channel axes) can be the same, e.g. X, Y, Z. No Y axis exists
here outside the transformation.

Machine data for transformation


MD24100 TRAFO_TYPE_1 = 256 for first TRANSMIT transformation
MD24110 TRAFO_AXES_IN_1[n] Channel axes for transformation 1
MD24120 TRAFO_GEOAX_ASSIGN_TAB_1[n] Geometry axes for transformation 1
MD24200 TRAFO_TYPE_2 = 256 for second TRANSMIT transformation
MD24210 TRAFO_AXES_IN_2[n] Channel axes for transformation 2
MD24220 TRAFO_GEOAX_ASSIGN_TAB_2[n] Geometry axes for transformation 2
Required assignment of channel axes for TRANSMIT transformation in machine data MD24110/MD24210:
TRAFO_AXES_IN_1/2[0]= Channel axis number of axis perpendicular to rotary axis
TRAFO_AXES_IN_1/2[1]= Channel axis number of rotary axis
TRAFO_AXES_IN_1/2[2]= Channel axis number of axis parallel to rotary axis

Machine data specifically for TRANSMIT


● MD24900 TRANSMIT_ROT_AX_OFFSET_1
Rotational position of Cartesian coordinate system x-y plane with respect to the defined zero position of rotary axis in
degrees (0... < 360)
● MD24910 TRANSMIT_ROT_SIGN_IS_PLUS_1
If the rotary axis rotates in an anti-clockwise direction on the X-Y plane opposite to the positive Z axis, then the MD must
be set to 1, otherwise to 0.
Direction of rotation for MD value = 1:

Function Manual
136 6FC5397-7EP40-0BA4, 07/2018
● MD24920 TRANSMIT_BASE_TOOL_1
The control is informed of the position of the tool zero point in relation to the origin of the coordinate system declared for
TRANSMIT. The MD has three components for the three axes of the Cartesian coordinate system.
Assignment of axis components:
TRANSMIT_BASE_TOOL_1[0]=Tx
TRANSMIT_BASE_TOOL_1[1]=Ty
TRANSMIT_BASE_TOOL_1[2]=Tz (see following figure)
Position of tool zero in relation to origin of the Cartesian coordinate system (center of rotation):

● MD24911 TRANSMIT_POLE_SIDE_FIX_1 = 0
Pole traversal continuous

Traversal of pole
The pole is defined as the center of rotation at point X=0, Y=0 of TRANSMIT plane (X machine axis intersects the center of
rotation).
In the vicinity of the pole, small positional changes in the geometry axes X, Y generally result in large changes in the
machine rotary axis position (exception: path only results in a movement of the XM axis).
Workpiece machining operations close to the pole are therefore not recommended since these may require sharp feedrate
reductions to prevent overloading of the rotary axis. Avoid selecting TRANSMIT when the tool is positioned exactly on the
pole. Ensure that the path of the tool center point does not travel through the X0/Y0 pole.

Examples: Machine data settings for TRANSMIT


General settings: Axis names: XM->X1, ZM->Z1, CM->SP1
● Machine axis name
MD10000 AXCONF_MACHAX_NAME_TAB[0]="X1"
MD10000 AXCONF_MACHAX_NAME_TAB[1]="Z1"
MD10000 AXCONF_MACHAX_NAME_TAB[2]="SP1"
MD10000 AXCONF_MACHAX_NAME_TAB[3]="SP2"
MD10000 AXCONF_MACHAX_NAME_TAB[4]=""
● Assignment of geometry axis to channel axis
MD20050 AXCONF_GEOAX_ASSIGN_TAB[0]=1
MD20050 AXCONF_GEOAX_ASSIGN_TAB[1]=0
MD20050 AXCONF_GEOAX_ASSIGN_TAB[2]=2
● Geometry axis names in channel
MD20060 AXCONF_GEOAX_NAME_TAB[0]="X"
MD20060 AXCONF_GEOAX_NAME_TAB[1]="Y"
MD20060 AXCONF_GEOAX_NAME_TAB[2]="Z"
● Valid machine axis numbers in channel
MD20070 AXCONF_MACHAX_USED[0]=1
MD20070 AXCONF_MACHAX_USED[1]=2
MD20070 AXCONF_MACHAX_USED[2]=3

Function Manual
6FC5397-7EP40-0BA4, 07/2018 137
MD20070 AXCONF_MACHAX_USED[3]=4
MD20070 AXCONF_MACHAX_USED[4]=0
● Channel axis names in channel
MD20080 AXCONF_CHANAX_NAME_TAB[0]="X"
MD20080 AXCONF_CHANAX_NAME_TAB[1]="Z"
MD20080 AXCONF_CHANAX_NAME_TAB[2]="C"
MD20080 AXCONF_CHANAX_NAME_TAB[3]="SP2"
MD20080 AXCONF_CHANAX_NAME_TAB[4]=""
● Initial setting of master spindle in channel
MD20090 SPIND_DEF_MASTER_SPIND=1
TRANSMIT transformation type:
● Definition of transformation 1 in channel
MD24100 TRAFO_TYPE_1=256
● Axis assignment for the 1st transformation in the channel
MD24110 TRAFO_AXES_IN_1[0] = 1
MD24110 TRAFO_AXES_IN_1[1] = 3
MD24110 TRAFO_AXES_IN_1[2] = 2
MD24110 TRAFO_AXES_IN_1[3]=0
MD24110 TRAFO_AXES_IN_1[4]=0
● Assignment of geometry axes to channel axes for transformation 1
MD24120 TRAFO_GEOAX_ASSIGN_TAB_1[0] = 1
MD24120 TRAFO_GEOAX_ASSIGN_TAB_1[1] = 3
MD24120 TRAFO_GEOAX_ASSIGN_TAB_1[2] = 2
Special TRANSMIT settings:
● Offset of rotary axis
MD24900 TRANSMIT _ROT_AX_OFFSET_1=0
● Sign of rotary axis
MD24910 TRANSMIT _ROT_SIGN_IS_PLUS_1=1
● Vector of base tool
MD24920 TRANSMIT_BASE_TOOL_1[0]=0
MD24920 TRANSMIT_BASE_TOOL_1[1]=0
MD24920 TRANSMIT_BASE_TOOL_1[2]=0
Setting data for the special treatment of the tool offset (only when required):
● Change of tool length component for change of plane
SD42940 TOOL_LENGTH_CONST=18
● Assignment of the tool length offset independent of tool type
SD42950 TOOL_LENGTH_TYPE=2
Settings for second spindle (milling spindle of the lathe):
● MD30300 IS_ROT_AX[AX4]=1
● MD30310 ROT_IS_MODULO[AX4]=1
● MD30320 DISPLAY_IS_MODULO[AX4]=1
● MD35000 SPIND_ASSIGN_TO_MACHAX[AX4]=2
● SD43300 ASSIGN_FEED_PER_REV_SOURCE[AX4]=0

Note
A special handling of milling tools on lathes with respect to length compensation is possible.

Function Manual
138 6FC5397-7EP40-0BA4, 07/2018
13.3 TRACYL
13.3.1 Overview
Standard lathe (without Y machine axis)
Machining grooves on a cylinder surface with X-C-Z kinematics:

Required machine kinematics


The two linear axes (XM, ZM) must be mutually perpendicular. The rotary axis (CM) must travel parallel to the linear axis ZM
(rotating around ZM). The linear axis XM intersects the rotary axis CM (center of rotation).
Machine with Y axis
Machining grooves on a cylinder surface with X-Y-Z-C kinematics:

Function Manual
6FC5397-7EP40-0BA4, 07/2018 139
Extended machine kinematics
The YM linear axis is also available to enable the machine kinematics requirements to be met (see above). This is arranged
perpendicular to XM and ZM respectively and, with these, forms a right-handed Cartesian coordinate system.
This type of kinematics is typical for milling machines and makes it possible to machine grooves where the groove wall and
groove base are mutually perpendicular – provided the milling tool diameter is less than the groove width (groove wall offset).
These grooves can otherwise only be machined using milling tool diameters which fit precisely.

Grooves in transverse section


Grooves with and without groove wall offset:

Activation/deactivation of TRACYL
The TRACYL function is activated in the program with
● TRACYL(d) in a separate block and deactivated with
● TRAFOOF in a separate block
d - machining diameter of the cylinder in mm
TRAFOOF deactivates any active transformation function.

Programming - principle
; without YM axis
; the geometry axes X, Y, Z are programmed
N10 G0 X... Z... SPOS=... ; starting positions, spindle in position control
N20 G19 G94 T... ; plane, feed type, select milling tool
N30 SETMS(2) ; switchover: master spindle is now the milling spindle
N40 TRACYL(24.876) ; switch on TRACYL, diameter: 24.876 mm
N50 G1 F200 X... M3 S... ; feed, switch on milling spindle
N600 G41 F200 Y... Z... ; milling of the cylinder surface with milling tool radius compensation
...
N90 G40 ...
N100 TRAFOOF ; switch off TRACYL
N110 G18 G95 T... ; switch back to turning
N120 SETMS ; master spindle is main spindle

Explanation:
The movement of the machine axes ZM and CM produces this contour on the peripheral surface of the cylindrical workpiece
with the milling cutter in accordance with the Y-Z path programmed (straight or circular). The programmed X axis (infeed)
continues to be traversed as the X axis.

Function Manual
140 6FC5397-7EP40-0BA4, 07/2018
Peripheral surface of cylinder G19 (Y-Z plane):

OFFN address
Distance of groove side wall from the reference contour (also see "TRACYL programming example")
Programming: OFFN=...; Distance in mm
As a rule, the groove center line is programmed. OFFN determines the groove width when the milling radius compensation
is active (G41, G42). Set OFFN=0 once the groove has been completed.

13.3.2 TRACYL configuration

General machine data


The names of the machine data, channel axes and geometry axes from the general machine data ($MN_AXCONF...) and
channel-specific machine data ($MC_AXCONF...) are also used for a transformation.
The geometry axis assignments specified in MD20050 AXCONF_GEOAX_ASSIGN_TAB only apply when the transformation
is deactivated. Additional assignments are specified for a transformation.

Note
The assigned machine axis names, channel axis names and geometry axis names must differ:
• MD10000 AXCONF_MACHAX_NAME_TAB
• MD20080 AXCONF_CHANAX_NAME_TAB
• MD20060 AXCONF_GEOAX_NAME_TAB
Exception for TRACYL:
The axis names of MD20060 and MD20080 (geometry and channel axes) can be the same for the TRACYL transformation
(e.g. X, Y, Z.), if no Y axis exists outside the transformation. This is usually the case for lathes.

Machine data for transformation


MD24100 TRAFO_TYPE_1 Def. for first TRACYL transformation *)
MD24110 TRAFO_AXES_IN_1[n] Channel axes for transformation 1
MD24120 TRAFO_GEOAX_ASSIGN_TAB_1[n] Geometry axes for transformation 1
MD24200 TRAFO_TYPE_2 Def. for second TRACYL transformation *)

Function Manual
6FC5397-7EP40-0BA4, 07/2018 141
MD24210 TRAFO_AXES_IN_2[n] Channel axes for transformation 2
MD24220 TRAFO_GEOAX_ASSIGN_TAB_2[n] Geometry axes for transformation 2
*) =512/513 without/with YM axis
Required assignment of channel axes for TRACYL transformation in machine data MD24110:
Configuration without YM axis:
TRAFO_AXES_IN_1[0]= Channel axis number of axis radial to rotary axis
TRAFO_AXES_IN_1[1]= Channel axis number of rotary axis
TRAFO_AXES_IN_1[2]= Channel axis number of axis parallel to rotary axis
Configuration without existing YM axis:
TRAFO_AXES_IN_1[3] Channel axis number of axis parallel to peripheral cylinder surface
and perpendicular to rotary axis (→ YM axis)

Machine data specifically for TRACYL


● MD24900 TRACYL_ROT_AX_OFFSET_1
Rotational position: rotary axis setting, when Y=0 (in degrees 0... < 360)
Rotational position of axis in the peripheral cylinder surface:

● MD24910 TRACYL_ROT_SIGN_IS_PLUS_1
If the rotary axis rotates in an anti-clockwise direction on the X-Y plane opposite to the positive Z axis, then the MD must
be set to 1, otherwise to 0.
Direction of rotation for MD value =1:

● MD24920 TRACYL_BASE_TOOL_1
The control is informed of the position of the tool zero point in relation to the origin of the coordinate system declared for
TRACYL. The MD has three components for the three axes of the Cartesian coordinate system.
Assignment of axis components in MD24920:
– TRACYL_BASE_TOOL_1[0]=Tx
– TRACYL_BASE_TOOL_1[1]=Ty
– TRACYL_BASE_TOOL_1[2]=Tz (see following figure)
Position of tool zero in relation to machine zero:

Example: Machine data settings for TRACYL with a standard lathe


General settings: Axis names: XM->X1, ZM->Z1, CM->SP1
● Machine axis name
MD10000 AXCONF_MACHAX_NAME_TAB[0]="X1"
MD10000 AXCONF_MACHAX_NAME_TAB[1]="Z1"

Function Manual
142 6FC5397-7EP40-0BA4, 07/2018
MD10000 AXCONF_MACHAX_NAME_TAB[2]="SP1"
MD10000 AXCONF_MACHAX_NAME_TAB[3]="SP2"
MD10000 AXCONF_MACHAX_NAME_TAB[4]=""
● Assignment of geometry axis to channel axis
MD20050 AXCONF_GEOAX_ASSIGN_TAB[0]=1
MD20050 AXCONF_GEOAX_ASSIGN_TAB[1]=0
MD20050 AXCONF_GEOAX_ASSIGN_TAB[2]=2
● Geometry axis names in channel
MD20060 AXCONF_GEOAX_NAME_TAB[0]="X"
MD20060 AXCONF_GEOAX_NAME_TAB[1]="Y"
MD20060 AXCONF_GEOAX_NAME_TAB[2]="Z"
● Machine axis number valid in channel
MD20070 AXCONF_MACHAX_USED[0]=1
MD20070 AXCONF_MACHAX_USED[1]=2
MD20070 AXCONF_MACHAX_USED[2]=3
MD20070 AXCONF_MACHAX_USED[3]=4
MD20070 AXCONF_MACHAX_USED[4]=0
● Name of channel axis in the channel
MD20080 AXCONF_CHANAX_NAME_TAB[0]="X"
MD20080 AXCONF_CHANAX_NAME_TAB[1]="Z"
MD20080 AXCONF_CHANAX_NAME_TAB[2]="C"
MD20080 AXCONF_CHANAX_NAME_TAB[3]="SP2"
MD20080 AXCONF_CHANAX_NAME_TAB[4]=""
● Initial setting of master spindle in channel
MD20090 SPIND_DEF_MASTER_SPIND=1
TRACYL transformation type for second transformation:
● Without groove wall offset (no YM axis)
MD24100 TRAFO_TYPE_2=512
● Axis assignment in channel
MD24110 TRAFO_AXES_IN_2[0]=1
MD24110 TRAFO_AXES_IN_2[1]=3
MD24110 TRAFO_AXES_IN_2[2]=2
MD24110 TRAFO_AXES_IN_2[3]=0
MD24110 TRAFO_AXES_IN_2[4]=0
● Assignment of geometry axes to channel axes
MD24120 TRAFO_GEOAX_ASSIGN_TAB_2[0]=1
MD24120 TRAFO_GEOAX_ASSIGN_TAB_2[1]=3
MD24120 TRAFO_GEOAX_ASSIGN_TAB_2[2]=2
Special TRACYL settings:
● Offset of rotary axis
MD24800 TRACYL_ROT_AX_OFFSET_1=0
● Sign of rotary axis
MD24810 TRACYL_ROT_SIGN_IS_PLUS_1=1
● Vector of base tool
MD24820 TRACYL_BASE_TOOL_1[0]=0
MD24820 TRACYL_BASE_TOOL_1[1]=0
MD24820 TRACYL_BASE_TOOL_1[2]=0

Function Manual
6FC5397-7EP40-0BA4, 07/2018 143
Setting data for the special treatment of the tool offset (only when required):
● Change of tool length component for change of plane
SD42940 TOOL_LENGTH_CONST=18
● Assignment of the tool length offset independent of tool type
SD42950 TOOL_LENGTH_TYPE=2
Settings for second spindle (milling spindle of the lathe):
● MD30300 IS_ROT_AX[AX4]=1
● MD30310 ROT_IS_MODULO[AX4]=1
● MD30320 DISPLAY_IS_MODULO[AX4]=1
● MD35000 SPIND_ASSIGN_TO_MACHAX[AX4]=2
● SD43300 ASSIGN_FEED_PER_REV_SOURCE[AX4]=0

Note
A special handling of milling tools on lathes with respect to length compensation is possible.

13.3.3 Programming example, TRACYL


Machining grooves with groove wall compensation
MD24100_TRAFO_TYPE_1 = 513
Contour
It is possible to machine a groove which is wider than the tool by using address OFFN=... to program the compensation
direction (G41, G42) in relation to the programmed reference contour and the distance of the groove side wall from the
reference contour.
Tool radius
The tool radius in relation to the groove side wall is automatically taken into account with G41, G42. The full functionality of
the plane tool radius compensation is available (steady transition at outer and inner corners as well as solution of bottleneck
problems).
Groove with groove wall offset - figure as example:

Function Manual
144 6FC5397-7EP40-0BA4, 07/2018
TRACYL is used for the milling of grooves on a peripheral cylinder surface. During this process, the "Path I" and "Path II"
sections are processed using different OFFN values.
CC is the channel axis name of the rotary axis, milling radius of T1, D1: 8.000 mm
G54 G94 ; set offset compensation and feedrate mode
G1 X50 Z50 F1000 ; move to a safe position
T11 D1 ; tool selection
DIAMOF ; programming in radius mode
TRACYL(40) ; transformation selection, reference diameter
; for surface: diameter 40 mm
SETMS(2) ; enable the second spindle as main spindle
S2000M4 ; rotate the milling cutting tool
G19 ; machining plane is cylinder surface Y/Z
R1=20 ; start point
LL: ; loop start
G1 X=R1 F200 ; X move to position with feedrate 200 mm/min
G41 OFFN=-3 ; tool radius compensation left of contour
; define groove wall offset
Y10 ; Y move to position 10
Z-50 ; Z move to position -50
Y70 ; Y move to position 70
G41 OFFN=-3 ; tool radius compensation left of contour
; define groove wall offset
Y10 ; Y move to position 10
Z10 ; Z move to position 10
R1=R1-0.2 ; cutting depth for each step is 0.2 mm
IF R1>15 GOTOB LL ; cutting depth is 5 mm
G40 Y0 ; turn off compensation function
TRAFOOF ; turn off TRACYL function
G1 X50 Z50 F1000 ; move to safe position
M30 ; program finish

13.4 Special features of TRANSMIT and TRACYL


POWER ON/RESET
The system response after POWER ON or RESET (program end) is determined by the settings stored in the following
machine data:
● MD20110 RESET_MODE_MASK (access to this MD only in protection level 1)
● MD20140 TRAFO_RESET_VALUE (active transformation after RESET).

Please note on selection


● Tool radius compensation must be deselected (G40).
● The frame which was active prior to TRANSMIT/TRACYL is deselected by the control. (G500).
● The control deselects an active working area limit for axes affected by the transformation (WALIMOF).
● Continuous path control and rounding are interrupted.
● An instructed intermediate movement block with chamfer or radius is not inserted.

Please note on deselection


● Tool radius compensation must be deselected (G40).
● Continuous path control and rounding are interrupted.
● An instructed intermediate movement block with chamfer or radius is not inserted.
● Following TRANSMIT/TRACYL deselection, zero offsets (Frame) and all settings used for the turning operation are to be
reset.

Function Manual
6FC5397-7EP40-0BA4, 07/2018 145
Operating modes, operating mode changeover
● The program processing with TRANSMIT/TRACYL is performed in "AUTO" mode.
● It is possible to interrupt "AUTO" mode and change over to JOG. When returning to "AUTO" mode, the operator must
ensure a problem-free repositioning of the tool.
● Axes cannot be referenced when a transformation is active.

13.5 Data table


13.5.1 Machine data
Number Identifier Name
Channel-specific
20110 RESET_MODE_MASK Definition of the control basic setting after POWER ON or
RESET/part program end (access only possible at protection level 1)
20140 TRAFO_RESET_VALUE Initial setting: Transformation active after Reset
22534 TRAFO_CHANGE_M_CODE M code for transformation changeover
24100 TRAFO_TYP_1 Type of 1st transformation, possibly with axis sequence
24110 TRAFO_AXES_IN_1 Axis assignment at input of 1st transformation
24120 TRAFO_GOEAX_ASSIGN_TAB_1 Geo-axis assignment for 1st transformation
24200 TRAFO_TYP_2 Type of 2nd transformation, possibly with axis sequence
24210 TRAFO_AXES_IN_2 Axis assignment at input of 2nd transformation
24220 TRAFO_GOEAX_ASSIGN_TAB_2 Geo-axis assignment for 2nd transformation
24800 TRACYL_ROT_AX_OFFSET_1 Deviation of rotary axis from zero position in degrees (1st TRACYL)
24810 TRACYL_ROT_SIGN_IS_PLUS_1 Sign of rotary axis for TRACYL (1st TRACYL)
24820 TRACYL_BASE_TOOL_1 Distance of tool zero point from origin of geo-axes (1st TRACYL)
24900 TRANSMIT_ROT_AX_OFFSET_1 Deviation of rotary axis from zero position in degrees (1st
TRANSMIT)
24910 TRANSMIT_ROT_SIGN_IS_PLUS_1 Sign of rotary axis for TRANSMIT (1st TRANSMIT)
24911 TRANSMIT_POL_SIDE_FIX_1 Limitation of working range in front of/behind pole, 1st transformation
24920 TRANSMIT_BASE_TOOL_1 Distance of tool zero point from origin of geo-axes (1st TRANSMIT)

13.5.2 Interface signals


Number Bit Name
Channel-specific
DB3800.DBX0001 .6 Transformation active

14 Measurement (M5)
14.1 Brief description
Channel-specific measuring
A measurement mode is programmed in a part program block (with or without DDTG). A trigger event (edge of the probe) is
defined additionally, which will trigger the measurement process. The instructions apply to all axes programmed in this
particular block. The program with the measurement process in "AUTO" mode is executed and can be employed for
workpiece or tool measuring.

Tool measuring in JOG


The control system includes operator support for the measurement process in "JOG" mode specially for measuring tools.
Channel-specific measuring is integrated into this sequence. The PLC user program must include the required functionality.
The measured offset values of the tool are available in the tool offset memory at the end of the measuring sequence.

Function Manual
146 6FC5397-7EP40-0BA4, 07/2018
The exact operating instructions are contained in the SINUMERIK 808D ADVANCED Programming and Operating Manual.

Note
The automatic measuring function is supported only on a milling machine.

14.2 Hardware requirements


14.2.1 Probes that can be used

General
In order to measure tool and workpiece dimensions, a touch-trigger probe is required that supplies a constant signal (rather
than a pulse) when deflected.
The probe must operate virtually bounce-free. Most sensors can be adjusted mechanically to ensure that they operate in this
manner.
Different types of probes supplied by a variety of manufacturers are available on the market. Probes are therefore divided
into three groups according to the number of directions in which they can be deflected (see figure below).

For probe assignment, see the table below:


Probe type Milling and machining centers
Workpiece measurements
Multi-directional X
Bi-directional X
Mono-directional X
A mono-probe can also be used for this purpose for milling and machining centers.

Multidirectional probe (3D)


This probe type can be used unconditionally for measuring tool and workpiece dimensions.

Bidirectional probe
This probe type is handled in the same way as a mono probe in milling and machining centers.

Mono-directional probe
This probe type can be used, with only a few restrictions, to take workpiece measurements on milling and machining centers.
The spindle must be capable of being positioned with the SPOS NC function if the measurement is to be carried out in
different axis directions/axes. The probe must therefore be aligned according to the measuring task.

Switching performance
The signal level of the connected probe (deflected/non-deflected condition) must be communicated to the control via the
MD13200 MEAS_PROBE_LOW_ACTIVE[0].

Function Manual
6FC5397-7EP40-0BA4, 07/2018 147
14.2.2 Probe connection
The probe for the control system is connected to pin4 (DI1) and pin5 (DI2) of X21. The actually used pin is determined by
the relevant macro command. Thus, all measuring inputs of the axis drive modules are operated whose axes are involved in
measuring. For the probe, use an external voltage (24 V) whose reference potential should be connected to X21, pin 10.
To ensure optimum interference immunity when connecting probes, lines must be used.
Reference:
SINUMERIK 808D ADVANCED Commissioning Manual

14.3 Channel-specific measuring


14.3.1 Measuring mode

Measuring commands MEAS and MEAW


The measuring operation is activated from the part program. A trigger event and a measuring mode are programmed. Two
different measuring modes are available:
● MEAS: Measurement with deletion of distance-to-go
Example: N10 G1 F300 X300 Z200 MEAS=-1
Trigger event is the falling edge (-) of probe 1: from deflected to non-deflected status.
● MEAW: Measurement without deletion of distance-to-go
Example: N20 G1 F300 X300 Y100 MEAW=1
Trigger event is the rising edge (+) of probe 1: from non-deflected to deflected status.
The measurement block is terminated when the probe signal has arrived or the programmed position has been reached. The
measurement job can be cancelled with the following key:

Reference:
SINUMERIK 808D ADVANCED Programming and Operating Manual

Note
If a GEO axis (axis in the WCS) is programmed in a measuring block, the measured values are stored for all current GEO
axes.

14.3.2 Measurement results

Reading measurement results in the program


The results of the measuring command can be read in the part program via system variables.
● System variable $AC_MEA[1]
Query measurement job status signal.
The variable is deleted at the beginning of a measurement. The variable is set as soon as the probe fulfills the activation
criterion (rising or falling edge). Execution of the measurement job can thus be checked in the part program.
● System variable $AA_MM[axis]
Access to measured value in the machine coordinate system (MCS). Read in part program. [axis] stands for the name of
the measurement axis (X, Y, ...).
● System variable $AA_MW[axis]
Access to measured value in the workpiece coordinate system. Read in part program. [axis] stands for the name of the
measurement axis (X, Y, ...).
References:
SINUMERIK 808D ADVANCED Programming and Operating Manual

Function Manual
148 6FC5397-7EP40-0BA4, 07/2018
PLC service display
The measuring signal can be controlled via the following operations:

+ → →
IS "Probe 1 activated" (DB2700.DBX0001.0).
The current measuring status of the axis is shown by the IS "Measurement active" (measuring block with this axis running).

14.4 Measurement accuracy and functional testing


14.4.1 Measuring accuracy

Accuracy
The propagation time of the measuring signal is determined by the hardware used. The delay times are in the µs range plus
the probe response time.
The measurement uncertainty is calculated as follows:
Measurement uncertainty = measuring signal propagation time x traversing velocity
Correct results can only be guaranteed for traversing velocity where not more than one triggering signal arrives per position
controller cycle.

14.4.2 Probe functional test


Example of functional test
The functional test for the probe is conducted favorably via an NC program.
%_N_PRUEF_MESSTASTER_MPF ;Testing program probe connection
N10; R10 ;Flag for trigger status
N20; R11: measurement in X axis
N30 T1 D1 ; Preselect tool offset for probe
N40 ANF: G0 G90 X0 F150 ;Starting position and meas. velocity
N50 MEAS=1 G1 X100 ; Measurement at measuring input 1 in the X axis
N60 STOPRE
N70 R10=$AC_MEA[1] ; Read switching signal at 1st measuring input
N80 IF R10==0 GOTOF FEHL1 ;Evaluation of signal
N90 R11=$AA_MW[X] ;Read in measured value in workpiece coordinates
N95 M0
N100 M2
N110 FEHL1: MSG ; Probe not switching!
N120 M0
N130 M2

Example of repeat accuracy


This program allows the measuring scatter (repeat accuracy) of the entire measuring system (machine-probe-signal
transmission) to be calculated.
In the example, ten measurements are taken in the X axis and the measured value recorded in the workpiece coordinates.
It is possible to determine the so-called "random dimensional deviations" which are not subject to any trend.
%_N_CHECK_ACCURATE_MPF
N05; R11 ; Switching signal
N06 R12=1 ; Counter
N10; R1 to R10 ; MEAS_VAL_IN _X
N15 T1 D1 ; Start conditions, preselect tool offset for
; probe
N20 ANF: G0 X0 F150 ;Prepositioning in the measured axis
N25 MEAS=+1 G1 X100 ; Measurement at 1st measuring input with
;rising switching edge, in the X axis
N30 STOPRE ; Stop decoding for subsequent evaluation of the
; result (automatically executed when reading
; MEA)
N35 R11= $AC_MEA[1] ; Read switching signal at 1st measuring input
N37 IF R11==0 GOTOF FEHL1 ;Check switching signal

Function Manual
6FC5397-7EP40-0BA4, 07/2018 149
N40 R[R12]=$AA_MW[X] ;Read measured value in workpiece ;coordinates
N50 R12=R12+1
N60 IF R12<11 GOTOB ANF ;Repeat 10 times
N65 M0
N70 M02
N80 FEHL1: MSG ; Probe not switching
N90 M0
N95 M02

The measurement results R1 to R10 can be read after selecting the parameter display.

14.5 Tool measuring in JOG


Measuring principle
The employed tool is traversed to the probe by the user in "JOG" mode using the traverse keys or handwheel. The
measuring program controls the real measurement sequence with a second approach of the probe and further positioning. In
the end the tool offsets are entered.
Advantage: The entered offset values before measuring the tool can deviate entirely from the actual values. The tools must
not be "pre-measured".

Note
The tool is "re-measured", not its wear.

Softkeys and templates are provided for use by the user in "JOG" mode. This supports the user during tool measuring.
Reference:
SINUMERIK 808D ADVANCED Programming and Operating Manual

Note
The PLC user program must be created with the necessary sequences. The functionality is not available beforehand.
Extreme caution must be taken when approaching the probe. The probes only have a limited deflection path. They will be
damaged or destroyed if this is exceeded! Observe the machine manufacturer's instructions!
In particular, the approach speed should be reduced to such an extent that the probe can always be stopped promptly.
"Rapid traverse override" may not be active.

The screen forms provided and the sequence depend on the technology. Accordingly, the following used tool types can be
measured:

Milling technology
● Milling tool (geometry length 1 and geometry radius)
● Drill (geometry length 1)

Tool offsets
The screens initially include the active tool T and the active offset number D for the target of the measurement result entry. A
different tool can be specified by the PLC via the interface, or the user can enter a different tool T and/or offset number D.

Note
If a tool or an offset number different to the active values has been entered, this must first be made known to the NC for
working after measurements have been made with this tool/tool offset, e.g. by programming and start in "MDA" mode. Only
then can the control unit calculate the correct tool offsets.

A tool length compensation is automatically entered into the GEO component of the active/specified tool offset D of the
active/specified tool, and the associated "wear" and "adapter" components are deleted.
When measuring the cutter radius it is assumed that no further offset is applied to the axes of the cutter radius level (values
in the axes of the "adapter" component and GEO lengths 2 and 3 are equal to zero). The result for the radius is entered in
the "geometry" component. The associated "adapter" and "wear" components of both axes of the level are deleted.

Function Manual
150 6FC5397-7EP40-0BA4, 07/2018
Probe
The tool measuring probe is a touch probe at a fixed location or is swiveled into the working area by means of a mechanical
device. If the probe plate is of rectangular design, the edges should be aligned parallel to the axis. The tool/calibration tool is
traversed against the measuring probe. The probe must be calibrated before a measurement is taken. This means that the
precise probe triggering points in relation to the machine zero are known.

Preparation, probe calibration


1. Select "JOG" mode.
2. The following values should be entered in the displayed window via this softkey:
return plane, safety clearance, JOG feed, variable increment and direction of rotation of the
spindle for general use in JOG and for tool measuring.
3. The following value must be entered in the window which opens when pressing this softkey:
• Feed for automatic probe approach in the measuring program.
• Probe triggering points (the values are set during calibration).
If the precise values are known, they can be entered manually. The probe does not then
need to be calibrated).
4. The adjustment sequence of the probe (calibration) is controlled via these two softkeys and
the opening window. The tool used in this case is the calibration tool with precisely known
and entered dimensions.
The calibration tool for the milling technology is of "cutter" type.

The internal sequence is the same as in measuring. The measuring results, however, are stored in the data for the probe
triggering points - not in the tool offsets.

Note
The internal NC programs for measuring or calibrating are configured so that measuring is carried out with the rising edge of
the probe.

Measuring sequence
"JOG" mode is selected. The measuring feed is entered. The probe is calibrated or the precise measuring trigger points are
entered.
1. Depending on the tool type, the measuring sequence is controlled via this softkey and fur-
ther softkeys.

2. The IS "Measuring in JOG is active" (DB1700.DBX0003.7) is transmitted to the PLC from


the HMI by pressing this softkey. PLC can specify a different T number to the active one via
the IS "T number for tool measuring in JOG" (DB1900.DBD5004). If the probe switches
when the selected axis is traversed, NCK outputs the IS "Probe 1 active"
(DB2700.DBX0001.0). The PLC then sets IS "Feed disable" (DB3200.DBX0006.0) and NCK
stops the axis movement. Feed disable is maintained as long as a traverse key is de-
pressed in JOG and the IS "Measuring in JOG is active" (DB1700.DBX0003.7) is set. After
this the PLC outputs the IS "Reset" (DB3000.DBX000.7). The traverse movement in JOG is
thereby cancelled.

Function Manual
6FC5397-7EP40-0BA4, 07/2018 151
3. HMI recognizes switching of the probe and outputs the change mode to "AUTO", IS com-
mand "AUTOMATIC mode" (DB1800.DBX0000.0) after the traverse key has been released
(immediately after handwheel jog). PLC transfers this to the NCK (DB3000.DBX0000.0).
"AUTO" mode is set to active by the NCK (IS "Active mode AUTOMATIC"
(DB3100.DBX0000.0)) and is displayed in the HMI screen. PLC cancels the IS "Feed disa-
ble (DB3200.DBX0006.0). The HMI then outputs the IS "Mode change disable"
(DB1800.DBX0000.4) to the PLC. If the PLC recognizes this signal (is only applied for one
PLC cycle), the PLC outputs the IS "Mode change disable" (DB3000.DBX0000.4) to the
NCK. An NC measuring program has been loaded to the NCK by the HMI. This is activated
now. The automatic direction of approach to the probe and the traverse path including the
safety clearance is calculated in this measuring program.The HMI outputs the command to
start the measuring program to the PLC via the IS "Start measuring in JOG"
(DB1800.DBX0000.6). The signals in the V1800 area are only applied for a single PLC
cycle. The IS "Start measuring in JOG" is therefore stored intermediately in the PLC. The
NC measuring program is launched by the PLC by outputting the IS "NC START"
(DB3200.DBX0007.1) to the NCK.
4. The axis is repositioned by the NC program, the probe is approached again, and finally
retracted. The HMI then transmits the command to switch back to "JOG" mode
(DB1800.DBX0000.2) to the PLC. The "Change mode disable" interface signal
(DB3000.DBX0000.4) is then reset by the PLC. The PLC outputs "JOG" mode
(DB3000.DBX0000.2) to the NCK and the NCK returns the IS "JOG mode active"
(DB3100.DBX0000.2) to the NCK.
After measuring or probe calibration is complete the function can be deselected via the following softkey:

This also resets the IS "Measuring in JOG active" (DB1700.DBX0003.0). It is also reset when the operating area is exited.
The automatic program can be cancelled via IS "Reset" (DB3000.DBX0000.7) or measuring in JOG can be closed via the
following softkey:

This also cancels any set IS "Feed disable" (DB3200.DBX0006.0) and IS "Change mode disable" (DB3000.DBX0000.4) or
intermediately saved signals.

PLC user program


The required functionality corresponding with the above-described procedure in the PLC user program must be provided by
the user.
The toolbox for the SINUMERIK 808D ADVANCED supplied by Siemens includes a user example in the PLC library. You
can use this. In this case it should be noted that PLC_INI (SBR32) and MCP_NCK (SBR38) must always be opened in OB1
as these transfer the signals of the MEAS_JOG (SBR43) subroutine to the NCK/HMI.

14.6 Data table


14.6.1 Machine data
Number Identifier Name
General
13200 MEAS_PROBE_LOW_ACTIVE Switching characteristics of probe

14.6.2 Interface signals


Number Bit Name
HMI signals (from HMI to PLC)
DB1700.DBX0003 .7 Measuring in JOG active
DB1800.DBX0000 .0 "AUTO" mode (request by HMI)

Function Manual
152 6FC5397-7EP40-0BA4, 07/2018
Number Bit Name
DB1800.DBX0000 .1 "MDA" mode (request by HMI)
DB1800.DBX0000 .2 "JOG" mode (request by HMI)
DB1800.DBX0000 .4 Change mode disable (request by HMI)
DB1800.DBX0000 .6 Start measuring in JOG (request by HMI)
DB1800.DBX0001 .2 REF machine function (request by HMI)
HMI signals (from PLC to HMI)
DB1900.DBD 5004 Tool number for tool measuring in JOG (input by PLC)
General (from NCK to PLC)
DB2700.DBX0001 .0 Probe 1 is actuated
Axis/spindle-specific (from axis to PLC)
DB390x.DBX0002 .3 Measurement active

15 Manual tool measurement (with the Y axis)


15.1 Introduction
After activating an additional axis and configuring it as the Y axis on a turning machine, you can measure axes X, Y and Z of
a tool on the machine.
For more information about how to create and activate a tool before measuring the tool, see the SINUMERIK 808D
ADVANCED Programming and Operating Manual.

Note
The function of manual measuring with the Y axis is supported only on a turning machine.

15.2 Preparations for measuring the tool manually (with the Y axis)
Configuring Drive Bus addresses
The Drive Bus address of the corresponding drive is properly set (p0918 = 12). For more information about how to configure
Drive Bus addresses, see the SINUMERIK 808D ADVANCED Commissioning Manual.

Activating an additional axis


At least one additional axis is activated. For more information, see Section "Activating the optional functions (Page 417)".

Setting parameters for the Y axis


Proceed as follows to set the parameters for the Y axis:
1. Select the system data operating area.
+
2. Open the general machine data window through the following softkey operations:

→ →
3. Set the machine data 10000[1] to MY1.

Function Manual
6FC5397-7EP40-0BA4, 07/2018 153
4. Press this softkey to open the channel machine data window and set the following machine
data:
• 20050[1] = 2
• 20050[2] = 3
• 20060[1] = Y
• 20070[1] = 2
• 20070[2] = 3
• 20070[3] = 4
• 20080[1] = Y
• 20080[2] = Z
• 20080[3] = SP
5. Press this softkey to activate the value changes. Note that the control system restarts to ac-
cept the new values and the additional axis can be displayed in the system.

6. Select the system data operating area.


7. Open the axis machine data window through the following softkey operations:

→ →
8. Use these softkeys to switch to the data set for axis MY1.

9. Use this softkey or the cursor keys to search for the following machine data and assign the
desired values:
• 30130[0] = 1
• 30240[0] = 1 (incremental encoder) or 4 (absolute encoder)
• 31020[0] = encoder resolution (= 2500: incremental encoder; = 2048: absolute encoder)
• 34200[0] = 1 (incremental encoder) or 0 (absolute encoder)
10. Press this softkey to open the drive data list.

11. Use these softkeys to switch to the data set for axis MY1.

12. Use this softkey or the cursor keys to search for the drive parameter p29000. Enter the motor
ID of the motor connected to axis MY1. You can find the motor ID on the motor rating plate.

13. Press this softkey to activate the value changes. Note that the control system restarts to ac-
cept the new values.

14. If necessary, you can also tune the drive performance for the Y axis. For more information,
see the SINUMERIK 808D ADVANCED Commissioning Manual. Note that you must perform
the reference point approach for the Y axis first before you start the drive tuning.

Function Manual
154 6FC5397-7EP40-0BA4, 07/2018
15.3 Measuring the tool manually (with the Y axis)
Operating sequence
Measuring the X axis of the tool
1. Select the machining operating area.

2. Switch to "MDA" mode and enter "SPOS=0" in the program editor window to fix the spindle.

3. Switch to handwheel control mode.



4. Select a suitable override feedrate.

5. Use the handwheel to move the tool to approach the workpiece and cut the surface of the
workpiece for about 1 mm along the Y axis. Then retract the tool along the Y axis.
Note:
Make sure you do not move the tool along the X axis afterwards.
6. Switch to "MDA" mode and continue to enter "SPOS=180" in the program editor window.

7. Press this key to rotate the spindle 180 degrees.

8. Repeat Steps 3 to 5.
9. Measure the distance between the two cutting surfaces machined in the previous steps with
a calliper.
10. Select the offset operating area.

11. Press the alphabetic key <X> or proceed through the following method to open the window
for measuring the tool in the X direction:
Move the cursor to the input field for Length X with the cursor keys and then press this soft-
key.

12. Enter the distance measured in Step 9 in the input field, for example, 48.

If you desire to use the relative coordinate, press this softkey.

Function Manual
6FC5397-7EP40-0BA4, 07/2018 155
13. Press this softkey to confirm your input. The system calculates the offset and enters it in the
geometry input field of the currently active tool automatically.

Measuring the Y axis of the tool


1. Select the machining operating area.

2. Switch to "MDA" mode and enter "SPOS=0" in the program editor window to fix the spindle.

3. Switch to handwheel control mode.



4. Select a suitable override feedrate.

5. Use the handwheel to move the tool to approach the workpiece and cut the surface of the
workpiece for about 1 mm along the X axis. Then retract the tool along the X axis.
Note:
Make sure you do not move the tool along the Y axis afterwards.
6. Switch to "MDA" mode and continue to enter "SPOS=180" in the program editor window.

7. Press this key to rotate the spindle 180 degrees.

8. Repeat Steps 3 to 5.
9. Measure the distance between the two cutting surfaces machined in the previous steps with
a calliper.
10. Select the offset operating area.

11. Press the alphabetic key <Y> or proceed through the following method to open the window
for measuring the tool in the Y direction:
Move the cursor to the input field for Length Y with the cursor keys and then press this soft-
key.

12. Enter the distance measured in Step 9 in the input field, for example, "48".

If you desire to use the relative coordinate, press this softkey.

Function Manual
156 6FC5397-7EP40-0BA4, 07/2018
13. Press this softkey to confirm your input. The system calculates the offset and enters it in the
geometry input field of the currently active tool automatically.

Measuring the Z axis of the tool


1. Select the machining operating area.

2. Select a suitable override feedrate and use the handwheel to move the tool to scratch the
required workpiece edge (or the edge of the setting block, if it is used) along the Z axis.
3. Select the offset operating area.

4. Press the alphabetic key <Z> or proceed through the following method to open the window
for measuring the tool in the Z direction:
Move the cursor to the input field for Length Z with the cursor keys and then press this soft-
key.

5. Enter the distance between the tool tip and the workpiece edge in the input field, for exam-
ple, "0". (This value is the thickness of a setting block if it is used.)

If you desire to use the relative coordinate, press this softkey.

6. Press this softkey to confirm your input. The system calculates the offset and enters it in the
geometry input field of the currently active tool automatically.

7. Repeat the above steps to finish measuring all the tools.

Function Manual
6FC5397-7EP40-0BA4, 07/2018 157
16 EMERGENCY OFF (N2)
16.1 Brief description
Note
It is the duty of the machine manufacturer to observe national and international standards (see the notes on standards in the
following paragraph). The control system supports the machine manufacturer in the implementation of the EMERGENCY
STOP function in accordance with the specifications in this Description of Functions. The responsibility for the EMERGENCY
STOP function (its triggering, execution and acknowledgment) rests exclusively with the machine manufacturer.

Note
Particular reference should be made to the following standards for the EMERGENCY STOP function:
• EN ISO 12100-1
• EN ISO 12100-2
• EN 418
• EN 60204-1

EMERGENCY STOP in the control system


The control system supports the machine manufacturer in implementing an EMERGENCY STOP function on the basis of the
following features:
● Activation of EMERGENCY STOP sequence in the NC via a PLC input.
● The EMERGENCY STOP procedure in the NC reduces the speed of all axes and spindles as quickly as possible.
● Unlocking of the EMERGENCY STOP button does not reset the EMERGENCY STOP state. Resetting the control device
does not restart the machine.
● After the EMERGENCY STOP state has been cancelled, it is not necessary to reference axes or synchronize spindles
(positions are corrected).

16.2 EMERGENCY STOP sequence


Requirements
Actuation of the EMERGENCY STOP pushbutton or a signal derived directly from the button must be taken to the control
system (PLC) as a PLC input. In the PLC user program, this PLC input must be transferred to IS "EMERGENCY STOP"
(DB2600.DBX0000.1) in the NC.
Resetting of the EMERGENCY STOP pushbutton or a signal derived directly from the button must be taken to the control
system (PLC) as a PLC input. In the PLC user program, this PLC input must be transferred to IS "Acknowledge
EMERGENCY STOP" (DB2600.DBX0000.2) in the NC.

Sequence in the NC
The predefined (in EN 418) sequence of internal functions that are implemented to obtain the EMERGENCY STOP state is
as follows in the control system:
1. Part program execution is interrupted. All axes and spindles are braked along a braking ramp defined in MD36610
AX_EMERGENCY_STOP_TIME.
2. The IS "808D READY" (DB3100.DBX0000.3) is reset.
3. The IS "EMERGENCY STOP active" (DB2700.DBX0000.1) is set.
4. Alarm 3000 is set.
5. On expiry of a delay that is set for specific axes/spindles in MD36620 SERVO_DISABLE_DELAY_TIME (shutdown delay,
controller enable), the controller enable is cancelled. It must be noted that MD36620 must be specified at least as long as
MD36610.

Function Manual
158 6FC5397-7EP40-0BA4, 07/2018
Sequence on the machine
The sequence of EMERGENCY STOP functions on the machine is determined solely by the machine manufacturer.
Attention should be paid to the following in connection to the sequence on the NC:
● The sequence of operations in the NC is started with IS "EMERGENCY STOP" (DB2600.DBX0000.1). When the axes
and spindles have come to a halt, the power supply must be interrupted, in compliance with EN 418.
● The PLC I/O is not affected by the sequence in the NC. If individual outputs are required to attain a particular state in the
event of an EMERGENCY STOP, the machine manufacturer must include functions for this purpose in the PLC user
program.

Note
The interruption of the power feed to the equipment is the responsibility of the machine manufacturer.
If the internal functions in the NC should not be executed in the predetermined sequence in the event of an
EMERGENCY STOP, then IS EMERGENCY STOP (DB2600.DBX0000.1) may not be set at any time up to the point that
an EMERGENCY STOP defined by the machine manufacture in the PLC user program is reached. As long as the
EMERGENCY STOP interface signal has not been set and no other alarm is active, all interface signals are effective in
the NC. Any EMERGENCY STOP state defined by the manufacturer can therefore be assumed.

16.3 EMERGENCY STOP acknowledgment


Acknowledge EMERGENCY STOP
The EMERGENCY STOP state is reset only if IS "Acknowledge EMERGENCY STOP" (DB2600.DBX0000.2) followed by IS
"Reset" (DB3000.DBX0000.7) are set. It must be noted in this respect that IS "Acknowledge EMERGENCY STOP" and IS
"Reset" must be set (together) for a long enough period for IS "EMERGENCY STOP active" (DB2700.DBX0000.1) to be
reset.
Reset emergency stop:

Resetting the EMERGENCY STOP state has the following effects:


● IS "EMERGENCY STOP active" is reset.
● The controller enable is switched in.
● IS "Position control active" is set.
● IS "808D READY" is set.
● Alarm 3000 is cleared.
● The part program is aborted.

PLC I/O
The PLC user program must switch the PLC I/O to the correct state for operation of the machine.

Function Manual
6FC5397-7EP40-0BA4, 07/2018 159
Reset
The EMERGENCY STOP state cannot be reset solely by IS "Reset" (DB3000.DBX0000.7) (see diagram above).

Power off/on
Power off/on (POWER ON) cancels the EMERGENCY OFF state unless IS "EMERGENCY OFF" (DB2600.DBX0000.1) is
still set.

16.4 Data table


16.4.1 Machine data
Number Identifier Name
Axis-specific
36610 AX_EMERGENCY_STOP_TIME Length of the braking ramp for error states
36620 SERVO_DISABLE_DELAY_TIME Shutdown delay controller enable

16.4.2 Interface signals


Number Bit Name
General
DB2600.DBX0000 .0 Braking on the contour with EMERGENCY STOP
DB2600.DBX0000 .1 EMERGENCY STOP
DB2600.DBX0000 .2 Acknowledge EMERGENCY STOP
DB2700.DBX0000 .1 EMERGENCY STOP active
Operating mode signal area
DB3000.DBX0000 .7 Reset

17 Reference point approach (R1)


17.1 Fundamentals
Why reference?
The control must be synchronized with the position measurement system of each machine axis so that the control can detect
the exact machine zero when it is switched on. This process is known as referencing.
The spindle process (synchronizing) is largely described in Chapter "Spindle (S1) (Page 166)".

Position measurement systems


The following position measuring systems can be mounted on the motor:
● Incremental rotary measuring system
● Absolute rotary measuring system
The referencing for the mounted position measuring systems can be set with MD34200 ENC_REFP_MODE ("REF.PIOINT"
mode).

Output cam
An output cam for referencing may be required for linear axes, and its signal has the following tasks:
● Selection of the direction of travel when approaching the zero mark (synchronized pulse)
● Selection of the zero mark, where required.

Function Manual
160 6FC5397-7EP40-0BA4, 07/2018
BERO
A BERO (inductive proximity switch) can be deployed as the encoder for the synchronized pulse (instead of the zero mark of
the position encoder) (preferred for rotary axes, spindles). Here connection is made to the control system via pin6 (DI3) of
terminal X21.

Note
A BERO proximity switch can be used only when an analog spindle drive is connected through the PPU interface X54 (no
V70 spindle drive is connected) and a motor encoder is connected through the PPU interface X60.

Reference:
SINUMERIK 808D ADVANCED Commissioning Manual

IS "Active machine function REF" (DB3100.DBX0001.2)


The reference point approach is performed with the REF machine function activated (IS "active machine function REF"). The
REF machine function can be selected in "JOG" mode (IS "REF machine function" (DB3000.DBX0001.2)).

Axis specific referencing


Axis-specific referencing is started separately for each machine axis with the "plus/minus traversing keys" interface signal
(DB380x.DBX0004.7 /.6). All axes can be referenced at the same time. If the machine axes are to be referenced in a
particular sequence, the following options are available:
● The operator must observe the correct sequence when starting.
● The PLC user program checks the sequence on start-up or defines the sequence itself.
● The order is defined in MD34110 REFP_CYCLE_NR (see channel-specific referencing)

Channel specific referencing


Channel-specific referencing is started with the "activate referencing" interface signal (DB3200.DBX0001.0). The control
acknowledges a successful start with IS "Referencing active" (DB3300.DBX0001.0). Each machine axis assigned to the
channel can be referenced with channel-specific referencing (this is achieved internally on the control by simulating the
plus/minus traversing keys). Axis-specific MD34110 REFP_CYCLE_NR (axis sequence for channel-spec. referencing) can
be used to define the sequence in which the machine data is referenced. If all axes entered in MD34110 REFP_CYCLE_NR
have reached their end points, the "All axes referenced" interface signal (DB3300.DBX0004.2) is enabled.

Special features
● Referencing is aborted with "Reset" interface signal (DB3000.DBX0000.7). All axes that have not reached their reference
point by this time are considered to be not referenced. IS "Referencing active" is reset and alarm 20005 is signaled.
● Working area limiting and software limit switches are not active for non-referenced machine axes.
● The defined axis-specific accelerations are observed at all times during referencing (except when alarms occur).
● The reference point approach can be started only with the direction key for the direction stored in
MD34010 REFP_CAM_DIR_IS_MINUS.

Referencing in the part program


One or more axes that have lost their reference can be referenced at the same time. The sequence of the individual phases
is identical to axis-specific referencing, except that the process is started with the G74 command instead of the plus/minus
traversing keys and is done via the machine axis identifiers.
Reference:
SINUMERIK 808D ADVANCED Programming and Operating Manual

Note
MD20700 REFP_NC_START_LOCK = 1 prevents a part program from being started (alarm output) if not all required axes
are referenced.

Function Manual
6FC5397-7EP40-0BA4, 07/2018 161
17.2 Referencing with incremental measuring systems
Time sequence
The referencing sequence for incremental measuring systems can be subdivided into three phases:
1. Phase: Traversing to the reference cam
2. Phase: Synchronization with the zero mark
3. Phase: Traversing to the reference point
Referencing sequence with incremental measuring system (example):

Characteristics of traversing to the reference point cam (phase 1)


● The feedrate override and feedrate stop is in effect.
● The machine axis can be stopped/started.
● The cam must be reached within the traversing distance in MD34030 REFP_MAX_CAM_DIST, otherwise a
corresponding alarm is triggered.
● The machine axis must come to a halt at the cam, otherwise a corresponding alarm is triggered.

Characteristics when synchronizing with the zero pulse (phase 2)


● Feedrate override is not active. Feedrate override 100% is active. Termination occurs at feedrate override 0%.
● Feedrate stop is active, the axis comes to a halt and a corresponding alarm is displayed.
● The machine axis cannot be stopped and restarted with NC stop/NC start.
● Monitoring of the zero mark is active with MD34060 REFP_MAX_MARKER_DIST.

Characteristics of traversing to the reference point (phase 3)


● The feedrate override and feedrate stop is in effect.
● The machine axis can be stopped and re-started with NC stop/NC start.
● If reference point offset is smaller than the braking distance of the machine axis from the reference point positioning
velocity to stop, the reference point is approached from the opposite direction.

Function Manual
162 6FC5397-7EP40-0BA4, 07/2018
Different motion sequences during referencing:
Referencing type Synchronizing pulse Motion sequence
(zero mark, BERO)
With reference cam (MD34000 Synchronizing pulse before cam,
REFP_CAM_IS_ACTIVE = 1) reference coordinate before synchro-
nizing pulse = without reversal:
(MD34050
REFP_SEARCH_MARKER_REVERS
E = 0)

Synchronizing pulse on cam, refer-


ence coordinate after synchronizing
pulse on cam = with reversal:
(MD34050
REFP_SEARCH_MARKER_REVERS
E = 1)

Without reference cam Reference coordinate after synchro-


(MD34000 nizing pulse
REFP_CAM_IS_ACTIVE = 0)

VC - reference point approach velocity (MD34020 REFP_VELO_SEARCH_CAM)


VM - reference point creep velocity (MD34040 REFP_VELO_SEARCH_MARKER)
VP - reference point positioning velocity (MD34070 REFP_VELO_POS)
RV - reference point offset (MD34080 REFP_MOVE_DIST + MD34090 REFP_MOVE_DIST_CORR)
RK - reference point coordinate (MD34100 REFP_SET_POS)

What is the minimum length of a reference cam?


Example of case: Synchronizing pulse before cam, reference coordinate before synchronizing pulse = synchronizing pulse
search with falling cam edge.
The reference cam must be long enough, so that when the cam is approached with the reference point approach velocity,
the braking operation ends at the cam (the axis comes to a standstill at the cam), and the cam is exited in the opposite
direction with the reference point creep velocity (exit with constant velocity).
To calculate the minimum length of the cam, the larger of the two velocities must be inserted into the formula:

If the machine axis does not come to a halt at the reference cam (interface signal "Reference point approach delay"
(DB380x.DBX1000.7) is reset), alarm 20001 is output. Alarm 20001 can occur if the reference cam is too short and the
machine axis travels over it when decelerating in phase 1.
If the reference cam extends to the end of travel of the axis, an inadmissible starting point for referencing (after the cam) can
be excluded.

Function Manual
6FC5397-7EP40-0BA4, 07/2018 163
Reference cam adjustment
The reference cam must be calibrated exactly. The following factors influence the response time of the control when
detecting the reference cam ("Reference point approach delay" interface signal):
● Switching accuracy of the reference cam switch
● Delay of the reference cam switch (NC contact)
● Delay at the PLC input
● PLC cycle time
● Internal processing time
Practice has shown that the signal edge of the reference cam, which is required for synchronizing, is aligned between two
synchronized pulses (zero marks). This can be achieved by:
● Set MD34080 REFP_MOVE_DIST = MD34090 REFP_MOVE_DIST_CORR = MD 34100 REFP_SET_POS = 0
● Reference axis
● In "JOG" mode, traverse the axis to half the path length between the two zero marks. This path is independent of the
pitch of the leadscrew S and the gear ratio n (e.g. S=10 mm/rev, n=1:1 produces a path of 5 mm).
● Calibrate the cam switch so that switching is done at exactly this position (IS "Reference point approach delay"
(DB380x.DBX1000.7))
● Alternatively, the value of MD34092 REFP_CAM_SHIFT can be changed instead of moving the cam switch.

WARNING
Failure to protact the machine due to the incorrectly calibrated reference cam
If the reference cam is not calibrated precisely, an incorrect synchronizing pulse (zero mark) may be evaluated. In this
case, the control assumes an incorrect machine zero and moves the axes to incorrect positions. Software limit switches
act on incorrect positions and are therefore not able to protect the machine.
• Calibrate the reference cam correctly.

17.3 Secondary conditions for absolute encoders


17.3.1 Calibrating absolute encoders

Calibration time
The calibration process determines the offset between the machine zero and the encoder zero and stores it in a non-volatile
memory. Normally, calibration need only be performed once, i.e. during first commissioning. The control then knows the
value and can calculate the absolute machine position from the encoder absolute value at any time. This status is identified
by MD34210 ENC_REFP_STATE=2.
The offset is stored in MD34090 REFP_MOVE_DIST_CORR.
The calibration process must be repeated in the following situations:
● After mounting/removal or replacement of encoder or of motor with built-in encoder.
● After change of an existing gear unit between motor (with absolute encoder) and load.
● Generally speaking, every time the mechanical connection between the encoder and load is separated and not
reconnected in exactly the same way.

Note
The control may not always recognize the need for recalibration. If it detects such a need, it sets MD34210 to 0 or 1. The
following is detected: changeover to another gear speed with a different gear ratio between the encoder and load.
In all other cases, the user must overwrite MD34210.

Data backup
When machine data is backed up, the status of MD34210 ENC_REFP_STATE is also saved.
By loading this data set, the axis is automatically deemed calibrated!

Function Manual
164 6FC5397-7EP40-0BA4, 07/2018
Note
If the data set has been taken from another machine (e.g. series startup), calibration must still be carried out after loading
and activating the data.

17.3.2 Reference point approach with absolute encoders

Parameter assignment
Traversing movement release
If for a machine axis with adjusted absolute value encoder as active measuring system, reference point traversing is
activated (manually in the JOG-REF mode or automatically via the part program instruction G74), the machine axis travels
depending on the parameterized traversing movement release.
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. When reach-
ing the reference point position, the reference point approach is completed.
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.

17.4 Data table


17.4.1 Machine data
Number Identifier Name
Channel-specific
20700 REFP_NC_START_LOCK NC-Start disable without reference point
Axis-specific
30200 NUM_ENCS Number of encoders
30240 ENC_TYP[0] Actual value encoder type
30330 MODULO_RANGE Magnitude of modulo range
31122 BERO_DELAY_TIME_PLUS[0] BERO delay time in plus direction
31123 BERO_DELAY_TIME_MINUS[0] 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 Reference point approach velocity
34030 REFP_MAX_CAM_DIST Maximum distance to reference cam
34040 REFP_VELO_SEARCH_MARKER[0] Reference point creep speed
34050 REFP_SEARCH_MARKER_REVERSE[0] Direction reversal to reference cam
34060 REFP_MAX_MARKER_DIST[0] Maximum distance to reference marker; maximum distance to
2 reference markers with distance-coded scales
34070 REFP_VELO_POS Reference point positioning velocity
34080 REFP_MOVE_DIST[0] Reference point distance/destination point for distancecoded
system
34090 REFP_MOVE_DIST_CORR[0] Reference point/absolute offset, distancecoded
34092 REFP_CAM_SHIFT[0] Electronic reference point cam shift for incremental measuring
systems with equidistant zero marks.
34093 REFP_CAM_MARKER_DIST[0] Reference cam/reference mark distance
34100 REFP_SET_POS[0]...[3] Reference point value

Function Manual
6FC5397-7EP40-0BA4, 07/2018 165
Number Identifier Name
34110 REFP_CYCLE_NR Axis sequence for channel-specific referencing
34210 ENC_REFP_STATE[0] Status of absolute encoder
34220 ENC_ABS_TURNS_MODULO[0] Absolute encoder range for rotary encoders
36300 ENC_FREQ_LIMIT[0] Encoder frequency limit
36302 ENC_FREQ_LIMIT_LOW[0] Encoder limit frequency resynchronization
36310 ENC_ZERO_MONITORING[0] Zero mark monitoring

17.4.2 Interface signals


Number Bit Name
Specific to operating mode
DB3000.DBX0001 .2 Machine function REF
DB3100.DBX0001 .2 Active machine function REF
Channel-specific
DB3200.DBX0001 .0 Activate referencing
DB3300.DBX0001 .0 Referencing active
DB3300.DBX0004 .2 All axes referenced
Axis-specific
DB380x.DBX0000 .5 Position measuring system 1
DB380x.DBX0004 .6 and .7 Traversing key minus/plus
DB380x.DBX1000 .7 Reference point approach delay
DB390x.DBX0004 .6 and .7 Traverse command minus/plus

18 Spindle (S1)
18.1 Brief description
Spindle functions
Depending on the machine type the following functions are possible for a spindle controlled by the NC:
● Input of a direction of rotation for the spindle (M3, M4)
● Input of a spindle speed (S)
● Spindle stop, without orientation (M5)
● Spindle positioning (SPOS=)
(position-controlled spindle required)
● Gear change (M40 to M45)
● Thread cutting/tapping (G33, G34, G35, G331, G332, G63)
● Revolutional feedrate (G95)
● Constant cutting rate (G96)
● Position encoder assembly on the spindle or on the spindle motor
● Spindle monitoring for min. and max. speed.
● Dwell time in spindle revolutions (G4 S)
An "enabled" spindle can be used instead of a controlled spindle. However, a spindle speed (S) is then not entered via the
program but, for example, manually (gearbox) at the machine. This does not permit programming of speed limits. The
following is possible via the program:
● Input of a direction of rotation for the spindle (M3, M4)

Function Manual
166 6FC5397-7EP40-0BA4, 07/2018
● Spindle stop, without orientation (M5)
● Tapping (G63)
If the spindle has a position encoder, the following functions are also available:
● Thread cutting/tapping (G33, G34, G35)
● Revolutional feedrate (G95)
If the spindle is enabled, the setpoint output for the spindle via MD30130 CTRLOUT_TYPE = 0 must be suppressed.

Definition of the spindle


A machine axis is declared a spindle by setting the following machine data:
● MD30300 IS_ROT_AX
● MD30310 ROT_IS_MODULO
● MD30320 DISPLAY_IS_MODULO
● MD35000 SPIND_ASSIGN_TO_MACHAX.
The IS "Spindle/no axis" reports the spindle mode (DB390x.DBX0000.0).

18.2 Spindle modes


18.2.1 Spindle modes

Spindle modes
The spindle can have the following modes:
● Control mode, see Section "Spindle control mode (Page 168)"
● Oscillation mode, see Section "Spindle oscillation mode (Page 169)"
● Positioning mode, see Section "Spindle positioning mode (Page 170)"
● Axis mode
● Tapping without compensating chuck, see also Chapter "Feed (Page 183)"
Switching between spindle modes:

Function Manual
6FC5397-7EP40-0BA4, 07/2018 167
Switching between spindle modes
● Control mode ---> oscillation mode
The spindle changes to oscillation mode if a new gear stage has been specified using automatic gear stage 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
stage is not equal to the current actual gear stage.
● Oscillation mode ---> control mode
When the new gear stage is engaged, the IS "Oscillation mode" (DB390x.DBX2002.6) is reset and the spindle is
switched to control mode with the IS "Gear changed" (DB380x.DBX2000.3). 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, SPOSA, and
M19 are used to switch to positioning mode.
● Positioning mode ---> control mode
SPCOF, M3, M4, M5, and M41-45 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.
● 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 ---> tapping without compensation chuck
Tapping without compensation chuck (thread interpolation) is activated via G331/G332. SPOS must first be used to set
the spindle to position-controlled operation.

18.2.2 Spindle control mode

When control mode?


The spindle is in control mode with the following functions:
● Constant spindle speed S, M3/M4/M5 and G94, G95, G97, G33, G63
● Constant cutting rate G96 S, M3/M4/M5

Requirements
A spindle position actual value sensor is absolutely essential for M3/M4/M5 in conjunction with revolution feedrate (G95, F in
mm/rev or inch/rev), constant cutting rate (G96, G97), thread cutting (G33).

Independent spindle reset


MD35040 SPIND_ACTIVE_AFTER_RESET defines the response of the spindle after reset or program end (M2, M30):
● If MD value=0, the spindle is immediately braked to rest at the valid acceleration. The last programmed spindle speed
and direction of rotation are deleted.
● If MD value = 1 (independent spindle reset), the last programmed spindle speed (S function) and the last programmed
direction of spindle rotation (M3, M4, M5) are retained. 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.

Note
The spindle can always be stopped with the IS "Delete distance-to-go / Spindle Reset".
CAUTION: The program continues at G94! With G95 the axes stop due to the missing feedrates as does the program
run if G1, G2, ... is active.

Function Manual
168 6FC5397-7EP40-0BA4, 07/2018
18.2.3 Spindle oscillation mode

Starting oscillation mode


This oscillation movement makes it easy to engage a new gear stage. In principle, the new gear stage can also be engaged
without oscillation
The spindle is in oscillation mode if a new gear stage was defined using the automatic gear stage selection (M40) or M41 to
M45 (IS "Change gear" (DB390x.DBX2000.3) is enabled). The IS "Change gear" is only enabled when a new gear stage is
selected that is not the same as the current actual gear stage. The spindle oscillation is started with the IS "Oscillation
speed" (DB380x.DBX202.5).
If the IS "Oscillation speed" is enabled without defining a new gear stage, the spindle does not change to oscillation mode.
Oscillation is started with the IS "Oscillation speed". The setting of the IS "Oscillation via PLC" (DB380x.DBX2002.4)
distinguishes between:
● Oscillation via NCK
● Oscillation via PLC

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 SPIND_OSCILL_TIME_CW
● Oscillation time in M4 direction (referred to as t2 in the following):
MD35450 SPIND_OSCILL_TIME_CCW

Oscillation via NCK


Phase 1: With the IS "Oscillation speed" (DB380x.DBX2002.5) , the spindle motor accelerates to the velocity (with oscillation
acceleration) specified in MD35400 SPIND_OSCILL_DES_VELO (oscillation speed). The starting direction is defined by
MD35430 SPIND_OSCILL_START_DIR (starting direction during oscillation).
Phase 2: If time t1 (t2) has elapsed, the spindle motor accelerates in the opposite direction to the speed defined in
MD35400 SPIND_OSCILL_DES_VELO (oscillation speed). Time t2 (t1) starts.
Phase 3: When time t2 (t1) expires, the spindle motor accelerates in the opposite direction (same direction as phase 1), etc.

Oscillation via PLC


With the IS "Oscillation speed" (DB380x.DBX2002.5) , the spindle motor accelerates to the velocity (with oscillation
acceleration) specified in MD35400 SPIND_OSCILL_DES_VELO (oscillation speed).
The direction of rotation is determined by IS "Set direction of rotation counterclockwise" or IS "Set direction of rotation
clockwise" (DB380x.DBX2002.7 or .6).
The oscillation movement and the two times t1 and t2 (for clockwise and counterclockwise rotation) must be simulated on
the PLC.

End of oscillation mode


The IS "Gear changed" (DB380x.DBX2000.3) informs the NC that the new gear stage (IS "Actual gear stage"
(DB380x.DBX2000.0 to .2)) applies and oscillation mode is exited. The actual gear stage should correspond to the set gear
stage. Oscillation mode is also ended if the IS "oscillation speed" (DB380x.DBX2002.5) is still set. The last programmed
spindle speed (S function) and spindle rotation (M3, M4 or M5) are active again.
After termination of oscillation mode the spindle returns to control mode.
All gear specific limit values (min./max. speed etc.) correspond to the set values of the actual gear stage and are deactivated
when the spindle stops.

Block change
If the spindle has been changed over to oscillation mode, IS "Change gear" (DB390x.DBX2000.3) is set, part program
processing is stopped. A new block is not executed. If oscillation mode is terminated using the IS "Gear switched"
(DB380x.DBX2000.3), the execution of the part program is continued. A new block is executed.

Function Manual
6FC5397-7EP40-0BA4, 07/2018 169
Block change following oscillation mode:

Special features
● The acceleration is defined by MD35410 SPIND_OSCILL_ACCEL (acceleration during oscillation).
● If the IS "oscillation speed" (DB380x.DBX2002.5) is reset, the oscillation stops. However, the spindle remains in
oscillation mode.
● The IS "Gear changed" should always be used for terminating gear stage change.
● The IS "Reset" (DB3000.DBX0000.7) does not terminate oscillation mode.
● If an indirect measuring system is used, synchronization is lost. The spindle is re-synchronized the next time the zero
mark is crossed.

Reset during gear stage change


The spindle cannot be stopped via IS "Reset" (DB3000.DBX0000.7) or IS "NC Stop" (DB3200.DBX0007.3) if the spindle is in
oscillation mode for gear stage change and the IS "Gear changed" (DB380x.DBX2000.3) is not yet available.
In this case, alarm 10640 "Stop not possible during gear change" is displayed if reset is selected. After changing the gear
stages, the reset request is performed and the alarm cleared, if this is still present at the interface.

Note
Option for aborting: Set IS "Delete distance-to-go / Spindle Reset" (DB380x.DBX0002.2).

18.2.4 Spindle positioning mode

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 deactivated. With the SPOS =..... program function, the spindle is in positioning mode (see also Section
"Programming (Page 177)").

Block change
The block change is carried out when all functions programmed in the block have reached their end criterion (e.g. axis
traverse completed, all auxiliary functions acknowledged by PLC) and the spindle has reached its position (IS "Exact stop
fine" for spindle (DB390x.DBX0000.7)).

Requirements
A spindle position actual value encoder is absolutely essential.

Function Manual
170 6FC5397-7EP40-0BA4, 07/2018
Positioning from rotation
Positioning from rotation at different speeds:

Sequence
Phase 1: Spindle rotates at a lower speed than the encoder limit frequency. The spindle is synchronized. It is set to control
mode. Process continues with Phase 2.
Phase 1a: Spindle rotates at a lower speed than the position control activation speed. The spindle is synchronized. It is set
to control mode. The rest of the sequence is possible via 4a.
Phase 1b (not shown): Spindle rotates at a speed higher than the encoder limit frequency. The spindle is not synchronized
initially, but is then synchronized when the rotation speed falls below the speed defined by the encoder frequency in
MD36302 ENC_FREQ_LIMIT_LOW (% value of MD36300). Sequence continues with Phase 2.
Phase 2: When the SPOS command takes effect, the spindle starts to decelerate with the acceleration stored in MD35200
GEAR_STEP_SPEEDCTRL_ACCEL until it reaches the position control activation speed.
Phase 3: When the position-control activation speed stored in MD35300 SPIND_POSCTRL_VELO is reached:
● The position control is activated.
● The distance-to-go (to target position) is calculated. (easier from Phase 1a)
● The acceleration is switched to MD35210 GEAR_STEP_POSCTRL_ACCEL. (acceleration in position control mode)
(always active below the position control activation speed)
Phase 4: The spindle brakes from the calculated "braking point" with MD35210 GEAR_STEP_POSCTRL_ACCEL to the
target position.
Phase 5: The position control remains active and stops the spindle in the programmed position. The IS "Position reached
with exact stop fine" (DB390x.DBX0000.7) and "... coarse" (DB390x.DBX0000.6) 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 (respectively defined in MD36010 STOP_LIMIT_FINE and MD36000 STOP_LIMIT_COARSE).

Positioning from standstill, spindle not synchronized


The spindle is not synchronized after the control has been activated. The first movement of the spindle must be positioning
(SPOS=...).

Function Manual
6FC5397-7EP40-0BA4, 07/2018 171
Positioning with stopped, non-synchronized spindle:

Sequence
Phase 1: Programming SPOS accelerates the spindle with the acceleration in MD35210 GEAR_STEP_ POSCTRL_ACCEL
(acceleration in position control mode) until the maximum speed entered in MD35300 SPIND_POSCTRL_VELO (position
control activation speed) is reached.
The direction of rotation is defined by MD35350 SPIND_POSITIONING_ DIR (direction of rotation during positioning from
standstill), if no input results from SPOS programming (ACN, ACP, IC). The spindle is synchronized with the next zero mark
of the position actual value encoder.
Phase 2: When the spindle is synchronized, the position control is activated. The spindle rotates at the maximum speed
stored in MD35300 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.
Phase 3: At the brake application point, the spindle is braked down to standstill with the acceleration set in
MD35210 GEAR_STEP_ POSCTRL_ACCEL (acceleration in position control mode).
Phase 4: The spindle has reached the target point and is stationary. The position control is active and stops the spindle in
the programmed position. The IS "Position reached with exact stop fine" (DB390x.DBX0000.7) and "... coarse"
(DB390x.DBX0000.6) 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 (MD36010 STOP_LIMIT_FINE and
MD36000 STOP_LIMIT_COARSE).

Positioning from standstill, spindle is synchronized


The spindle has already been turned by one spindle revolution with M3 and M4 and was then brought to a standstill with M5.
Positioning with stationary, synchronized spindle:

Sequence
The spindle travels to the programmed end point optimally in terms of time. Depending on the appropriate secondary
conditions, the operational sequences in phases 1 - 2 - 3 - 4 or 1 - 3a - 4a are executed.
Phase 1: SPOS will switch the spindle to position control mode. The acceleration from
MD35210 GEAR_STEP_POSCTRL_ACCEL (acceleration in the position control mode) is activated. The direction of rotation
is determined by the relevant distance-to-go (type of path setting with SPOS).
The speed entered in MD35300 SPIND_POSCTRL_VELO (position control activation speed) is not exceeded. The
traversing path to the end point is calculated. If the end point can be accessed immediately from this phase, Phase 3a, 4a
continues instead of Phase 2.

Function Manual
172 6FC5397-7EP40-0BA4, 07/2018
Phase 2: Acceleration has been performed up to the speed set in MD35300 SPIND_POSCTRL_VELO (position control
activation speed). The brake application point calculation identifies when the programmed spindle position (SPOS=...) can
be approached with the acceleration defined in MD35210 GEAR_STEP_POSCTRL_ACCEL.
Phase 3 and Phase 4: The sequence for "Deceleration" and "Position reached" is the same as for non-synchronized
spindles.

Spindle reset
The positioning process can be aborted with the IS "Delete distance-to-go/spindle reset" (DB380x.DBX0002.2). However,
the spindle remains in positioning mode.

Notes
● In positioning mode the spindle speed override switch continues to be valid.
● Positioning (SPOS) is cancelled with "Reset" or "NC stop".

18.3 Synchronization
Why synchronize?
The control must be synchronized with the position measurement system on the spindle so that the control knows the exact
0 degree position when switched on. Only a synchronized spindle is capable of thread cutting or positioning.
For axes, this process is referred to as referencing, see Chapter "Reference point approach (R1) (Page 160)".

Installation position of the position measurement system


● Directly on the motor in combination with a BERO proximity switch on the spindle (zero mark encoder)
● Directly on the spindle
● Above the measuring gearbox plus BERO switch on the spindle.

Note
A BERO proximity switch can be used only when an analog spindle drive is connected through the PPU interface X54 (no
V70 spindle drive is connected) and a motor encoder is connected through the PPU interface X60.

Synchronization possibilities
When the spindle is switched on, the spindle can be synchronized as follows:
● The spindle is started with a spindle speed (S function) and a spindle rotation (M3 or M4), and synchronized with the next
zero mark of the position measurement system or with the BERO signal. The 0 degree position is shifted by MD34080
REFP_MOVE_DIST + MD34090 REFP_MOVE_DIST_CORR - MD34100 REFP_SET_POS.

Note
Only use MD34080 for shifting the 0 degree position. Monitoring with MD34060 REFP_MAX_MARKER_DIST should be
set to two spindle revolutions (720 degrees).

● Programming SPOS=... from various states (refer to Section "Spindle positioning mode (Page 170)")
● In "JOG" mode, the spindle is started in speed control mode with the direction keys and synchronizes with the next zero
mark of the position measurement system or the BERO signal.

Value acceptance
When synchronizing the spindle, the associated reference point from MD34100 REFP_SET_POS[0] (default value = 0) is
transferred and a possible shift of the reference point. These shifts (machine data) act irrespective of the connected
measurement system and are described in Chapter "Reference point approach (R1) (Page 160)".

Maximum encoder frequency exceeded


When the spindle speed reaches a speed (large S value programmed), which exceeds the maximum encoder limit
frequency MD36300 ENC_FREQ_LIMIT (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.

Function Manual
6FC5397-7EP40-0BA4, 07/2018 173
If a speed is then reached that is below the encoder limit frequency in MD36302 ENC_FREQ_LIMIT_LOW (% value of
MD36300), the spindle automatically synchronizes with the next zero mark signal. You can achieve this by programming a
lower S value, changing the spindle speed override switch, etc.

Re-synchronizing
In the following case, however, the position measuring system must be re-synchronized: the position measurement encoder
is on the motor, a BERO (distance sensor for synchronization signals) is mounted to the spindle and the gear stage is
changed. The synchronization is triggered internally when the spindle is rotating in the new gear stage.

18.4 Gear stage change


Number of gear stages
Five gear stages can be configured for the spindle. If the spindle motor is mounted on the spindle directly (1:1) or with a non-
adjustable gear ratio, MD35010 GEAR_STEP_CHANGE_ENABLE (gear stage change is possible) must be set to zero.
Gear stage change with gear stage selection:

Defining a gear stage


A gear stage can be defined as follows:
● Permanent definition in the part program (M41 to M45)
● Automatic definition by the programmed spindle speed (M40)
In the case of M40, the spindle must be in the control mode for automatic gear stage selection with an S value. The gear
stage change is otherwise rejected and alarm 22000 "Gear change not possible" is output.

M41 to M45
The gear stage can be permanently defined in the part program with M41 to M45. If a gear stage is defined by M41 to M45,
which is different than the current (actual) gear stage, the IS "Change gear" (DB390x.DBX2000.3) and the IS "Set gear
stage A" to "...C" (DB390x.DBX2000.0 to .2) are set. The programmed spindle speed (S) then refers to this permanently
defined gear stage. If a spindle speed exceeding the maximum speed of the permanently defined gear stage is programmed,
the speed is limited to the maximum speed of this gear stage and the IS "Programmed speed too high" (DB390x.DBX2001.1)
is enabled. If a speed is programmed lower than the minimum speed of this gear stage, the speed is raised to this speed.
The IS "Setpoint speed increased" (DB390x.DBX2001.2) is then enabled.

Function Manual
174 6FC5397-7EP40-0BA4, 07/2018
M40
M40 in the part program causes the gear stage to be selected automatically by the control. The control checks which gear
stage is possible for the programmed spindle speed (S function). If the suggested gear stage is not equal to the current
(actual) gear stage, the IS "Change gear" (DB390x.DBX2000.3) and the IS "Set gear stage A to C" (DB390x.DBX2000.0
to .2) are enabled.
The automatic gear stage selection function initially compares the programmed spindle speed with the minimum and
maximum speed of the current gear stage. If the comparison is positive, a new gear stage is not defined. If the comparison is
negative, the comparison is performed on each of the gear stages (starting with gear stage 1) until the result is positive. If
the comparison in the 5th gear stage is also not positive, no gear stage change is triggered. If necessary the speed is limited
to the maximum speed of the current gear stage or increased to the minimum speed of the current gear stage, and the IS
"Setpoint speed limited" (DB390x.DBX2001.1) or IS "Setpoint speed increased" (DB390x.DBX2001.2) is enabled.
Example for speed ranges for automatic gear stage selection (M40):

Gear stage change


A new gear stage can only be selected when the spindle is stationary.
The spindle is stopped internally in the control if a gear stage change is requested. If the new gear stage is preselected by
M40 and spindle speed or M41 to M45, the IS "Set gear stage A" to "...C" (DB390x.DBX2000.0 to .2) and the IS "Change
gear" (DB390x.DBX2000.4) are set. At the point when the IS "Oscillation speed" (DB380x.DBX2002.5) is enabled, the
spindle decelerates to a stop with the acceleration for oscillation or with the acceleration for speed control / position control.
The next block in the part program after the gear stage change via M40 and S value or M41 to M45 is not performed (same
effect as if the IS "Read-in disable" (DB3200.DBX0006.1) were enabled).
When stationary the spindle (IS "Axis/spindle stationary" (DB390x.DBX0001.4)) can be activated with the IS "Oscillation
speed" (DB380x.DBX2002.5) (see Section "Spindle oscillation mode (Page 169)"). When the new gear stage is engaged,
the PLC user sets the IS "Actual gear stage" (DB380x.DBX2000.0 to .2) and IS "Gear changed" (DB380x.DBX2000.3). The
gear stage change is considered completed (spindle mode "Oscillation mode" is deselected) and the spindle is switched to
the parameter block of the new actual gear stage. The spindle accelerates at the new gear stage to the spindle speed last
programmed (if M3 or M4 are active). The IS "Change gear" (DB390x.DBX2000.3) is reset by the NCK, which causes the
PLC user to reset the IS "Gear changed" (DB380x.DBX2000.3). The next block in the part program can be executed.

Function Manual
6FC5397-7EP40-0BA4, 07/2018 175
The following figure shows the typical time sequence for the gear stage change.
Gear stage change with stationary spindle:

Parameter set
One parameter set each is provided for each of the five gear stages. The appropriate parameter set is activated through the
IS "Actual gear stage A" to "...C" (DB380x.DBX2000.0 to .2).
It is assigned as follows:
Index n PLC interface, Data of the data set Contents
CBA coding
0 - Data for axis mode
1 000 Data for 1st gear stage Servo gain factor,
001 monitoring functions,
speed, acceleration,
2 010 Data for 2nd gear stage etc.
3 011 Data for 3rd gear stage
4 100 Data for 4th gear stage
5 101 Data for 5th gear stage

Function Manual
176 6FC5397-7EP40-0BA4, 07/2018
The machine data included in a parameter set are marked specifically in Section "Machine data (Page 181)". The following
machine data is added per gear stage for each parameter set index n (n=1 -> 1st gear stage of the spindle, etc.):
● MD35110 GEAR_STEP_MAX_VELO[n]
● MD35120 GEAR_STEP_MIN_VELO[n]
● MD35130 GEAR_STEP_MAX_VELO_LIMIT[n]
● MD35140 GEAR_STEP_MIN_VELO_LIMIT[n]
● MD35200 GEAR_STEP_SPEEDCTRL_ACCEL[n]
● MD35210 GEAR_STEP_POSCTRL_ACCEL[n]
● MD35310 SPIND_POSIT_DELAY_TIME[n]

18.5 Programming
Functions
The spindle can be set for the following functions:
● G95 Revolutional feedrate
● G96 S... LIMS=... Constant cutting rate in m/min, upper speed limit
● G97 Cancel G96 and freeze last spindle speed
● G33, G331, G332 Thread cutting, tapping
● G4 S ... Dwell time in spindle revolutions
M3 CW spindle rotation
M4 CCW spindle rotation
M5 Spindle stop, without orientation
S... Spindle speed in rpm, e.g. S300
SPOS=... Spindle positioning, e.g. SPOS=270 -> at position 270 degrees.
The block change is only performed when the spindle is in position.
SPOS=DC(Pos) The direction of motion is retained for positioning while in motion and the position approached.
When positioning from standstill, the position is approached via the shortest path.
SPOS=ACN(Pos) The position is always approached with negative direction of motion. If necessary, the direction of
motion is inverted prior to positioning.
SPOS=ACP(Pos) The position is always approached with positive direction of motion. If necessary, the direction of
motion is inverted prior to positioning.
SPOS=IC(Pos) The traversing path is specified. The direction of traversing is obtained from the sign in front of
the traversing path. If the spindle is in motion, the direction of traversing is inverted if necessary
to allow traversing in the programmed direction.
M40 Automatic gear stage selection for the spindle
M41 to M45 Select gear stage 1 to 5 for the spindle
SPCON Position control on
SPCOF Position control off
M70 Position control on
LIMS=... Programmable maximum spindle speed for G96
Reference:
SINUMERIK 808D ADVANCED Programming and Operating Manual

Function Manual
6FC5397-7EP40-0BA4, 07/2018 177
18.6 Spindle monitoring
18.6.1 Spindle monitoring
Speed ranges
The spindle monitoring functions and the currently active functions (G94, G95, G96, G33, G331, G332, etc.) define the
admissible speed ranges of the spindle.
Ranges of spindle monitoring functions/speeds:

18.6.2 Axis/spindle stationary


Only when the spindle is stationary, i.e. the actual spindle speed is below a value defined in MD36060
STANDSTILL_VELO_TOL, is IS "Axis/spindle stationary" (DB390x.DBX0001.4) set. Functions such as tool change, open
machine door, path feed can be activated using the PLC user program.
Monitoring is effective in the three spindle modes.

18.6.3 Spindle in setpoint range


The "Spindle in setpoint range" monitor checks whether the programmed spindle speed has been reached, whether the
spindle is stationary (IS "Axis/spindle stationary") or whether it is still in the acceleration phase.
In the spindle "control mode", the speed setpoint (programmed speed with spindle override including the active limits) is
compared with the actual speed. If the deviation of the actual speed from the speed setpoint is greater than the spindle
speed tolerance set in MD35150 SPIND_DES_VELO_TOL:
● IS "Spindle in setpoint range" (DB390x.DBX2001.5) is set to zero.
● The next machining block is not enabled if
MD35500 SPIND_ON_SPEED_AT_IPO_START is set.

Function Manual
178 6FC5397-7EP40-0BA4, 07/2018
18.6.4 Maximum spindle speed

Maximum spindle speed


A maximum speed is defined for "maximum spindle speed" spindle monitoring, which the spindle may not exceed.
The maximum spindle speed is entered in MD35100 SPIND_VELO_LIMIT.
The control limits an excessive spindle speed setpoint to this value. If the actual spindle speed exceeds the maximum
spindle speed despite allowance for the spindle speed tolerance (MD35150 SPIND_DES_VELO_TOL), there is a drive fault
and IS "Speed limit exceeded" (DB390x.DBX2002.0) is set. Furthermore the alarm 22100 is output and all axes and the
spindle are decelerated.

18.6.5 Minimum/maximum speed for gear stage

Max. speed
MD35130 GEAR_STEP_MAX_VELO_LIMIT defines the maximum speed for the gear stage. In the gear stage engaged, this
set speed can never be exceeded. When the programmed spindle speed is limited, the IS "Set speed limited"
(DB390x.DBX2001.1) is enabled.

Minimum speed
MD35140 GEAR_STEP_MIN_VELO_LIMIT defines the minimum speed for the gear stage. It is not possible that the speed
falls below this (set) speed if an S value is programmed, which is too small. Then, the IS "Setpoint speed increased"
(DB390x.DBX2001.2) is enabled.
The minimum gear stage speed is operative only in spindle open loop control mode; the speed of the gear stage can only fall
below the minimum limit through:
● Spindle override 0 %
● M5
● S0
● IS "Spindle stop"
● Remove IS "Controller enable"
● IS "Reset"
● IS "Spindle reset"
● IS "Oscillation speed"
● IS "NCSTOP axes and spindle"
● IS "Axis/spindle disable"

18.6.6 Max. encoder limit frequency


Note
The maximum encoder limit frequency 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 from being exceeded.

Maximum encoder limit frequency exceeded


If the spindle reaches a speed in the open-loop control mode (a high S value has been programmed) which is higher than
the max. encoder limit frequency (the max. speed of the encoder may not be exceeded), the synchronization is lost.
However, the spindle continues to rotate.
If one of the thread cutting (G33), revolutional feedrate (G95), constant cutting rate (G96, G97) functions is programmed, the
spindle speed is reduced automatically so far until the active measuring system works reliably again.
In the "positioning mode" spindle mode and with position-controlled threads (G331, G332) the max. encoder limit frequency
is not exceeded.

Function Manual
6FC5397-7EP40-0BA4, 07/2018 179
If the encoder limit frequency is exceeded, the IS "Referenced/synchronized" DB390x.DBX0000.4) is reset for the
measurement system and IS "Encoder limit frequency 1 exceeded" (DB390x.DBX0000.2) is enabled.
If the maximum encoder limit frequency has been exceeded and the speed subsequently falls below the encoder frequency
in MD36302 ENC_FREQ_LIMIT_LOW (% value of MD36300 ENC_FREQ_LIMIT), the spindle is automatically synchronized
with the next zero mark or the next BERO signal.

18.6.7 Target point monitoring

Function
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 set position (target point).
Two limit values can be defined as incremental path (starting at the spindle set position) in the following machine data.
● MD36000 STOP_LIMIT_COARSE (exact stop limit coarse)
● MD36010 STOP_LIMIT_FINE (exact stop limit fine)
Regardless of the two limit values, the positioning of the spindle is always as accurate as the connected spindle
measurement encoder, the backlash, the transmission ratio, etc.
Exact stop zones of a spindle for positioning:

IS: Position reached with exact stop ...


When the limits MD 36000 and MD 36010 are reached, IS "Position reached with exact stop coarse" (DB390x.DBX0000.6)
and IS "Position reached with exact stop fine" (DB390x.DBX0000.7) are output to the PLC.

Block change with SPOS


If the spindle is being positioned with SPOS, the block change will be dependent on the end point monitoring with the IS
"Position reached with exact stop fine". All other functions programmed in the block must have achieved their end criterion
(e.g. axes ready, all auxiliary functions acknowledged by the PLC).

18.7 Analog spindle


Function
In the control system, an analog spindle is designed for machine running. The spindle is controlled through the rated analog
voltage ranging from +10 V to -10 V and two signals in terminals X21-8 and X21-9. The voltage has the corresponding
output on the control system.
The analog spindle supports an increment encoder (TTL encoder), which can be directly connected to the control system.
You can parameterize the encoder only of an analog spindle. When you set the parameter of the encoder with a step motor
shaft, alarm 26006 is thrown out.
Through MD30130 CTRLOUT_TYPE and MD30240 ENC_TYPE, you can switch the rated value output between an analog
spindle and an actual spindle. For an analog spindle without any encoder, MD30240 ENC_TYPE[n] must be set to zero.

Function Manual
180 6FC5397-7EP40-0BA4, 07/2018
18.8 Data table
18.8.1 Machine data
Number Identifier Name
Channel-specific
20090 SPIND_DEF_MASTER_SPIND Master spindle
Axis-specific
30134 IS_UNIPOLAR_OUTPUT[0] Setpoint output is unipolar
30300 IS_ROT_AX Rotary axis
30310 ROT_IS_MODULO Modulo conversion
30320 DISPLAY_IS_MODULO Position display
31050 * DRIVE_AX_RATIO_DENOM[n] Denominator load gearbox
31060 * DRIVE_AX_RATIO_NUMERA[n] Numerator load gearbox
32200 * POSCTRL_GAIN [n] Servo gain factor Kv
32810 * EQUIV_SPEEDCTRL_TIME [n] Equivalent time constant speed control circuit for feedforward
control
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 distancecoded
system
34090 REFP_MOVE_DIST_CORR Reference point offset/absolute offset, distancecoded
34100 REFP_SET_POS Reference point value
34200 ENC_REFP_MODE Referencing mode
35000 SPIND_ASSIGN_TO_MACHAX Assignment of spindle to machine axis
35010 GEAR_STEP_CHANGE_ENABLE Gear stage change possible
35040 SPIND_ACTIVE_AFTER_RESET Spindle active after reset
35100 SPIND_VELO_LIMIT Maximum spindle speed
35110 * GEAR_STEP_MAX_VELO[n] Maximum speed for gear change
35120 * GEAR_STEP_MIN_VELO[n] Minimum speed for gear change
35130 * GEAR_STEP_MAX_VELO_LIMIT[n] Maximum speed of gear stage
35140 * GEAR_STEP_MIN_VELO_LIMIT[n] Minimum speed of gear stage
35150 SPIND_DES_VELO_TOL Spindle speed tolerance
35200 * GEAR_STEP_SPEEDCTRL_ACCEL[n] Acceleration in speed control mode
35210 * GEAR_STEP_POSCTRL_ACCEL[n] Acceleration in position control mode
35300 SPIND_POSCTRL_VELO Position control activation speed
35310 SPIND_POSIT_DELAY_TIME[n] Positioning delay time
35350 SPIND_POSITIONING_DIR Positioning direction of rotation for a nonsynchronized spindle
35400 SPIND_OSCILL_DES_VELO Reciprocating speed
35410 SPIND_OSCILL_ACCEL Oscillation acceleration
35430 SPIND_OSCILL_START_DIR Starting direction during oscillation
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
36060 STANDSTILL_VELO_TOL Threshold velocity "Axis/spindle stationary"
36200 * AX_VELO_LIMIT [n] Threshold value for velocity monitoring
36300 ENC_FREQ_LIMIT Encoder limit frequency

Function Manual
6FC5397-7EP40-0BA4, 07/2018 181
Number Identifier Name
36302 ENC_FREQ_LIMIT_LOW Encoder limit frequency resynchronization
36720 DRIFT_VALUE Drift basic value
The machine data marked with * is contained in the parameter set for a gear stage.

18.8.2 Setting data


Number Identifier Name
General
41200 JOG_SPIND_SET_VELO JOG velocity for the spindle
Spindle-specific
43230 SPIND_MAX_VELO_LIMS Programmable spindle speed limit G96

18.8.3 Interface signals


Number Bit Name
Axis-specific
DB30x.DBD0000 - M function for the spindle (DINT), axis-specific
DB30x.DBD0004 - S function for the spindle (REAL), axis-specific
DB380x.DBB0000 - Feed override
DB380x.DBX0001 .7 Override active
DB380x.DBX0001 .5 Position measuring system 1
DB380x.DBX0001 .3 Axis/spindle disable
DB380x.DBX0002 .2 Spindle reset/delete distance-to-go
DB380x.DBX0002 .1 Controller enable
DB380x.DBX2000 .3 Gear changed
DB380x.DBX2000 .0 to .2 Actual gear stage A to ...C
DB380x.DBX2001 .4 Resynchronize spindle during positioning 1 (spindle)
DB380x.DBX2001 .6 Invert M3/M4
DB380x.DBX2002 .7 Set direction of rotation counterclockwise
DB380x.DBX2002 .6 Set direction of rotation clockwise
DB380x.DBX2002 .5 Oscillation speed
DB380x.DBX2002 .4 Oscillation via PLC
DB380x.DBB2003 - Spindle override
DB390x.DBX0000 .7 Position reached with exact stop fine
DB390x.DBX0000 .6 Position reached with exact stop coarse
DB390x.DBX0000 .4 Referenced/synchronized 1
DB390x.DBX0000 .2 Encoder limit frequency exceeded 1
DB390x.DBX0000 .0 Spindle / no axis
DB390x.DBX0001 .7 Current controller active
DB390x.DBX0001 .6 Speed control loop active
DB390x.DBX0001 .5 Position controller active
DB390x.DBX0001 .4 Axis/spindle stationary (n < nmin)
DB390x.DBX2000 .3 Change gear stage
DB390x.DBX2000 .0 to .2 Actual gear stage A to ...C
DB390x.DBX2001 .7 Actual direction of rotation clockwise
DB390x.DBX2001 .5 Spindle in setpoint range
DB390x.DBX2001 .2 Setpoint speed increased
DB390x.DBX2001 .1 Setpoint speed limited

Function Manual
182 6FC5397-7EP40-0BA4, 07/2018
Number Bit Name
DB390x.DBX2001 .0 Speed limit exceeded
DB390x.DBX2002 .7 Active spindle control mode
DB390x.DBX2002 .6 Active spindle mode oscillation mode
DB390x.DBX2002 .5 Active spindle positioning mode
DB390x.DBX2002 .3 Tapping with compensation chuck active
DB390x.DBX2002 .0 Constant cutting rate active (G96)

19 Feedrates (V1)
19.1 Path feedrate F
19.1.1 Path feedrate F

Functionality
The feedrate F is the path velocity of the tool along the programmed workpiece contour. The individual axis velocities
therefore result from the portion of the axis path in the overall distance to be traversed.
The feedrate F is effective for the interpolation types G1, G2, G3, CIP, and CT and is retained in a program until a new F
word is written.
Reference:
SINUMERIK 808D ADVANCED Programming and Operating Manual

Dimension units for F: G94, G95


The dimension unit for the F word is determined by G functions:
● G94 F as feedrate in mm/min or inch/min
● G95 F as feedrate in mm/rev of the spindle or inch/rev
(only meaningful when the spindle is running)
The inch dimension system applies with G700 or system setting "inch" with MD10240 SCALING_SYSTEM_IS_METRIC=0.

Dimension units for F with G96, G97


For lathes the group with G94, G95 has been extended by the G96, G97 functions for the constant cutting rate (ON/OFF).
These functions also influence the S word.
With activated G96 function, the spindle speed is adapted to the currently machined workpiece diameter (transverse axis)
such that a programmed cutting rate S remains constant on the tool edge (spindle speed times diameter = constant).
The S word is evaluated as the cutting rate as of the block with G96. G96 is modally effective until cancellation by another G
function of the group (G94, G95, G97).
The feedrate F is always evaluated in the unit of dimension of mm/rotation or inch/rotation (as for G95).

Maximum tool path velocity


The maximum path velocity is obtained from the maximum velocities of the relevant axes (MD32000 MAX_AX_VELO) and
their proportion of the path. The maximum velocity of an axis stored in the machine data cannot be exceeded.

CFC feedrate override for circles


When machining circular contours using milling tools and the active tool radius compensation (G41/G42), the feedrate at the
milling cutter center must be adjusted if the programmed F value is intended to be active at the circular contour. If the CFC
feedrate override is active, inside and outside circle machining is detected automatically.
The feedrate override can be switched-off using CFTCP.

Function Manual
6FC5397-7EP40-0BA4, 07/2018 183
Reference:
SINUMERIK 808D ADVANCED Programming and Operating Manual

Interface signals
If the revolutional feedrate is active, IS "Revolutional feedrate" (DB3300.DBX0001.2) is set.
If the G96/G332 function is active, the IS "Constant cutting rate active" (DB390x.DBX2002.0) is set for the spindle.

Alarms
● If no F word is programmed at G1, G2, G3, ..., alarm 10860 is issued. An axis movement is not possible. However,
please note: SD42110 DEFAULT_FEED!
● If F0 is programmed, alarm 14800 is issued.
● If G95 is active and the spindle is stationary, an axis movement is not possible. No alarm is issued.

Notes
● If the "Dry run feedrate" function is activated and the program is started, the feedrates programmed in combination with
G1, G2, G3, CIP, CT will be replaced by the feedrate value stored in SD42100 DRY_RUN_FEED, see Section "Program
processing with dry run feedrate (DRY) (Page 104)".
● The velocity of the traversing movement of an axis in "JOG" mode is determined by the machine data/setting data.

19.1.2 Feedrate with G33, G34, G35 (thread cutting)

Types of thread cutting


G33 - thread with constant pitch
G34 - thread with (linearly) increasing pitch
G35 - thread with (linearly) decreasing pitch

Axis velocity
With respect to G33, G34, or G35 threads, the axis velocity for the thread length results from the set spindle speed and the
programmed pitch. However, the maximum axis velocity defined in MD32000 MAX_AX_VELO cannot be exceeded.
The feedrate F is not relevant. It is, however, kept in the memory.
The axis velocity, e.g. for a cylinder thread, results from the set spindle speed (S) and programmed pitch (K):
Fz [mm/min] = speed S [rev/min] * pitch K [mm/rev]

Note
For G34 and G35 the pitch change in mm/rev2 is programmed under the F address.

Reference:
SINUMERIK 808D ADVANCED Programming and Operating Manual

NC stop, single block


NC stop and single block are only active after completion of thread chaining.

Information
● The spindle speed override switch must remain unchanged during thread machining (tapping).
● The feedrate override switch is irrelevant in a block with G33, G34, G35.

Programmable runin and runout path: DITS, DITE


The run-in and run-out path is to be traversed in addition to the required thread. The starting and braking of the axis (both
axes in case of a tapered thread) are performed in these areas. This path depends on the pitch, spindle speed, and the axis
dynamics (configuration).

Function Manual
184 6FC5397-7EP40-0BA4, 07/2018
If the available path for run-in or run-out is limited, it may be necessary to reduce the spindle speed so that this path is
sufficient. In this case, the run-in and run-out paths can be specified separately in the program to achieve favorable cutting
values and short machining times or to simplify the handling of this issue.
If no values are specified, the values from the setting data (SD) apply. The specifications in the program are written in
SD42010 THREAD_RAMP_DISP[0] ... [1].
If this path is not sufficient for traversing at the configured axis acceleration, the axis is overloaded in terms of acceleration.
Alarm 22280 ("Programmed run-in path too short") is then issued for the thread run-in. The alarm is purely for information
and has no effect on part program execution.
The run-out path acts as an approximate distance at the end of the thread. This achieves a smooth change in the axis
movement when retracting.

Programming
DITS= ...: Run-in path of the thread
DITE= ...: Run-out path of the thread
Reference:
SINUMERIK 808D ADVANCED Programming and Operating Manual

SD42010
Only paths, and not positions, are programmed with DITS and DITE.
With the part program instructions, the setting data SD42010 THREAD_RAMP_DISP[0], ...[1] defines the following
acceleration response of the axis during thread cutting ([0]-run-in, [1]-run-out):
● SD42010 = < 0 to -1:
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 an approximate distance. This achieves a smooth change in the axis movement.

Pitch change F with G34, G35


If you already know the starting and final lead of a thread, you can calculate the pitch change F to be programmed according
to the following equation:

The identifiers have the following meanings:


Ke Pitch of axis target point coordinate [mm/rev]
Ka Initial pitch (progr. under I and K) [mm/rev]
LG Thread length in [mm]

19.1.3 Feedrate for G63 (tapping with compensation chuck)

Feedrate F
In the case of G63 it is necessary to program a feedrate F. It must be suitable for the selected spindle speed S (programmed
or set) and for the pitch of the drill:
Feedrate F [mm/min] = speed S [rev/min] x pitch [mm/rev]
The compensation chuck absorbs possible path differences of the drill axis to a limited extent.

Function Manual
6FC5397-7EP40-0BA4, 07/2018 185
Reference:
SINUMERIK 808D ADVANCED Programming and Operating Manual

19.1.4 Feedrate for G331, G332 (tapping without compensation chuck)

Axis velocity
With respect to G331/G332 tapping, the axis velocity for the thread length results from the effective spindle speed S and the
programmed pitch. However, the maximum axis velocity defined in MD32000 MAX_AX_VELO cannot be exceeded.
The feedrate F is not relevant. It is, however, kept in the memory.

Interface signal
If the G331/G332 function is active, the IS "Tapping without compensation chuck active" (DB390x.DBX2002.3) is set for the
spindle.

Note
The tapping may only be carried out without a compensation chuck if an exact dynamic adjustment of the spindle and the
relevant axis has been performed. With G331/G332 the parameter set n (0...5) of the axis becomes effective automatically.
This parameter set also applies to the current gear stage of the spindle (M40, M41 to M45 - see also Chapter "Spindle (S1)
(Page 166)").
In general, the axis is adjusted to the slower spindle.

Reference:
SINUMERIK 808D ADVANCED Programming and Operating Manual

19.1.5 Feedrate for chamfer/rounding: FRC, FRCM

Chamfer/rounding
You can insert the chamfer (CHF or CHR) or rounding (RND) elements into a contour corner. If you wish to round several
contour corners sequentially by the same method, use "Modal rounding" (RNDM).
You can program the feedrate for the chamfer/rounding with FRC=... (non-modal) or FRCM= ... (modal). If FRC/FRCM is not
programmed, the normal feedrate F is applied.

Programming
FRC=... Non-modal feedrate for chamfer/rounding
Value > 0: Feedrate in mm/min (G94) or mm/rev. (G95)

FRCM=... Modal feedrate for chamfer/rounding


Value > 0: Feedrate in mm/min (G94) or mm/rev. (G95)
Modal feedrate for chamfer/rounding ON
Value = 0: Modal feedrate for chamfer/rounding OFF
Feedrate F applies to the chamfer/rounding

Notes
● F, FRC, FRCM are not active when a chamfer is traversed with G0. If the feedrate F is active for chamfer/rounding, it is
by default the value from the block which leads away from the corner. Other settings can be configured via machine data
MD20201 CHFRND_MODE_MASK.
● A maximum of three blocks without corresponding information may be put between two blocks containing traversing
information for chamfer/rounding (axes of the plane). In the case of more blocks without axis information in the plane and
existing instructions for inserting chamfer or rounding, an alarm is triggered.

Function Manual
186 6FC5397-7EP40-0BA4, 07/2018
19.2 Rapid traverse G0
Application
The rapid traverse movement G0 is used for rapid positioning of the tool, but not for direct workpiece machining. All axes
can be traversed simultaneously. This results in a straight path.
For each axis, the maximum speed (rapid traverse) is defined in machine data MD32000 MAX_AX_VELO. If only one axis
traverses, it uses its rapid traverse. If, for example, two axes are traversed simultaneously, the path velocity (resulting
velocity) is selected to achieve the maximum possible path velocity under consideration of both axes.
If, for example, two axes have the same maximum velocity and also travel the same path, the path velocity = 1.41 * max.
axis velocity.
The feedrate F is not relevant for G0. It is, however, kept in the memory.

Rapid traverse override


In "AUTO" operating mode, the feedrate override switch also applies to the rapid traverse through the following operations:

->
The active function is displayed with ROV in the status line. HMI to PLC sets the IS "Feedrate override for rapid traverse
selected" (DB1700.DBX0001.3). The PLC user program must place this signal on the IS "Rapid traverse override active"
(DB3200.DBX0006.6).

19.3 Feedrate control


19.3.1 Overview
Possibilities for programming and controlling the feedrate:

Function Manual
6FC5397-7EP40-0BA4, 07/2018 187
19.3.2 Feedrate disable and feedrate/spindle stop

General
The "Feed disable" or "Feed/spindle stop" brings the axes to a standstill. The path contour is maintained (exception: G33
block).

Feed disable
The channel-specific interface signal "Feed disable" (DB3200.DBX0006.0) will stop all axes (geometry and special axes) in
all operating modes.
This feed disable is not effective if G33 is active; it is, however, active with G63, G331, G332.

Feed stop for axes in the WCS


The "Feed stop" interface signals (DB3200.DBX1000.3, DB3200.DBX1004.3, and DB3200.DBX1008.3) are used to stop the
geometry axes (axes in the WCS) during traversing in the workpiece coordinate system (WCS) in "JOG" mode.

Axis-specific feed stop


The axis-specific "Feed stop" interface signal (DB380x.DBX0004.3) is used to stop the relevant machine axis.
In "AUTO" 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.
Only the current axis is stopped in "JOG" mode.
The axis specific "Feed stop" is active when G33 is active (but: contour deviations = thread error!).

Spindle stop
The "Spindle stop" interface signal (DB380x.DBX0004.3) is used to stop the spindle.
"Spindle stop" is active with G33 and G63.

Note
Contour deviations = thread error!

19.3.3 Feedrate override via a machine control panel

General
The operator can use the feedrate override switch to increase or decrease the path feedrate relative to the programmed
feedrate in percent with immediate effect. The feedrates are multiplied by the override values.
An override between 0 and 120% can be programmed for the path feedrate F.
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 spindle override can be used to modify the spindle speed and the cutting rate (with G96). The override can be between
50 and 120%.
The override is not permitted to exceed the machine specific acceleration and speed limits or generate a contour error.
The override acts on the programmed values before limits intervene.

Channel-specific feedrate and rapid traverse override


One enable signal and one byte are provided on the PLC interface for the override factor in percent for feedrate and rapid
traverse:
● IS "Feedrate override" (DB3200.DBB0004)
● IS "Feedrate override active" (DB3200.DBX0006.7)
● IS "Rapid traverse override" (DB3200.DBB0005)
● IS "Rapid traverse override active" (DB3200.DBX0006.6)

Function Manual
188 6FC5397-7EP40-0BA4, 07/2018
The interface for the override (value) is supplied by a machine control panel via the PLC to the NC and it is Gray-coded.
An active feedrate override acts on all path axes. An active rapid traverse override acts on all axes traversing with rapid
traverse.
If there is no dedicated rapid traverse override switch, the feedrate override switch can be used. In this case, feedrate
overrides above 100% are limited to 100% for rapid traverse override.
The override to be active can be selected via the PLC or operator panel.
If the selection is made using the operator panel (display: ROV), the IS "Feedrate override for rapid traverse selected"
(DB1700.DBX0001.3) is set and must be transferred by the PLC user program to the IS "Rapid traverse override active"
(DB3200.DBX0006.6). The value itself is to be transferred by the PLC user program from a machine control panel to the IS
"Rapid traverse override" (DB3200.DBB0005).
The channel-specific feedrate and rapid traverse overrides are inactive if G33, G63, G331 and G332 are active.

Axis-specific feedrate override


One enable signal and one byte for the feedrate override factor in percent are available on the PLC interface for each axis:
● IS "Feedrate override" (DB380x.DBB0000)
● IS "Override active" (DB380x.DBX0001.7)
If G33, G331, G332, G63 are active, the axis-specific feedrate override has no effect (is internally set to a fixed value of
100%).

Spindle override
One enable signal and one byte for the spindle override factor in percent are available on the PLC interface for each spindle:
● IS "Spindle override" (DB380x.DBB2003)
● IS "Override active" (DB380x.DBX0001.7)
The additional signal IS "Feedrate override for spindle valid" (DB380x.DBX2001.0) allows the PLC user program to
determine that the value of the IS "Feedrate override" (DB380x.DBB0000) should apply.
The spindle override is active with G33, but it should not be actuated for reasons of accuracy; also active with G331, G332.
In the case of G63, the spindle override is set to a fixed value of 100%.

Override active
The set override values are effective in all operating modes and machine functions. This applies if the IS "Rapid traverse
override active", "Feedrate override active" or "Override active" are set.
An override factor of 0% acts as a feedrate disable.

Override inactive
When the override is inactive (i.e. the above interface signals are set to "0"), the override factor "1" is used internally for all
switch positions (except from the 1st position), i.e. the override is 100%.

Note
The 1st switch position of the Gray-coded interfaces for the value represents a special case. In this case, the override factor
of the 1st switch position is also used if the IS "Rapid traverse override active", "Feedrate override active", "Override active"
are not set. Thus 0% is issued as the override value for axes (acts the same as "Feed disable"). The following applies to the
spindle if the IS "Override active" is not set: Override value 50%.

19.4 Data table


19.4.1 Machine/setting data
Number Identifier Name
General machine data
10240 SCALING_SYSTEM_IS_METRIC Basic system metric
Channel-specific machine data

Function Manual
6FC5397-7EP40-0BA4, 07/2018 189
Number Identifier Name
20201 CHFRND_MODE_MASK Specifications regarding the chamfer/rounding behavior
Axis-specific machine data
32000 MAX_AX_VELO Maximum axis velocity
35100 SPIND_VELO_LIMIT Maximum spindle speed
Channel-specific setting data
42100 DRY_RUN_FEED Dry run feedrate
42010 THREAD_RAMP_DISP Acceleration behavior of the feedrate axis when thread
cutting
42110 DEFAULT_FEED Default value for path feed

19.4.2 Interface signals


Number Bit Name
Channel-specific
DB3200.DBX0000 .6 Activate dry run feed
DB3200.DBX0004 - Feed override
DB3200.DBX0005 - Rapid traverse override
DB3200.DBX0006 .0 Feed disable
DB3200.DBX0006 .6 Rapid traverse override active
DB3200.DBX0006 .7 Feed rate override active
DB3200.DBX1000 .3 Feed stop, geometry axis 1
DB3200.DBX1004 .3 Feed stop, geometry axis 2
DB3200.DBX1008 .3 Feed stop, geometry axis 3
DB1700.DBX0000 .6 Dry run feed rate selected
DB1700.DBX0001 .3 Feed rate override selected for rapid traverse
DB3300.DBX0001 .2 Revolutional feed rate active
Axis/spindle-specific
DB380x.DBB0000 - Feed override
DB380x.DBB2003 - Spindle override
DB380x.DBX0001 .7 Override active (axis or spindle)
DB380x.DBX2001 .0 Feedrate override for spindle valid
DB380x.DBX0004 .3 Feed stop/spindle stop
DB390x.DBX2002 .0 Constant cutting rate active (spindle)
DB390x.DBX2002 .3 Tapping without compensation chuck active (spindle)

20 Tool: tool compensation (W1)


20.1 Tool and tool compensation overview
Characteristics
The control system is capable of calculating the tool compensation data for different tool types (drill, milling cutter, turning
tool, ...).
● Length compensation
● Radius compensation
● Storage of the tool compensation data in the tool offset memory
– Tool identification with T numbers from 0 to 32000

Function Manual
190 6FC5397-7EP40-0BA4, 07/2018
– Definition of a tool with a maximum of nine cutting edges (offset blocks) through D number
– Cutting edge is described by tool parameters:
Tool type
Geometry: Length/radius
Wear: Length/radius
Cutting edge position (for turning tools)
● Tool change selectable: Immediately with T command or through M6
● Tool radius compensation
– Compensation active for all interpolation types: linear and circular
– Compensation at outer corners selectable: transition circle (G450) or equidistant intersection (G451)
– Automatic detection of outer/inner corners
Reference:
SINUMERIK 808D ADVANCED Programming and Operating Manual

20.2 Tool
Select a tool
A tool is selected in the program with the T function. Whether the new tool is immediately loaded with the T function or with
M6 depends on the setting in MD22550 TOOL_CHANGE_MODE (new tool offset with the M function).

Value range of T
The T function can assume integer values from T0 (no tool) to T32000 (tool with the number 32000).
Up to 64 tools can be stored in the control system simultaneously.

20.3 Tool offset


Tool compensation through D function
A tool can have up to nine cutting edges. The nine tool cutting edges are assigned to the D functions D1 to D9.
Up to 128 data fields (D numbers) for tool compensation blocks can be stored in the control system simultaneously.
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 offsets 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
you to select the cutting edge:
● The cutting edge number is programmed
● The cutting edge number is not programmed D1 is active automatically.

Activating the tool offset


D1 to D9 activates the tool compensation (offset) 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).
● 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).
Reference:
SINUMERIK 808D ADVANCED Programming and Operating Manual

Function Manual
6FC5397-7EP40-0BA4, 07/2018 191
20.4 Special handling of tool compensation
Tool compensation (offset) can be handled as follows.

Influence of setting data


Using specific setting data the operator / programmer can influence the calculation of the length compensation of the used
tool:
● SD42940 TOOL_LENGTH_CONST
(allocation of the tool length components to the geometry axes)
● SD42950 TOOL_LENGTH_TYPE
(allocation of the tool length components independent of tool type)

Note
The modified setting data will become effective with the next cutting edge selection.

Tool length and plane change (SD42940 TOOL_LENGTH_CONST)


Value of the setting data equal to 0:
The behavior corresponds to the standard definition: The lengths 1 to 3 in geometry and wear are assigned to the 1st to 3rd
axes of the plane according to the active G17 to G19 and according to the tool type. If the active G17 to G19 changes, the
axis assignment for the lengths 1 to 3 also changes because abscissa, ordinate and application are allocated to different
geometry axes.
Reference:
SINUMERIK 808D ADVANCED Programming and Operating Manual
Value of the setting data not equal to 0:
The assignment of the tool lengths 1 to 3 in geometry and wear to the geometry axes are performed according to the SD
value and are not changed if the machining plane (G17 to G19) changes.
The assignment of the tool lengths 1 to 3 to the geometry axes for turning tools (tool types 500 to 599) results from the value
of the setting data SD42940 in accordance with the following table:
Plane/value Length 1 Length 2 Length 3
17 Y X Z
18*) 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 the value for 18.
With respect to the values with a negative sign the assignment of length 3 is identical, length 1 and 2 are exchanged -
compared to the assignment with the corresponding positive values.
The following table shows the assignment of the tool lengths 1 to 3 to the geometry axes for drills / milling cutters (tool types
100 to 299):
Plane/value Length 1 Length 2 Length 3
17*) 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 the value for 17.
With respect to the values with a negative sign the assignment of length 1 is identical, length 2 and 3 are exchanged -
compared to the assignment with the corresponding positive values.

Function Manual
192 6FC5397-7EP40-0BA4, 07/2018
Note
For representation in tables, it is assumed that geometry axes 1 to 3 are named X, Y, Z. The axis order (1st, 2nd and 3rd
geometry axis) but not the axis identifier determines the assignment between an offset and an axis.

Length compensation for tool type (SD42950 TOOL_LENGTH_TYPE)


Value of the setting data equal to 0:
The behavior corresponds to the standard definition: The lengths 1 to 3 in geometry and wear are assigned to the actual tool
type (milling cutter / drill or turning tool).
Reference:
SINUMERIK 808D ADVANCED Programming and Operating Manual
Value of the setting data not equal to 0:
The assignment of the tool lengths is always independent of the actual tool type.
Value 1: Length assignment always as for milling tools.
Value 2: Length assignment always as for turning tools.

Notes
● The influence of these two setting data only refers to tool lengths. The tool radius is not affected.
● If SD42940 TOOL_LENGTH_CONST is set not equal to 0 and the value in SD42950 TOOL_LENGTH_TYPE is 1 or 2,
the related table for the assigned tool type (milling or turning tool) applies in SD42940.

Example
SD42940 TOOL_LENGTH_CONST =18
SD42950 TOOL_LENGTH_TYPE =2
Explanation:
The active tool with the active D number always behaves as a turning tool in the length compensation (-> SD42950 =2).
The length assignment is performed in all planes G17 to G19 as for G18 (-> SD42940=18):
Length 1 -> X axis
Length 2 -> Z axis
If Y axis exists: Length 3 -> Y axis
The tool radius acts according to the actual tool type and the active plane.

20.5 Data table


20.5.1 Machine data
Number Identifier Name
Channel-specific
22360 TOOL_PARAMETER_DEF_MASK Definition of tool parameters
22550 TOOL_CHANGE_MODE New tool offsets with M function

20.5.2 Interface signals


Number Bit Name
Channel-specific
DB2500.DBX0008 .0 T function 1 change
DB2500.DBX0010 .0 D function 1 change
DB2500.DBD2000 - T function 1
DB2500.DBD5000 - D function 1

Function Manual
6FC5397-7EP40-0BA4, 07/2018 193
Number Bit Name
DB2500.DBX1000 .6 M6
DB3200.DBX0013 .5 Deactivate workpiece counter

21 Contour handwheel
Function
When the function is activated, the feedrate of path and synchronized axes can be controlled via a handwheel in "AUTO"
and "MDA" modes.

Availability
For the SINUMERIK 808D ADVANCED, the contour handwheel function is available as an option that is under license.

Input mode (path or velocity input)


Either the distance or the velocity can be entered via the handwheel:
● Path definition
Limiting the velocity to the maximum permissible value causes the axes to overtravel. The path defined by the
handwheel is traversed and no pulses are lost.
● Velocity specification
The handwheel only defines the traverse velocity. As soon as the handwheel stops, the axes stop too. Motion is braked
immediately if no pulses are supplied from the handwheel in one IPO cycle, thus preventing overtravel by the axes. The
handwheel pulses do not supply a path default.
The input mode is set with machine data: MD11346 $MN_HANDWH_TRUE_DISTANCE (handwheel path or velocity input).
For more information about this machine data, see the SINUMERIK 808D ADVANCED Parameter Manual.

Feedrate
The feedrate in mm/min is dependent on the following:
● The number of pulses supplied by the selected handwheel within one period
● Pulse evaluation of the handwheel via the machine data: MD11322 $MN_CONTOURHANDWH_IMP_PER_LATCH
(contour handwheel pulses per detent position)
● The activated increment (INC1, 10, 100, etc.)
● The distance weighting of an increment of the first available geometry axis: MD31090 $MA_JOG_INCR_WEIGHT
(evaluation of an increment for INC/handwheel)
● The programmed feedrate (resultant velocity can be higher)
The actual handwheel velocity must be equal to or smaller than 1.26 times the programmed feedrate.
The feedrate is not dependent on the following:
● The programmed feedrate mode (mm/min, mm/rev.)
● The rapid traverse velocity for G0 blocks
● The override (position 0% is effective, i.e. zero speed)

Traversing direction
The traversing direction depends on the direction of rotation:
● Clockwise
– Results in travel in the programmed direction
If the block-change criterion (IPO end) is reached, the program advances to the next block (response identical to G60).
● Counterclockwise
– Results in travel opposite to the programmed direction

Function Manual
194 6FC5397-7EP40-0BA4, 07/2018
Here, the axes can only traverse to the appropriate block start. Pulses are not collected if the handwheel continues to
rotate. In this case, alarm 20085 is triggered, indicating that the traverse direction or overtravel of beginning of a block is
not allowed.

Activation of the function


The function can be activated via the NC program or via interface signals.
Activating via the NC program
The contour handwheel can be activated in the NC program non-modally using FD=0, that is, velocity F... from the block
before the contour handwheel applies in the following block without the need for additional programming.
You can proceed through the following steps to activate the contour handwheel function via the NC program:
1. Select the machining operating area.

2. Make sure the axes have been referenced, and then open the desired part program contain-
ing "FD=0" in "AUTO" or "MDA" mode, for example:

3. Select "HANDWHEEL" operating mode, and assign the handwheel to the first geometry
axis. For more information about handwheel assignment, see Section "Handwheel traversal
in JOG (Page 74)".

4. Press this key on the MCP. When the block runs to "FD=0", you can control the feedrate of
path and synchronized axes via a handwheel.

Note
"FD=0" applies to the current block only. After the contour handwheel is deactivated, the feedrate programmed in the
previous block applies. If no feedrate was programmed in the previous blocks, a corresponding alarm is output.
"FD" and "F" cannot appear in the same NC block (triggers an alarm).

Activating via interface signal


Switching-in/switching-out is realized via the interface signal: DB3200.DBX14.0-1 (activate contour handwheel (1, 2)).
Address (PLC → NCK) Signal state Corresponding to ... (NCK → PLC)
DB3200.DBX14.0 =1: activate contour handwheel 1 DB3300 DBX5.0 (=1/0: contour handwheel 1
=0: deactivate contour handwheel 1 is active/inactive) *
DB3200.DBX14.1 =1: activate contour handwheel 2 DB3300 DBX5.1 (=1/0: contour handwheel 2
=0: deactivate contour handwheel 2 is active/inactive) *

* The signal state of DB3300 is set by NC automatically, and cannot be changed in PLC.
When the contour handwheel is activated, it can also be simulated. After activation via interface signal DB3200.DBX14.3
(contour handwheel simulation), the feedrate is no longer defined by the contour handwheel. The programmed feedrate is
used instead.

Function Manual
6FC5397-7EP40-0BA4, 07/2018 195
The direction for simulation is also defined via an interface signal DB3200.DBX14.4 (negative direction simulation contour
handwheel). When the simulation is deselected or the direction is changed, the current movement is decelerated using a
braking ramp.
Address (PLC → NCK) Signal state Corresponding to ... (NCK → PLC)
DB3200.DBX14.3 =1: contour handwheel simulation on -
=0: contour handwheel simulation off
DB3200.DBX14.4 =1: negative direction for contour handwheel -
simulation
=0: direction as programmed for contour
handwheel simulation
You can simply modify PLC subroutine 37 (MCP_NCK) network 41 as follows in the default PLC program to realize desired
contour handwheel function:
Input signals Description Output signals Description
ConHw_Key Define the contour handwheel at ConHw_LED Define the contour handwheel at
the MCP key the MCP LED
SimConHw_Key Define the simulation contour SimConHw_LED Define the simulation contour
handwheel at the MCP key handwheel at the MCP LED
NegDir- Define the negative direction for NegDir- Define the negative direction for
SimConHw_Key simulation contour handwheel at SimConHw_LED simulation contour handwheel at
the MCP key the MCP LED
For example, if you desire to control the contour handwheel via the MCP key K7, you can set the address of signal
ConHw_Key to DB1000.DBX1.7 and the address of signal ConHw_LED to DB1100.DBX1.7.
After you edit the default PLC program as above and download it to the control system, you can use the contour handwheel
by activating it via the MCP key K7 and then executing a part program containing "FD=0".

Note
The contour handwheel function remains active as long as the MCP key defined for contour handwheel is activated. In this
case, FD=0 always applies. The programmed feedrate programmed applies only after the block containing "FD=0" runs out
and the contour handwheel key is deactivated.
The override is effective as for NC program execution.

Boundary conditions
● Requirements
Fixed feedrate, dryrun feedrate, thread cutting, or tapping must not be selected.
● Limit values
The acceleration and velocity of the axes are limited to the values defined in the machine data.
● Interruption of traversing movement
On a cycle stop, the function remains selected but the handwheel pulses are not summated and are ineffective.
Requirement: MD32084 $MA_HANDWH_STOP_COND bit 2 = 1
DRF
A selected DRF function also has a path-override action.
● Channel-specific deletion distance-to-go
This causes the movement triggered by the contour handwheel to be aborted; the axes are decelerated and the program
is restarted with the next NC block. The contour handwheel then becomes effective again.

Function Manual
196 6FC5397-7EP40-0BA4, 07/2018
22 Tool parameter: clearance 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 this tool parameter as the tool clearance angle.
Tool clearance angle of the turning tool during relief cutting:

Note
To activate this tool parameter on the HMI, set bit 18 of MD19730[0] to 1 (MD19730[0] = 40000H).
Currently, the clearance angle function can work only when the optional Manual Machine Plus function is licensed and
activated.

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.
Tool clearance angle for longitudinal and face machining:

Note
If a tool clearance angle of zero is entered, relief cutting is not monitored in the turning cycles.

Function Manual
6FC5397-7EP40-0BA4, 07/2018 197
23 PLC axis control
23.1 Brief description
The PLC can control axes/spindles via data blocks of the user interface; the axis/spindle is specified by its DB number:
● DB380x interface PLC → NCK (at axis/spindle)
● DB390x interface NCK → PLC (from axis/spindle)
with axis index x: 0 ≤ x ≤ max. axis index; axis index = axis number - 1
The following functions are supported:
● Positioning axes
● Spindle positioning
● Rotate spindle
● Oscillate spindle
● Indexing axes
For more information, see Chapter "Spindle (S1) (Page 166)".

Precondition
The axis to be controlled must be assigned to the PLC (PLC axis). An axis can be interchanged between NC and PLC using
the user interface "Axis interchange" (DB380x.DBB8/DB390x.DBB8).

Function start
Each function is activated by the positive edge of the corresponding "Start" signal. This signal must remain a logical "1" until
the function has been positively or negatively acknowledged (e.g. using Position reached = "1" or Error = "1"). The signal
"Positioning axis active" = "1" indicates that the function is active and that the output signals are valid.

Interrupt
It is not possible to interrupt the function by resetting the start signal, but only via other interface signals (using the axis-
specific signal Delete distance to go/spindle reset, DB380x.DBX2.2).
The axis interface returns axis status signals that may need to be evaluated (e.g. exact stop, travel command, → DB390x).
If the axis/spindle is being traversed via the NC program when the PLC axis control is called (travel command present), then
the function is only started after this traversing motion has ended. No error code is output in this situation.

Axis disable
With the axis disable set, an axis controlled via PLC axis control will not move. Only a simulated actual value is generated.
(Behavior as with NC programming).

23.2 Function interface


23.2.1 User interface: Preparing the NC axis as PLC axis

Request signals to axis/spindle (excerpt)


Firstly, the axis/spindle must be requested from the PLC:
DB380x Signals to axis/spindle (PLC → NCK) [r/w]
Byte Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
DBB8 Request Activation Request
PLC axis/ signal when NC axis/
spindle this byte is spindle
changed
A change of a request signal (DB380x.DBX8.7 or 8.0) must be notified to the NC via a 0→1 edge of the activation signal
(DB380x.DBX8.4). After a PLC cycle, the activation signal must be reset again.

Function Manual
198 6FC5397-7EP40-0BA4, 07/2018
Status signals from axis/spindle (excerpt)
DB390x Signals from axis/spindle (NCK → PLC) [r]
Byte Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
DBB8 PLC axis/ Neutral Axis inter- New type NC axis/
spindle axis/ change requested spindle
spindle possible from PLC

Note
Simulation
To activate the interface signals, the machine data MD30350 $MA_SIMU_AX_VDI_OUTPUT must be set for each required
axis during the simulation.

Request and relinquish PLC axis

23.2.2 User interface: Functionality


The two tables provide an overview of the available interface signals. The precise description of the signals and the
explanation of what signals are relevant for the individual functions are explained in the following.

Signals to PLC axis


DB380x Signals to PLC axis (PLC → NCK) [r/w]
Byte Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
DBB3000 Start posi- Start spin- Start spin- Start spin- - - - -
tioning axis dle posi- dle rotation dle oscilla-
tioning tion
DBB3001 - - Stop spin- Stop spin- - - - -
dle rotation dle oscilla-
tion

Function Manual
6FC5397-7EP40-0BA4, 07/2018 199
DB380x Signals to PLC axis (PLC → NCK) [r/w]
DBB3002 Automatic Constant Direction of - Handwheel Traversing Distance Distance
gear selec- cutting rate rotation as override dimension, condition, condition,
tion for M4 inches (not shortest incremental
metric) distance (IC)
(DC)
DBB3003 Indexing - - - - - Distance Distance
position condition, condition,
abs. pos. abs. neg.
direction direction
(ACP) (ACN)
DBD3004 Position (REAL, with indexing axis: DINT)
DBD3008 Feedrate velocity (REAL), if < 0, the value is taken from machine data POS_AX_VELO
The bits of the distance conditions and the direction of rotation definition define the particular positioning or traversing mode,
only one of the bits must be set:
Meaning Distance condition to be set
Positioning absolute No mode bit set
Positioning incremental DBB3002.0 = 1
Positioning shortest distance DBB3002.1 = 1
Positioning absolute, positive approach direction DBB3003.1 = 1
Positioning absolute, negative approach direction DBB3003.0 = 1
Direction of rotation as for M4 DBB3002.5 = 1
The remaining bits are used to specify and start the particular function, these function bits as well as position and velocity
are explained in more detail for the individual functions.

Signals from PLC axis


DB390x Signals from PLC axis (NCK → PLC) [r]
Byte Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
DBB3000 Positioning Position - - - Error while Axis cannot
axes active reached traversing be started
DBB3001 - - - - - - - -
DBB3002 - - - - - - -
DBB3003 Error number
The following requirements must be satisfied so that you can use the functions listed below:
● The axis or spindle is correctly assigned to the PLC.
● The controller and pulse enable are set.
● After you set all of the control signals, only one of the start signals is set in DB380x.DBB3000.

23.2.3 Spindle positioning


DB380x PLC → NCK control signals Remark
DBX3002.0 Incremental traversing Only one of the four signals may be set concurrently.
DBX3002.1 Traverse along the shortest path All signals 0: Absolute positioning
DBX3003.0 Absolute, negative direction
DBX3003.1 Absolute, positive direction
DBD3004 Position setpoint / distance setpoint Distance setpoint if DBX3002.0 == 1
DBD3008 Feedrate 0: Traverse with the value from MD35300
$MA_SPIND_POSCTRL_VELO
DBX3000.6 Start Note: reset of the signal does not result in a stop.
DBX2.2 Delete distance-to-go, spindle reset Interrupt signal, exits the function

Function Manual
200 6FC5397-7EP40-0BA4, 07/2018
DB390x NCK → PLC status signals Remark
DBX3000.7 Positioning axis active 1 when Start = 1. Also 1 when override = 0 or posi-
tion setpoint reached.
DBX3000.6 Position reached 1: Position setpoint reached with "Exact stop fine"
DBX3000.0 Spindle cannot be started
DBX3000.1 Error while traversing 1: Error during traversing, evaluate the error number
in DBB3003
DBB3003 Error number
DBX1.4 Axis/spindle stationary 1: If n < nmin

① The function is activated by the user with a positive edge of Start.


② The Positioning axis active message shows that the function is active and that the output signals are valid. Position
reached and Axis stationary may be withdrawn. For path specification = 0, the signals are not canceled.
③ When the position is reached this is signaled (Position reached), Spindle stationary is set.
④ The user then withdraws Start.
⑤ The Positioning axis active signal is then reset.
⑥ The user immediately resets the Start signal with receipt of the Positioning axis active signal.
⑦ Positioning is aborted after you set Spindle reset. This signal must be present for at least one PLC cycle.
⑧ The spindle comes to a standstill (Spindle stationary), the Error signal is set. (In this case, error number 115 is
output.)

23.2.4 Rotate spindle


DB380x PLC → NCK control signals Remark
DBX3002.0 Incremental traversing -
DBX3002.1 Traverse along the shortest path -
DBX3002.5 Direction of rotation as for M4 1: Direction of rotation specified by M4
0: Direction of rotation specified by M3
DBX3003.0 Absolute, negative direction -
DBX3003.1 Absolute, positive direction -
DBD3008 Feedrate velocity Spindle speed
DBX3000.5 Start spindle rotation -

Function Manual
6FC5397-7EP40-0BA4, 07/2018 201
DB380x PLC → NCK control signals Remark
DBX3001.5 Stop spindle rotation -

DB390x NCK → PLC status signals Remark


DBX3000.7 Positioning axis active 1: For start or stop == 1
DBX3000.6 Position reached 1: Function was started without an error
DBX3000.1 Error 1: Error when traversing, evaluate the error number
in DBB3003
DBB3003 Error number -
DBX1.4 Axis/spindle stationary -

① The function is activated by the user with a positive edge of Start.


② Messages Positioning axis active and Position reached are signaled back. Position reached is in this case irrele-
vant.
③ The user stops spindle rotation by resetting Start and setting Stop.
④ The spindle stops and the Spindle stationary signal is set.
⑤ The user then resets Stop.
⑥ Reset of Stop causes Positioning axis active to be reset.

23.2.5 Oscillate spindle


DB380x PLC → NCK control signals Remark
DBX3002.0 Incremental It is not permissible that any of the bits are set.
DBX3002.1 Shortest path
DBX3002.5 Direction of rotation as for M4
DBX3003.0 Absolute, negative direction
DBX3003.1 Absolute, positive direction

Function Manual
202 6FC5397-7EP40-0BA4, 07/2018
DB380x PLC → NCK control signals Remark
DBD3004 Setpoint gear stage MD35010 $MA_GEAR_STEP_CHANGE_ENABLE =
0
0 - 5: Oscillation
MD35010 $MA_GEAR_STEP_CHANGE_ENABLE =
1
0: Oscillation
1: Oscillation with gear stage change M41
2: Oscillation with gear stage change M42
3: Oscillation with gear stage change M43
4: Oscillation with gear stage change M44
5: Oscillation with gear stage change M45
DBD3008 Feedrate velocity When oscillating, no significance. The oscillation
speed is taken from machine data MD35400
$MA_SPIND_OSCILL_DES_VELO.
DBX3000.5 Start spindle oscillation It is not permissible that the start directly follows a
DBX3001.5 Stop spindle oscillation stop. The stop must first be reset (both 0).

DB390x NCK → PLC status signals Remark


DBX3000.7 Positioning axis active 1: For start or stop == 1
DBX3000.6 Position reached 1: After start
DBX3000.1 Error 1: Error when traversing, evaluate the error number
in DBB3003
DBX3000.0 Axis cannot be started 1: Error when starting, evaluate the error number in
DBB3003
DBB3003 Error number
DBX1.4 Axis/spindle stationary

Function Manual
6FC5397-7EP40-0BA4, 07/2018 203
① The function is activated by the user with a positive edge of Start.
Note: this is possible only when the Positioning axis active signal is reset.
② Messages Positioning axis active and Position reached are signaled back, Position reached is in this case irrele-
vant and is therefore not shown.
③ The user stops spindle oscillation by resetting Start and setting Stop.
④ The spindle stops and the Spindle stationary signal is set.
⑤ The user then resets Stop.
⑥ Reset of Stop causes Positioning axis active to be reset.
⑦ Stop is reset in the user program and Start is again set, incorrectly, in the same PLC cycle. This means that Posi-
tioning axis active is not reset, but...
⑧ ...the Axis cannot be started signal is set (error number 106).

23.2.6 Indexing axis


DB380x PLC → NCK control signals Remark
DBX3002.0 Incremental traversing Only one of the signals may be set concurrently.
DBX3002.1 Traverse along the shortest path All signals 0: Absolute positioning
DBX3002.5 Direction of rotation as for M4
DBX3003.0 Absolute, negative direction
DBX3003.1 Absolute, positive direction
DBX3003.7 Indexing position Indexing axis ON
DBD3004 Position setpoint / distance setpoint Distance setpoint if DBX3002.0 == 1
DBD3008 Feedrate velocity 0: Traverse with the value from MD32060
$MA_POS_AX_VELO
DBX3000.7 Start positioning axis Note: reset of the signal does not result in a stop.
DBX2.2 Delete distance-to-go, spindle reset Interrupt signal, exits the function

DB390x NCK → PLC status signals Remark


DBX3000.7 Positioning axis active Also 1, if override = 0 or position setpoint reached.
DBX3000.6 Position reached 1: Position setpoint reached with "Exact stop fine"
DBX3000.1 Error 1: Error when traversing, evaluate the error number
in DBB3003
DBB3003 Error number -
DBX1.4 Axis/spindle stationary -

Function Manual
204 6FC5397-7EP40-0BA4, 07/2018
① The function is activated by the user with a positive edge of Start.
Note: this is possible only when the Positioning axis active signal is reset.
② Messages Positioning axis active and Position reached are signaled back. Position reached is in this case irrele-
vant.
③ The user stops spindle oscillation by resetting Start and setting Stop.
④ The spindle stops and the Spindle stationary signal is set.
⑤ The user then resets Stop.
⑥ Reset of Stop causes Positioning axis active to be reset.

23.2.7 Positioning axis metric


DB380x PLC → NCK control signals Remark
DBX3002.0 Incremental traversing Only one of the signals may be set concurrently.
DBX3002.1 Traverse along the shortest path All signals 0: Absolute positioning
DBX3002.5 Direction of rotation as for M4
DBX3003.0 Absolute, negative direction
DBX3003.1 Absolute, positive direction
DBD3002.2 Traversing dimension inch 0: Traversing dimension, metric
DBX3002.3 Handwheel override 0: Override OFF
DBD3004 Position setpoint / distance setpoint Distance setpoint if DBX3002.0 == 1
DBD3008 Feedrate velocity 0: Traverse with the value from MD32060
$MA_POS_AX_VELO
DBX3000.7 Start positioning axis Note: reset of the signal does not result in a stop.
DBX2.2 Delete distance-to-go, spindle reset Interrupt signal, exits the function

DB390x NCK → PLC status signals Remark


DBX3000.7 Positioning axis active Also 1, if override = 0 or position setpoint reached.
DBX3000.6 Position reached 1: Axis has reached the position setpoint
DBX3000.1 Error 1: Error when traversing, evaluate the error number
in DBB3003
DBB3003 Error number -

Function Manual
6FC5397-7EP40-0BA4, 07/2018 205
① First function activation using positive edge of Start.
② Positioning axis active = 1 shows that the function is active and that the output signals are valid. Position reached
and Axis stationary are possibly withdrawn.
③ Positive acknowledgment Position reached = 1 and Positioning axis active = 1
④ Reset of function activation after receipt of acknowledgment
⑤ Signal change via function
⑥ Positioning is aborted after you delete distance-to-go, and the signal duration is min. 1 PLC cycle.
⑦ Signals Position reached and Error are set, and the error number can be read (in this case, 30).

23.2.8 Positioning axis inch


DB380x PLC → NCK control signals Remark
DBX3002.0 Incremental traversing Only one of the signals may be set concurrently.
DBX3002.1 Traverse along the shortest path All signals 0: Absolute positioning
DBX3002.5 Direction of rotation as for M4
DBX3003.0 Absolute, negative direction
DBX3003.1 Absolute, positive direction
DBX3002.2 Traversing dimension inch 0: Traversing dimension, metric
DBX3002.3 Handwheel override 0: Override OFF
DBD3004 Position setpoint / distance setpoint Distance setpoint if DBX3002.0 == 1
DBD3008 Feedrate velocity 0: Traverse with the value from MD32060
$MA_POS_AX_VELO
DBX3000.7 Start positioning axis Note: reset of the signal does not result in a stop.
DBX2.2 Delete distance-to-go, spindle reset Interrupt signal, exits the function

DB390x NCK → PLC status signals Remark


DBX3000.7 Positioning axis active Also 1, if override = 0 or position setpoint reached.
DBX3000.6 Position reached 1: Axis has reached the position setpoint
DBX3000.1 Error 1: Error when traversing, evaluate the error number
in DBB3003
DBB3003 Error number -

Function Manual
206 6FC5397-7EP40-0BA4, 07/2018
① First function activation using positive edge of Start.
② Positioning axis active = 1 shows that the function is active and that the output signals are valid. Position reached
and Axis stationary are possibly withdrawn.
③ Positive acknowledgment Position reached = 1 and Positioning axis active = 1
④ Reset of function activation after receipt of acknowledgment
⑤ Signal change via function
⑥ Positioning is aborted after you delete distance-to-go, and the signal duration is min. 1 PLC cycle.
⑦ Signals Position reached and Error are set, and the error number can be read (in this case, 30).

23.2.9 Positioning axis metric with handwheel override


DB380x PLC → NCK control signals Remark
DBX3002.0 Incremental traversing Only one of the signals may be set concurrently.
DBX3002.1 Traverse along the shortest path All signals 0: Absolute positioning
DBX3002.5 Direction of rotation as for M4
DBX3003.0 Absolute, negative direction
DBX3003.1 Absolute, positive direction
DBX3002.2 Traversing dimension inch 0: Traversing dimension, metric
DBX3002.3 Handwheel override 0: Override OFF
DBD3004 Position setpoint / distance setpoint Distance setpoint if DBX3002.0 == 1
DBD3008 Feedrate velocity 0: Traverse with the value from MD32060
$MA_POS_AX_VELO
DBX3000.7 Start positioning axis Note: reset of the signal does not result in a stop.
DBX2.2 Delete distance-to-go, spindle reset Interrupt signal, exits the function

DB390x NCK → PLC status signals Remark


DBX3000.7 Positioning axis active Also 1, if override = 0 or position setpoint reached.
DBX3000.6 Position reached 1: Axis has reached the position setpoint
DBX3000.1 Error 1: Error when traversing, evaluate the error number
in DBB3003
DBB3003 Error number -

Function Manual
6FC5397-7EP40-0BA4, 07/2018 207
① First function activation using positive edge of Start.
② Positioning axis active = 1 shows that the function is active and that the output signals are valid. Position reached
and Axis stationary are possibly withdrawn.
③ Positive acknowledgment Position reached = 1 and Positioning axis active = 1
④ Reset of function activation after receipt of acknowledgment
⑤ Signal change via function
⑥ Positioning is aborted after you delete distance-to-go, and the signal duration is min. 1 PLC cycle.
⑦ Signals Position reached and Error are set, and the error number can be read (in this case, 30).

23.2.10 Positioning axis inch with handwheel override


DB380x PLC → NCK control signals Remark
DBX3002.0 Incremental traversing Only one of the signals may be set concurrently.
DBX3002.1 Traverse along the shortest path All signals 0: Absolute positioning
DBX3002.5 Direction of rotation as for M4
DBX3003.0 Absolute, negative direction
DBX3003.1 Absolute, positive direction
DBX3002.2 Traversing dimension inch 0: Traversing dimension, metric
DBX3002.3 Handwheel override 0: Override OFF
DBD3004 Position setpoint / distance setpoint Distance setpoint if DBX3002.0 == 1
DBD3008 Feedrate velocity 0: Traverse with the value from MD32060
$MA_POS_AX_VELO
DBX3000.7 Start positioning axis Note: reset of the signal does not result in a stop.
DBX2.2 Delete distance-to-go, spindle reset Interrupt signal, exits the function

DB390x NCK → PLC status signals Remark


DBX3000.7 Positioning axis active Also 1, if override = 0 or position setpoint reached.
DBX3000.6 Position reached 1: Axis has reached the position setpoint
DBX3000.1 Error 1: Error when traversing, evaluate the error number
in DBB3003
DBB3003 Error number -

Function Manual
208 6FC5397-7EP40-0BA4, 07/2018
① First function activation using positive edge of Start.
② Positioning axis active = 1 shows that the function is active and that the output signals are valid. Position reached
and Axis stationary are possibly withdrawn.
③ Positive acknowledgment Position reached = 1 and Positioning axis active = 1
④ Reset of function activation after receipt of acknowledgment
⑤ Signal change via function
⑥ Positioning is aborted after you delete distance-to-go, and the signal duration is min. 1 PLC cycle.
⑦ Signals Position reached and Error are set, and the error number can be read (in this case, 30).

23.2.11 Rotate spindle with automatic gear stage selection


DB380x PLC → NCK control signals Remark
DBX3002.0 Incremental traversing -
DBX3002.1 Traverse along the shortest path -
DBX3002.5 Direction of rotation as for M4 1: Direction of rotation specified by M4
0: Direction of rotation specified by M3
DBX3003.0 Absolute, negative direction -
DBX3003.1 Absolute, positive direction -
DBX3002.7 Automatic gear stage selection 1: Automatic gear stage selection ON
DBD3008 Feedrate velocity Spindle speed
DBX3000.5 Start spindle rotation -
DBX3001.5 Stop spindle rotation -

DB390x NCK → PLC status signals Remark


DBX3000.7 Positioning axis active 1: For start or stop == 1
DBX3000.6 Position reached 1: Setpoint speed is output
DBX3000.1 Error 1: Error when traversing, evaluate the error number
in DBB3003
DBB3003 Error number -
DBX1.4 Axis/spindle stationary -

Function Manual
6FC5397-7EP40-0BA4, 07/2018 209
① Function activated by user with a positive edge of Start.
② Messages Positioning axis active and Position reached are signaled back. Position reached is in this case irrele-
vant.
③ The user stops spindle rotation by resetting Start and setting Stop.
④ The spindle stops and the Spindle stationary signal is set.
⑤ The user then resets Stop.
⑥ Reset of Stop causes Positioning axis active to be reset.

23.2.12 Rotate spindle with constant cutting rate [m/min]


DB380x PLC → NCK control signals Remark
DBX3002.0 Incremental traversing -
DBX3002.1 Traverse along the shortest path -
DBX3002.5 Direction of rotation as for M4 1: Direction of rotation specified by M4
0: Direction of rotation specified by M3
DBX3003.0 Absolute, negative direction -
DBX3003.1 Absolute, positive direction -
DBX3002.2 Traversing dimension inch 0: Traversing dimension, metric
DBX3002.6 Const. cutting speed 1: Constant cutting speed ON
DBD3008 Feedrate velocity Spindle speed
DBX3000.5 Start spindle rotation -
DBX3001.5 Stop spindle rotation -

DB390x NCK → PLC status signals Remark


DBX3000.7 Positioning axis active 1: For start or stop == 1
DBX3000.6 Position reached 1: Setpoint speed is output
DBX3000.1 Error 1: Error when traversing, evaluate the error number
in DBB3003
DBB3003 Error number -
DBX1.4 Axis/spindle stationary -

Function Manual
210 6FC5397-7EP40-0BA4, 07/2018
① Function activated by user with a positive edge of Start.
② Messages Positioning axis active and Position reached are signaled back. Position reached is in this case irrele-
vant.
③ The user stops spindle rotation by resetting Start and setting Stop.
④ The spindle stops and the Spindle stationary signal is set.
⑤ The user then resets Stop.
⑥ Reset of Stop causes Positioning axis active to be reset.

23.2.13 Rotate spindle with constant cutting rate [feet/min]


DB380x PLC → NCK control signals Remark
DBX3002.0 Incremental traversing -
DBX3002.1 Traverse along the shortest path -
DBX3002.5 Direction of rotation as for M4 1: Direction of rotation specified by M4
0: Direction of rotation specified by M3
DBX3003.0 Absolute, negative direction -
DBX3003.1 Absolute, positive direction -
DBX3002.2 Traversing dimension inch 1: Traversing dimension inch
DBX3002.6 Const. cutting speed 1: Constant cutting speed ON
DBD3008 Feedrate velocity Spindle speed
DBX3000.5 Start spindle rotation -
DBX3001.5 Stop spindle rotation -

DB390x NCK → PLC status signals Remark


DBX3000.7 Positioning axis active 1: For start or stop == 1
DBX3000.6 Position reached 1: Setpoint speed is output
DBX3000.1 Error 1: Error when traversing, evaluate the error number
in DBB3003
DBB3003 Error number -
DBX1.4 Axis/spindle stationary -

Function Manual
6FC5397-7EP40-0BA4, 07/2018 211
① Function activated by user with a positive edge of Start.
② Messages Positioning axis active and Position reached are signaled back. Position reached is in this case irrele-
vant.
③ The user stops spindle rotation by resetting Start and setting Stop.
④ The spindle stops and the Spindle stationary signal is set.
⑤ The user then resets Stop.
⑥ Reset of Stop causes Positioning axis active to be reset.

23.2.14 Error messages


If a function could not be executed, the following signals are set depending on the error:
● DB390x .DBX3000.0 == 1 (axis cannot be started)
● DB390x.DBX3000.1 == 1 (error during travel)
The exact error cause is indicated as:
● DB390x.DBB3003 (error number)

Error number Meaning


Decimal Hex
1 01 Several functions of the axis/spindle were activated simultaneously
20 14 A function was started without the position being reached
30 1E The axis/spindle was transferred to the NC while still in motion
40 28 The axis is programmed by the NC program, NCK internal error
50 32 Permanently assigned PLC axis: Traverses (JOG) or is referencing
60 3C Permanently assigned PLC axis: Channel status does not permit a start
100 64 False position programmed for axis/spindle (alarm number1) 16830)
101 65 Programmed speed is too high
102 66 Incorrect value range for constant cutting rate (alarm number1) 14840)
104 68 Following spindle: Illegal programming (alarm number1) 22030)
105 69 No measuring system available (alarm number1) 16770)
106 6A Positioning process of the axis still active (alarm number1) 22052)

Function Manual
212 6FC5397-7EP40-0BA4, 07/2018
Error number Meaning
Decimal Hex
107 6B Reference mark not found (alarm number1) 22051)
108 6C No transition from speed control to position control (alarm number1) 22050)
109 6D Reference mark not found (alarm number1) 22051)
110 6E Velocity/speed is negative
111 6F Setpoint speed is zero
112 70 Invalid gear stage
115 73 Programmed position has not been reached
117 75 G96/G961 is not active in the NC
118 76 G96/G961 is still active in the NC
120 78 Axis is not an indexing axis (alarm number1) 20072)
121 79 Indexing position error (alarm number1) 17510)
125 7D DC (shortest distance) not possible (alarm number1) 16800)
126 7E Absolute value minus not possible (alarm number1) 16820)
127 7F Absolute value plus not possible (alarm number1) 16810)
128 80 No transverse axis available for diameter programming (alarm number1) 16510)
130 82 Software limit switch plus (alarm number1) 20070)
131 83 Software limit switch minus (alarm number1) 20070)
132 84 working area limitation plus (alarm number1) 20071)
133 85 working area limitation minus (alarm number1) 20071)
134 86 Frame not permitted for indexing axis
135 87 Indexing axis with "Hirth toothing" is active (alarm number1) 17501)
136 88 Indexing axis with "Hirth toothing" is active and axis not referenced (alarm number1) 17503)
137 89 Spindle operation not possible for transformed spindle/axis (alarm number1) 22290)
138 8A The corresponding effective coordinate-system-specific working area limit plus violated for the axis
(alarm number1)20082)
139 8B The corresponding effective coordinate-system-specific working area limit minus violated for the axis
(alarm number1)20082)
200 C8 System alarm number1) 450007
1) For more information about the alarm description, see the SINUMERIK 808D ADVANCED Diagnostics Manual.

23.3 Examples for positioning a PLC axis


There are three positioning modes for the PLC axis:
● Positioning via the PLC user interface
● Positioning with the indexing position table predefined in the general machine data
● Positioning according to the distance value defined in the axis machine data
Precondition
The PLC axis must be requested from the PLC via the PLC user interface.

Function Manual
6FC5397-7EP40-0BA4, 07/2018 213
Positioning via the PLC user interface
• DB3803.DBX8.7 = 1: request
PLC axis
• DB3803.DBX8.0 = 1: request
NC axis

DB3803.DBX3002.0 = 1: distance
condition, incremental (IC)

• DB3803.DBX3003.0 = 1: dis-
tance condition, absolute nega-
tive direction (ACN)
• DB3803.DBX3003.1 = 1: dis-
tance condition, absolute posi-
tive direction (ACP)
• DB3803.DBX3002.1 = 1: dis-
tance condition, shortest dis-
tance (DC)

PLC axis traverses to the position


114.0.

Result: The PLC axis traverses to the position setpoint (value set in DB3803.DBD3004).
Positioning with the predefined indexing position table
You can proceed through the following operations on the PPU to define the indexing position table:

+ → → →
● Define the number of positions in MD10900 INDEX_AX_LENGTH_POS_TAB_1;
● Enter the value of each position in MD10910 INDEX_AX_POS_TAB_1.

Function Manual
214 6FC5397-7EP40-0BA4, 07/2018
• DB3803.DBX8.7 = 1: request
PLC axis
• DB3803.DBX8.0 = 1: request
NC axis

Indexing position active

Select the fifth indexing position

Result: The PLC axis traverses to the fifth position set in MD10910[4].

24 Positioning axes (P2) (PPU16x.3 only)


24.1 Product brief
Axes for auxiliary movements
In addition to axes for machining a workpiece, modern machine tools can also be equipped with axes for auxiliary
movements, for example:
● Axis for tool magazine
● Axis for tool turret
● Axis for workpiece transport
● Axis for pallet transport

Function Manual
6FC5397-7EP40-0BA4, 07/2018 215
● Axis for loader (also multi-axis)
● Axis for tool changer
● Axis for sleeve assembly / end support
The axes for the workpiece machining are called path axes. Within the channel they are guided by the interpolator such that
they start simultaneously, accelerate, reach the end point and stop together.
Axes for auxiliary movements are traversed independently of the path axes at a separate, axis-specific feedrate. In the past,
many of these axes were moved hydraulically and started by an auxiliary function in the part program. With the closed-loop
axis control implemented in the NC, the axis can be addressed by name in the part program and its actual position displayed
on the screen.

Note
"Additional positioning axis/auxiliary spindle" option
Axes for auxiliary movements must not be interpolating ("full-value") NC axes. Auxiliary movements may also be carried out
using special axes, which can be obtained using the "Additional positioning axis/auxiliary spindle" option. This optional
function is available on PPU16x.3 only.
Functional restrictions
Optional positioning axes/auxiliary spindles have fewer functions. The following functions are not possible:
• Using the axis as a path axis, geometry axis, or special path axis
• Incorporating the axis into the geometry axis grouping (GEOAX)
• Rigid thread cutting and tapping
Commissioning
As standard, axes are defined as interpolating axes:
MD30460 $MA_BASE_FUNCTION_MASK bit 8 = 0
If an axis is to be operated as a positioning axis/auxiliary spindle with reduced functionality, the value for bit 8 must be set to
"1":
MD30460 $MA_BASE_FUNCTION_MASK bit 8 = 1

Function
The "positioning axes" function makes it easier to integrate axes for auxiliary movement into the control system:
● during programming:
The axes are programmed together with the axes for workpiece machining in the same part program, without having to
sacrifice valuable machining time.
There are special (POS, POSA) traversing instructions.
● during program testing/start-up:
Program testing and start-up are performed simultaneously for all axes.
● during operation:
Operation and monitoring of the machining process commence simultaneously for all axes.
● during PLC configuring/commissioning:
No allowance has to be made on PLC or external computers (PCs) for synchronization between axes for machining and
axes for auxiliary movements.
● during system configuring:
A second channel is not required.

Motions and interpolations


Each channel has one path interpolator and at least one axis interpolator with the following interpolation functions:
● for path interpolator:
Linear interpolation (G1), circular interpolation (G2 / G3), spline interpolation, etc.
● for axis interpolator:
If a positioning axis is programmed, an axis interpolator starts in the control (with linear interpolation G1).
● End-of-motion criterion:

Function Manual
216 6FC5397-7EP40-0BA4, 07/2018
The programmed end position of a positioning axis has been reached when the end-of-motion criterion FINEA, COARSA or
IPOENDA is fulfilled.

● Path axes with rapid traverse movement:


Path axes can be traversed in linear or non-linear interpolation mode with rapid traverse movement (G0).
For more information, see Chapter "Continuous path mode, exact stop, and LookAhead (B1) (Page 33)".
● Autonomous singleaxis operations:
Single PLC axes, command axes started via static synchronized actions or asynchronous reciprocating axes can be
interpolated independently of the NC.
An axis/spindle interpolated by the main run then reacts independently of the NC program. The channel response
triggered by the program run is decoupled to transfer the control of a certain axis / spindle to the PLC.
● Control by PLC:
All channel-specific signals normally act to the same extent on path and positioning axes.
Positioning axes can be controlled via additional, axis-specific signals.
PLC axes are traversed by the PLC via special function blocks in the basic program; their movements can be
asynchronous to all other axes. The travel motions are executed separate from the path and synchronized actions.

24.2 Positioning axis


Positioning axes are programmed in the same part program as the machining operation and programmed together with path
axes, that is, with the axes that are responsible for workpiece machining.
Commands for positioning axes and path axes can be included in the same NC block. Although they are programmed in the
same NC block, the path and positioning axes are not interpolated together and do not reach their end point simultaneously
(no direct time relationship). For more information, see Section "Motion behavior and interpolation functions (Page 218)".

Positioning axis types and block change


The block change time depends on the programmed positioning axis type. For more information, see Section "Block change
(Page 225)".
Type Description
1 The block change occurs when all path and positioning axes have reached their programmed end point.
2 The block change occurs when all path axes have reached their programmed end point.
With positioning axis type 2, it is possible to approach the programmed end point across several block limits.
3 It is possible to set the block change within the braking ramp of the single axis interpolation if the criteria for the
motion end and the block change are fulfilled for the path interpolation.

Motion synchronization
Positioning axes permit movements to be activated from the same machining program and such movements to be
synchronized at block limits (type 1) or at explicit points by means of a WAITP command (type 2).

Motion end criterion for block change in the brake ramp


For single-axis interpolation, it is also possible to set another end-of-motion criterion for the block change in the braking
ramp.

Traverse path axes in G0 as positioning axis


Each path axis can be traversed as positioning axis in rapid traverse movement (G0). Thus all axes travel to their end point
independently.
In this way, two sequentially programmed X and Z axes are treated like positioning axes in conjunction with G0. The block
change to axis Z can be initiated by axis X as a function of the braking ramp time setting (100-0%). Axis Z starts to move
while axis X is still in motion. Both axes approach their end point independently of one another.

Axis types
Positioning axes can be linear axes and rotary axes.
Positioning axes can also be configured as indexing axes.

Function Manual
6FC5397-7EP40-0BA4, 07/2018 217
Independence of positioning axes and path axes
The mutual independence of positioning and path axes is ensured by the following measures:
● No shared interpolation
● Each positioning axis has a dedicated axis interpolator
● Dedicated feedrate override for each positioning axis
● Dedicated programmable feedrate
● Dedicated "axis-specific delete distance-to-go" interface signal

Dependencies
Positioning axes are dependent in the following respects:
● A shared part program
● Starting of positioning axes only at block boundaries in the part program
● With rapid traverse movement G0 path axes traverse as positioning axes in one of two different modes
● No rapid traverse override
● The following interface signals act on the entire channel and therefore on positioning axes:
– DB3200.DBX7.1 (NC start)
– DB3200.DBX7.3 (NC stop)
– DB3200.DBX7.7 (reset)
– DB3200.DBX6.1 (read-in disable)
● Alarms specific to program and channel also deactivate positioning axes.
● Program control (dry run feed, program test, DRF, ... etc.) also act on positioning axes
● Block search and single block also act on positioning axes.
● The last block with a programmed end-of-motion criterion that was processed in the search run serves as a container for
setting all axes.
● Group 1 (modal movement commands) of the G commands (i.e. G0, G1, G2, ...) does not apply to positioning axes.

Applications
The following are typical applications for positioning axes:
● Single-axis loaders
● Multi-axis loaders without interpolation (PTP → point-to-point traversing)
● Workpiece feed and transport
Other applications are also possible:
● With G0 workpiece delivery and workpiece transport can travel to their end points independently of one another.
● On machines with several machining processes in sequence: Significant reduction in individual machining steps due to
block change in the braking ramp of the single-axis interpolation.

Note
Positioning axes are not suitable for multi-axis loaders that require interpolation between the axes (path interpolator).

24.3 Motion behavior and interpolation functions


24.3.1 Path interpolator and axis interpolator

Path interpolator
Every channel has a path interpolator for a wide range of interpolation modes such as linear interpolation (G1), circular
interpolation (G2/G3), and spline interpolation.

Function Manual
218 6FC5397-7EP40-0BA4, 07/2018
Axis interpolator
Each channel has axis interpolators in addition to path interpolators. The maximum number corresponds to the maximum
number of existing channel axes.
If a positioning axis is programmed, an axis interpolator starts in the control with straight line interpolation G1. This axis
interpolator runs independently of the path interpolator until the programmed end position of the positioning axis has been
reached.
There is no time relationship between the path interpolator and the axis interpolator, nor between the axis interpolators.
Path control mode (G64) is not possible with positioning axes.
The programmed end position of a positioning axis has been reached when the end-of-motion criterion FINEA, COARSA or
IPOENDA is fulfilled.

24.3.2 Autonomous singleaxis operations

Functionality
Single PLC axes, command axes started via static synchronized actions or asynchronous reciprocating axes can be
interpolated independently of the NC. An axis/spindle interpolated by the main run then reacts independently of the NC
program with respect to:
● NC stop
● Alarm handling
● Program control
● End of program
● RESET

Boundary conditions
Axes/spindles currently operating according to the NC program are not controlled by the PLC.
Command axis movements cannot be started via non-modal or modal synchronized actions for PLC-controlled
axes/spindles. Alarm 20143 is signaled.

Transfer axis control to the PLC


Description of the sequence
1. PLC → NC: Request to control the axis
DB380x.DBX5004.7 = 1 (PLC controls axis)
2. NC: Checks whether the axis is a main run axis or a neutral axis.
3. NC: Checks whether an additional axis may be controlled from the PLC.
4. NC confirms the transfer:
– DB390x.DBX3.1 = 1 (PLC controls the axis)
– System variable $AA_SNGLAX_STAT = 1
Result: The PLC controls the axis/spindle.
Alternatives
Initial state: The axis is controlled by the PLC. As a result of a channel stop, the channel is in the "interrupted" state.
● Axis state "inactive" ⇒
– The stop state is canceled.
– If the axis is started, this directly results in axis motion.
● Axis state "active" ⇒
– The stop state is not canceled.
– Generate the axis state according to Use case 2 "Stop axis".
– Resume axis motion according to Use case 3 "Continue axis motion".

Function Manual
6FC5397-7EP40-0BA4, 07/2018 219
● A reset is performed in the channel ⇒
This process is asynchronous to control acceptance by the PLC. The two previously mentioned alternatives can occur or
the axis is assigned to the channel and is reset.
Boundary conditions
Axes/spindles, traversed by an NC program, cannot be transferred to the PLC. Axes/spindles, which are traversed by static
synchronized actions or as oscillating axis, as neutral axis, concurrent positioning axis or command axis, can be transferred.

Relinquish axis control by the PLC


Description of the sequence:
1. PLC → NC: The PLC returns axis control to the NC
DB380x.DBX5004.7 = 0 (PLC controls axis)
2. NC: Checks whether an axial alarm is present.
3. NC: Checks whether a movement has been activated that has still not been completed? If yes, then the movement is
stopped with an axial stop according to Use case 2 "Stop axis/spindle".
4. NC: Carries out an axial reset corresponding to Use case 4 "Reset axis/spindle".
5. NC confirms the acceptance:
DB390x.DBX3.0 = 0 (reset executed)
DB390x.DBX3.1 = 0 (PLC controls the axis)
DB390x.DBX3.2 = 0 (axis stop active)
System variable $AA_SNGLAX_STAT = 0
Result: The NC has now taken over control of the axis/spindle.
Alternatives
In the following cases the NC confirms the transfer - but internally sets the "stopped" channel state for the axis/spindle:
● The channel is in the "interrupted" state
● A stop alarm is active for the channel
● A stop alarm is active for the mode group
Boundary conditions
The axis/spindle must be operating under PLC control.
The NC confirms acceptance of an axis/spindle only if an axial alarm is not active.

Description of the sequence based on use cases


Requirement
The axis/spindle is controlled by the PLC
Relevant NC/PLC interface signals
One of the axes/spindles controlled by the PLC can be influenced by the following NC/PLC interface signals independent of
the NC program:
● DB3200.DBX6.2 (delete distance-to-go)
● DB380x.DBX5004.1 (reset)
● DB380x.DBX5004.2 (continue)
● DB380x.DBX5004.6 (stop along braking ramp)
For more information about signal flow between the NC and PLC at the NC/PLC interface during autonomous single
operations, see Section "Control by the PLC (Page 230)".

Use case 1: Cancel axis/spindle


The behavior when canceling the axis/spindle function is the same as for "delete distance-to-go":
DB3200.DBX6.2 = 1 (delete distance-to-go)

Function Manual
220 6FC5397-7EP40-0BA4, 07/2018
Use case 2: Stop axis/spindle
The following traversing motion of the axis/spindle controlled from the main run is stopped:
● PLC axis
● Asynchronous oscillating axis
● Command axis by static synchronized action
● Superimposed motion $AA_OFF,DRF handwheel traversal, online tool offset and external work offset.
Following axis movements of the axis/spindle are not stopped.
Description of the sequence:
● PLC → NC: Request to stop the axis/spindle
DB380x.DBX5004.6 = 1 (stop along braking ramp)
● NC: Brakes the axis along a ramp.
● NC confirms the execution:
– DB390x.DBX0.6 = 1 (exact stop coarse)
– DB390x.DBX0.7 = 1 (exact stop fine)
– DB390x.DBX3.2 = 0 (axis stop active)
– DB390x.DBX4.6/.7 = 0 (traversing command minus/plus)
– Axis status interrupted with system variable $AA_SNGLAX_STAT == 3
Result: The axis/spindle is stopped.

Note
Following axis movements
Following axis movements can only be suppressed when the leading axis stops.
Retraction motion
Retraction motion triggered by the "Extended stop and retract" function cannot be stopped.
References
Function Description, Special Functions; Extended Stop and Retract (R3)

Use case 3: Continue axis/spindle


Traversing motion interrupted after Use case 2 "Stop axis" should be continued.
Description of the sequence:
● PLC → NC: Continue axis
DB380x.DBX5004.2 = 1 (continue)
● NC: Checks whether for the axis/spindle an axial alarm with delete criterion "CANCELCLEAR" or "NCSTARTCLEAR" is
present? If yes, then this is deleted.
● NC: Checks whether axis motion can be resumed? If yes, then the axis/spindle makes the transition into the "active"
state.
● NC confirms the execution:
– DB390x.DBX0.6 = 0 (exact stop coarse)
– DB390x.DBX0.7 = 0 (exact stop fine)
– DB390x.DBX3.2 = 0 (axis stop active)
– DB390x.DBX4.6/.7 = 1 (traversing command minus/plus)
– Axis state active with system variable $AA_SNGLAX_STAT == 4.
Result: Traversing motion of the axis/spindle is continued.

Function Manual
6FC5397-7EP40-0BA4, 07/2018 221
Boundary conditions
In the following cases, the request to continue is ignored:
● The axis/spindle is not controlled by the PLC.
● The axis/spindle is not in the stopped state.
● An alarm is pending for the axis/spindle.

Use case 4: Reset axis/spindle (reset)


Description of the sequence:
● PLC → NC: Reset request for this axis/spindle
DB380x.DBX5004.1 = 1 (reset)
● NC: Transitions the axis/spindle into the "stopped" state.
● NC: Interrupts the stopped sequences and signals to the PLC, the interruption - essentially the same as for "Delete
distance-to-go".
● NC: The internal states for the axis/spindle are reset.
● NC: The axis-specific machine data, which become effective at reset, become active.

Note
In conjunction with a channel reset, no axis-specific machine data is active for axes controlled from the PLC.

● NC confirms the execution:


– DB390x.DBX3.0 = 1 (reset executed)
– DB390x.DBX3.2 = 0 (axis stop active)
– System variable $AA_SNGLAX_STAT = 1
● NC exits this operation.

24.4 Positioning axis dynamic response


Velocity
The positioning axes traverse at the axis-specific feedrate programmed for them. For more information, see Section "Motion
behavior and interpolation functions (Page 218)". This feedrate is not influenced by the path axes.
The feedrate is programmed as an axis-specific velocity in units of mm/min, inch/min or degrees/min.
The axis-specific feedrate is always permanently assigned to a positioning axis by the axis name.
If a positioning axis has no programmed feedrate, the control system automatically applies the rate set in axis-specific
machine data:
MD32060 $MA_POS_AX_VELO (initial setting for positioning axis velocity)
The programmed axis-specific feedrate is active until the end of the program.

Feedrate override
The path and positioning axes have separate feedrate overrides. Each positioning axis can be influenced by its own axis-
specific feedrate override.

Rapid traverse override


Rapid traverse override applies only to path axes. Positioning axes have no rapid traverse interpolation (only axial linear
interpolation G01) and therefore no rapid traverse override.

Revolutional feedrate
In JOG mode the behavior of the axis/spindle also depends on the setting of SD41100 JOG_REV_IS_ACTIVE (revolutional
feedrate when JOG active).

Function Manual
222 6FC5397-7EP40-0BA4, 07/2018
● 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) as a function of the master spindle.
● If the setting data is not active, the behavior of the axis/spindle depends on SD43300
$SA_ASSIG_FEED_PER_REV_SOURCE (revolutional feedrate for positioning axes/spindles)
● If the setting data is not active, the behavior of a geometry axis on which a frame with rotation is effective depends on the
channel-specific setting data SD42600 $SC_JOG_FEED_PER_REV_SOURCE. (In the operating mode JOG, revolutional
feedrate for geometry axes on which a frame with rotation is effective.)

Maximum axial acceleration


With positioning axis motions, one of the two following maximum values is effective depending on the set positioning axis
dynamic response mode:
● MD32300 $MA_MAX_AX_ACCEL [0] (maximum axial acceleration for path motions in the dynamic response mode
DYNNORM)
● MD32300 $MA_MAX_AX_ACCEL [1] (maximum axial acceleration for path motions in the dynamic response mode
DYNPOS)
The positioning axis dynamic response mode is set in the NC-specific machine data:
MD18960 $MN_POS_DYN_MODE = <mode>
<mode> Meaning
0 Effective maximum axial acceleration: MD32300 $MA_MAX_AX_ACCEL[ 0 ]
1 Effective maximum axial acceleration: MD32300 $MA_MAX_AX_ACCEL[ 1 ]

Maximum axial jerk


When traversing positioning axes with active jerk limitation, the value from one of the following machine data takes effect as
maximum axial jerk:
● MD32430 $MA_JOG_AND_POS_MAX_JERK (maximum axial jerk for positioning axis motions)
● MD32431 $MA_MAX_AX_JERK [0] (maximum axial jerk for path motions in the dynamic response mode DYNNORM)
● MD32431 $MA_MAX_AX_JERK [1] (maximum axial jerk for path motions in the dynamic response mode DYNPOS)
The machine data to be used is determined by the set positioning axis dynamic response mode:
MD18960 $MN_POS_DYN_MODE = <mode>
<mode> Meaning
The following is effective as maximum axial jerk for positioning axis motions:
0 MD32430 $MA_JOG_AND_POS_MAX_JERK
With active G75 (fixed-point approach): MD32431 $MA_MAX_AX_JERK[0]
1 MD32431 $MA_MAX_AX_JERK[1]

24.5 Programming
24.5.1 General
Note
The maximum number of positioning axes that can be programmed in a block is limited to the maximum number of available
channel axes.

Definition
Positioning axes are defined using the following parameters:
● Axis type: Positioning axis type 1, type 2 or type 3
● End point coordinates (in absolute dimensions or in incremental dimensions)
● Feedrate for linear axes in [mm/min], for rotary axes in [degrees/min]

Function Manual
6FC5397-7EP40-0BA4, 07/2018 223
Example: Positioning axis type 1
Program code Comment
POS[Q1]=200 FA[Q1]=1000 ; Axis Q1 with feedrate 1000mm/min at Position 200.

Example: Positioning axis type 2


Program code Comment
POSA[Q2]=300 FA[Q2]=1500 ; Axis Q2 with feedrate 1,500mm/min at Position 300.

Note
Within a part program, an axis can be a path axis or a positioning axis. Within a movement block, however, each axis must
be assigned a unique axis type.

Programming in synchronized action


Axes can be positioned completely asynchronous to the part program from synchronized actions.
Example:
Program code Comment
ID=1 WHENEVER $R==1 DO POS[Q4]=10 ; The axial feedrate is specified permanently.
FA[Q3]=990

Block change
The block change can be adjusted for positioning axis types 1 and 2 with:
FINEA=<axis name> or
FINEA[<axis name>]
COARSEA=<axis name> or
COARSEA[<axis name>]
IPOENDA=<axis name> or
IPOENDA[<axis name>]
In Type 3 positioning axis, the block change within the brake ramp of the single interpolation can be set with:
IPOBRKA=<axis name> or
IPOBRKA(<axis name>[,<instant in time*>])
* Instant in time of the block change, referred to the braking ramp as a %

Absolute dimension / incremental dimension


The programming of the end point coordinates takes place in absolute dimension (G90) or in incremental dimension (G91).
Example Meaning
Programming the end point coordinates
G90 POS[Q1]=200 In absolute dimension
G91 POS[Q1]=AC(200) In absolute dimension
G91 POS[Q1]=200 In incremental dimension
G90 POS[Q1]=IC(200) In incremental dimension

Reprogram type 2 positioning axes


With type 2 positioning axes (motion across block limits), you need to be able to detect in the part program whether the
positioning axis has reached its end position. Only then is it possible to reprogram this positioning axis (otherwise an alarm
is issued).
If POSA and then POSA again with IPOBRKA (block change in the braking ramp) is programmed, an alarm is not issued. For
more information, please refer to NC command IPOBKA in Section "Settable block change time".

Coordination (WAITP)
The coordination command WAITP enables you to designate a position in the NC program where the program is to wait until
an axis programmed with POSA in a previous NC block has reached its end position.

Function Manual
224 6FC5397-7EP40-0BA4, 07/2018
Program code Comment
N10 G01 G90 X200 F1000 POSA[Q1]=200
FA[Q1]=500
N15 X400
N20 WAITP(Q1) ; The program processing is stopped automatically until Q1 is
at position.
N25 X600 POS[Q1]=300 ; Q1 is a positioning axis of Type 1 (feedrate FA[Q1] from
block N10).
N30 X800 Q1=500 ; Q1 is path axis (path feed F1000 from block N10).

WAITP exists in an internal block.

An explicit reference must be made to any axis for which the program is to wait.
Example:
Program code Comment
N10 G01 G90 X200 F1000 POSA[Q1]=200 FA[Q1]=500
N15 X400
N20 WAITP(Q1) ; The program processing is
stopped automatically until Q1
is at position.
N25 X600 POS[Q1]=300 ; Q1 is a positioning axis of
Type 1 (feedrate FA[Q1] from
block N10).
N30 X800 Q1=500 ; Q1 is path axis (path feed
F1000 from block N10).

Tool offset
A tool length compensation for positioning axes can be implemented by means of an axial zero offset, allowing, for example,
the positioning path of a loader to be altered. An example where the axial zero offset might be used in place of the tool
length compensation is where a loader containing tools of various dimensions has to bypass an obstacle.

End of program
The program end (program status selected) is delayed until all axes (path axes + positioning axes) have reached their
programmed end points.

24.5.2 Revolutional feed rate in external programming


The two following setting data can be used to specify that the revolutional feed rate of a positioning axis should be derived
from another rotary axis/spindle:
SD43300 $SA_ASSIGN_FEED_PER_REV_SOURCE(revolutional feed rate for position axes/spindles)
SD42600 JOG_FEED_PER_REV_SOURCE (control of revolutional feed rate in JOG)
The following settings are possible:
Value Description
0 No revolutional feed rate selected
>0 The revolutional feed rate is derived from the round axis/spindle with the machine axis index specified here.
-1 The revolutional feed rate is derived from the master spindle of the channel in which the axis/spindle is ac-
tive.
-2 The revolutional feed rate is derived from the rotary axis/spindle with the machine axis index 0.
-3 The revolutional feed rate is derived from the master spindle of the channel in which the axis/spindle is ac-
tive. No revolutional feed rate is selected if the master spindle is at a standstill.

24.6 Block change


24.6.1 Block change
Since path and positioning axes are interpolated separately, they reach their programmed end positions at different instants
in time. If path and positioning axes are programmed in a block together, then the block change behavior depends on the
programmable type of positioning axes.

Function Manual
6FC5397-7EP40-0BA4, 07/2018 225
Type 1: Block-related positioning axis
Properties:
● The block change is performed as soon as all path and positioning axes have reached their respective programmed
end-of-motion criterion:
– Path axes: G601, G602, G603
– Positioning axes: FINEA, COARSA, IPOENDA
● Programming the positioning axis: POS[<axis>]

Note
Continuous path mode
Continuous path mode across block limits (G64) is only possible if the positioning axes reach their end-of-motion criterion
before the path axes (in the diagram above, this is not the case).

Type 2: Modal positioning axis (across blocks)


Properties:
● The block change is performed as soon as all path axes have reached their programmed end-of-motion criterion (G601,
G602, G603)

● Programming the positioning axis: POSA[<axis>]


● The positioning axis traverses beyond the block limits to its programmed end position. It is not permissible that the
positioning axis is programmed again before reaching its end-of-motion criterion.

Function Manual
226 6FC5397-7EP40-0BA4, 07/2018
24.6.2 Settable block change time
Type 3: Conditional block-related positioning axis
Properties:
● The block change is performed as soon as all path and positioning axes have reached their respective programmed
end-of-motion criterion:
– Path axes: G601, G602, G603
– Positioning axes: IPOBRKA
● Programming the positioning axis:
– N(x) IPOBRK(<axis>[,<instant in time>]) ;own block
– N(x+1) POS[<axis>]

Function Manual
6FC5397-7EP40-0BA4, 07/2018 227
Block change criterion: "Braking ramp" (IPOBRKA)
If, when activating the block change criterion "brake ramp", a value is programmed for the optional parameter <instant in
time>, then this becomes effective for the next positioning motion and is written into the setting data synchronized to the
main run. If no value is specified for the block change instant in time, then the actual value of the setting data is effective.
SD43600 $SA_IPOBRAKE_BLOCK_EXCHANGE
The time at which the block change can be realized is specified as a percentage of the braking ramp:
● 100% = start of the braking ramp
● 0% = end of the braking ramp, the same significance as block change criterion IPOENDA
Programming
IPOBRKA(<axis>[,<instant in time>])
IPOBRKA: Block change criterion: Deceleration ramp
Effective: Modal
<axis>: Channel axis name (X, Y, ....)
<instant in time>: Time of the block change, referred to the braking ramp as a %:
• 100% = start of the braking ramp
• 0% = end of the braking ramp, the same significance as IPOENDA
Type: REAL
IPOBRKA is deactivated for the corresponding access when an axis end-of-motion criterion (FINEA, COARSEA , IPOENDA ) is
next programmed for the axis.

Additional block change criterion: "Tolerance window" (ADISPOSA)


A tolerance window around the end of block (either as actual or setpoint position) can be defined as additional block change
criterion. Then, two conditions must be fulfilled for the block change:
● Block change criterion: "Braking ramp"
● Block change criterion: "Tolerance window"
Programming
ADISPOSA(<axis>[,<mode>,<window size>])
ADISPOSA: Tolerance window for end-of-motion criterion
Effective: Modal
<axis>: Channel axis name (X, Y, ....)
<mode>: Reference of the tolerance window
Type: INT
Value range: 0 Tolerance window not active
1 Tolerance window with respect to the setpoint position
2 Tolerance window with respect to actual position
<window size>: Size of the tolerance window
Type: REAL

System variable for end-of-motion criterion


The effective end-of-motion criterion can be read using the system variable $AA_MOTEND.

Supplementary conditions
Premature block change
A premature block change is not possible in the following cases:
● Oscillating axis
During oscillation with partial infeed, the block-specific oscillation motion must remain active until the axis with partial
infeed has reached its final position.

Function Manual
228 6FC5397-7EP40-0BA4, 07/2018
● Handwheel
For handwheel input, the last set end-of-motion criterion applies.
Changing the axis state
The axis for which a block change occurred within the braking ramp can only be programmed in the following block in the
same axis state.
When the axis state changes, for example, to POSfollowed by SPOS, the last programmed end-of-motion criterion FINEA,
COARSEA, IPOENDA is active. This also applies in the following cases:

● a positioning axis becomes a path axis


● if the program waits for the end of the positioning movement: WAITP, M30, end of the technology cycle, preprocessing
stop
● Velocity override is deactivated or activated

Examples
Block change criteria "braking ramp" in the part program
Program code Comment
; Default setting is effective.
N10 POS[X]=100 ; Positioning motion from X to position 100.
; Block change criterion: "Exact stop fine"
N20 IPOBRKA(X,100) ; Block change criterion: "Braking ramp", 100% = start of the braking
ramp.
N30 POS[X]=200 ; The block is changed as soon as the X axis starts to brake.
N40 POS[X]=250 ; Axis X does not brake at position 200, but moves further to position
250. As soon as the axis starts to brake, the block is changed.
N50 POS[X]=0 ; Axis X brakes and returns to position 0,
the block change is realized at position 0 and "exact stop fine".
N60 X10 F100 ; Axis X traverses as path axis to position 10.
N70 M30

Block change criterion "braking ramp" in synchronized action


In the technology cycle:
Program code Comment
FINEA ; End-of-motion criterion: "Exact stop fine"
N10 POS[X]=100 ; The technology cycle block change is realized if the X axis has
reached position 100 and "exact stop fine" is reached.
N20 IPOBRKA(X,100) ; Block change criterion, activate "braking ramp",
100% = start of the braking ramp.
N30 POS[X]=200 ; The technology cycle block is changed as soon as the X axis starts to
brake.
N40 POS[X]=250 ; Axis X does not brake at position 200, but moves further to position
250. As soon as the axis starts to brake, the block change is realized
in the technology cycle.
N50 POS[X]=0 ; Axis X brakes and returns to position 0,
the block change is realized at position 0 and "exact stop fine".
N60 M17

Block change criterion "braking ramp" and "tolerance window" in the part program
Program code Comment
; Default setting is effective.
N10 POS[X]=100 ; Positioning motion from X to position 100.
Block change criterion: "Exact stop fine"
N20 IPOBRKA(X,100) ; Block change criterion: "Braking ramp", 100% = start of the braking
ramp.
N21 ADISPOSA(X,1,0.5) ; Tolerance window: 1 = setpoint position, tolerance = 0.5
N30 POS[X]=200 ; The block is changed as soon as the X axis starts to brake.
N40 POS[X]=250 ; Axis X does not brake at position 200, but moves further to position
250. As soon as the axis starts to brake, the block is changed.
N50 POS[X]=0 ; Axis X brakes and returns to position 0,
the block change is realized at position 0 and "exact stop fine".
N60 X10 F100
N70 M30

Function Manual
6FC5397-7EP40-0BA4, 07/2018 229
Block change criterion "braking ramp" and "tolerance window" in synchronized action
In the technology cycle:
Program code Comment
FINEA ; End-of-motion criterion: "Exact stop fine"
N10 POS[X]=100 ; The technology cycle block change is realized if the X axis has
reached position 100 and "exact stop fine" is reached.
N20 IPOBRKA(X,100) ; Block change criterion, activate "braking ramp",100% = start of the
braking ramp.
N21 ADISPOSA(X,2,0.3) ; Tolerance window: 2 = actual position, tolerance = 0.3
N30 POS[X]=200 ; Technology cycle block change is realized as soon as the X axis starts
to brake and the actual position of the X axis >= 199.7.
N40 POS[X]=250 ; X axis does not brake at position 200, but moves further to position
250. As soon as the X axis starts to brake and the position of the X
axis >= 249.7, the block change is realized in the technology cycle.
N50 POS[X]=0 ; Axis X brakes and returns to position 0,
the block change is realized at position 0 and "exact stop fine".
N60 M17

IPOBRKA(X) could also be written into the N20 blocks without specifying the instant in time, if the corresponding value has
already been entered into the setting data:
SD43600 $SA_IPOBRAKE_BLOCK_EXCHANGE[X] == 100

24.6.3 End of motion criterion with block search

Last block serves as container


The last end-of-motion criterion programmed for an axis is collected and output in an action block. The last block with a
programmed motion end condition that was processed in the search run serves as a container for setting all axes.

Example
For two action blocks with end-of-motion criteria for three axes:
Program code Comment
N01 G01 POS[X]=20 POS[Y]=30
IPOENDA[X] ; Last programmed IPOENDA end-of-motion crite-
rion
N02 IPOBRKA(Y, 50) ; Second action block for the Y axis IPOENDA
N03 POS[Z]=55 FINEA[Z] ; Second action block for the Z axis FINEA
N04 $A_OUT[1]=1 ; First action block for output as digital
output
N05 POS[X]=100 ;
N06 IPOBRKA(X, 100) ; Second action block for the X axis IPOBRKA
container
... ; For all programmed end-of-motion criteria
TARGET: ; Block search target

The first action block contains the digital output:


$A_OUT[1] = 1.
The second action block contains the settings for the end-of-motion criteria:
for the X axis IPOBRKA / $SA_IPOBRAKE_BLOCK_EXCHANGE[AX1]=100
for the Y axis IPOBRKA / $SA_IPOBRAKE_BLOCK_EXCHANGE[AX2]=50
for the Z axis FINEA. The motion end condition IPOENDA last programmed is also stored for the X axis.

24.7 Control by the PLC


PLC axes are traversed from the PLC and can move asynchronously to all other axes. The travel motions are executed
separate from the path and synchronized actions.
For more information about how to control the positioning axis via the PLC user interface, see Chapter "PLC axis control
(Page 198)".

Function Manual
230 6FC5397-7EP40-0BA4, 07/2018
24.8 Response with special functions
24.8.1 Dry run (DRY RUN)
The dry run feedrate is also effective for positioning axes unless the programmed feedrate is larger than the dry run feedrate.
Activation of the dry run feed entered in SD42100 $SA_DRY_RUN_FEED can be controlled with SD42101
$SA_DRY_RUN_FEED_MODE. See
For more information, see Chapter "Feedrates (V1) (Page 183)".

24.8.2 Single block

Positioning axis type 1


Single-block mode is effective with positioning axes of type 1.

Positioning axis type 2


Positioning axes of type 2 also continue across block limits in single block mode.

Positioning axis type 3


Positioning axes of type 3 also continue across block limits in single block mode.

24.9 Examples
Motion behavior and interpolation functions
In the following example, the two positioning axes Q1 and Q2 represent two separate units of movement. There is no
interpolation relationship between the two axes. In the example, the positioning axes are programmed as type 1 (for
example, in N20) and type 2 (for example, in N40).

Program example
Program code
N10 G90 G01 G40 T0 D0 M3 S1000
N20 X100 F1000 POS[Q1]=200 POS[Q2]=50 FA[Q1]=500
FA[Q2]=2000
N30 POS[Q2]=80
N40 X200 POSA[Q1] = 300 POSA[Q2]=200] FA[Q1]=1500
N45 WAITP[Q2]
N50 X300 POSA[Q2]=300
N55 WAITP[Q1]
N60 POS[Q1]=350
N70 X400
N75 WAITP[Q1, Q2]
N80 G91 X100 POS[Q1]=150 POS[Q2]=80
N90 M30

Function Manual
6FC5397-7EP40-0BA4, 07/2018 231
24.10 Data table
24.10.1 Machine data
Number Identifier Name
NC-specific
18960 POS_DYN_MODE Type of positioning axis dynamic response
Channel-specific
20730 G0_LINEAR_MODE Interpolation behavior with G0
Axis/spindle-specific
30460 BASE_FUNCTION_MASK Axis functions
32060 POS_AX_VELO Feedrate for positioning axis
32300 MAX_AX_ACCEL Maximum axis acceleration
32430 JOG_AND_POS_MAX_JERK Maximum axial jerk for positioning axis movements
32431 MAX_AX_JERK Maximum axial jerk for path movements

24.10.2 Setting data


Number Identifier Name
Axis/spindle-specific
43600 IPOBRAKE_BLOCK_EXCHANGE Braking ramp block change condition
43610 ADISPOSA_VALUE Braking ramp tolerance window

24.10.3 Interface signals


Number Bit Name
Channel-specific
DB3200.DBX0006 .0 Feed disable
DB3200.DBX0007 .1 NC Start
DB3200.DBX0007 .4 NC stop axes plus spindle
DB3200.DBX0007 .7 Reset
DB3300.DBX0004 .3 All axes stationary
DB3300.DBX1000 .6 Travel command minus
DB3300.DBX1000 .7 Travel command plus
Axis/spindle-specific
DB380x.DBB0000 - Feed override, axis-specific
DB380x.DBX0002 .1 Controller enable
DB380x.DBX0002 .2 Distance-to-go/Spindle RESET
DB380x.DBX5004 .1 Reset
DB380x.DBX5004 .2 Continue
DB380x.DBX5004 .6 Stop along braking ramp
DB380x.DBX5004 .7 PLC-controlled axis
DB390x.DBX0000 .6 Exact stop coarse
DB390x.DBX0000 .7 Exact stop fine
DB390x.DBX0001 .1 Axial alarm
DB390x.DBX0001 .2 Axis ready (AX_IS_READY)
DB390x.DBX0003 .0 Reset executed
DB390x.DBX0003 .1 PLC-controlled axis
DB390x.DBX0003 .2 Axis stop active
DB390x.DBX0003 .3 Axis/spindle inhibit active

Function Manual
232 6FC5397-7EP40-0BA4, 07/2018
Number Bit Name
DB390x.DBX0004 .6 Travel command minus
DB390x.DBX0004 .7 Travel command plus
DB390x.DBX1002 .5 Positioning axis
DB390x.DBX5002 .7 Emergency retraction active

25 Synchronous spindle (S3)


25.1 Brief description
25.1.1 Function
The "synchronous spindle" function can be used to couple two spindles with synchronous position or speed. One spindle is
defined as the leading spindle (LS), the second spindle is then the coupled-motion spindle (CS).
Speed synchronism: nCS = kÜ * nLS with kÜ = 1, 2, 3, ...
Position synchronism: φCS = φLS + Δφ with 0° ≤ Δφ < 360°

Note
"Generic Coupling 'CP-BASIC'" option
You can obtain the "synchronous spindle" function by activating the "Generic Coupling 'CP-BASIC'" option. This optional
function is available for the turning variant of the control system only.
Memory configuration
Memory space reserved in dynamic NC memory for the "synchronous spindle" function is defined in machine data:
MD18450 $MN_MM_NUM_CP_MODULES (maximum allowed number of CP coupling modules)
MD18452 $MN_MM_NUM_CP_MODUL_LEAD (maximum allowed number of CP master values)
It's recommended that the expected maximum values, which can be expected simultaneously for this machine in its
maximum configuration, are already be set during commissioning.

Possible applications
Rear side machining
One application option is, for example, the reverse side machining in a double-spindle lathe with on-the-fly transfer of the
workpiece from the position-synchronous leading spindle to the coupled-motion spindle (or vice versa), without having to
decelerate down to standstill.
Multi-edge machining (polygonal turning)
The "synchronous spindle" function provides the basis for multi-edge machining (polygonal turning) through specification of
an integer gear ratio kÜ between the leading spindle and the coupled-motion spindle.

Number of coupled-motion spindles


For the SINUMERIK 808D ADVANCED, at most one pair of synchronokus spindles can be active simultaneously in the NC
channel.

Definition
The assignment of the leading spindle to the coupled-motion spindle of synchronous spindles can be parameterized
channel-specifically via machine data or flexibly defined via part program commands.

Selecting/de-selecting
Part program commands are used to select/deselect the synchronous operation of a pair of synchronous spindles.

Function Manual
6FC5397-7EP40-0BA4, 07/2018 233
25.1.2 Synchronous mode

Description
<axial expression>: can be:
- Axis name
- Spindle name
<axis name>: C (if spindle has the name "C" in axis operation.)

Function Manual
234 6FC5397-7EP40-0BA4, 07/2018
<spindle name>: Sn, SPI(n) where n = spindle number
<spindle number>: 1, 2, ... according to the spindle number defined in
MD35000 $MA_SPIND_ASSIGN_TO_MACHAX
(coupled-motion spindle, leading spindle, offset): Offset = read programmable offset of the coupled-motion
spindle using system variables
$P_COUP_OFFS[Sn] Programmed position offset of the synchronous spindle

Synchronous spindle pair


Synchronous operation involves a coupled-motion spindle and a leading spindle, referred to as the synchronous spindle pair.
The coupled-motion spindle imitates the movements of the leading spindle when a coupling is active (synchronous operation)
in accordance with the defined functional interrelationship.

Synchronous mode
Synchronous mode (also referred to as “synchronous spindle operation”) is another spindle operating mode. Before
synchronous mode is activated, the coupled-motion spindle must have been switched to position control. Synchronous
operation is activated for the coupled-motion spindle when the coupling is activated. As soon as the coupling is deactivated,
the coupled-motion spindle switches back to open-loop control mode.
As soon as synchronous operation is active for the coupled-motion spindle, the following interface signal is reported to the
PLC:
IS "synchronous mode" (DB390x.DBX2002.4) = 1.

Number of synchronous spindles


For the SINUMERIK 808D ADVANCED, at most one pair of synchronous spindles can be active simultaneously in the NC
channel.

Options in synchronous mode


The following functions are available for synchronous mode:
● Coupled-motion spindle (CS) and leading spindle (LS) turn at the same speed
(nCS = nLS; transformation ratio kÜ = 1)
● Rotation in the same or opposite direction between coupled-motion spindle and leading spindle
(can be defined positively or negatively using transformation ratio kÜ)
● Coupled-motion spindle (CS) and leading spindle (LS) rotate at different speeds
(nCS = kÜ · nLS; transformation ratio kÜ ≠ 1)
Application: polygonal turning
● Settable angular position between coupled-motion spindle and leading spindle (φCS = φLS + Δφ)
The spindles run at synchronous speed with a defined angular offset between coupled-motion spindle and leading
spindle (position synchronous coupling).
Application: shaped workpieces
● Activation of synchronous operation between coupled-motion spindle and leading spindle can take place when the
spindles are in motion or at standstill.
● The full functionality of the open-loop and position control modes is available for the leading spindle.
● When synchronous mode is not active, the coupled-motion spindle and leading spindle can be operated in all other
spindle modes.
● The transformation ratio can also be altered when the spindles are in motion in active synchronous mode.
● With synchronous spindle coupling switched on, the offset of the coupled-motion spindle to the leading spindle (overlaid
movement) can be altered.

Coupling options
Synchronous spindle couplings can be defined as
● Permanently configured via channel-specific machine data
(hereinafter referred to as "permanently configured coupling") as well as

Function Manual
6FC5397-7EP40-0BA4, 07/2018 235
● Freely defined using language commands (COUP...) in the part program
(hereafter referred to as "user defined coupling")
. The following variants are possible:
1. A fixed configuration for a coupling can be programmed via machine data. In addition, a second coupling can be freely
defined via the part program.
2. No coupling is configured via machine data. In this case, the couplings can be user-defined and parameterized via the
part program.

Separate coupled-motion spindle interpolator


The separate coupled-motion spindle interpolator allows a number of coupled-motion spindles from different channels or
from another NCU to be coupled as defined by the user to a single leading spindle. The coupled-motion spindle interpolator
is
● COUPON or COUPONC activated and
● COUPOF or COUPOFS deactivated
and is always located in the channel in which the COUPON, COUPONC command has been programmed for the coupled-motion
spindle.
Certain synchronous spindle functions can be controlled from the PLC by means of coupling-specific axial VDI interface
signals. These signals act exclusively on the coupled-motion spindles and do not affect the leading spindle (see Section
"Controlling synchronous spindle coupling via PLC (Page 241)").

Definition of synchronous spindles


Before synchronous operation is activated, the spindles to be coupled (coupled-motion spindle, leading spindle) must be
defined.
This can be done in two ways depending on the application in question:
1. Permanently configured coupling:
Machine axes that are to function as the coupled-motion spindle and leading spindle are defined in channel-specific MD
21300 $MC_COUPLE_AXIS_1[n].
The machine axes programmed as the leading spindle and coupled-motion spindle for this coupling configuration cannot
be altered by the NC part program.
If necessary, the coupling parameters can be modified with the NC part program.
2. User-defined coupling:
Couplings can be created and altered in the NC part program with language command "COUPDEF(coupled-motion spindle,
leading spindle, ...)". If a new coupling relationship is to be defined, it may be necessary to delete an existing user-
defined coupling beforehand (with language command COUPDEL(coupled-motion spindle, leading spindle)).
The axis names (Sn, SPI(n)) for the coupled-motion spindle and leading spindle must be programmed with "coupled-
motion spindle" and "leading spindle" for every language command COUP..., thus ensuring that the synchronous spindle
coupling is unambiguously defined.
The valid spindle number must then be assigned axis-specific machine data of a machine axis:
MD35000 $MA_SPIND_ASSIGN_TO_MACHAX.
IS "coupled-motion spindle active" (DB390x.DBX5003.1) and IS "leading spindle active" (DB390x.DBX5003.0) indicate to the
PLC for each machine axis whether the axis is active as a leading or coupled-motion spindle.
The leading spindle can be programmed either via a part program, PLC or also using synchronized actions.

Transformation ratio
The transformation ratio is programmed with separate numerical values for numerator and denominator (transformation ratio
parameters). It is therefore possible to specify the transformation ratio very exactly, even with rational numbers.
In general:
kÜ = transformation ratio parameter for numerator : transformation ratio parameter for denominator = Ünumerator : Üdenominator
The value range of the transformation ratio parameter (Ünumerator, Üdenominator) is virtually unlimited in the control.
The transformation ratio parameters for the coupling configured via machine data can be defined in channel-specific
SD42300: COUPLE_RATIO_1[n]. In addition, the transformation ratio can be altered with language command

Function Manual
236 6FC5397-7EP40-0BA4, 07/2018
COUPDEF(coupled-motion spindle, leading spindle, Ünumerator, Üdenominator ,...). The values entered in the setting data is not
overwritten in this case (default settings).
The transformation ratio for the coupling defined via the NC part program can only be input with language command
COUPDEF (...).

The new transformation ratio parameters take effect as soon as the COUPDEF command has been processed.
For further programming commands for synchronous spindle couplings, please see Section "Programming (Page 244)".

Coupling characteristics
The following characteristics can be defined for every synchronous spindle coupling:
● Block change behavior
The condition to be fulfilled for a block change can be defined on activation of synchronous operation or on alteration of
the transformation ratio or the defined angular offset when the coupling is active:
– Block change takes place immediately
– Block change in response to "fine synchronism"
– Block change in response to "coarse synchronism"
– Block change for IPOSTOP (that is, after setpoint-end synchronism)
– Check of the synchronism conditions at an arbitrary moment with WAITC.
● Type of coupling between the coupled-motion spindle and the leading spindle
The position setpoint or the actual position value of the leading spindle can be used as the reference value for the
coupled-motion spindle. The following coupling types can therefore be selected:
– Setpoint coupling (DV)
Use in position controlled operation. The control dynamic response of both spindles should coincide as far as
possible. Preferably, the setpoint coupling should be used.
– Actual value coupling (AV)
Application if no position control of the leading spindle is possible or with great deviation of the control characteristics
between the coupled-motion spindle and the leading spindle. The setpoints for the coupled-motion spindle are
derived from the actual values of the leading spindle. The quality of synchronism is worse with a varying spindle
speed than with the setpoint coupling.
– Speed coupling (VV)
Internally, the velocity coupling is a setpoint coupling. The requirements for the coupled-motion spindle and leading
spindle are lower. Position control and measuring systems are not required for the coupled-motion spindle and
leading spindle.
The position offset between the coupled-motion spindle and the leading spindle is undefined.
The selection of the relevant coupling characteristics for the configured coupling is made using machine data (see Section
"Configuration (Page 248)") and for the user defined coupling using the COUPDEF language command (see Section "Definition
(COUPDEF) (Page 244)").
In addition, coupling characteristics "type of coupling" and "block change response" can be altered for the permanently
configured coupling by means of language command COUPDEF.

Change protection for coupling characteristics


The channel-specific MD21340 $MC_COUPLE_IS_WRITE_PROT_1 is used to define whether or not the configured
coupling parameters "transformation ratio", "type of coupling" and "block change response" can be altered by the NC part
program:
0: Coupling parameters can be altered by the NC part program via command COUPDEF
1: Coupling parameters cannot be altered by the NC part program. Attempts to make changes will be rejected with an alarm
message.

Superimposed motion
In synchronous operation, the synchronous spindle copies the movement of the leading spindle in accordance with the
programmed transformation ratio.

Function Manual
6FC5397-7EP40-0BA4, 07/2018 237
At the same time, the synchronous spindle can also be traversed with overlay so that the coupled-motion spindle and
leading spindle can operate at a specific angular position in relation to one another.
The overlaid traversing movement of the coupled-motion spindle can be initiated in various ways:
● Programmable position offset of the coupled-motion spindle for AUTO and MDA:
– The COUPON and SPOS language commands can be used for active synchronous operation to change the position
reference between the coupled-motion spindle and the leading spindle (see Section "Selecting synchronous mode for
a part program (Page 239)").
● Manual position offset of the coupled-motion spindle:
– In JOG (JOG continuous or JOG incremental) mode
Superimposition of the coupled-motion spindle using the handwheel or with plus or minus traversing keys when
synchronous operation is active.
– In AUTO and MDA modes
Superimposition of the coupled-motion spindle with handwheel using DRF offset
As soon as the coupled-motion spindle executes the overlaid traversing movement, IS "overlaid movement"
(DB390x.DBX5002.4) is set to the 1 signal.
The overlaid movement is executed optimally in terms of time at the maximum possible coupled-motion spindle speed with
COUPON. With an offset change by means of SPOS, the positioning velocity can be specified with FA[Sn] and manipulated by
an override (can be selected through IS "feedrate override valid for spindle" DB380x.DBX2001.0).
For more information about specifying the position speed with FA[Sn], see Chapter "Spindle (S1) (Page 166)".

Setpoint correction
The setpoint correction of the system variable $AA_COUP_CORR[Sn] impacts on all subsequent coupled-motion spindle
programming in the same way as a position offset and corresponds to a DRF offset in the MCS.

Example: establish correction value


If a coupling offset of 7° has been programmed using COUPON(....,77) and if a mechanical offset of 81° has come about as
a result of closing the workpiece support fixture, a correction value of 4° is calculated:
The system variables return the following values for the coupled-motion spindle:
$P_COUP_OFFS[S2] ; programmed position offset = 77°
$AA_COUP_OFFS[S2] ; setpoint position offset = 77°
$VA_COUP_OFFS[S2] ; actual value position offset approx. 77°
$AA_COUP_CORR[S2] ; correction value = 4°

25.1.3 Prerequisites for synchronous mode

Conditions on selection of synchronous mode


The following conditions must be fulfilled before the synchronous spindle coupling is activated or else alarm messages will
be generated.
● The synchronous spindle coupling must have been defined beforehand (either permanently configured via machine data
or according to user definition via part program using COUPDEF).
● The spindles to be coupled must be defined in the NC channel in which the coupling is activated.
Channel-specific MD20070 $MC_AXCONF_MACHAX_USED
Axis specific MD35000 $MA_SPIND_ASSIGN_TO_MACHAX
● The coupled-motion spindle must be assigned to the NC channel in which the coupling is activated.
Default setting with axis-specific MD30550 AXCONF_ASSIGN_MASTER_CHAN
● The following applies to setpoint and actual value couplings (DV, AV):
The coupled-motion spindle and leading spindle must at least have a position measuring system for recording positions
and position controls must be started up.

Function Manual
238 6FC5397-7EP40-0BA4, 07/2018
Note
When position control is activated, the maximum setpoint speed of the leading spindle is automatically limited to 90%
(control reserve) of the maximum speed. The limitation is signaled via IS "setpoint speed limited" (DB390x.DBX2001.1).

For more information, see Chapter "Spindle (S1) (Page 166)".


● The following applies to setpoint couplings (DV):
To ensure more accurate synchronization characteristics, the leading spindle should be in position control mode
(language instruction SPCON) before the coupling is activated.
● Before selecting the synchronous mode, the gear stage necessary for the coupled-motion spindle and leading spindle
must be selected. In synchronous mode, gear stage changeover and therefore oscillation mode are not possible for the
coupled-motion spindle and leading spindle. Upon request, an alarm message is generated.

25.1.4 Selecting synchronous mode for a part program

Activate coupling COUPON, COUPONC


Language command COUPON activates the coupling in the part program between the programmed spindles with the last valid
parameters and thus also activates synchronous mode. This coupling may be a fixed configuration or user-defined. The
leading spindle and/or coupled-motion spindle may be at standstill or in motion at the instant of activation.
Certain preconditions must be fulfilled before synchronous operation can be activated (see Section "Prerequisites for
synchronous mode (Page 238)").
The COUPONC command adopts the previous programmed direction of spindle rotation and spindle speed for the coupled-
motion spindle and leading spindle in the part program. It is not possible to specify an angular offset.

COUPON activation variants


Two different methods can be selected to activate synchronous mode:
1. Fastest possible activation of coupling with any angular reference between the leading spindle (LS) and the coupled-
motion spindle (CS).
COUPON(coupled-motion spindle, leading spindle)
2. Activation of coupling with a defined angular offset POSCS between leading and coupled-motion spindles. With this
method, the angular offset must be programmed on selection.
COUPON(coupled-motion spindle, leading spindle, POSCS)

Block change behavior


Before synchronous operation is selected, it must be determined under what conditions the block change must occur when
the synchronous mode is activated (see Section "Definition (COUPDEF) (Page 244)").

Determine current coupling status


The $AA_COUP_ACT[<axial expression>] axial system variable can be used in the NC part program to specify the current
coupling status for the specified axis/spindle (see Section "Axial system variables for synchronous spindle (Page 247)"). As
soon as the synchronous spindle coupling is active for the coupled-motion spindle, bit 2 must be "1" when read.

Change defined angular offset


Language commands COUPON and SPOS allow the defined angular offset to be changed while synchronous mode is active.
The coupled-motion spindle is positioned as an overlaid movement at the angular offset programmed with POSCS. During
this time, the IS "overlaid movement" (DB390x.DBX5002.4) is set.

Angular offset POSCS


The defined angular offset POSCS must be specified as an absolute position referred to the zero degrees position of the
leading spindle in a positive direction of rotation.
The "0° position" of a position-controlled spindle is calculated as follows:
● From the zero mark or proximity sensor signal of the measurement system and
● From the reference values saved using axis-specific machine data:
MD34100 $MA_REFP_SET_POS, reference point value,

Function Manual
6FC5397-7EP40-0BA4, 07/2018 239
of no significance with interval-coded systems.
MD34080 $MA_REFP_MOVE_DIST reference point distance/target point
with interval-coded systems,
MD34090 $MA_REFP_MOVE_DIST_CORR reference point offset / absolute offset with interval coding.
Range of POSCS: 0 ... 359.999°.
For more information, see Chpater "Reference point approach (R1) (Page 160)".

Read current angular offset


Using axial system variables, it is possible to read the current position offset between the coupled-motion spindle and the
leading spindle in the NC part program. A distinction is made between:
● Current position offset of setpoint between the coupled-motion spindle and the leading spindle
$AA_COUP_OFFS [<axis name for the coupled-motion spindle>]
● Current position offset of actual value between the coupled-motion spindle and the leading spindle
$VA_COUP_OFFS [<axis name for the coupled-motion spindle>]
(Explanation of <axis name>, see Section "Synchronous mode (Page 234)")

Activation after power ON


Synchronous mode can also be activated with a non-referenced/synchronized coupled-motion spindle or leading spindle (IS
"referenced/synchronized 1 or 2" DB390x.DBX0.4 or DB390X.DBX0.5 =0). In this case, a warning message is displayed.
Example:
The coupled-motion spindle and leading spindle are already coupled in a friction lock via a workpiece after power ON.

25.1.5 Deselecting the synchronous mode for the part program

Open coupling (COUPOF, COUPOFS)


Synchronous mode between the specified spindles is canceled by the parts program instruction COUPOF. Three variants are
possible.
If synchronous mode is canceled between the specified spindles using COUPOF, then it is irrelevant whether this coupling is
permanently configured or user defined. The leading and coupled-motion spindles can be at standstill or in motion when
synchronous operation is deactivated.
On switching off the synchronous mode with COUPOF, the coupled-motion spindle is put into control mode. The originally
programmed S-word is no longer valid for the coupled-motion spindle, the coupled-motion spindle can be operated like any
other normal spindle.
When the coupling is opened with COUPOF, a block preprocessing stop STOPRE is generally initiated internally in the control.
The COUPOFS instruction can be used to open a coupling either as quickly as possible with a stop and no position data or
with a stop at the programmed position.

COUPOF and COUPOFS variants


Three different methods can be used to deselect synchronous mode with COUPOF and COUPOFS:
1. Deactivation of coupling as quickly as possible
The block change is enabled immediately.
COUPOF(coupled-motion spindle, leading spindle) and COUPOFS(coupled-motion spindle, leading spindle)
2. A coupling is not deselected until the coupled-motion spindle has crossed the programmed deactivation position POSCS
(coupled-motion spindle = CS; leading spindile = LS).
The block change is then enabled.
COUPOFS(coupled-motion spindle, leading spindle, POSCS)
3. A coupling is not deselected until the coupled-motion spindle and leading spindle has crossed the programmed
deactivation positions POSCS and POSLS.
The block change is then enabled.
COUPOFS(coupled-motion spindle, leading spindle, POSCS, POSLS)

Function Manual
240 6FC5397-7EP40-0BA4, 07/2018
POSCS, POSLS
Deactivation positions POSCS and POSLS match the actual positions of the coupled-motion spindle and leading spindle
respectively referred to the defined reference point value.
Range of POSCS, POSLS: 0 ... 359,999°.
For more information, see Chapter "Reference point approach (R1) (Page 160)".

COUPOF during the motion


If synchronous mode is deselected while the spindles are in motion with COUPOF, the coupled-motion spindle continues to
rotate at the current speed (nCS). The current speed can be read with system variable $AA_S in the NC parts program.
The coupled-motion spindle can then be stopped from the parts program with M05, SPOS, SPOSA or from the PLC with the
appropriate interface signal.

COUPOFS with stop of the coupled-motion spindle


Opening a synchronous spindle coupling is extended by a stop of the coupled-motion spindle:
● Deactivating a coupling as quickly as possible and opening a coupling as quickly as possible.
The block change is then enabled.
COUPOFS(coupled-motion spindle, leading spindle)
● Opening the coupling with stop of the coupled-motion spindle at the programmed position. The block change is then
enabled.
Condition:
COUPOFS(coupled-motion spindle, leading spindle) and COUPOFS(coupled-motion spindle, leading spindle, POSCS) have
no meaning if a coupling was not active.

25.1.6 Controlling synchronous spindle coupling via PLC

Controlling the coupled-motion spindle spindle via PLC


Using the coupling-specific, axial VDI interface signals, it is possible to control synchronization motions for the coupled-
motion spindle from the PLC program. This offers the option of utilizing the PLC to disable, suppress or restore a
synchronization motion for the coupled-motion spindle specified by offset programming.
These signals have no effect on the leading spindle. The following coupling-specific VDI signal (PLC → NC) is available:
IS "disable synchronization" (DB380x.DBX5007.5)

"Disable synchronization"
The synchronization motion for the coupled-motion spindle is suppressed using the axial signal IS "disable synchronization"
(DB380x.DBX5007.5).
When the main run advances to a block containing part program instruction COUPON (coupled-motion spindle, leading spindle,
offset), the following interface signal is evaluated for the coupled-motion spindle:
IS "disable synchronization" (DB380x.DBX5007.5).
● For IS "disable synchronization" (DB380x.DBX5007.5) = 0, the position offset is traversed through as before.
● For IS "disable synchronization" (DB380x.DBX5007.5) = 1, only the continuous velocity synchronism is established. The
coupled-motion spindle does not execute any additional movement.
The coupling then responds analogously to a programmed COUPON(<coupled-motion spindle>,<leading spindle>).

Special features
For the IS "disable synchronization" (DB380x.DBX5007.5) offset motion of the coupled-motion spindle cannot be controlled
that was generated as follows:
● SPOS, POS
● Synchronized actions
● JOG
These functions are controlled by VDI signal IS "feedrate stop/spindle stop" (DB380x.DBX4.3).

Function Manual
6FC5397-7EP40-0BA4, 07/2018 241
Synchronized state reached
Whenever a state of synchronism has been reached, the following two VDI signals are set regardless of whether
synchronization has been disabled or not:
IS "synchronism coarse" (DB390x.DBX5002.1) and
IS "synchronism fine" (DB390x.DBX5002.0)
Further block changes after COUPON are not prevented by suppression of synchronization.

Example
Block change behavior after COUPON
Program code Comment
; IS "Disable synchronization"
; set (DB380x.DBX5007.5) = 1 for S2
N51 SPOS=10 SPOS[2]=10 ; positions correspond to an offset
; of 0°
N52 COUPDEF(S2,S1,1,1,"FINE","DV")
N53 COUPON(S2,S1,77) ; actual offset of 0 degrees is retained
; no coupled-motion spindle movement,
; VDI signals
; IS "synchronism coarse"
; (DB390x.DBX5002.1) and
; IS "synchronism fine"
; (DB390x.DBX5002.0)
; are set and the block change
; is enabled.
N54 M0
N57 COUPOF(S2,S1)
N99 M30

Reset and recovery


Resetting the IS "disable synchronization" (DB380x.DBX5007.5) has no effect on the coupled-motion spindle offset. If the
offset motion of the coupled-motion spindle has been suppressed by the VDI interface signal, then the offset is not
automatically applied when the VDI signal is reset.
Synchronization is recovered as follows:
● By repeating the part program operation COUPON (coupled-motion spindle, leading spindle, offset) with IS "disable
synchronization" (DB380x.DBX5007.5) = 0.
COUPON (coupled-motion spindle, leading spindle, offset) can be written, for example, in an ASUB.

● By setting the IS "resynchronize" (DB380x.DBX5007.4) = 1

Read offset
The following system variables can be used to read three different position offset values of the coupled-motion spindle from
the part program and synchronized actions. The variable $P_COUP_OFFS[Sn] is only available in the part program.
Description NC variable
Programmed position offset of the synchronous spindle $P_COUP_OFFS[Sn]
Position offset of synchronous spindle, setpoint end $AA_COUP_OFFS[Sn]
Position offset of synchronous spindle, actual value end $VA_COUP_OFFS[Sn]

"Feedrate stop/spindle stop"


By configuring bit 4 in MD30455 MISC_FUNCTION_MASK, the behavior of the axial IS "feedrate stop/spindle stop"
(DB380x.DBX4.3) is defined for the coupled-motion spindle.
Bit 4 = 0 compatibility method:
Canceling feed enable for the coupled-motion spindle decelerates the coupling assembly.
Bit 4 = 1:
Feedrate enable refers only to the interpolation component (SPOS,..) and does not affect the coupling.

Function Manual
242 6FC5397-7EP40-0BA4, 07/2018
25.1.7 Monitoring of synchronous operation

Fine/coarse synchronism
In addition to conventional spindle monitoring operations, synchronous operation between the coupled-motion spindle and
leading spindle is also monitored in synchronous mode.
IS "fine synchronism" (DB390x.DBX5002.0) or IS "coarse synchronism" (DB390x.DBX5002.1) is transmitted to the PLC to
indicate whether the current position (AV, DV) or actual speed (VV) of the coupled-motion spindle lies within the specified
tolerance window.
When the coupling is switched on, the signals "coarse synchronism" and "fine synchronism" are updated when setpoint
synchronism is reached.
The size of the tolerance windows is set with machine data of the coupled-motion spindle. Reaching of the synchronism is
influenced by the following factors:
● AV, DV: Position variance between the coupled-motion spindle and the leading spindle
● VV: Difference in speed between the coupled-motion spindle and the leading spindle

Threshold values
The relevant position or velocity tolerance range for the coupled-motion spindle in relation to the leading spindle must be
specified in degrees or 1 rev/min.
● Threshold value for "coarse synchronism"
axis spec. MD37200: AV, DV: COUPLE_POS_TOL_COARSE

Function Manual
6FC5397-7EP40-0BA4, 07/2018 243
MD37220: VV: COUPLE_VELO_TOL_COARSE
● Threshold value for "fine synchronism"
axis spec. MD37210: AV,DV: COUPLE_POS_TOL_FINE
MD37230: VV: COUPLE_VELO_TOL_FINE

Speed/acceleration limits
In synchronous mode, the speed and acceleration limit values of the leading spindle are adjusted internally in the control in
such a way that the coupled-motion spindle can imitate its movement, allowing for the currently selected gear stage and
effective speed ratio, without violating its own limit values.
For example, the leading spindle is automatically decelerated to prevent the coupled-motion spindle from exceeding the
maximum speed in order to maintain synchronism between the spindles.

25.2 Programming
Coupling commands with leading-spindle programming
Command Function
COUPDEF(coupled-motion spindle, leading Define coupling or change for configured coupling
spindle ...)
COUPON(coupled-motion spindle, leading Switch the coupling on
spindle, POSCS)
COUPONC(coupled-motion spindle, leading Activate coupling with transfer of the currently effective speed of the
spindle)
coupled-motion spindle
COUPOF(coupled-motion spindle, leading Switch the coupling off
spindle)
COUPOFS(coupled-motion spindle, leading Deactivate coupling with stop of the coupled-motion spindle
spindle, POSCS)
COUPDEL (coupled-motion spindle, lead- Delete coupling
ing spindle)
COUPRES (coupled-motion spindle, lead- Reactivate configured coupling data
ing spindle)
Coupling commands without leading-spindle programming
Command Function
COUPOF(coupled-motion spindle, leading Switch the coupling off
spindle)
COUPOFS(coupled-motion spindle, POSCS) Deactivate coupling with stop of the coupled-motion spindle
COUPDEL(coupled-motion spindle) Delete coupling
COUPRES(coupled-motion spindle) Reactivate configured coupling data

25.2.1 Definition (COUPDEF)

Programmable couplings
The number of couplings can be programmed as often as desired depending on the axes available. This number results
from the number of axes/spindles less one for the master. Furthermore, one coupling can also be configured via machine
data as in earlier SW versions.

Permanently configured coupling


The coupling characteristics and transformation ratio for a permanently configured synchronous spindle coupling can be
altered by the NC part program provided that they are not write-protected. The machine axes for the coupled-motion spindle
and leading spindle cannot be changed.

Define new couplings


Language command "COUPDEF" can be used to create new synchronous spindle couplings (user-defined) and to modify the
parameters for existing couplings.
When the coupling parameters are fully specified, the following applies:
COUPDEF(coupled-motion spindle, leading spindle, Tnumerator, Tdenominator, block change behavior, coupling type)
The synchronous spindle coupling is unambiguously defined with the coupled-motion spindle and leading spindle.

Function Manual
244 6FC5397-7EP40-0BA4, 07/2018
The other coupling parameters must only be programmed when they need to be changed. The last valid status remains
applicable for non-specified parameters.
The individual coupling parameters are explained below:
● coupled-motion spindle, leading spindle: Spindle name for coupled-motion and leading spindles
For example: S1, SPI(1), S2, SPI(2)
The valid spindle number must be assigned in the axis-specific MD35000 $MA_SPIND_ASSIGN_TO_MACHAX of a
machine axis.
● Tnumerator, Tdenominator: Transformation ratio parameters for numerator and denominator
The transformation ratio is specified in the form of numeric values for numerator and denominator (see Section
"Synchronous mode (Page 234)").
The numerator must always be programmed. If no denominator is specified, then its value is always assumed to be "1.0".
● Block change behavior
This parameter allows you to select when the block change should take place when synchronous operation is selected:
NOC: Block change is enabled immediately
FINE: Block change in response to "fine synchronism"
COARSE: Block change in response to "coarse synchronism"
IPOSTOP: Block change for IPOSTOP (that is, after setpoint-end synchronism)
The block change response is specified as a character string (that is, with quotation marks).
The block change response can be specified simply by writing the letters in bold print. The remaining letters can be entered
to improve legibility of the part program but they are not otherwise significant.
If no block change response is specified, then the currently selected response continues to apply.
With the programmable synchronism test markers WAITC, the replacement with new blocks is delayed until the
parameterized synchronism is reached.
● Coupling type
DV (Desired Values): Setpoint coupling between the coupled-motion spindle and the leading spindle
AV (Actual Values): Actual value coupling between the coupled-motion spindle and the leading spindle
VV (Velocity Values): Speed coupling between the coupled-motion spindle and the leading spindle
If no coupling type is specified, then the currently selected type continues to apply.

Note
The coupling type may only be changed when synchronous operation is deactivated!

Examples
COUPDEF (SPI(2), SPI(1), 1.0, 1.0, "FINE", "DV")
COUPDEF (S2, S1, 1.0, 4.0)
COUPDEF (S2, SPI(1), 1.0)

Default settings
The following default settings apply to user-defined couplings:
● ÜNumerator=1.0
● ÜDenominator =1.0
● Block change response = IPOSTOP (block change enabled with setpoint synchronism)
● Type of coupling = DV (setpoint coupling)

Delete couplings
Language command "COUPDEL" is used to delete user-defined couplings.
COUPDEL (coupled-motion spindle, leading spindle)
Function Manual
6FC5397-7EP40-0BA4, 07/2018 245
Note
COUPDEL impacts on an active coupling, deactivates it and deletes the coupling data. Alarm 16797 is therefore meaningless.
The coupled-motion spindle adopts the last speed. This corresponds to the behavior associated with COUPOF(coupled-motion
spindle, leading spindle).

Activate original coupling parameters


Language command "COUPRES" can be used to re-activate the configured coupling parameters.
COUPRES (coupled-motion spindle, leading spindle)
The parameters modified using COUPDEF (including the transformation ratio) are subsequently deleted.
Language command "COUPRES" activates the parameters stored in the machine and setting data (configured coupling) and
activates the default settings (user-defined coupling).

Programmable block change


It is possible to mark a point in the NC program using the "WAITC" language command. The system waits at this point for
fulfillment of the synchronism conditions for the specified coupled-motion spindle and delays changes to new blocks until the
specified state of synchronism is reached (see "Monitoring of synchronous operation (Page 243)").
WAITC (coupled-motion spindle)
Advantage: The time between activating the synchronous coupling and reaching synchronism can be used in a meaningful
way, technologically speaking.

Note
Basically, it is always possible to write WAITC. If the spindle indicated is not active as coupled-motion spindle, the command
for this spindle is without effect.

If no synchronism condition is indicated, the check is always performed for the synchronism condition
programmed/configured on the respective coupling, at least for the setpoint synchronism.
Examples:
WAITC(S2),
:
WAITC(S2, "Fine"),
:
WAITC(S2, ,S4, "Fine")

Stop and block change


If "Stop" has been activated for the cancellation period of the axis enables for the leading or coupled-motion spindle, then
the last setpoint positions with the setting of the axis enables from the servo drive are approached again.
Commands COUPON and WAITC can influence the block change behavior. The block change criterion is defined using
COUPDEF or via the MD21320 $MC_COUPLE_BLOCK_CHANGE_CTRL_1.

25.2.2 Switch the coupling (COUPON, COUPONC, COUPOF) on and off

Activate synchronous mode


Language command COUPON is used to activate couplings and synchronous mode.
Two methods by which synchronous operation can be activated are available:
1. COUPON(coupled-motion spindle, leading spindle)
Fastest possible activation of synchronous operation with any angular reference between the leading and coupled-
motion spindles.
2. COUPON(coupled-motion spindle, leading spindle, POSCS)
Activation of synchronous operation with a defined angular offset POSCS between the leading and coupled-motion
spindles. This offset is referred to the zero degrees position of the leading spindle in a positive direction of rotation. The
block change is enabled according to the defined setting. Range of POSCS: 0 ... 359.999 degrees.

Function Manual
246 6FC5397-7EP40-0BA4, 07/2018
3. COUPONC(coupled-motion spindle, leading spindle)
When activating with COUPONC, the previous programming of M3 S... or M4 S... is adopted. A difference in speed is
transferred immediately. An offset position cannot be programmed.
By programming COUPON(coupled-motion spindle, leading spindle, POSCS) or SPOS when synchronous operation is already
active, the angular offset between the coupled-motion spindle and the leading spindle can be changed.

Deactivate synchronous mode


The following method can be selected to deactivate synchronous mode:
● COUPOF(coupled-motion spindle, leading spindle)
Fastest possible deactivation of synchronous operation. The block change is enabled immediately.
If continuous path control (G64) is programmed, a non-modal stop is generated internally in the control.
Examples:
COUPDEF (S2, S1, 1.0, 1.0, "FINE, "DV")
:
COUPON (S2, S1, 150)
:
COUPOF (S2, S1, 0)
:
COUPDEL (S2, S1)
1. COUPOFS(coupled-motion spindle, leading spindle)
Deactivating a coupling with stop of the coupled-motion spindle. Block change is performed as quickly as possible with
immediate block change.
2. COUPOFS(coupled-motion spindle, leading spindle, POSCS)
After the programmed deactivation position that refers to the machine coordinate system has been crossed, the block
change is not enabled until the deactivation positions POSCS have been crossed.
Value range 0 ... 359.999°.

25.2.3 Axial system variables for synchronous spindle

Determining current coupling status


The current coupling status of the coupled-motion spindle can be read in the NC part program with the following axial system
variable:
$AA_COUP_ACT[<axial expression>]
For explanation of <axial expression>, see Section "Synchronous mode (Page 234)".
Example:
$AA_COUP_ACT[S2]
The value read has the following significance for the coupled-motion spindle:
Value = 0: No coupling active
Value = 4: Synchronous spindle coupling active

Read current angular offset


The current position offset between the coupled-motion spindle and the leading spindle can be read in the NC part program
by means of the following axial system variables:
● Setpoint-based position offset between the coupled-motion spindle and the leading spindle:
$AA_COUP_OFFS[<axial expression>]
● Actual-value-based position offset between the coupled-motion spindle and the leading spindle:
$VA_COUP_OFFS[<axial expression>]
Example:
$AA_COUP_OFFS[S2]
If an angular offset is programmed with COUPON, this coincides with the value read after reading the setpoint synchronization.

Function Manual
6FC5397-7EP40-0BA4, 07/2018 247
Reading the programmed angular offset
The position offset last programmed between the coupled-motion spindle and the leading spindle can be read in the NC part
program by means of the following axial system variables:
$P_COUP_OFFS[<axial expression>]

Note
After cancellation of the servo enable signal when synchronous operation and follow-up mode are active, the position offset
applied when the controller is enabled again is different to the originally programmed value.
$P_COUP_OFFS only returns the value originally programmed. $AA_COUP_OFFS and $VA_COUP_OFFS return the
current value. The programmed offset can be recreated with NST DB380x.DBX5007.4 (resynchronization).

25.2.4 Automatic selection and deselection of position control

Behavior in speed control mode


In DV coupling mode, program instructions COUPON, COUPONC and COUPOF, COUPOFS are used to activate and/or deactivate
position control for the leading spindle as required. If there are several coupled-motion spindles on the leading spindle, then
in speed-controlled mode, the first DV activates coupling position control for the leading spindle and the last DV coupling
deactivates coupling position control for the leading spindle if SPCON is not programmed.
The leading spindle does not need to be located in the same channel as the coupled-motion spindle.

Automatic selection with COUPON and COUPONC


Depending on the coupling type, the effect of COUPON and COUPONC on the position control for synchronous operation is as
follows:
Coupling type DV AV VV
Coupled-motion spindle Position control ON Position control ON No action
Leading spindle Position control On 1 No action No action
1The position control is activated by a COUPON and COUPONC instruction if at least one coupled-motion spindle has been
coupled to it with coupling type DV.

Automatic deselection with COUPOF and COUPOFS


Depending on the coupling type, the effect of COUPOF and COUPOFS on the position control is as follows:
Coupling type DV AV VV
Coupled-motion spindle Position control OFF 2 Position control OFF 2 No action 2
Leading spindle Position control OFF 3 No action No action
2COUPOF and COUPOFS without position specification
Speed control mode is activated for the coupled-motion spindle. Positioning mode is activated with COUPFS with a stop
position. Position control is not deactivated if the coupled-motion spindle was located in position-controlled spindle mode
using SPCON or COUPFS was programmed with position.
3 With COUPOF position control is deactivated if there are no more couplings of the DV coupling type for this leading spindle.

Position control is retained if the leading spindle is in positioning mode or axial mode or was in position-controlled spindle
mode using SPCON.

25.3 Configuration
Note
One synchronous-spindle coupling can be configured for each channel.

Function Manual
248 6FC5397-7EP40-0BA4, 07/2018
The table below gives the machine data required for the configuration.
Number Name: $MC_ Function
MD21300 COUPLE_AXIS_1[<n>] Machine axes of the synchronous-spindle coupling:
• <n> = 0: Machine axis number of the coupled-motion spindle
• <n> = 1: Machine axis number of the leading spindle
Machine axis numbers in accordance with: MD20070
$MC_AXCONF_MACHAX_USED (machine axes in the channel)
Machine axis numbers == 0: No coupling configured. The following system data
is then not relevant.
Note: The machine axes configured for the synchronous-spindle coupling cannot
be changed using program commands.
MD21320 COUPLE_BLOCK_ Block change release after activating the synchronous operation 1):
CHANGE_CTRL_1 • Immediately
• On reaching "Synchronism fine"
• On reaching "Synchronism coarse"
• On reaching "Synchronism setpoint"
Note: No change protection1), the block change release can be changed with the
COUPDEF command.
MD21310 COUPLING_MODE_1 Coupling type 1):
• Actual value coupling
• Setpoint value coupling
• Speed coupling
Note: No change protection1), the coupling type can be changed for deactivated
coupling with the COUPDEF command.
MD21330 COUPLE_RESET_ Behavior of the synchronous-spindle coupling with regard to NC Start, NC Stop
MODE_1 and Reset.
MD21340 COUPLE_IS_WRITE_ Change protection for coupling
PROT_1
1) See MD21340 $MC_COUPLE_IS_WRITE_PROT_1

The table below gives the setting data required for the configuration.

Number Name: $SC_ Function


SD42300 COUPLE_RATIO_1[<n>] Speed transmission ratio: coupled-motion spindle/leading spindle = numerator /
denominator 1):
• <n> = 0: Numerator (coupled-motion spindle)
• <n> = 1: Denominator (leading spindle)
Note: No change protection1), the transmission ratio can be changed with the
COUPDEF command.
1) See MD21340 $MC_COUPLE_IS_WRITE_PROT_1

25.3.1 Response of the synchronous-spindle coupling for NC Start


The behavior of the synchronous-spindle coupling during NC Start depends on the setting in the following machine data:
Configured synchronous-spindle coupling
Response MD21330 $MC_COUPLE_RESET_MODE_1
Maintain coupling Bit 0 = 0
Deselect coupling Bit 0 = 1
Activate configured data Bit 5 = 1
Switch the coupling on Bit 9 = 1

Function Manual
6FC5397-7EP40-0BA4, 07/2018 249
Programmed synchronous-spindle coupling
Response MD20112 $MC_START_MODE_MASK
Maintain coupling Bit 10 = 0
Deselect coupling Bit 10 = 1

25.3.2 Behavior of the synchronous-spindle coupling for reset


The behavior of the synchronous operation for reset and at program end depends on the setting in the following machine
data:
Configured synchronous-spindle coupling
Response MD21330 MD20110 $MC_RESET_MODE_MASK
$MC_COUPLE_RESET_MODE_1
Maintain coupling Bit 1 = 0 Bit 0 = 1
Deselect coupling Bit 1 = 1 Bit 0 = 1
Activate configured data Bit 6 = 1 Bit 0 = 1
Programmed synchronous-spindle coupling
Response MD20110 $MC_RESET_MODE_MASK
Maintain coupling Bit 0 = 1, Bit 10 = 1
Deselect coupling Bit 0 = 1, Bit 10 = 0

25.4 Points to note


25.4.1 Special features of synchronous mode in general

Control dynamics
When using the setpoint coupling, the position control parameters of the coupled-motion spindle and leading spindle (for
example, KV factor) should be matched with one another. If necessary, different parameter blocks should be activated for
speed control and synchronized mode. The control parameters of the coupled-motion spindle may differ from position control,
feedforward control and parameter block, as also in the uncoupled case, set using MD30455
$MA_MISC_FUNCTION_MASK (see Section "Special points regarding start-up of a synchronous spindle coupling
(Page 259)").

Precontrol
Due to the improved control system dynamic response it provides, feedforward control for the coupled-motion and leading
spindles in synchronous mode is always active.
It can, however, be deselected for the coupled-motion and leading spindles with axis-specific MD32620 $MA_FFW_MODE.
If MD32620 $MA_FFW_MODE is set to zero, there are function limitations. Position control can no longer be activated in
motion with SPCON. SPOS, M19 or SPOSA are therefore not possible. The NC part program cannot deactivate the
feedforward control for the coupled-motion and leading spindles with FFWOF.
The feedforward control mode (speed or torque feedforward control) is defined in axis-specific MD32620 $MA_FFW_MODE
(see also Chapter "Compensation (K3) (Page 113)").

Speed and acceleration limits


The speed and acceleration limits of the spindles operating in synchronous mode are determined by the "weakest" spindle in
the synchronous spindle pair. The current gear stages, the programmed acceleration and, for the leading spindle, the
effective position control status (On/Off) are taken into account for this purpose.
The maximum speed of the leading spindle is calculated internally in the control taking into account the speed ratio and the
spindle limitations of the coupled-motion spindle.

Multiple couplings
If the system detects that a coupling is already active for a coupled-motion or leading spindle when the synchronous mode is
activated, then the activation process is ignored and an alarm message is generated.

Function Manual
250 6FC5397-7EP40-0BA4, 07/2018
Examples of multiple couplings:
● A spindle is acting as the coupled-motion spindle for several leading spindles
● Coupling cascade (a coupled-motion spindle is a leading spindle of an additional coupling)

Number of configurable spindles per channel


Every axis in the channel can be configured as a spindle. The number of axes per channel depends on the control version.

Start synchronous mode using ASUB


When the PLC starts an ASUB, in the "AUTO" or "MDI" modes, synchronous operation can be switched on and off – or
terminated.
For more information, see Chapter "Operating modes, program operation (K1) (Page 87)".

Response to alarms
In the case of an alarm, which occurs during synchronous operation, and acts as alarm response "withdraw control enable"
and "activate follow-up mode" in the control, the ongoing control behavior is the same as the behavior due to NC/PLC
interface signals:
● DB380x.DBX2.1 = 0 (controller enable)
● DB380x.DBX1.4 = 1 (follow-up mode)
(See Section "Synchronous mode and NC/PLC interface signals (Page 253)")
By resynchronizing via the NC/PLC interface signal:
DB380x.DBX5007.4 = 0 → 1 (resynchronization)
If the programmed offset is restored (see Section "Restore synchronism of the coupled-motion spindle (Page 251)").

Block search when synchronous operation is active

Note
When synchronous operation is active for a block search, then it is recommended that only block search type 5, "block
search via program test" (SERUPRO), is used.

25.4.2 Restore synchronism of the coupled-motion spindle

Causes for a positional offset


When the coupling is reactivated after the drive enable signals have been canceled, a positional offset can occur between
the leading and coupled-motion spindles if follow-up mode is activated. A positional offset can be caused by:
● A part has been clamped or both spindles have been turned manually (machine area is open, drives are disconnected
from supply).
● After the spindle enable signals are canceled, the two spindles coast to standstill at different speeds if they are not
mechanically coupled.
● A drive alarm occurs (internal follow-up mode):
DB390x.DBX1.3 (follow-up mode active) = 1
When the alarm is cleared, the NC must not trigger any synchronization motion.
● A synchronization was not executed due to a synchronization lock of the coupled-motion spindle:
DB380x.DBX5007.5 (disable synchronization)

Basic procedure
If the coupled-motion and leading spindles have fallen out of synchronism, or failed to synchronize at all, synchronism can
be restored between them by the following measures:
1. Set the axis enable signals and cancel synchronization disable signal if this has been set.
2. Start coupled-motion spindle resynchronization with the NC/PLC interface signal:
DB380x.DBX5007.4 (resynchronization)

Function Manual
6FC5397-7EP40-0BA4, 07/2018 251
Only after the resynchronization process is complete can the setpoint-end synchronism be fully restored.
3. Wait until the coupled spindles have synchronized.

Enable resynchronization
Setting the enabling signals closes the coupling at the current actual positions. The two following NC/PLC interface signals
are set:
DB390x.DBX5002.1 (coarse synchronism)
DB390x.DBX5002.0 (fine synchronism)
The following requirements must be fulfilled for resynchronization to work:
● The axis enabling signal must be set for the coupled-motion spindle.
● The PLC must not set any synchronization disables for the coupled-motion spindle:
DB380x.DBX5007.5 (disable synchronization)

Resynchronize coupled-motion spindle


Resynchronization is started for the relevant coupled-motion spindle and commences as soon as the low-high edge of
following interface signal is detected:
DB380x.DBX5007.4 (resynchronization)
The NC acknowledges the detection of the edge by outputting the NC/PLC interface signal:
DB390x.DBX5003.4 (synchronization running)
The interface signal "Synchronization running" is reset if:
● synchronization of the coupled-motion spindle has been completed up to the stage at which there is synchronism at the
setpoint end.
● the NST DB380x.DBX5007.4 (resynchronization) was reset.

Response of synchronous signals during additional movements for the coupled-motion spindle
The superimposed component is calculated to establish the synchronism signals.

Example
Program code Comment
N51 SPOS=0 SPOS[2]=90
N52 OUPDEF(S2,S1,1,1,"FINE","DV")
N53 COUPON(S2,S1,77)
N54 M0 ; Offset=77°, "coarse", "fine" synchronous run
signals exist.
N55 SPOS[2]=0 FA[S2]=3600 ; Difference in speed, synchronism signals
"coarse", "fine" are reported
N56 M0 ; (note tolerances, see above)
; Offset=0°, "coarse", "fine" synchronous run
signals exist.
N60 M2=3 S2=500 ; difference in speed, synchronism signals
"coarse", "fine" are reported.
; offset undefined, synchronism signals
"coarse", "fine" are reported.
N65 M0 ; (Note tolerances, see above)

Note
The axis enable signals can be canceled to interrupt a movement overlaid on the coupled-motion spindle (for example,
SPOS). This component of the movement is not affected by IS "NC/PLC interface signal" DB380x.DBX5007.4
(resynchronization), but is restored by the REPOS operation.

Supplementary condition
IS DB380x.DBX5007.4 (resynchronization) has any effect only if there is a defined offset position between the coupled-
motion spindle and leading spindle.

Function Manual
252 6FC5397-7EP40-0BA4, 07/2018
This is the case following COUPON with offset positions such as COUPON(...,77) or SPOS, SPOSA, M19 for the coupled-motion
spindle with a closed coupling..

25.4.3 Synchronous mode and NC/PLC interface signals


Note
During synchronous operation, the effect of the associated interface signal for the leading spindle (LS) or coupled-motion
spindle (CS) on the coupling must always be considered.

Spindle override (DB380x.DBB2003)


Only the spindle override value of the LS is active in synchronous operation.

Spindle disable (DB380x.DBX1.3)


LS CS Coupling Response
0 0 off Setpoints are output
0 1 off No setpoint output for CS
1 0 off No setpoint output for LS
1 1 off No setpoint output for LS and CS
0 0 ON Setpoints are output
0 1 ON Spindle disable not effective for CS
1 0 ON Spindle disable also effective for CS, no setpoint output
1 1 ON No setpoint output for LS and CS

Controller enable (DB380x.DBX2.1)


LS: Resetting the "controller enable" during synchronous operation
If the controller enable of the LS is reset during synchronous operation for active setpoint coupling, a control-internal
switching is made to the actual value coupling. If the controller enable is reset while the LS is traversing, the LS is stopped
and an alarm issued. Synchronous operation remains active.
LS and CS: Selection of synchronous operation without controller enable
If the "controller enable" for LS and CS is not set for selected synchronous operation, it will be activated. LS and CS,
however, are not traversed until controller enable for LS and CS has been granted.
LS and CS: Setting the "Controller enable"
The position assumed by a spindle with setting the "controller enable" depends on DB380x.DBX1.4 == <value> (follow-up
operation):
<value> Assumed spindle position
0 Position when controller enable is canceled
1 Current position

Note
It is recommended for synchronous spindles during a block search, to write the DB380x.DBX2.1 interface signal (controller
enable) always together for CS and LS. If this is not done, the block search, for example, stops after a CS machining
because the controller enable of the LS is not pending.

Note
Synchronism error
If the DB380x.DBX2.1 interface signal (controller enable) is canceled for the CS after Spindle Stop without the coupling
being deactivated beforehand, then any synchronism error resulting from external intervention will not be compensated
when the "controller enable" is activated again. This causes any programmed angular relationship between CS and LS to be
lost.
The angular relationship can be restored by resynchronizing: DB380x.DBX5007.4 = 1 (resynchronization)

Function Manual
6FC5397-7EP40-0BA4, 07/2018 253
Follow-up mode (DB380x.DBX1.4)
For follow-up operation, the set position is regularly set to the current actual position:
DB380x.DBX1.4 == 1 (follow-up operation) AND DB380x.DBX2.1 == 0 (controller enable)
⇒ Cyclic: Set position = actual position

Note
DB380x.DBX1.4 (follow-up operation) is relevant only for DB380x.DBX2.1 == 0 (controller enable)

Position measuring system 1/2 (DB380x.DBX1.5 and DB380x.DBX1.6)


Switchover of the position measuring system for the CS and LS is possible during synchronous operation. The coupling is
retained.

Note
It is recommended to switchover the position measuring system for CS and LS only for deselected synchronous operation.

Delete distance-to-go / spindle reset (DB380x.DBX2.2)


LS: Setting spindle reset during synchronous operation
The setting of spindle reset causes the LS to be braked to standstill with the parameterized acceleration. Synchronous
operation remains active.
Any superimposed movement, other than together with COUPON / COUPONC, will be completed as fast as possible.

Spindle stop (feed stop) (DB380x.DBX4.3)


LS and CS: Setting spindle stop during synchronous operation
The setting of "spindle stop" for CS or LS causes both spindles to be braked synchronous to standstill. Synchronous
operation remains active.
Resetting spindle stop
Once "spindle stop" has been reset for both spindles, reacceleration is made to the last valid speed setpoint.
Application example
Bring CS and LS to a standstill when a protection door is opened during synchronous operation.
Signal characteristic for LS and CS:
1. Stop: DB380x.DBX4.3 = 1 (spindle stop)
2. Waiting for standstill: DB390x.DBX1.4 == 1
3. Stopping: DB380x.DBX2.1 = 0 (controller enable)

Delete S value (DB380x.DBX2000.7)


LS: Delete S value during synchronous operation
If "delete S value" is set, the LS is braked to a standstill using a ramp. Synchronous operation remains active.
CS: Delete S value during synchronous operation
The control interface signal does not have any function for the CS in synchronous operation.

Resynchronize spindle 1/2 (DB380x.DBX2000.4 and DB380x.DBX2000.5)


LS: Resynchronizing the position measuring system during synchronous operation

Note
It is recommended to resynchronize the position measuring system of the LS only for deselected synchronous operation.

Function Manual
254 6FC5397-7EP40-0BA4, 07/2018
Resynchronize (DB380x.DBX5007.4)
CS: Restoring the programmed angular offset
If synchronism between CS and LS is lost or not performed, the programmed angular offset can be restored.
● Requirement: DB380x.DBX5007.4 = 1 (resynchronization)
● Acknowledgment: DB380x.DBX5003.4 == 1 (synchronization running)

Traverse keys for JOG (DB380x.DBX4.6 and DB380x.DBX4.7)


The "plus and minus traversing keys" for JOG are not disabled in the control for the CS in synchronous operation, that is, the
CS executes a superimposed motion if one of these keys is pressed.

Note
If superimposed traversing movements are to be precluded, they must be locked out by measures in the PLC user program.

NC Stop axes plus spindles (DB3200.DBX7.4)


"NC Stop axes plus spindles" in synchronous operation decelerates the coupled spindles in accordance with the selected
dynamic response. They continue to operate in synchronous mode.

NC Start (DB3200.DBX7.1)
(See Section "Response of the synchronous-spindle coupling for NC Start (Page 249)")

Note
NC Start after NC Stop does not deselect synchronous operation.

25.4.4 Differential speed between leading and coupled-motion spindles

When does a differential speed occur?


A differential speed develops, e.g. with turning machine applications, when two spindles oppose one other. Through the
signed addition of two speed sources, a speed component is derived from the leading spindle via the coupling factor. In
addition to this, for the coupled-motion spindle a speed (S...) and a direction of rotation (M3/M4) can be programmed.
Generally, to achieve synchronous operation, a coupling factor is used with a value of '-1'. This sign reversal then results in a
differential speed for the coupled-motion spindle as compared to an additional programmed speed.
This typical behavior in relation to the NC is illustrated in the following diagram.

Function Manual
6FC5397-7EP40-0BA4, 07/2018 255
Example

Program code Comment


N01 M3 S500 ; S1 rotates in the positive direction with 500 rpm
; the master spindle is spindle 1
N02 M2=3 S2=300 ; S2 rotates in the positive direction with 300 rpm
N05 G4 F1
N10 COUPDEF(S2,S1,-1) ; Coupling factor -1:1
N11 COUPON(S2,S1) ; Activate coupling. The speed of the coupled-motion spindle S2
results from the speed of the leading spindle S1 and the coupling
factor.
N26 M2=3 S2=100 ; Programming the differential speed, S2 is the coupled-motion
spindle.
Application
Manufacturing operations with positioned leading spindle and rotating tools require exact synchronism with the counter
spindle which then functions like a coupled-motion spindle. A turret rotating about the coupled-motion spindle allows parts to
be machined with different tool types.
The following diagram shows an application in which the tool is positioned parallel to the main spindle.

Function Manual
256 6FC5397-7EP40-0BA4, 07/2018
Preconditions
Basic requirements for differential speed programming:
● Synchronous spindle functionality is required.
● The dynamic response of the coupled-motion spindle must be at least as high as that of the leading spindle. Otherwise,
the system may suffer from reduced quality, for example, rigid tapping without a compensating chuck G331/G332.
● The differential speed must be programmed in the channel in which the coupled-motion spindle is also configured. The
leading spindle can be programmed in a different channel.
● The differential speed must be enabled for the coupled-motion spindle by the PLC via IS "enable overlaid movement"
(DB380x.DBX5002.4). If the enable signal has not been set, alarm 16771 "Channel% Following axis% Overlaid
movement not enabled" is output. This alarm is cleared when IS "enable overlaid movement" (DB380x.DBX5002.4) is set
or the coupling is opened.

Note
Positioning motion such as SPOS, SPOSA, M19 and axis motion do not have to be enabled.

Note
The differential speed does not therefore affect the coupling process.
The coupled-motion or leading spindle cannot change gear stages while a coupling is active.

Activate coupling with COUPONC


When the coupling is activated, the coupled-motion spindle is accelerated, as before, to the leading spindle speed through
application of the coupling factor. If the coupled-motion spindle is already rotating (M3, M4) when the coupling is activated, it
continues with this motion after coupling.

Deactivate coupling
If the coupling is deactivated, the coupled-motion spindle continues to rotate at the speed corresponding to the sum of both
speed components. The spindle behaves as if it had been programmed with the speed and direction transferred from the
other spindle. When deactivating, there are no differences to the previous behavior.

Differential speed
A differential speed results from the renewed programming of the coupled-motion spindle (in the example, S2=...) or M2=3,
M2=4 in speed control mode during an active synchronous spindle coupling or by adopting the speed of the coupled-motion
spindle for COUPONC.
Condition:
Speed S... must also be re-programmed with direction of rotation M3 or M4. Otherwise alarm 16111 "Channel% Block%
Spindle% No speed programmed" is displayed.

Read offsets of coupled-motion spindle


The current offset always changes when a differential speed is programmed. The current offset can be read at the setpoint
end with $AA_COUP_OFFS[Sn] and at the actual value end with $VA_COUP_OFFS[Sn].
The last offset programmed returns the variable $P_COUP_OFFS[Sn].

Display differential speed


The programmed difference component is displayed as the speed setpoint for the programmed differential speed (in our
example, corresponds to 100 rpm).
The actual speed refers to the motor speed. In the example, the actual speed is 500 rev/min * (-1) + 100 rpm = -400 rev/min.

IS, NC to the PLC


Coupled-motion spindle in speed-controlled operation
The IS "spindle in setpoint range" (DB390x.DBX2001.5) is set for the coupled-motion spindle by the NC if the programmed
speed difference (see previous example, N26 with M2=3 S2=100) is reached. If a differential speed is programmed and not
enabled by the PLC, this VDI interface signal is not set.

Function Manual
6FC5397-7EP40-0BA4, 07/2018 257
Even if a differential speed has been programmed, the coupled-motion spindle remains under position control if this is
required by the coupling.

Note
The axial VDI interface signal NC → PLC IS "Superimposed motion" (DB390x.DBX5002.4) is set when the differential speed
programming creates setpoints in addition to the coupling setpoints.

Actual direction of rotation clockwise (DB390x.DBX2001.7)


IS "Actual direction of rotation clockwise" (DB390x.DBX2001.7) refers to the resulting motor direction.

IS PLC to the NC
Influence on coupled-motion spindle via PLC interface
The effect of the axial VDI interface signals on the coupled-motion spindle with differential speed in speed control mode is
described below:

Delete distance to go / Spindle Reset (DB380x.DBX2.2)


The programmed differential speed and direction can be terminated by IS "delete distance-to-go / Spindle Reset"
(DB380x.DBX2.2). To delete the programmed speed only, it is possible to set IS "delete S value" (DB380x.DBX2000.7).

Resynchronize spindle 1/2 (DB380x.DBX2000.4 and DB380x.2000.5)


The IS "resynchronize spindle 1/2" (DB380x.DBX2000.4/DB380x.2000.5) are not locked. Any positional offset is not
compensated automatically by the coupling.

Invert M3/M4 (DB380x.DBX2001.6)


IS "invert M3/M4" (DB380x.DBX2001.6) only inverts the additional programmed speed component for the coupled-motion
spindle.
The motion component generated by the synchronous spindle coupling remains unaffected.

Spindle override (DB380x.DBB2003)


The "Spindle override" VDI interface (DB380x.DBB2003) only affects the additional programmed speed component for the
coupled-motion spindle. If the spindle override switch is transferred to all axial inputs, then any change in the spindle
override value is applied twice to the coupled-motion spindle:
● once indirectly by a change in speed for the leading spindle and
● once in the programmed component of the coupled-motion spindle.
The offset value can be adjusted accordingly in the PLC program.

Deselecting the coupling


If the coupling is deactivated, the coupled-motion spindle continues to rotate at the speed corresponding to the sum of both
speed components. The motion transition upon coupling deselection is at continuous speed.
With COUPOF , the spindle behaves as if it had been programmed with the speed and direction transferred from the other
spindle. In the example, this would be M4 S400.
When COUPOFS is programmed, the coupled-motion spindle is decelerated to standstill from the current speed.

Activate additional functions


The coupled-motion spindle can also be a master spindle. In this case, it is capable of additional functions.
● Rotational feedrate with G95, G96 and G97. With G96 S2=... the "constant cutting speed" can be activated for the
coupled-motion spindle.
The speed dependent on the position of the transverse axis is the setpoint speed for the speed interpolator of spindle 2
and is therefore included in the total speed of S2.
● Rigid tapping without compensating chuck with G331, G332.

Function Manual
258 6FC5397-7EP40-0BA4, 07/2018
25.4.5 Behavior of synchronism signals during synchronism correction

Effect of synchronism correction


New synchronism signals are produced by comparing the actual values with the corrected setpoints. Once a correction
process has been undertaken, the synchronism signals should be present again.

25.4.6 Delete synchronism correction and NC reset


Variable $AA_COUP_CORR[Sn] returns the value zero for different situations in which the synchronism correct is deleted:
● Once a synchronized spindle coupling has been activated for the following in question with COUPON(..)/COUPONC(..), an
existing synchronism correction is adopted in the setpoint position.
● A synchronism correction active during NC reset but not at the parts program end is adopted in the setpoint position. This
does not affect the synchronism signals.
● At M30, an existing synchronism correction is retained
● At the user end, the correction value can also be deleted at any early point by describing the variable $AA_COUP_CORR
with the value zero. The synchronism correction is removed immediately and using a ramp with reduced acceleration
rate if larger values are involved.

25.4.7 Special points regarding start-up of a synchronous spindle coupling

Spindle start-up
The leading and coupled-motion spindles must be started up initially like a normal spindle. For more information about the
appropriate procedure, see Chapter "Spindle (S1) (Page 166)".

Requirements
The following parameters must then be set for the synchronous spindle pair:
● The machine numbers for the leading and coupled-motion spindles
(for permanently configured coupling with channel-specific machine data MD21300 $MC_COUPLE_AXIS_1[n])
● The required coupling mode (setpoint, actual value or speed coupling)
(for permanently configured coupling with channel-specific machine data MD21310 $MC_COUPLING_MODE_1[n])
● The gear stage(s) of the coupled-motion spindle and leading spindle for synchronous operation
● The following coupling properties are still applicable for permanently configured synchronous spindle coupling:
– Block change response in synchronous spindle operation:
MD21320 $MC_COUPLE_BLOCK_CHANGE_CTRL_1
– Coupling cancellation response:
MD21330 $MC_COUPLE_RESET_MODE_1
– Write-protection for coupling parameters:
MD21340 $MC_COUPLE_IS_WRITE_PROT_1
– Transformation parameters for synchronous spindle coupling:
SD42300 $SC_COUPLE_RATIO_1[n]

Command behavior of the coupled-motion and leading spindles for setpoint coupling
In order to obtain the best possible synchronism in setpoint couplings, the coupled-motion and leading spindles must have
the same dynamic response as the response to setpoint changes. The axial control loops (position, speed and current
controllers) should each be set to the optimum value so that variances can be eliminated as quickly and efficiently as
possible.
The dynamic response adaptation function in the setpoint branch is provided to adapt different axis dynamic responses
without loss of control quality (see also Chapter "Compensation (K3) (Page 113)"). The following control parameters must
each be set optimally for the coupled-motion and leading spindles:
● KV factor (MD32200 $MA_POSCTRL_GAIN)

Function Manual
6FC5397-7EP40-0BA4, 07/2018 259
● Feedforward control parameters
MD32620 $MA_FFW_MODE
MD32610 $MA_VELO_FFW_WEIGHT
MD32650 $MA_AX_INERTIA
MD32800 $MA_EQUIV_CURRCTRL_TIME
MD32810 $MA_EQUIV_SPEEDCTRL_TIME
Behavior during loss of synchronism:
● Axis-specific MD32620 $MA_FFW_MODE
We recommend setting the feedforward control mode of the coupled-motion axis to speed feedforward control with Tt
symmetrization MD32620 = 3.
This feedforward control mode can be further optimized for a more secure symmetrization process by changing the axis-
specific machine data:
Machine data Meaning
MD32810 EQUIV_SPEEDCTRL_TIME Equivalent time constant speed control loop for feedforward
control
MD37200 COUPLE_POS_TOL_COURSE Threshold value for "coarse synchronism"
MD37210 COUPLE_POS_TOL_FINE Threshold value for "fine synchronism"
MD37220 COUPLE_VELO_TOL_COURSE Velocity tolerance 'coarse'
MD37220 COUPLE_VELO_TOL_FINE Velocity tolerance 'fine'
In such cases, higher threshold values for the synchronism signals and larger position and/or speed tolerances result in
more stable results.

Dynamic response adaptation


To obtain a good control behavior, the coupled-motion and leading spindles must have the same dynamic response. The
following error for the coupled-motion and leading spindles must be equal at any given speed. For dynamically different
spindles, a matching via the dynamic response adaptation can be achieved in the setpoint branch. The difference of the
equivalent time constants between the dynamic "weakest" spindle to the associated other spindle must be entered as time
constant of the dynamic response adaptation.
Example
When the speed feedforward control is active, the dynamic response is primarily determined by the equivalent time constant
of the "slowest" speed control loop.
● Equivalent time constant leading spindle: MD32810 $MA_EQUIV_SPEEDCTRL_TIME[<leading spindle>] = 5 ms
● Equivalent time constant coupled-motion spindle: MD32810 $MA_EQUIV_SPEEDCTRL_TIME[<coupled-motion spindle>]
= 3 ms
● Time constant of dynamic response adaptation for the coupled-motion spindle: MD32910
$MA_DYN_MATCH_TIME[<coupled-motion spindle>] = 5 ms - 3 ms = 2 ms
● Activation of the dynamic response adaptation for the coupled-motion spindle: MD32900
$MA_DYN_MATCH_ENABLE[<coupled-motion spindle>] = 1
The following error for the coupled-motion and leading spindles is identical for correctly set dynamic response adaptation:
alarm operating area >
For the optimization, it may be necessary to adjust servo gain factors or feedforward control parameters slightly.

Position control parameter sets


In the case of spindles, each gear stage is assigned a position-control parameter set. These parameter sets can be used to
adapt the dynamic response for the coupled-motion and leading spindles in synchronous operation. This requires that a
different gear stage is used for speed and positioning operation and synchronous operation. The associated gear stage must
be switched before activating the associated operating mode.
Control parameters
The following control parameters must be set identically for the coupled-motion and leading spindles:
● MD33000 $MA_FIPO_TYPE (fine interpolator type)

Function Manual
260 6FC5397-7EP40-0BA4, 07/2018
● MD32400 $MA_AX_JERK_ENABLE (axial jerk limitation)
● MD32402 $MA_AX_JERK_MODE (filter type for axial jerk limitation)
● MD32410 $MA_AX_JERK_TIME (time constant for the axial jerk filter)
● MD32412 $MA_AX_JERK_FREQ (blocking frequency of the axial jerk filter)
● MD32414 $MA_AX_JERK_DAMP (damping of the axial jerk filter)
● MD32420 $MA_JOG_AND_POS_JERK_ENABLE (release jerk limitation)
● MD32430 $MA_JOG_AND_POS_MAX_JERK (axial jerk)
Coupled-motion spindle: Automatic parameterization of the control parameters
The control parameters of the coupled-motion spindle can be set as follows using this machine data:
MD30455 $MA_MISC_FUNCTION_MASK
Bit 5=0: Synchronous spindle coupling, coupled-motion spindle:
Position control, feedforward control and parameter block are set for the coupled-motion spindle.
Bit 5=1: Synchronous spindle coupling:
The control parameters of the coupled-motion spindle are set as in an uncoupled scenario.

Automatic transfer of the leading spindle parameters for synchronous operation


For the automatic dynamic response adaptation for the coupled-motion and leading spindles, for synchronous operation, the
parameter values for the position control, feedforward control and parameter records of the coupled-motion spindle can be
transferred from the leading spindle:
MD30455 $MA_MISC_FUNCTION_MASK, Bit 5

Separate dynamic response for spindle and axis operations


In spindle and axis operations, dynamic programming FA, OVRA, ACC and VELOLIMA can be set separately from one
another with the following MD:
MD30455 $MA_MISK_FUNCTION_MASK Bit 6=0
Assignment is undertaken by the programmed axis or spindle name. For example, in spindle operation, VELOLIMA[S1]=50
therefore only reduces the maximum speed to 50% and in axis operation, VELOLIMA[C]=50 only reduces the maximum
speed to 50%.
If, for example, VELOLIMA[S1]=50 and VELOLIMA[C]=50 are to have the same effect as before with this machine data, the
programming of FA, OVRA, ACC and VELOLIM have an effect regardless of the programmed names:
MD30455 $MA_MISK_FUNCTION_MASK Bit 6=1

Knee-shaped acceleration characteristic


For the leading spindle, the effect of a knee-shaped acceleration characteristic on the coupled-motion spindle is identified by
the following axis-specific machine data:
● MD35220 $MA_ACCEL_REDUCTION_SPEED_POINT (speed for reduced acceleration) and
● MD35230 $MA_ACCEL_REDUCTION_FACTOR (reduced acceleration).
If MD35242 $MA_ACCEL_REDUCTION_TYPE is present, it is also used to configure the type of acceleration reduction.
Otherwise a hyperbolic drop in acceleration is assumed.
If the dynamic response of a coupled-motion spindle is lower than that of the leading spindle when the coupling factor is
taken into account, the leading spindle dynamic response is reduced to the required level while the coupling is active.
The acceleration should be constant over the entire speed range for the coupled-motion spindle. However, if a knee-shaped
acceleration characteristic is also stored in the above-mentioned machine data for the coupled-motion spindle, this is only
taken into account when the spindles are coupled in. The setpoints of the coupled-motion spindle are applied for the
specified knee-shaped acceleration characteristic.
For more information, see Chapter "Acceleration (B2) (Page 42)".

Function Manual
6FC5397-7EP40-0BA4, 07/2018 261
Actual value coupling
In an actual value coupling (AV), the drive for the coupled-motion spindle must be considerably more dynamic than the
leading spindle drive. The individual drives in an actual value coupling are also set optimally according to their dynamic
response.
An actual value coupling should only be used in exceptional cases.

Speed coupling
The velocity coupling (VV) corresponds internally to a setpoint coupling (DV), but with lower dynamic requirements of the
coupled-motion and leading spindles. A position control servo loop is not required for the coupled-motion spindle and/or
leading spindle. Measuring systems are not required.

Threshold values for coarse/fine synchronism


After controller optimization and feedforward control setting, the threshold values for coarse and fine synchronism must be
entered for the coupled-motion spindle.
● Threshold value for "coarse synchronism"
axis-specific MD7200: AV, DV: COUPLE_POS_TOL_COARSE
MD37220: VV: COUPLE_VELO_TOL_COARSE
● Threshold value for "fine synchronism"
axis-specific MD37210: AV, DV: COUPLE_POS_TOL_FINE
MD37230: VV: COUPLE_VELO_TOL_FINE
The values of the coupled-motion spindle must be calculated according to the accuracy requirements of the machine
manufacturer, and the PLC interface must be checked via the service display.

Angular offset coupled-motion/leading spindle


If there must be a defined angular offset between the coupled-motion spindle and the leading spindle, for example, when
synchronous operation is activated, the "zero degree positions" of the coupled-motion and leading spindles must be mutually
adapted. This can be done with the following machine data:
● MD34100 $MA_REFP_SET_POS
● MD34080 $MA_REFP_MOVE_DIST
● MD34090 $MA_REFP_ MOVE_DIST_CORR
For more information, see Chapter "Reference point approach (R1) (Page 160)".

Service display for the coupled-motion spindle


In the alarm operating area, when commissioning in the synchronous mode, the following values are displayed for the
coupled-motion spindle:
● Actual deviation between setpoints of the coupled-motion and leading spindles
Value displayed: Position offset in relation to leading spindle (setpoint)
(value corresponds to angular offset between the coupled-motion spindle and the leading spindle that can be read with
axis variable $AA_COUP_OFFS in the part program)
● Actual deviation between actual values of the coupled-motion and leading spindles
Value displayed: Position offset in relation to leading spindle (actual value)

25.5 Boundary conditions


Availability of the "synchronous spindle" function
The function is an option ("Generic Coupling 'CP-BASIC'"), which must be assigned to the hardware via the license
management.

Note
For more information about the different versions of the generic coupling, see Chapter "Axis couplings (M3) (Page 62)".

Function Manual
262 6FC5397-7EP40-0BA4, 07/2018
25.6 Examples
Programming example
Program code Comment
; Leading spindle = master spindle = spindle 1
; Coupled-motion spindle = spindle 2
N05 M3 S3000 M2=4 S2=500 ; Master spindle rotates at 3000 rpm
; Coupled-motion spindle: 500 rpm
N10 COUPDEF (S2, S1, 1, 1, "No", "Dv") ; Def. of coupling, can also
; be configured
N70 SPCON ; Include leading spindle in the position control
; (setpoint value coupling).
N75 SPCON(2) ; Bring coupled-motion spindle into closed-loop posi-
tion control
N80 COUPON (S2, S1, 45) ; On-the-fly coupling to offset position = 45 degrees
N200 FA [S2] = 100 ; Positioning speed = 100 degrees/min
N205 SPOS[2] = IC(-90) ; Traverse with 90° overlay in negative direction
N210 WAITC(S2, "Fine") ; Wait for "fine" synchronism
N212 G1 X.., Y.. F... ; Machining
N215 SPOS[2] = IC(180) ; Traverse with 180° overlay in positive direction
N220 G4 S50 ; Dwell time = 50 revolutions
; of master spindle
N225 FA [S2] = 0 ; Activate configured velocity (MD)
N230 SPOS[2] = IC (-7200) ; 20 rev. with configured velocity
; in neg. direction
N350 COUPOF (S2, S1) ; On-the-fly decoupling, S = S2 = 3000
N355 SPOSA[2] = 0 ; Stop the coupled-motion spindle at zero degrees
N360 G0 X0 Y0
N365 WAITS(2) ; Wait for spindle 2
N370 M5 ; Stop the coupled-motion spindle
N375 M30

25.7 Data table


25.7.1 Machine data
Number Identifier Name
NC-specific
10000 AXCONF_MACHAX_NAME_TAB Machine axis name
Channel-specific
20070 AXCONF_MACHAX_USED Machine axis number valid in channel
21300 COUPLE_AXIS_1 Definition of synchronous spindle pair
21310 COUPLING_MODE_1 Type of coupling in synchronous spindle mode
21320 COUPLE_BLOCK_CHANGE_CTRL_1 Block change behavior in synchronous spindle operation
21330 COUPLE_RESET_MODE_1 Coupling abort behavior
21340 COUPLE_IS_WRITE_PROT_1 Coupling parameters are write-protected
Axis/spindle-specific
30455 MISK_FUNCTION_MASK Axis functions
32200 POSCTRL_GAIN Servo gain factor (KV factor)
32400 AX_JERK_ENABLE Axial jerk limitation
32410 AX_JERK_TIME Time constant for axial jerk filter
32420 JOG_AND_POS_JERK_ENABLE Initial setting for axial jerk limitation
32430 JOG_AND_POS_MAX_JERK Axial jerk
32620 FFW_MODE Feedforward control mode

Function Manual
6FC5397-7EP40-0BA4, 07/2018 263
Number Identifier Name
32810 EQUIV_SPEEDCTRL_TIME Equivalent time constant speed control loop for feedfor-
ward control
34080 REFP_MOVE_DIST Reference point approach distance
34090 REFP_MOVE_DIST_CORR Reference point offset
34100 REFP_SET_POS Reference point value
35000 SPIND_ASSIGN_TO_MACHAX Assignment of spindle to machine axis
37200 COUPLE_POS_TOL_COARSE Threshold value for "Coarse synchronism"
37210 COUPLE_POS_TOL_FINE Threshold value for "Fine synchronism"
37220 COUPLE_VELO_TOL_COARSE Speed tolerance "coarse" between leading and coupled-
motion spindles
37230 COUPLE_VELO_TOL_FINE Speed tolerance "fine" between leading and coupled-
motion spindles
37240 COUP_SYNC_DELAY_TIME Delay time actual value synchronism

25.7.2 Setting data


Number Identifier Name
Axis/spindle-specific
42300 COUPLE_RATIO_1 Transmission parameters for synchronous spindle operation

25.7.3 Interface signals


Number Bit Name
Channel-specific
DB1700.DBX0000 .6 Dry run feedrate selected
DB1700.DBX0001 .3 Feedrate override selected for rapid traverse
DB3200.DBX0007 .1 NC Start
DB3200.DBX0007 .4 NC stop axes plus spindle
Axis/spindle-specific
DB380x.DBX0001 .3 Axis/spindle disable
DB380x.DBX0001 .4 Follow-up mode
DB380x.DBX0001 .5/6 Position measuring system 1, position measuring system 2
DB380x.DBX0002 .1 Controller enable
DB380x.DBX0002 .2 Distance-to-go/Spindle RESET
DB380x.DBX0004 .3 Spindle stop/feed stop
DB380x.DBX0004 .6/.7 Traversing keys for JOG
DB380x.DBX2000 .4/5 Re-synchronize spindle 1, re-synchronize spindle 2
DB380x.DBX2000 .7 Delete S value
DB380x.DBX2001 .0 Feedrate override valid
DB380x.DBX2001 .6 Invert M3/M4
DB380x.DBB2003 - Spindle override
DB390x.DBX0000 .4/5 Referenced/synchronized 1, referenced/synchronized 2
DB390x.DBX2002 .4 Synchronous mode
DB390x.DBX5002 .0 Synchronism fine
DB390x.DBX5002 .1 Synchronism coarse
DB390x.DBX5002 .2 Actual value coupling
DB390x.DBX5002 .4 Superimposed motion
DB390x.DBX5003 .0 Leading spindle active
DB390x.DBX5003 .1 Coupled-motion spindle active

Function Manual
264 6FC5397-7EP40-0BA4, 07/2018
26 Safety Integrated
26.1 Standards and regulations
26.1.1 General information

26.1.1.1 Aims
Manufacturers and operating companies of equipment, machines, and products are responsible for ensuring the required
level of safety. This means that plants, machines, and other equipment must be designed to be as safe as possible in
accordance with the current state of the art. To ensure this, companies describe in the various standards the current state of
the art covering all aspects relevant to safety. When the relevant Standards are observed, this ensures that state-of-the-art
technology has been utilized and, in turn, the erector/builder of a plant or a manufacturer of a machine or a piece of
equipment has fulfilled his appropriate responsibility.
Safety systems are designed to minimize potential hazards for both people and the environment by means of suitable
technical equipment, without restricting industrial production and the use of machines more than is necessary. The
protection of man and environment must be assigned equal importance in all countries, which is it is important that rules and
regulations that have been internationally harmonized are applied. This is also designed to avoid distortions in the
competition due to different safety requirements in different countries.
There are different concepts and requirements in the various regions and countries of the world when it comes to ensuring
the appropriate degree of safety. The legislation and the requirements of how and when proof is to be given and whether
there is an adequate level of safety are just as different as the assignment of responsibilities.
The most important thing for manufacturers of machines and companies that set up plants and systems is that the legislation
and regulations in the country where the machine or plant is being operated apply. For example, the control system for a
machine that is to be used in the US must fulfill local US requirements even if the machine manufacturer (OEM) is based in
the European Economic Area (EEA).

26.1.1.2 Functional safety


Safety, from the perspective of the object to be protected, cannot be split-up. The causes of hazards and, in turn, the
technical measures to avoid them can vary significantly. This is why a differentiation is made between different types of
safety (e.g. by specifying the cause of possible hazards). "Functional safety" is involved if safety depends on the correct
function.
To ensure the functional safety of a machine or plant, the safety-related parts of the protection and control devices must
function correctly. In addition, the systems must behave in such a way that either the plant remains in a safe state or it is
brought into a safe state if a fault occurs. In this case, it is necessary to use specially qualified technology that fulfills the
requirements described in the associated Standards. The requirements to achieve functional safety are based on the
following basic goals:
● Avoiding systematic faults
● Controlling systematic faults
● Controlling random faults or failures
Benchmarks for establishing whether or not a sufficient level of functional safety has been achieved include the probability of
hazardous failures, the fault tolerance, and the quality that is to be ensured by minimizing systematic faults. This is
expressed in the Standards using different terms. In IEC/EN 61508, IEC/EN 62061 "Safety Integrity Level" (SIL) and EN ISO
13849-1 "Categories" and "Performance Level" (PL).

26.1.2 Safety of machinery in Europe


The EU Directives that apply to the implementation of products are based on Article 95 of the EU contract, which regulates
the free exchange of goods. These are based on a new global concept ("new approach", "global approach"):
● EU Directives only specify general safety goals and define basic safety requirements.
● Technical details can be defined by means of standards by Standards Associations that have the appropriate mandate
from the commission of the European Parliament and Council (CEN, CENELEC). These standards are harmonized in
line with a specific directive and listed in the official journal of the commission of the European Parliament and Council.
Legislation does not specify that certain standards have to be observed. When the harmonized Standards are observed,
it can be assumed that the safety requirements and specifications of the Directives involved have been fulfilled.
● EU Directives specify that the Member States must mutually recognize domestic regulations.

Function Manual
6FC5397-7EP40-0BA4, 07/2018 265
The EU Directives are equal. This means that if several Directives apply for a specific piece of equipment or device, the
requirements of all of the relevant Directives apply (e.g. for a machine with electrical equipment, the Machinery Directive and
the Low-Voltage Directive apply).

26.1.2.1 Machinery Directive


The basic safety and health requirements specified in Annex I of the Directive must be fulfilled for the safety of machines.
The protective goals must be implemented responsibly to ensure compliance with the Directive.
Manufacturers of a machine must verify that their machine complies with the basic requirements. This verification is
facilitated by means of harmonized standards.

26.1.2.2 Harmonized European Standards


The two Standards Organizations CEN (Comité Européen de Normalisation) and CENELEC (Comité Européen de
Normalisation Électrotechnique), mandated by the EU Commission, drew-up harmonized European standards in order to
precisely specify the requirements of the EC directives for a specific product. These standards (EN standards) are published
in the official journal of the commission of the European Parliament and Council and must be included without revision in
domestic standards. They are designed to fulfill basic health and safety requirements as well as the protective goals
specified in Annex I of the Machinery Directive.
When the harmonized standards are observed, it is "automatically assumed" that the Directive is fulfilled. As such,
manufacturers can assume that they have observed the safety aspects of the Directive under the assumption that these are
also covered in this standard. However, not every European Standard is harmonized in this sense. Key here is the listing in
the official journal of the commission of the European Parliament and Council.
The European Safety of Machines standard is hierarchically structured. It is divided into:
● A standards (basic standards)
● B standards (group standards)
● C standards (product standards)
Type A standards/basic standards
A standards include basic terminology and definitions relating to all types of machine. This includes EN ISO 12100-1
(previously EN 292-1) "Safety of Machines, Basic Terminology, General Design Principles".
A standards are aimed primarily at the bodies responsible for setting the B and C standards. The measures specified here
for minimizing risk, however, may also be useful for manufacturers if no applicable C standards have been defined.
Type B standards/group standards
B standards cover all safety-related standards for various different machine types. B standards are aimed primarily at the
bodies responsible for setting C standards. They can also be useful for manufacturers during the machine design and
construction phases, however, if no applicable C standards have been defined.
A further sub-division has been made for B standards:
● Type B1 standards for higher-level safety aspects (e.g. ergonomic principles, safety clearances from sources of danger,
minimum clearances to prevent parts of the body from being crushed).
● Type B2 standards for protective safety devices are defined for different machine types (e.g. EMERGENCY STOP
devices, two-hand operating circuits, interlocking elements, contactless protective devices, safety-related parts of
controls).
Type C standards/product standards
C standards are product-specific standards (e.g. for machine tools, woodworking machines, elevators, packaging machines,
printing machines etc.). Product standards cover machine-specific requirements. The requirements can, under certain
circumstances, deviate from the basic and group standards. Type C/product standards have the highest priority for machine
manufacturers who can assume that it fulfills the basic requirements of Annex I of the Machinery Directive (automatic
presumption of compliance). If no product standard has been defined for a particular machine, type B standards can be
applied when the machine is constructed.
A complete list of the standards specified and the mandated draft standards are available on the Internet at the following
address:
http://www.newapproach.org/
Recommendation: Due to the rapid pace of technical development and the associated changes in machine concepts, the
standards (and C standards in particular) should be checked to ensure that they are up to date. Please note that the

Function Manual
266 6FC5397-7EP40-0BA4, 07/2018
application of a particular standard may not be mandatory provided that all the safety requirements of the applicable EU
directives are fulfilled.

26.1.2.3 Standards for implementing safety-related controllers


If the functional safety of a machine depends on various control functions, the controller must be implemented in such a way
that the probability of the safety functions failing is sufficiently minimized. EN ISO 13849-1 and EN IEC61508 define
principles for implementing safety-related machine controllers which, when properly applied, ensure that all the safety
requirements of the EC Machinery Directive are fulfilled. These standards ensure that the relevant safety requirements of the
Machinery Directive are fulfilled.
Standards for implementing safety-related controllers:

The application areas of EN ISO 13849-1, EN 62061, and EN 61508 are very similar. To help users make an appropriate
decision, the IEC and ISO associations have specified the application areas of both standards in a joint table in the
introduction to the standards. EN ISO 13849-1 or EN 62061 should be applied depending on the technology (mechanics,
hydraulics, pneumatics, electrics, electronics and programmable electronics), risk classification and architecture.
Type Systems for executing safety-related control EN ISO 13849-1 EN 62061
functions
A Non-electrical (e.g. hydraulic, pneumatic) X Not covered
B Electromechanical (e.g. relay and/or basic Restricted to the designated All architectures and max. up
electronics) architectures (see comment to SIL 3
1) and max. up to PL = e
C Complex electronics (e.g. programmable Restricted to the designated All architectures and max. up
electronics) architectures (see comment to SIL 3
1) and max. up to PL = d
D A standards combined with B standards Restricted to the designated X
architectures (see comment See comment 3
1) and max. up to PL = e
E C standards combined with B standards Restricted to the designated All architectures and max. up
architectures (see comment to SIL 3
1) and max. up to PL = d
F C standards combined with A standards or C X X
standards combined with A standards and B See comment 2 See comment 3
standards

Function Manual
6FC5397-7EP40-0BA4, 07/2018 267
Type Systems for executing safety-related control EN ISO 13849-1 EN 62061
functions
"X" indicates that the point is covered by this standard.
Comment 1:
Designated architectures are described in Annex B of EN ISO 13849-1 and provide a simplified basis for the quantification.
Comment 2:
For complex electronics: Using designated architectures in compliance with EN ISO 13849-1 up to PL = d or every archi-
tecture in compliance with EN 62061.
Comment 3:
For non-electrical systems: Use components that comply with EN ISO 13849-1 as sub-systems.

26.1.2.4 DIN EN ISO 13849-1


A qualitative analysis according to DIN EN 13849-1 is not sufficient for modern control systems due to their technology.
Among other things, DIN EN ISO 13849-1 does not take into account time behavior (e.g. test interval and/or cyclic test,
lifetime). This results in the probabilistic approach in DIN EN ISO 13849-1 (probability of failure per unit time).
DIN EN ISO 13849-1 is based on the known categories of EN 954-1. It now also takes into account complete safety
functions and all the devices required to execute these. With DIN EN ISO 13849-1, safety functions are investigated from a
quantitative perspective going beyond the qualitative basis of EN 954-1. Performance levels (PL), which are based on the
categories, are used. The following safety-related characteristic quantities are required for devices/equipment:
● Category (structural requirement)
● PL: Performance level
● MTTFd: Mean time to dangerous failure
● DC: Diagnostic coverage
● CCF: Common cause failure
The standard describes how the performance level (PL) is calculated for safety-related components of the controller on the
basis of designated architectures. In the event of any deviations from this, EN ISO 13849-1 refers to EN 61508.
When combining several safety-related parts to form a complete system, the standard explains how to determine the
resulting PL.

Note
DIN EN ISO 13849-1 and machinery directive
Since May 2007, DIN EN ISO 13849-1 has been harmonized as part of the Machinery Directive.

26.1.2.5 EN 62061
EN 62061 (identical to IEC 62061) is a sector-specific standard subordinate to IEC/EN 61508. It describes the
implementation of safety-related electrical machine control systems and looks at the complete life cycle, from the conceptual
phase to decommissioning. The standard is based on the quantitative and qualitative analyses of safety functions, whereby
it systematically applies a top-down approach to implementing complex control systems (known as "functional
decomposition"). The safety functions derived from the risk analysis are sub-divided into sub-safety functions, which are then
assigned to real devices, sub-systems, and sub-system elements. Both the hardware and software are covered. EN 62061
also describes the requirements placed on implementing application programs.
A safety-related control system comprises different sub-systems. From a safety perspective, the sub-systems are described
in terms of the SIL claim limit and PFHD characteristic quantities.
Programmable electronic devices (e.g. PLCs or variable-speed drives) must fulfill EN 61508. They can then be integrated in
the controller as sub-systems. The following safety-related characteristic quantities must be specified by the manufacturers
of these devices.
Safety-related characteristic quantities for subsystems:
● SIL CL: SIL claim limit
● PFHD: Probability of dangerous failures per hour
● T1: Lifetime

Function Manual
268 6FC5397-7EP40-0BA4, 07/2018
Simple sub-systems (e.g. sensors and actuators) in electromechanical components can, in turn, comprise sub-system
elements (devices) interconnected in different ways with the characteristic quantities required for determining the relevant
PFHD value of the sub-system.
Safety-related characteristic quantities for subsystem elements (devices):
● λ: Failure rate
● B10 value: For elements that are subject to wear
● T1: Lifetime
For electromechanical devices, a manufacturer specifies a failure rate λ with reference to the number of operating cycles.
The failure rate per unit time and the lifetime must be determined using the switching frequency for the particular application.
Parameters for the sub-system, which comprises sub-system elements, that must be defined during the design phase:
● T2: Diagnostic test interval
● β: Susceptibility to common cause failure
● DC: Diagnostic coverage
The PFHD value of the safety-related controller is determined by adding the individual PFHD values for subsystems.
The user has the following options when setting up a safety-related controller:
● Use devices and sub-systems that already comply with EN ISO 13849-1, IEC/EN 61508, or IEC/EN 62061. The standard
provides information specifying how qualified devices can be integrated when safety functions are implemented.
● Develop own subsystems:
– Programmable, electronic systems and complex systems: Application of EN 61508 or EN 61800-5-2.
– Simple devices and subsystems: Application of EN 62061.
EN 62061 does not include information about non-electric systems. The standard provides detailed information on
implementing safety-related electrical, electronic, and programmable electronic control systems. EN ISO 13849-1 must be
applied for non-electric systems.

Note
Function examples
Details of simple sub-systems that have been implemented and integrated are now available as "functional examples".

Note
EN 62061 and machinery directive
IEC 62061 has been ratified as EN 62061 in Europe and harmonized as part of the Machinery Directive.

26.1.2.6 Series of standards EN 61508 (VDE 0803)


This series of standards describes the current state of the art.
EN 61508 is not harmonized in line with any EU directives, which means that an automatic presumption of conformity for
fulfilling the protective requirements of a directive is not implied. The manufacturer of a safety-related product, however, can
also use EN 61508 to fulfill basic requirements of European directives in accordance with the latest conceptual design, for
example, in the following cases:
● If no harmonized standard exists for the application in question. In this case, the manufacturer can use EN 61508,
although no presumption of conformity exists here.
● A harmonized European standard (e.g. EN 62061, EN ISO 13849, EN 60204-1) references EN 61508. This ensures that
the appropriate requirements of the directives are fulfilled ("standard that is also applicable"). When manufacturers apply
EN 61508 properly and responsibly in accordance with this reference, they can use the presumption of conformity of the
referencing standard.
EN 61508 covers all the aspects that must be taken into account when E/E/PES systems (electrical, electronic, and
programmable electronic System) are used in order to execute safety functions and/or to ensure the appropriate level of
functional safety. Other hazards (e.g. electric shock) are, as in EN ISO 13849, not part of the standard.
EN 61508 has recently been declared the "International Basic Safety Publication", which makes it a framework for other,
sector-specific standards (e.g. EN 62061). As a result, this standard is now accepted worldwide, particularly in North
America and in the automotive industry. Today, many regulatory bodies already stipulate it (e.g. as a basis for NRTL listing).

Function Manual
6FC5397-7EP40-0BA4, 07/2018 269
Another recent development with respect to EN 61508 is its system approach, which extends the technical requirements to
include the entire safety installation from the sensor to the actuator, the quantification of the probability of hazardous failure
due to random hardware failures, and the creation of documentation covering all phases of the safety-related lifecycle of the
E/E/PES.
26.1.2.7 Risk analysis/assessment
Risks are intrinsic in machines due to their design and functionality. For this reason, the Machinery Directive requires that a
risk assessment be performed for each machine and, if necessary, the level of risk reduced until the residual risk is less than
the tolerable risk. To assess these risks, the following standards must be applied:
EN ISO 12100-1 "Safety of Machinery - basic terminology, general principles for design"
EN ISO 13849-1 "Safety-related parts of control systems"
EN ISO 12100-1 focuses on the risks to be analyzed and the design principles for minimizing risk.
The risk assessment is a procedure that allows hazards resulting from machines to be systematically investigated. Where
necessary, the risk assessment is followed by a risk reduction procedure. When the procedure is repeated, this is known as
an iterative process. This can help eliminate hazards (as far as this is possible) and can act as a basis for implementing
suitable protective measures.
The risk assessment involves the following:
● Risk analysis
– Determines the limits of the machine (EN ISO 12100-1)
– Identification of the hazards (EN ISO 12100-114)
– Estimating the level of risk (EN 1050 Paragraph 7)
● Risk evaluation
As part of the iterative process to achieve the required level of safety, a risk assessment is carried out after the risk
estimation. A decision must be made here as to whether the residual risk needs to be reduced. If the risk is to be further
reduced, suitable protective measures must be selected and applied. The risk assessment must then be repeated.
Iterative process for achieving safety:

Function Manual
270 6FC5397-7EP40-0BA4, 07/2018
Risks must be reduced by designing and implementing the machine accordingly (e.g. by means of controllers or protective
measures suitable for the safety-related functions).
If the protective measures involve the use of interlocking or control functions, these must be designed according to EN ISO
13849-1. For electrical and electronic controllers, EN 62061 can be used as an alternative to EN ISO 13849-1. Electronic
controllers and bus systems must also comply with IEC/EN 61508.

26.1.2.8 Risk reduction


Risk reduction measures for a machine can be implemented by means of safety-related control functions in addition to
structural measures. To implement these control functions, special requirements must be taken into account, graded
according to the magnitude of the risk. These are described in EN ISO 13849-1 or, in the case of electrical controllers
(particularly programmable electronics), in EN 61508 or EN 62061. The requirements regarding safety-related controller
components are graded according to the magnitude of the risk and the level to which the risk needs to be reduced.
EN ISO 13849-1 defines a risk flow chart that instead of categories results in hierarchically graduated Performance Levels
(PL).
IEC/EN 62061 uses "Safety Integrity Level" (SIL) for classification purposes. This is a quantified measure of the safety-
related performance of a controller. The required SIL is also determined in accordance with the risk assessment principle
according to ISO 12100 (EN 1050). Annex A of the standard describes a method for determining the required Safety
Integrity Level (SIL).
Regardless of which standard is applied, steps must be taken to ensure that all the machine controller components required
for executing the safety-related functions fulfill these requirements.

26.1.2.9 Residual risk


In today's technologically advanced world, the concept of safety is relative. The ability to ensure safety to the extent that risk
is ruled out in all circumstances – "zero-risk guarantee" – is practically impossible. The residual risk is the risk that remains
once all the relevant protective measures have been implemented in accordance with the latest state of the art.
Residual risks must be clearly referred to in the machine/plant documentation (user information according to EN ISO 12100-
2).

26.1.3 Machine safety in the USA


A key difference between the USA and Europe in the legal requirements regarding safety at work is that, in the USA, no
legislation exists regarding machinery safety that is applicable in all of the states and that defines the responsibility of the
manufacturer/supplier. A general requirement exists stating that employers must ensure a safe workplace.

26.1.3.1 Minimum requirements of the OSHA


The Occupational Safety and Health Act (OSHA) from 1970 regulates the requirement that employers must offer a safe
place of work. The core requirements of OSHA are specified in Section 5 "Duties".
The requirements of the OSH Act are managed by the "Occupational Safety and Health Administration" (also known as
OSHA). OSHA employs regional inspectors who check whether or not workplaces comply with the applicable regulations.
The OSHA regulations are described in OSHA 29 CFR 1910.xxx ("OSHA Regulations (29 CFR) PART 1910 Occupational
Safety and Health"). (CFR: Code of Federal Regulations.)
http://www.osha.gov
The application of standards is regulated in 29 CFR 1910.5 "Applicability of standards". The concept is similar to that used in
Europe. Product-specific standards have priority over general standards insofar as they cover the relevant aspects. Once
the standards are fulfilled, employers can assume that they have fulfilled the core requirements of the OSH Act with respect
to the aspects covered by the standards.
In conjunction with certain applications, OSHA requires that all electrical equipment and devices that are used to protect
workers be authorized by an OSHA-certified, "Nationally Recognized Testing Laboratory" (NRTL) for the specific application.
In addition to the OSHA regulations, the current standards defined by organizations such as NFPA and ANSI must be
carefully observed and the extensive product liability legislation that exists in the US taken into account. Due to the product
liability legislation, it is in the interests of manufacturing and operating companies that they carefully maintain the applicable
regulations and are "forced" to fulfill the requirement to use state-of-the-art technology.
Third-party insurance companies generally demand that their customers fulfill the applicable standards of the standards
organizations. Self-insured companies are not initially subject to this requirement but, in the event of an accident, they must
provide verification that they have applied generally-recognized safety principles.

Function Manual
6FC5397-7EP40-0BA4, 07/2018 271
26.1.3.2 NRTL listing
To protect employees, all electrical equipment used in the USA must be certified for the planned application by a "Nationally
Recognized Testing Laboratory" (NRTL) certified by the OSHA. NRTLs are authorized to certify equipment and material by
means of listing, labeling, or similar. Domestic standards (e.g. NFPA 79) and international standards (e.g. IEC/EN 61508 for
E/E/PES systems) are the basis for testing.

26.1.3.3 NFPA 79
Standard NFPA 79 (Electrical Standard for Industrial Machinery) applies to electrical equipment on industrial machines with
rated voltages of less than 600 V. A group of machines that operate together in a coordinated fashion is also considered to
be one machine.
For programmable electronics and communication buses, NFPA 79 states as a basic requirement that these must be listed if
they are to be used to implement and execute safety-related functions. If this requirement is fulfilled, then electronic controls
and communication buses can also be used for Emergency Stop functions, Stop Categories 0 and 1 (refer to NFPA 79
9.2.5.4.1.4). Like EN 60204-1, NFPA 79 no longer specifies that the electrical energy must be disconnected by
electromechanical means for emergency stop functions.
The core requirements regarding programmable electronics and communication buses are:
system requirements (see NFPA 79 9.4.3)
1. Control systems that contain software-based controllers must:
● In the event of a single fault
– cause the system to switch to a safe shutdown mode
– prevent the system from restarting until the fault has been rectified
– prevent an unexpected restart
● Offer the same level of protection as hard-wired controllers
● Be implemented in accordance with a recognized standard that defines the requirements for such systems.
2. IEC 61508, IEC 62061, ISO 13849-1, ISO 13849 2 and IEC 61800-5-2 are specified as suitable standards in a note.
Underwriter Laboratories Inc. (UL) has defined a special category for "Programmable Safety Controllers" for implementing
this requirement (code NRGF). This category covers control devices that contain software and are designed for use in
safety-related functions.
A precise description of the category and a list of devices that fulfill this requirement can be found on the Internet at the
following address:
http://www.ul.com → certifications directory → UL Category code/ Guide information → search for category "NRGF"
TUV Rheinland of North America, Inc. is also an NRTL for these applications.

26.1.3.4 ANSI B11


ANSI B11 standards are joint standards developed by associations such as the Association for Manufacturing Technology
(AMT) and the Robotic Industries Association (RIA).
The hazards of a machine are evaluated by means of a risk analysis/assessment. The risk analysis is an important
requirement in accordance with NFPA 79, ANSI/RIA 15.06, ANSI B11.TR-3 and SEMI S10 (semiconductors). The
documented findings of a risk analysis can be used to select a suitable safety system based on the safety class of the
application in question.
The situation in Japan is different from that in Europe and the US. Legislation such as that prescribed in Europe does not
exist. Similarly, product liability does not play such an important role as it does in the US.
Instead of legal requirements to apply standards have been defined, an administrative recommendation to apply JIS
(Japanese Industrial Standard) is in place: Japan bases its approach on the European concept and uses basic standards as
national standards (see the table below).
ISO/IEC number JIS number Comment
ISO12100-1 JIS B 9700-1 Earlier designation TR B 0008
ISO12100-2 JIS B 9700-2 Earlier designation TR B 0009
ISO14121- 1 / EN1050 JIS B 9702
ISO13849- 1 JIS B 9705-1

Function Manual
272 6FC5397-7EP40-0BA4, 07/2018
ISO/IEC number JIS number Comment
ISO13849- 2 JIS B 9705-1
IEC 60204-1 JIS B 9960-1 Without annex F or route map of the
European foreword
IEC 61508-0 to -7 JIS C 0508
IEC 62061 JIS number not yet assigned
In addition to the requirements of the guidelines and standards, company-specific requirements must be taken into account.
Large corporations in particular (e.g. automobile manufacturers) make stringent demands regarding automation components,
which are often listed in their own equipment specifications.
Safety-related issues (e.g. operating modes, operator actions with access to hazardous areas, EMERGENCY STOP
concepts, etc.) should be clarified with customers early on so that they can be integrated in the risk assessment/risk
reduction process.

26.1.4 Machine safety in Japan


The situation in Japan is different from that in Europe and the US. Legislation such as that prescribed in Europe does not
exist. Similarly, product liability does not play such an important role as it does in the US.
Instead of legal requirements to apply standards have been defined, an administrative recommendation to apply JIS
(Japanese Industrial Standard) is in place: Japan bases its approach on the European concept and uses basic standards as
national standards (see the table below).
ISO/IEC number JIS number Comment
ISO12100-1 JIS B 9700-1 Earlier designation TR B 0008
ISO12100-2 JIS B 9700-2 Earlier designation TR B 0009
ISO14121- 1 / EN1050 JIS B 9702
ISO13849-1 JIS B 9705-1
ISO13849-2 JIS B 9705-1
IEC 60204-1 JIS B 9960-1 Without annex F or route map of the European fore-
word
IEC 61508-0 to -7 JIS C 0508
IEC 62061 JIS number not yet assigned

26.1.5 Equipment regulations


In addition to the requirements of the guidelines and standards, company-specific requirements must be taken into account.
Large corporations in particular (e.g. automobile manufacturers) make stringent demands regarding automation components,
which are often listed in their own equipment specifications.
Safety-related issues (e.g. operating modes, operator actions with access to hazardous areas, EMERGENCY STOP
concepts, etc.) should be clarified with customers early on so that they can be integrated in the risk assessment/risk
reduction process.

26.2 General information about SINAMICS Safety Integrated


Safety Integrated function - STO
The Safe Torque Off (STO) is a safety function that prevents the drive from restarting unexpectedly, in accordance with EN
60204-1:2006 Section 5.4.
The STO function is in conformance with the IEC 61508, SIL2 standard, in the operating mode with a high demand,
Category 3 and Performance Level d (PL d) according to ISO 13849-1:2015, as well as IEC 61800-5-2.

Controlling the STO Function


The STO function can be controlled via terminals. For more information on STO wiring, see Section "Connecting the 24 V
power supply/STO - X6" of the SINUMERIK 808D ADVANCED Commissioning Manual.

Function Manual
6FC5397-7EP40-0BA4, 07/2018 273
26.3 System features
26.3.1 Certification
The safety function of the SINAMICS V70 drive system meets the following requirements:
● Category 3 according to ISO 13849-1:2015
● Performance Level (PL) d to EN ISO 13849-1:2015
● Safety integrity level 2 (SIL 2) to IEC 61508
In addition, the safety function of SINAMICS V70 has been certified by independent institutes. An up-to-date list of certified
components is available on request from your local Siemens office.

26.3.2 Safety instructions


Note
Additional safety information and residual risks not specified in this section are included in the SINUMERIK 808D
ADVANCED Commissioning Manual.

DANGER
Risk minimization through Safety Integrated
Safety Integrated can be used to minimize the level of risk associated with machines and plants.
However, safe operation of a system or machine based on Safety Integrated is only possible if the following preconditions
are fully satisfied:
• The machine builder (OEM) precisely knows and observes this technical user documentation - including the
documented limitations, safety information and residual risks.
• The machine builder (OEM) carefully and professionally designs, constructs and configures the system/machine. This
must then be verified through careful and thorough acceptance tests by qualified personnel and the results
documented.
• The machine builder (OEM) implements and validates all the measures required in accordance with the
system/machine risk analysis by means of the programmed and configured Safety Integrated functions or by other
means.
The use of Safety Integrated does not replace the machine/plant risk assessment carried out by the machine manufacturer
as required by the EC machinery directive.
In addition to using Safety Integrated functions, further risk reduction measures must be implemented.

WARNING
Danger to life as a result of inactive Safety Integrated functions while powering up
The Safety Integrated functions are only activated after the system has completely powered up. System startup is a critical
operating state with increased risk. When accidents occur, this can result in death or severe injury.
• Stay completely away from any hazardous areas while the system powers up.
• For vertical axes, check that the drives are in a no-torque state.

WARNING
Regulations from EN 60204-1
The Emergency Stop function must bring the machine to a standstill according to STO.
The machine must not restart automatically after emergency stop.
When Safety Integrated functions are deactivated, an automatic restart is permitted under certain circumstances depending
on the risk analysis (except when emergency stop is reset). An automatic start is permitted when a protective door is
closed, for example.

Function Manual
274 6FC5397-7EP40-0BA4, 07/2018
WARNING
Danger to life when the system powers up after hardware and/or software has been changed or replaced
After hardware and/or software components have been modified or replaced, it is only permissible for the system to run up
and the drives to be activated with the protective devices closed. Changes to the system that have not been thoroughly
tested can initiate undesirable functions. For persons in the hazardous area, this can result in death or severe injury.
• Carry out the following tests after a change or replacement:
– A complete acceptance test
– A partial acceptance test
– A simplified function test
• Before personnel may re-enter the hazardous area, the drives MUST be tested to ensure that they exhibit stable control
behavior by briefly moving them in both the plus and minus directions (+/–).
• Ensure that nobody is in the hazardous area during the test.
• When switching on, carefully observe that Safety Integrated functions are only available and can only be selected after
the system has completely powered up.

26.3.3 Probability of failure of the safety function (PFH value)

Probability of failure
The probability of the failure of safety functions must be specified in the form of a PFH value (Probability of Failure per Hour)
in accordance with IEC 61508, IEC 62061, and ISO 13849-1:2015. The PFH value of a safety function depends on the
safety concept of the drive unit and its hardware configuration, as well as on the PFH values of other components used for
this safety function.
Corresponding PFH values are provided for the SINAMICS V70 drive system, depending on the hardware configuration
(number of drives, control type, number of encoders used). The various integrated safety functions are not differentiated.
The PFH values can be requested from your local sales office.

26.3.4 Response time


Response time means the time from the control via terminals until the response actually occurs. The worst response time for
the STO function is 5 ms.

26.3.5 Residual risk


The fault analysis enables machine manufacturers to determine the residual risk at their machine with regard to the drive
unit. The following residual risks are known:

WARNING
Danger to life as a result of hardware faults relating to the intrinsic principle: PFH value
Due to the intrinsic potential of hardware faults, electrical systems are subject to additional residual risk, which can be
expressed by means of the PFH value.
• Take into account these residual risks when designing your machine and where necessary apply suitable
countermeasures.

WARNING
Danger to life when a drive moves when two power transistors simultaneously fail (breakdown of depletion layer)
The simultaneous breakdown of depletion layer of two power transistors (one in the upper and the other offset in the lower
inverter bridge) in the inverter may cause the drive to move briefly. This can result in accidents leading to death or severe
injury.
• Take suitable measures to prevent unexpected drive movement, for example, by using a brake equipped with safety
monitoring.

Function Manual
6FC5397-7EP40-0BA4, 07/2018 275
26.4 Safety Integrated basic functions
26.4.1 Safe Torque Off (STO)
In conjunction with a machine function or in the event of a fault, the "Safe Torque Off" (STO) function is used to safely
disconnect the torque-generating energy feed to the motor.
When the function is selected, the drive unit is in a "safe status". The switching on inhibited function prevents the drive unit
from being restarted.
The two-channel pulse suppression function integrated in the Motor Modules/Power Modules is a basis for this function.

Functional features of "Safe Torque Off"


● This function is integrated in the drive; this means that a higher-level controller is not required.
● The function is drive-specific, i.e. it is available for each drive and must be individually commissioned.
● When the "Safe Torque Off" function is selected, the following applies:
– The motor cannot be started accidentally.
– The pulse suppression safely disconnects the torque-generating energy feed to the motor.
– The power unit and motor are not electrically isolated.
● By selecting/deselecting STO, in addition to the fault messages, the safety messages are also automatically withdrawn.
The STO function can be used wherever the drive naturally reaches a standstill due to load torque or friction in a sufficiently
short time or when "coasting down" of the drive will not have any relevance for safety.

WARNING
Unexpected movement of machines caused by inactive safety functions
The motor can undesirably move once the energy feed has been disconnected, e.g. coasting down.
• Take appropriate measures to ensure that the motor does not undesirably move in this case.

Note
Closing delay of the holding brake
The closing signal (low level) of the holding brake is output 30 ms after the STO is triggered.

Preconditions for using the STO function


When use the STO function, the following preconditions should be fulfilled:
● Each monitoring channel (STO1 and STO2) triggers safe pulse suppression with its switch off signal path.
● If a motor holding brake is connected and configured, the connected brake is not safe because there is no safety function
for brake, such as safe brake.
Behaviors of the STO function
Terminal State Action
STO1 STO2
High level High level Safe The servo motor can normally run when you power on the servo
drive.
Low level Low level Safe The servo drive starts up normally but the servo motor cannot
run.
High level Low level Unsafe Alarm occurs and servo motor coasts down.
Low level High level Unsafe Alarm occurs and servo motor coasts down.

Function Manual
276 6FC5397-7EP40-0BA4, 07/2018
Control circuit interfaces - drive side
Type Illustration Signal Description
Safe Torque Off (STO) STO 1 STO 1: coast down
interfaces STO + STO +: 24 VDC
STO 2 STO 2: coast down
Control power input +24 V Power supply 24 VDC (without brake: -15% to
interfaces 1) +20%, with brake: -10% to +10% )
M Power supply 0 VDC
Maximum connectable cross-section: 1.5 mm2
1) Maximum current consumptions without brake power supply and with brake power supply are respectively 1 A and 3 A.

Wiring

Note
Using the STO function
The STO1, STO+ and STO2 are short connected at the factory setting.
When the STO function is to be used, you must remove the short-circuit stick before connecting the STO interfaces. If you
do not need to use it any more, you must reinsert the short-circuit stick; otherwise, the motor will not run.

The wiring for factory setting and using the STO function is shown as follows:

Selecting/deselecting "Safe Torque Off"


The following is executed when "Safe Torque Off" is selected:
● Each monitoring channel triggers safe pulse suppression via its switch-off signal path.
● A motor holding brake is closed (if connected and configured).

Note
If "Safe Torque Off" is selected and de-selected through one channel within 2 seconds, the pulses are suppressed without a
message being output.

Restart after the "Safe Torque Off" function has been selected
1. Deselect the function in each monitoring channel via the input terminals.
2. Issue drive enable signals.
3. Switch the drive back on.
– 1/0 edge at input signal "ON/OFF1"
– 0/1 edge at input signal "ON/OFF1" (switch on drive)
4. Operate the drives again.

Function Manual
6FC5397-7EP40-0BA4, 07/2018 277
Response time for the "Safe Torque Off" function
The worst response time for the STO function is 5 ms.

26.4.2 Forced dormant error detection

Forced dormant error detection or test of the switch-off signal paths for Safety Integrated Basic Functions
The forced dormant error detection function at the switch-off signal paths is used to detect software/hardware faults at both
monitoring channels in time and is automated by means of activation/deactivation of the "Safe Torque Off" function.
To fulfill the requirements of ISO 13849-1:2015 regarding timely error detection, the two switch-off signal paths must be
tested at least once within a defined time to ensure that they are functioning properly. This functionality must be
implemented by means of forced dormant error detection function, triggered either in manual mode or by the automated
process.
A timer ensures that forced dormant error detection is carried out as quickly as possible.
8760 hours for the forced dormant error detection.
Once this time has elapsed, an alarm is output and remains present until forced dormant error detection is carried out.
The timer returns to the set value each time the STO function is deactivated.
When the appropriate safety devices are implemented (e.g. protective doors), it can be assumed that running machinery will
not pose any risk to personnel. For this reason, only an alarm is output to inform the user that a forced dormant error
detection run is due and to request that this be carried out at the next available opportunity. This alarm does not affect
machine operation.
Examples of when to carry out forced dormant error detection:
● When the drives are at a standstill after the system has been switched on (POWER ON).
● When the protective door is opened.
● At defined intervals.
● In "AUTO" mode (time and event dependent)

Note
The timer will be reset if the associated forced dormant error detection is executed. The corresponding alarm is not
triggered.
The forced dormant error detection procedure of Safety Function (STO) always has to be executed through the terminals.

27 Special functions
27.1 Multi-language support for the machine manufacturer's HMI data
In the control system, the machine manufacturer's HMI data will support multiple languages in an easy way.
You can access the following HMI data screen with the operations:

+ → → → "HMI data" folder


Function Manual
278 6FC5397-7EP40-0BA4, 07/2018
There are the following three types of multi-language support for the machine manufacturer's HMI data:
● No multi-language support
● Single file
● Multiple files

No multi-language support
This is the case for:
● Customized bitmaps
● User cycle bitmap file
● User cycle softkey index file
● User cycle parameter file
● EasyXLanguage scripts
In all languages, the same files are used since multi-language support for these files are unnecessary.

Single file
This is the case for:
● User cycle alarm file
● Extended user text file
● OEM MD description file
● PLC alarm texts
● OEM R variable name file
● Service planner task name file
For these files, the machine manufacturer can easily import or export all language files without changing the system
language. Files in different languages are distinguished by the file name. For example, for PLC alarm texts, the file name will
be in the format of:
alcu_<LANG>.txt
wherein, <LANG> stands for the real language abbreviations.

Note
Never contain any upper case in the file name; otherwise, the file name cannot be recognized by the control system.
A file in the incorrect file name format cannot be identified by the control and thus will not be active on the control.

Multiple files
This is the case for:
● OEM online help
● OEM manual
● OEM slide show
For these files, the machine manufacturer can prepare all files for a certain language in a folder with the name <LANG>,
which stands for the real language abbreviations, and then copy them to the desired folder on the control.

Note
A folder in the incorrect folder name format cannot be identified by the control and thus will not be active on the control.

Function Manual
6FC5397-7EP40-0BA4, 07/2018 279
Country code table
The following table provides different language codes for your reference.
Language Code Language Code
Simplified Chinese chs 1) Italian ita
Traditional Chinese cht Korean kor
Czech csy Dutch nld
Denish dan Polish plk
German deu Portuguese ptb
English eng 1) Rumanian rom
Spanish esp Russian rus
Finnish fin Swedish sve
French fra Turkish trk
Hungarian hun
1) Default languages already loaded on the control in the scope of delivery

27.2 Calling an online help


27.2.1 The help system
The control system provides comprehensive online help. Whenever necessary, you can call the help system from any
operating area.

The help system


Press this key or the key combination <ALT> + <H> to call the help system from any operating area. If a con-
text-sensitive help exists, window "①" opens; otherwise, window "③" opens.

① Calls the context-sensitive help for the current topic:


• Current operating window
• NC/V70 alarms selected in the alarm specific operation area
• Machine data or setting data selected
• V70 data selected

Function Manual
280 6FC5397-7EP40-0BA4, 07/2018
② Calls the machine manufacturer-developed PDF manual

③ Displays all available help information:


• Siemens help manuals
• Machine manufacturer-developed help manuals, if any
• All available NC/V70 alarms
• All available V70 parameters
• All available machine data or setting data

Softkeys in window "①"


Navigates upwards through the hierarchical topics

Navigates downwards through the hierarchical topics

Selects cross references


A cross reference is marked by the characters "≫ ... ≪" .
Note:
This softkey is displayed only if the current page contains a cross reference.
Opens the selected topic in the current topic relevant window
Functions the same as pressing the following key:

Searches for a term in the current topic

Continues search for the next term that matches the search criteria

Exits the help system

Softkeys in window "②"


Zooms in the current view

Zooms out the current view

Zooms the current view to page width

Jumps to the desired page

Function Manual
6FC5397-7EP40-0BA4, 07/2018 281
Searches for a term in the current topic

Continues search for the next term that matches the search criteria

Exits the help system

Keys for window "③"


Expands hierarchical topics

Collapses hierarchical topics

Navigates upwards through the hierarchical topics

Navigates downwards through the hierarchical topics

Selects cross references


A cross reference is marked by the characters "≫ ... ≪" .
Note:
This softkey is displayed only if the current page contains a cross reference.
Opens the selected topic in the current topic relevant window
Functions the same as pressing the following key:

Searches for a term in the current topic

Continues search for the next term that matches the search criteria

Exits the help system

27.2.2 Calling a machine manufacturer's help and manual

Machine manufacturer's online help


You can also create your own online help in text files, and upload the help into the control system using a USB stick.

Function Manual
282 6FC5397-7EP40-0BA4, 07/2018
To create your own online help, you must use the existing help file format, as shown below:

Note
You must end the text by pressing the Enter key; otherwise the online help does not work properly.

The table below gives the detailed information about the commands you can use in your help texts:
Command Description
#{XE "BookmarkName"} Creates a bookmark named BookmarkName. The command
must be followed by an HL command, which will be used as
description in the help index. These bookmarks will be dis-
played in the help content list.
#{HL{depth}} Defines a headline. The parameter {depth} defines the
{depth} = 1 - 5 headline depth.
#{NPAGE} Starts a new help page.
#{BOOKMARK "BookmarkName"} Sets a hidden bookmark named BookmarkName, which
occurs in the help index. It can be used in the XREF com-
mand to create a hyperlink.
#{XREF "BookmarkName"}{file name}{Display text of hyper- Creates a hyperlink in the help text. The destination Book-
link} markName can be a bookmark created via the BOOKMARK
or XE command.
#{BITMAP "no_ref.bmp"} Inserts a bitmap in the text.
#{SCOLOR {color}} Changes the color of the following text to the specified one
{color} = RED, ORANGE, BLACK, BLUE, GREEN,
YELLOW, WHITE

Calling a machine manufacturer's online help


1. • Create files for an online help on your PC. The possible file formats are .txt, .png,
and .bmp.
• Save the files in the following path in a USB stick:
– For the turning variant: ...\<LANG>\turning\manual
– For the milling variant: ...\<LANG>\milling\manual
wherein, <LANG> = language code of the language used for the online help. For more
information, see Section "Multi-language support for the machine manufacturer's HMI
data (Page 278)".
2. Insert the USB stick into the USB interface at the front of the PPU.

Function Manual
6FC5397-7EP40-0BA4, 07/2018 283
3. Select the system data operating area.
+
4. Open the "USB" window through the following softkey operations:


5. Press this hardkey to select the desired <LANG> folders, and then copy the folders with the
following softkey:

Press this softkey to open the window of system data.

6. Find the folder for storing the online help files through the following operations, and press
this key to open it:

→ →

7. Paste the online help files with this softkey.

8. Then you can view your own online help through the following operations:

→ → →

For more information about the key operations in this window, see Section "The help system
(Page 280)".
9. Exit the online help.

: returning to the operating area where you stay before calling the help

: returning to the online help main menu

Function Manual
284 6FC5397-7EP40-0BA4, 07/2018
Calling a machine manufacturer's manual
1. • Create the file for a manual on your PC. The file name must be oemmanual.pdf.
• Save the files in the following path in a USB stick:
– For the turning variant: ...\<LANG>\turning\manual
– For the milling variant: ...\<LANG>\milling\manual
wherein, <LANG> = language code of the language used for the online help. For more
information, see Section "Multi-language support for the machine manufacturer's HMI
data (Page 278)".
2. Insert the USB stick into the USB interface at the front of the PPU.
3. Select the system data operating area.
+
4. Open the "USB" window through the following softkey operations:


5. Press this hardkey to select the desired<LANG>folders, and then copy the folders with the
following softkey:

Press this softkey to open the window of system data.

6. Find the folder for storing the manual file through the following operations, and press this
key to open it:

→ →

7. Paste the manual file with this softkey.

8. View your own manual through the following operations:


For more information about the key operations in this window, see Section "The help system
(Page 280)".
9. Exit the manual.

NOTICE
Poor performance of the system
• Do not upload a machine manufacturer's manual of a large size; otherwise, the system performance will be reduced.

Function Manual
6FC5397-7EP40-0BA4, 07/2018 285
27.3 Calling a standard cycle with auxiliary functions
You can call user cycles with M codes or T codes. With this function, you can perform operations such as changing machine
tools.

Note
M codes or T codes for calling user cycles must not be in the same program segment.

Calling cycles with "M6"


Configure the parameters shown in the table below to activate an M code for calling a standard cycle:
No. Name Unit Value Description
22550 TOOL_CHANGE_MODE - 1 Activating tool parameters with an M code
22560 TOOL_CHANGE_M_CODE - 206 The M code for activating tool parameters
10715 M_NO_FCT_CYCLE[0] - 6 Calling the standard cycle with M06
10716 M_NO_FCT_CYCLE_NAME[0] - "TOOL" Name of the standard cycle
For the format of a standard cycle, refer to the example shown below:

Calling cycles using the "T" function


Configure the parameters shown in below table to activate a T code for calling a standard cycle:
No. Name Unit Value Description
22550 TOOL_CHANGE_MODE - 0 Activating tool parameters with an M code
10717 T_NO_FCT_CYCLE[0] - "TOOL" Calling the standard cycle with M06
The format of the standard cycle is the same with that of M codes. The tool number for programming will be saved into
system variable $C_T.

Descriptions of frequently used system variables


Variables Descriptions
$P_ISTEST Program testing status; boolean variable
$P_SEARCH Program searching status; boolean variable
$P_SEARCHL Program searching status; real numbers: 1-, 2-, 3-
$P_TOOLNO Tool number in the spindle turret
$P_TOOLP Programming tool number

Function Manual
286 6FC5397-7EP40-0BA4, 07/2018
Variables Descriptions
$C_T Programming tool number.
$P_TOOLP is inactive when the program code T calls a tool changing cycle that is
defined with MD10717. The tool number is then represented with "$C_T".
$TC_DP1[Tool number, 1] Tool type
$TC_DP3[Tool number, 1] Tool's geometrical parameter: tool length 1
$TC_DP6[Tool number, 1] Tool's geometrical parameter: tool radius
$TC_DP12[Tool number, 1] Tool wear: the direction of length 1
$TC_DP15[Tool number, 1] Tool wear: the direction of radius
$TC_DP24[Tool number, 1] Tool's dimension:
0: normal
1: oversize
$TC_DP25[Tool number, 1] Number of the tool turret
_TM[n] Global user data (integral)
_ZSFR[n] Global user data (float)
NOTE:
Since this data has been used in the Siemens standard technology cycles, ensure
that there is no conflict with the technology cycles when you are using this data.

27.4 Display function


Displaying the time counter
The time counter is available for the control system to count the following time periods:
Time period System variable Description
Run time $AC_OPERATING_TIME Total time for running programs in "AUTO" mode
Cycle time $AC_CYCLE_TIME Run time of a selected program
Cutting time $AC_CUTTING_TIME Cutting time (G01, G02, G03) of a selected program
Setup time 1) $AN_SETUP_TIME Time elapsed since the last power-on with default val-
ues
Power on time 1) $AN_POWERON_TIME Time elapsed since the last normal power-on
Remain time 2) - Remaining time for running the current program.
1) Both the setup time and the power on time are counted automatically after the controller has been powered on.
2) The remaining time has no corresponding system variable and can be counted only after a cycle of a part program has
successfully run.
By default, the run time, cycle time, setup time, and power on time are displayed. The cutting time can only be counted after
being activated with MD27860:
Number Name Value Description
27860 PROCESSTIMER_MODE Actual value Activation of counting for the following program
runtime periods:
• Run time
• Cycle time
• Cutting time

Function Manual
6FC5397-7EP40-0BA4, 07/2018 287
The procedure for calling the time counter is as follows:
1. Select the offset operating area.

2. Press these two softkeys in succession. Then the time counter is displayed, counting the
following time periods:

Or
1. Enter "AUTO" mode and select the machining operating area.

2. After you press this softkey, the time counter is displayed, counting the following time peri-
ods:

Displaying the workpiece counter


The workpiece counter is available for the control system to count the following parts:
Part System variable Description
Required parts $AC_REQUIRED_PARTS Required parts to be counted.
Activated after you set MD27880 BIT0 = 1:
• BIT 1 = 0: if "Part count" = "Parts required", alarm or
interface DB3300.DBX4001.1 = 1
Parts in total $AC_TOTAL_PARTS Total number of counted parts.
Activated after you set MD27880 BIT 4 = 1:
• BIT 5 = 0: M02/M30 increases "Parts in total" to "1"
• BIT 5 = 1: the M code defined by MD27882 increases
"Parts in total" to "1"
• BIT 6 = 0/1: the counter does not work when "Program
test" is inactive
Part count $AC_ACTUAL_PARTS Parts actually counted.
Activated after you set MD27880 BIT 8 = 1:
• BIT 9 = 0: M02/M30 increases "Parts in total" to "1"
• BIT 9 = 1: the M code defined by MD27882 increases
"Parts in total" to "1"
• BIT 10 = 0/1: the counter does not work when "Pro-
gram test" is inactive

Number Name Value Description


27880 PART_COUNTER Actual value Configuring and activating the workpiece counter
27882 PART_COUNTER_MCODE Actual value Defining an M code for the counting action: 0 to 99

Function Manual
288 6FC5397-7EP40-0BA4, 07/2018
The procedure for calling the workpiece counter is as follows:
1. Select the offset operating area.

2. Press these two softkeys in succession. Then the workpiece counter is displayed, counting
the following parts:

Or
1. Enter "AUTO" mode and select the machining operating area.

2. Press these two keys in succession.
Then the workpiece counter is displayed, counting the following parts:

27.5 Prog_Event function


With the Prog_Event function, two subroutine programs called "CYCPE1MA.SPF" and "CYCPE_MA.SPF" are triggered to be
executed at certain states such as the end of a program, NC reset, etc.. You must first create at least one of the
CYCPE1MA.SPF and CYCPE_MA.SPF files, and then save the file(s) under the cycle directory (N: \CMA).
Relevant parameters:
No. Name Value Descriptions
11450 SEARCH_RUN_MODE 7H -
20106 PROG_EVENT_IGN_SINGLEBLOCK 1FH -
20107 PROG_EVENT_IGN_INHIBIT CH -
20108 PROG_EVENT_MASK Actual value Triggering modes for N: \CMA\CYCPE1MA.SPF and
N: \CMA\CYCPEMA.SPF:
• Bit 0: activating the program event during the NC
commissioning
• Bit 1: activating the program event at the end of a
NC program
• Bit 2: activating the program event using the
RESET key
• Bit 3: activating the program event after powering
up the NC
20109 PROG_EVENT_MASK_PROPERTIE 1H -
S

Function Manual
6FC5397-7EP40-0BA4, 07/2018 289
27.6 Fast I/O
Hardware description
The FAST I/O interface (X21) provides 3 digital inputs and 1 digital output:
Illustration Pin Signal Description Variable
4 DI1 Fast input 1 with address DB2900.DBX0.0 $A_IN[1]
5 DI2 Fast input 2 with address DB2900.DBX0.1 $A_IN[2]
6 DI3 Fast input 3 with address DB2900.DBX0.2 $A_IN[3]
7 DO1 Fast output 1 with address DB2900.DBX4.0 $A_OUT[1]

Relevant parameters
MD No. Name Meaning Value
10366 HW_ASSIGN_DIG_FASTIN[0] Hardware assignment for the fast inputs 10101
10368 HW_ASSIGN_DIG_FASTOUT[0] Hardware assignment for the fast outputs 10101

PLC interface addresses


DB2900 Signals from fast inputs and outputs
Byte Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
0 Input 3 Input 2 Input 1
4 Output 1

Applications of the fast inputs/outputs


Fast inputs
In the PLC application program, you can directly read each bit value from the address DB2900.DBX0.0.
In a part program, you can read each bit value from the address DB2900.DBX0.0 via corresponding system variable.
Fast outputs
From the address DB2900.DBX4.0 you cannot assign a value to the fast output; otherwise, the PLC application program will
stop with an error. However, you can assign a value to the fast output from address DB2800.DBX5.0 and DB2800.DBX6.0.
In the PLC application program, you can trigger the address DB2800.DBX5.0 with a rising edge or a negative edge at the
address DB2800.DBX6.0, and thus the address DB2900.DBX4.0 will vary with the address DB2800.DBX6.0.
For example, if you want to use I0.0 to trigger or deactivate the set/reset of the address DB2900.DBX4.0, you can write as
follows in the PLC application program:

Function Manual
290 6FC5397-7EP40-0BA4, 07/2018
In a part program, you can set or reset the fast output via its corresponding variable. The system variable is $A_OUT[1].
For example:

27.7 Creating user cycles


The control system is integrated with standard Siemens cycles. If necessary, you can also create your own cycles.
To create a customized cycle, you must prepare the files shown below:
● User cycle file
● User cycle alarm file
● User cycle bitmap file
● Extended user text file
● User cycle softkey index file
● User cycle parameter file

27.7.1 Creating the extended user text file


The extended user text file is required for the display of respective screen texts, cycle messages and softkey texts.

Naming rule
almc_<LANG>.txt
Here "<LANG>" refers to the language denotation, for example, eng.
For more information, see Section "Multi-language support for the machine manufacturer's HMI data (Page 278)".

Text definition rules


When defining the texts, you must follow the rule below:
<Identifier> "<Text>" // <lines*chars>
● <Identifier>: here you use a number to define the identifier for a softkey, message, or screen. The number ranges from
83000 to 84999.
● <Text>: here you define the actual text to be displayed, such as softkey name, message text, and parameter description
text.
● <lines*chars>: here you specify the available space for the text in the GUI in number of characters and lines. You can
start a new line by inserting the character of "%n". A maximum of 2 lines with 9 characters each are available for softkey
texts.

Example
83000 "User%nCycles" // 2*9 ⇒ two lines, each line with nine-character space
83001 "CYCLE100" // 9 ⇒ one line with nine-character space
83020 "DIA short description" // 21 ⇒ one line with 21-character space

27.7.2 Creating the user cycle softkey index file


The user cycle softkey index file (cov.com) file is required to define the softkeys for the user cycle. You can create the
cov.com file with a text editor like the WordPad or Notepad.

Text definition rules


Sx.y.z\$identifier\bitmap(cycle)

Function Manual
6FC5397-7EP40-0BA4, 07/2018 291
Parameters Value range Significance
x 5 The fifth horizontal key.
y 1 to 8 The first to eighth vertical key in the first level.
z 1 to 8 The first to eighth vertical key in the second level.
\$identifier\ - The softkey identifier defined in the extended user text file.
bitmap(cycle) - The bitmap for the cycle screen. The bitmap name must be followed with the user
cycle name which will display in the upper left corner of the cycle screen.

Example
S5.0.0\$83000\ ⇒ define a softkey (with the identifier 83000) at the fifth horizontal key.

S5.1.0\$83001\CN1(CYCLE100) ⇒ define a softkey (with the identifier 83001) at the first vertical key in the first level after
pressing the fifth horizontal key; CN1.bmp is used for the CYCLE100 screen.
S5.2.0\$83002\CN2(CYCLE101) ⇒ define a softkey (with the identifier 83002) at the second vertical key in the first level after
pressing the fifth horizontal key; CN2.bmp is used for the CYCLE101 screen.
M17

27.7.3 Creating the user cycle parameter file


The user cycle parameter file (sc.com) file is required to define the help information and the parameters for the user cycle.
You can create the sc.com file with a text editor like the WordPad or Notepad.

Text definition rules


The "//" symbol indicates the beginning of a cycle description.
If you have created an image to display on the left of the screen at cycle start, call the image at the first line. The image is
followed by the cycle name written in brackets.
Now define the parameters for the individual variables according to the format shown in the table below:
Bit Description of the parameters Entry
1 Start of variable definition (
2 Variable type R - REAL
I - INTEGER
C - CHAR
S - STRING
3 Separator /
4 • Minimum value + space + maximum value • Minimum value + space + maximum value
• * + values available for selection • * + different values (separated with space)

Note that you can also define different pictures for the
characters.
5 Separator /
6 Default value Value is missing in the cycle if no entry is made.
7 Separator /
8 Short parameter text $ + the identifier (the short description of the selected
parameter, which will display in the upper left corner of the
parameter screen; defined in the extended user text file)
9 End of variable definition )
10 Start of description [
11 Parameter name Text preceding the input field; a maximum of five charac-
ters in length
12 End of description ]
13 Parameter-specific image /B + bmp file name (without file extension)

Function Manual
292 6FC5397-7EP40-0BA4, 07/2018
Note
Separators, start and end identifiers must always be entered.
The bits 4, 6, and 13 can be left blank.
If no texts are stored with the $ identifier, three question marks appear in the associated fields on the screen.

Example
//CN1(CYCLE100)
(R/0 99999.999//$83020)[DIA]
(R/0 99999.999//$83021)[DIAF]
(R/-9999.999 99999.999//$83022)[STAP]
(R/-9999.999 99999.999//$83023)[ENDP]
(R/0 99999.999//$83024)[MID]
(R/0 99999.999//$83025)[UX]
(I/*0 1 2/0/$83026)[MACH]/B CN1
(R/1 99999.999/1/$83027)[VRT]
M17

27.7.4 Creating the user cycle file


You can create a user cycle file according to different machining functions. It is a subroutine program that can be used at
calling a cycle.

Naming rule
CYCLExxx.SPF
Here "xxx" refers to the cycle number. It must not exceed four digits..

Note
The name of a user cycle must not be same with that of a standard Siemens cycle. It is recommend to use a cycle number
with the range of 100 to 800.

Programming example
Create the program with a wordpad or notepad.
As a cycle screen always also transfers values as call parameters to the user cycle, the transfer interface is defined as
follows.
PROC CYCLE100(REAL DIA,REAL DIAF,REAL STAP,REAL ENDP,REAL MID,REAL UX,INT MACH,REAL VRT)
SAVE SBLOF DISPLOF
PROC is a keyword followed by the cycle name with the cycle number. All the transfer parameters for the screen are
contained within brackets with the data type and name separated by commas.
PROC CYCLE100(REAL DIA,REAL DIAF,REAL STAP,REAL ENDP,REAL MID,REAL UX,INT MACH,REAL VRT)
SAVE SBLOF DISPLOF
DEF REAL VAR1
IF $P_EP[X]<DIA GOTOF LL1
LL3:
IF DIAF>DIA GOTOF END2
START:
IF MACH==0 GOTOF ROUGHING1
IF MACH==1 GOTOF FINISHING
IF MACH==2 GOTOF ROUGHING1
DEF REAL VAR1
ROUGHING1:
R101=(DIA-DIAF)/2-UX
R102=R101/MID

Function Manual
6FC5397-7EP40-0BA4, 07/2018 293
R103=TRUNC(R102)
R104=0
VAR1=DIA
IF R103<=1 GOTOF ROUGHING2
LL2:
SBLON
G90 G0 X=VAR1 Z=STAP+2
G1 Z=ENDP
G91 X=MID
G0 G91 X=VRT Z=VRT
G90 G0 Z=STAP+2
SBLOF
VAR1=VAR1-2*MID
R104=R104+1
IF R104<=R103 GOTOB LL2
IF R104>R103 GOTOF ROUGHING2
ROUGHING2:
SBLON
G90 G0 X=DIAF+UX
G1 Z=ENDP
G0 G91X=VRT Z=VRT
G90 G0 X=DIA+2
Z=STAP+2
IF MACH==2 GOTOF FINISHING
SBLOF
RET
FINISHING:
SBLON
G0 X=DIAF
G1 Z=ENDP
G1 X=DIA+VRT
G0 G91X=VRT Z=VRT
G90 Z=STAP+2
SBLOF
RET
LL1:
IF $P_EP[Z]<STAP GOTOF END1
GOTOB LL3
END1:
SETAL(65000)
STOPRE
M0
RET
END2:
SETAL(65001)
STOPRE
M0
RET

Function Manual
294 6FC5397-7EP40-0BA4, 07/2018
27.7.5 Creating the user cycle alarm file
The user cycle alarm file is required to display alarm numbers and alarm messages for user cycles.

Naming rule
alc_<LANG>.txt
Here "<LANG>" refers to the language denotation, for example, eng.
For more information, see Section "Multi-language support for the machine manufacturer's HMI data (Page 278)".

Text definition rules


When defining the texts, you must follow the rule below:
<AlarmNumber> "<Text>" // <lines*chars>
● <AlarmNumber>: here you define the alarm number. The number ranges from 65000 to 69999.
● <Text>: here you define the actual alarm text.
● <lines*chars>: here you specify the available space for the text in the GUI in number of characters and lines. You can
start a new line by inserting the character of "%n".

Example
65000 "Current tool position is incorrect" // 34 ⇒ one line with 34-character space
65001 "DIAF is bigger than DIA" // 23 ⇒ one line with 23-character space

27.7.6 Creating the user cycle bitmap file


The cycle icons must be stored as bitmap files (*.bmp) with a maximum size of 224 * 224 pixels in 16 colors.
The icon name must begin with an uppercase/lowercase "C" and its length must not exceed 32 characters including the file
extension (for example, CN1.bmp).

Note
If 16 colors are not sufficient for the display, you can also use 24-bit color depth bitmaps.

27.7.7 Transferring the desired files to the control system


Proceed as follows to transfer the required files to the control system.
Prerequisite: A USB memory stick which contains all required files is inserted into the USB interface at the front of the PPU.

Transferring the user cycle file


1. Select the system data operating area.
+
2. Open the USB storage directory through the following softkey operations:


3. Select the desired user cycle file (for example, CYCLE100.SPF) and then press this softkey
to copy the file.

4. Press this softkey to open the user cycle directory.

5. Press this softkey to paste the file.

Function Manual
6FC5397-7EP40-0BA4, 07/2018 295
Transferring the bitmap file
1. Press this softkey to switch to the USB storage directory.

2. Select the desired bitmap file(s) (for example, cn1.bmp, cn2.bmp...) and then press this
softkey to copy the file(s).
Note that you can use the following key to select multiple files:

3. Press this softkey to open the window of system data.

4. Find the folder for storing the user cycle files through the following operations, and press
this key to open it:

→ →
5. Press this key to open the following user cycle bitmap file folder:

6. Paste the user cycle bitmaps with this softkey.

Transferring the user cycle alarm file


1. Press this softkey to switch to the USB storage directory.

2. Locate the user cycle alarm file (for example, alc_eng.txt) and press this softkey to copy the
file.

3. Press this softkey to open the window of system data.

Function Manual
296 6FC5397-7EP40-0BA4, 07/2018
4. Find the following user cycle alarm file folder and press this key to open it:

5. Paste the user cycle alarm file with this softkey.

6. Press this softkey when a message appears prompting you to restart the HMI. The new
data will be active after the HMI restarts successfully.

Transferring the cov.com file and sc.com file


1. Select the system data operating area.
+
2. Open the USB storage directory through the following softkey operations:


3. Select the cov.com and sc.com files and then press this softkey to copy the files.
Note that you can use the following key to select multiple files:

4. Press this softkey to open the window of system data.

5. Find the folder for storing the user cycle files through the following operations, and press
this key to open it:

→ →
6. Press this softkey to replace the following empty files:

Function Manual
6FC5397-7EP40-0BA4, 07/2018 297
7. Press this softkey when a message appears prompting you to restart the HMI. The new
data will be active after the HMI restarts successfully.

Transferring the extended user text file


1. Select the system data operating area.
+
2. Open the USB storage directory through the following softkey operations:


3. Locate the extended user text file (for example, almc_eng.txt) and press this softkey to copy
the file.

4. Find the folder for storing the extended user text file through the following operations, and
press this key to open it:

→ →

5. Press this softkey to paste the extended user text file.

6. Press this softkey when a message appears prompting you to restart the HMI. The new
data will be active after the HMI restarts successfully.

27.7.8 Calling the created user cycle


After you transfer all the files necessary for your own cycle to the control system, the cycle is created successfully. Then you
can call the cycle in the program editing operating area.
Proceed as follows to call the created cycle, for example, CYCLE100.
1. Select the program management operating area.

Function Manual
298 6FC5397-7EP40-0BA4, 07/2018
2. Select the desired part program and press this key to open it in the program editor.

Then you can see the softkey you define at the fifth horizontal softkey, for example:

3. Press this softkey to open the lower-level menu for calling user cycles, for example:

Function Manual
6FC5397-7EP40-0BA4, 07/2018 299
4. Press this softkey to open the window for CYCLE100, for example:

5. Set the parameters as desired, and press this softkey to confirm and return to the program
editing screen. Then you can find CYCLE100 inserted in your program.

27.7.9 Editing the user cycle screens


You can edit the softkeys, identifiers, bitmaps or parameters for user cycles.
To do so, export the relevant files and edit them on a PC. After that, import them back to the respective folders and restart
the control system.

27.8 Using the machine manufacturer's machine data descriptions


If necessary, you can use your own descriptions for the PLC machine data 14510, 14512, 14514, 14516, and 17400.
Proceed as follows to edit the machine data description:
1. Select the system data operating area.
+
2. Press this softkey, and the window of basic NC data opens by default.

3. Press this softkey and all machine data available for editing is listed.

4. Use the cursor keys to select a desired MD.

5. Press this softkey to activate the input field at the bottom of the screen and enter the de-
sired description text, for example:

Function Manual
300 6FC5397-7EP40-0BA4, 07/2018
6. Confirm your entry with this softkey or the following key:

After you have modified the description of at least one MD on the control system, you can find an OEM MD description file
(.txt) which contains the manufacturer's MD descriptions edited under the current system language. You can access this file
through the following operations:

+ → → → →

An OEM MD description file is language-dependent. You can copy the file in the desired language to your computer using a
USB memory stick for backup or batch editing of the machine data descriptions.

27.9 Using the machine manufacturer's R variable names


If necessary, you can define the names of the R variables as desired.
Proceed as follows to define your own R variable names:
1. Select the offset operating area.

2. Press this softkey to open the list of R variables.

3. Press this softkey to activate the name display of all R variables.

4. Use the cursor keys to select an R variable and enter the desired name in the name input
field, for example:

5. Press this key or move the cursor to confirm your entries.

Function Manual
6FC5397-7EP40-0BA4, 07/2018 301
After you have defined at least one R variable name on the control system, you can find an OEM R variable name file (.txt)
which contains the manufacturer's R variable names defined under the current system language. You can access this file
through the following operations:

+ → → → →

An OEM R variable name file is language-dependent. You can copy the file in the desired language to your computer using
a USB memory stick for backup or batch editing of the R variable names.

27.10 Generating user dialogs using customized EasyXLanguage scripts


27.10.1 Scope of functions
The "Generate user dialogs" function offers an open structure and enables the user to develop customer-specific and
application-specific user interfaces in the SINUMERIK 808D ADVANCED.
The control system offers an XML-based script language for generating user dialogs.
This script language makes it possible to display machine-specific menus and dialog forms in the user-
defined operating area on the HMI.

All dialog forms can be designed on a language-neutral basis. In such cases, the system reads out the texts to be displayed
from the accompanying language database.

Use
The defined XML instructions offer the following properties:
● Display dialogs containing the following elements:
– Softkeys
– Variables
– Texts and Help texts
– Graphics and Help displays
● Call dialogs by performing the following operation:
– Pressing the (start) softkeys
● Restructure dialogs dynamically by performing the following operations:
– Editing and deleting softkeys
– Defining and designing variable fields

Function Manual
302 6FC5397-7EP40-0BA4, 07/2018
– Inserting, exchanging, and deleting display texts (language-dependent or language-neutral)
– Inserting, exchanging, and deleting graphics
● Initiate operations in response to the following actions:
– Displaying dialogs
– Inputting values (variables)
– Selecting a softkey
– Exiting dialogs
● Exchange data between dialogs
● Operate variables as follows:
– Read (NC, PLC, and user variables)
– Write (NC, PLC, and user variables)
– Combine with mathematical, comparison, or logic operators
● Execute the following functions:
– Subprograms
– File functions
– PI services
● Apply protection levels according to user classes
The valid elements (tags) for the script language are described in Section "XML identifier (Page 306)".

Note
The following section is not intended as a comprehensive description of XML (Extensible Markup Language). Please refer to
the relevant specialist literature for additional information.

27.10.2 Fundamentals of configuration

Configuration files
The defining data for new user interfaces are stored in configuration files. These files are automatically interpreted and the
result displayed on the screen. Configuration files are not stored in the software supplied and must first be set up and loaded
by the user.
Example configuration files (EasyXLanguage scripts) are included in the ...\examples\SINUMERIK_808D\easyXL folder of
the Toolbox.
An XML editor or another form of text editor can be used to generate the configuration files.

Note
The configuration file name is case-insensitive.

Menu tree principle


Several interlinked dialogs create a menu tree. A link exists if you can switch from one dialog to another. You can use the
newly defined horizontal/vertical softkeys in this dialog to call the preceding or any other dialog.

Function Manual
6FC5397-7EP40-0BA4, 07/2018 303
Configured start softkeys can be used to create a further menu tree behind the start menu:

Start menu
Pressing this key on the PPU calls the start menu, which is defined by the name "main" in the "xmldial.xml"
file. The start menu is used to initiate your own operating sequences.
You can use the "main" menu to link your own dialogs or additional softkey bars so that they can be loaded
and used for executing additional actions.

27.10.3 Configuration files (EasyXLanguage scripts)


The following files in the relevant manufacturer's folder on the control are needed to configure user dialogs:
File type Name of the file Meaning
Script file "xmldial.xml" This script file uses XML tags to control
how the configured softkey menus and
dialog forms will appear in the user-
defined operating area on the HMI.
Bitmaps E.g. "text.bmp" or "text.png" The control system supports BMP and
PNG formats.
XML files inserted in the "xmldi- E.g. "machine_settings.xml" These files also contain programmed
al.xml" control file with the instructions for displaying the dialog
"INCLUDE" XML tag. forms and parameters on the HMI.

Function Manual
304 6FC5397-7EP40-0BA4, 07/2018
Dependencies of files for configuring user dialogs

Loading configuration
Make sure that you copy the generated configuration files to the following path from a USB stick directly or from a network
drive via Ethernet connection:

+ → → → → →

Note
When a script file "xmldial.xml" is available in the folder above, you can call the start menu in the user-defined operating
area.
After the initial copying process, reset the control system through the following operations:

+ → → →

Function Manual
6FC5397-7EP40-0BA4, 07/2018 305
Example of a user dialog on the HMI
The configured softkey menus are displayed when the user-defined operating area is called. This enables the user to
operate the dialog forms which have been configured.

27.10.4 Structure of configuration file

Overview
A configuration file consists of the following elements:
● Description of the "main" start menu with start softkeys
● Definition of dialogs
● Definition of variables
● Description of the blocks
● Definition of softkey bars

27.10.5 Language dependency


Language-dependent texts are used for:
● Softkey labels
● Headers
● Help texts
● Any other texts

27.10.6 XML identifier

27.10.6.1 General structure

Structure and instructions of the script file for dialog configuration


All dialog configurations should be stored in the DialogGui tag.
<DialogGui>

</DialogGui>

Function Manual
306 6FC5397-7EP40-0BA4, 07/2018
Example:
<?xml version="1.0" encoding="utf-8"?>
<DialogGui>

<FORM name ="Hello_World">
<INIT>
<CAPTION>Hello World</CAPTION>
</INIT>
...
</FORM>

</DialogGui>

Instructions
The language offers the following instructions for executing conditional instructions and loop controls:
● For loop
● While loop
● Do while loop
● Conditional processing
● Switch and case instructions
● Operator controls in a dialog form
● Softkey descriptions
● Define variables
For a detailed description of instructions, see Instruction/identifier description (Page 307).

27.10.6.2 Instruction/identifier description


The following XML tags are defined for generating dialogs and menus, and for executing program sequences:

Note
Attribute values that are in quotation marks "<...>" should be replaced by the currently used expressions.
Example:
<DATA_LIST action="read/write/append" id="<list name>">
is programmed as follows:
<DATA_LIST action="read/write/append" id="my datalist">

Tag identifier Meaning


BREAK Conditional cancellation of a loop.
CONTROL The tag is used to generate control elements.
CONTROL_RESET The tag enables one or more control components to be restarted.

Syntax:
<CONTROL_RESET resetnc="TRUE" />

Attributes:
• RESETNC = "TRUE"

The NC component is restarted.

Function Manual
6FC5397-7EP40-0BA4, 07/2018 307
Tag identifier Meaning
CREATE_CYCLE_EVENT If the parser starts to process the tag CREATE_CYCLE, initially, the message
<CREATE_CYCLE_EVENT> is sent to the active form. This message can be used for
preparing the cycle parameters, before the parser generates the NC operation from the
parameter list and the generation rule.

Syntax:
<CREATE_CYCLE_EVENT>


</CREATE_CYCLE_EVENT>

Example:
<SOFTKEY_OK>

<CREATE_CYCLE />


<SOFTKEY_OK>

<FORM>
<NC_INSTRUCTION>MY_CYCLE($P1, $P2)</ NC_INSTRUCTION >


<CREATE_CYCLE_EVENT>
<type_cast name="P1" type="int"/>

<OP> P1 = P1 * 150 </OP>

</CREATE_CYCLE_EVENT>

</FORM>

Function Manual
308 6FC5397-7EP40-0BA4, 07/2018
Tag identifier Meaning
DATA The tag enables the NC, PLC, GUD and drive data to be directly written to.
The Addressing components (Page 358) section contains details on address formation.

Attribute:
• name

Variable address

Tag value:
All alphanumeric terms are approved as tag values. If a value is to be written from a local
variable directly, the $ replacement operator preceding the name of the local variable
should be used.

Syntax:
<DATA name="<variable name>"> value </DATA>

Example:
<DATA name = "plc/mb170"> 1 </DATA>

<LET name = "tempVar"> 7 </LET>
<!— the contents of the local variables "tempVar" are written to
bit memory byte 170 →
<DATA name = "plc/mb170">$tempVar</DATA>
DATA_LIST The tag enables the listed drive and machine data to be saved or restored.
Addresses are listed in lines. Section "Addressing components (Page 358) " describes
how addresses are formed.
Up to 20 temporary data lists can be created.

Attributes:
• action

read – the values of the listed variables are stored in a temporary memory
append – the values of the listed variables are added to an existing list
write – the backed up values are copied to the relevant machine data
• id

The identifier identifies the temporary memory

Syntax:
<DATA_LIST action="<read/write/append>" id="<list name>">
NC/PLC address compilation
</DATA_LIST>

Example:
<DATA_LIST action ="read" id="<name>">
nck/channel/parameter/r[2]
nck/channel/parameter/r[3]
nck/channel/parameter/r[4]
$MN_USER_DATA_INT[0]

</ DATA_LIST>
<DATA_LIST action ="write" id="<name>" />

Function Manual
6FC5397-7EP40-0BA4, 07/2018 309
Tag identifier Meaning
DO_WHILE Do while loop
DO
Instructions
WHILE (Test)

Syntax:
<DO_WHILE>
Instructions

<CONDITION>…</CONDITION>
</DO_WHILE>
The Do while loop comprises a block of instructions and a condition. The code in the
instruction block is executed first, then the condition is applied. If the condition is true, the
function executes the code section again. This is continually repeated until the condition is
false.

Example:
<DO_WHILE>
<DATA name = "PLC/qb11"> 15 </DATA>
<CONDITIION> "plc/ib9" == 0 </CONDITION>
</DO_WHILE>
DYNAMIC_INCLUDE The tag includes an XML script file.
Contrary to the INCLUDE tag, read-in is first only realized when executing the corre-
sponding operation.
For large projects, the use of the tag reduces the load time of the customer area and/or
the cycle support. Further, the average level of resources is reduced, as not all of the
dialogs are always called during a session.

Syntax:
<DYNAMIC_INCLUDE src="path name"/>

Example:
<SOFTKEY POSITION="3">
<CAPTION>MY_MENU</CAPTION>
<DYNAMIC_INCLUDE src/>
<NAVIGATION>MY_MENU</NAVIGATION>
</SOFTKEY>
ELSE Instruction for situations where the condition has not been met (IF, THEN, ELSE)

Function Manual
310 6FC5397-7EP40-0BA4, 07/2018
Tag identifier Meaning
FOR For loop
for (initialization; test; continuation) instruction(s)

Syntax:
<FOR>
<INIT>…</INIT>
<CONDITION>…</CONDITION>
<INCREMENT>…</INCREMENT>
Instructions

</FOR>
The For loop is executed as follows:
1. Evaluation of the expression initialization (INIT).
2. Evaluation of the expression test (CONDITION) as a Boolean expression.
If the value is false, the For loop is exited.
3. Execution of the following instructions.
4. Evaluation of the expression continuation (INCREMENT).
5. Continue with 2.
All the variables within the INIT, CONDITION, and INCREMENT branches are declared
and initialized outside the FOR loop.

Example:
<LET name = "count">0</LET>
<FOR>
<INIT>
<OP> count = 0</OP>
</INIT>
<CONDITION> count <= 7 </CONDITION>
<INCREMENT>
<OP> count = count + 1 </OP>
</INCREMENT>
<OP> "plc/qb10" = 1+ count </OP>
</FOR>

Function Manual
6FC5397-7EP40-0BA4, 07/2018 311
Tag identifier Meaning
FORM The tag contains the description of a user dialog. The relevant tags are described in the
section on generating menus and dialog forms.

Syntax:
<FORM name="<dialog name>" color="#ff0000">

Attributes:
• color

Background color of the dialog form (color coding, see Section "Color coding
(Page 329)")
– Default white
• name

Identifier of the form


• type
Permissible value is cycle , which identifies a user cycle screen form
• xpos

X-position of the top left corner of the dialog box (optional)


• ypos

Y position of the top left corner (optional)


• width

Extension in the X direction (in pixels) (optional)


• height

Extension in the Y direction (in pixels) (optional)


FORM Continued Attributes:
• truetypefont

Whether the font of the dialog form is of the true type (optional)

Values:
• true

The font of the dialog form is of the true type regardless of the value of machine data
MD1113
• false

The font of the dialog form is set via bit 0 of MD1113 (default)
– Bit 0 = 0: the fixed type font is used for text display (default)
– Bit 0 = 1: the true type font is used for text display

Example:
<FORM name="dialog name" truetypefont="true">



</form>

Function Manual
312 6FC5397-7EP40-0BA4, 07/2018
Tag identifier Meaning
FORM Continued You can define how the images in a form will be displayed on the screen with a resolution
of 800x600 pixels, that is, adapt the image size to the screen, by setting bit 1 of MD1113.

Precondition:
This function is applicable only when the script file is copied to the control system with a
screen resolution of 800x600 pixels.

Values:
• Bit 1 = 0: the image is automatically scaled up by a factor of 1.25 (default)
• Bit 1 = 1: the original image size is kept without automatic scaling
IF Conditional instruction (IF, THEN, ELSE)
The THEN and ELSE tags are enclosed in the IF tag.
The condition that is executed in the CONDITION tag follows the IF tag. The further pro-
cessing of the instructions depends upon the result of the operation. If the function result
is true, then the THEN branch is executed and the ELSE branch is skipped. If the result of
the function is false, the parser executes the ELSE branch.

Syntax:
<IF>
<CONDITION> Condition != 7 </CONDITION>
<THEN>
Instruction for the case: Condition fulfilled
</THEN>
<ELSE>
Instruction for the case: Condition not fulfilled
</ELSE>
</IF>
Or simplified as follows (cannot be used for addresses that require quotation marks):
<IF CONDITION>="Condition != 7">
<THEN>
Instruction for the case: Condition fulfilled
</THEN>
<ELSE>
Instruction for the case: Condition not fulfilled
</ELSE>
</IF>

Example:
<IF>
<CONDITION> "plc/mb170" != 7 </CONDITION>
<THEN>
<OP> "plc/mb170" = 7 </OP>

</THEN>
<ELSE>
<OP> "plc/mb170" = 2 </OP>

</ELSE>
</IF>

Function Manual
6FC5397-7EP40-0BA4, 07/2018 313
Tag identifier Meaning
INCLUDE The instruction includes an XML description.
(see also DYNAMIC_INCLUDE in this table)

Attribute:
• src

Contains the path name.

Syntax:
<?INCLUDE src="<Path name>" ?>

Function Manual
314 6FC5397-7EP40-0BA4, 07/2018
Tag identifier Meaning
LET The instruction creates a local variable under the specified name.
Fields:
Using the attribute dim (dimension) single or two-dimensional fields can be created. The
field index addresses the individual field elements.
For a two-dimensional field, initially the line index is specified and then the column index.
• Single-dimensional field:

Indices 0 to 4

• Two-dimensional field:

Index line 0 to 3 and index column 0 to 5

Attributes:
• name

Variable name
• type

The variable type can be an integer (INT), unsigned integer (UINT), double
(DOUBLE), float (FLOAT), string (STRING), or STRUCT. The variable type can also
be a structure defined with typedef. If there is no type instruction specified, the system
creates an integer variable.
<LET name = "VAR1" type = "INT" />
• permanent

If the attribute is set to true, then the variable value is saved permanently. This attrib-
ute is only effective for a global variable.
• dim

The following number of field elements must be specified. For a two-dimensional field,
the second dimension is specified after the first dimension separated by a comma.

A field element is accessed via the field index, which is specified in square brackets
after the variable name.

name[index] or name[row,column]
– Single-dimensional field: dim="<Number of elements>"
– Two-dimensional field: dim="<Number of lines>,<number of columns>"

Non-initialized field elements are pre-assigned with "0".

Function Manual
6FC5397-7EP40-0BA4, 07/2018 315
Tag identifier Meaning
LET Continued Example:
One-dimensional field:
<let name="array" dim="10"></let>
Two-dimensional field:
<let name="list_string" dim="10,3" type="string"></let>

Pre-assignment:
A variable can be initialized with a value.
<LET name = "VAR1" type = "INT"> 10 </LET>

If values comprising NC or PLC variables are saved in a local variable, the assignment
operation automatically adapts the format to that of the variables which have been loaded.
• Pre-assignment for a string variable:

Texts containing more than one line can be assigned to a string variable if the format-
ted text is transferred as a value. If a line is to end with a line feed <LF> (line feed) ,
the characters "\\n" should be added at the end of the line.

<LET name = "text" type = "string"> F4000 G94\\n


G1 X20\\n
Z50\\n
M2\\n
</LET>>

Fields (Arrays):
<let name="list" dim="10,3">
{1,2,3},
{1,20}
</let>

<let name="list_string" dim="10,3" type="string">


{"text 10","text 11"},
{"text 20","text 21"}
</let>

Assignment:
Values made up of the machine data or subroutines can be assigned to a variable using
the assignment operation "=".
A variable remains valid until the end of the higher-level XML block.
Variables which are to be available globally should be created directly after the DialogGUi
tag.
The following must be observed for a dialog box:
• The message processing opens the corresponding tag.
• The tag is closed after the message has been executed.
• All variables within the tag are deleted when closing.

Function Manual
316 6FC5397-7EP40-0BA4, 07/2018
Tag identifier Meaning
LET Continued Variable type struct:
This variable type contains a composition of variables that can be addressed using the
structure name. A structure can contain all variable types and structures.

Within the structure, a variable is declared with the "element" tag. The attributes of the
tags and the initialization correspond to the attributes and initialization of the let instruc-
tion.

<let name="name" type="struct">

<element name="<Name>" type="<Variable type>" />

</let>
LET Continued Access to a variable of the structure is via the structure name and variable name. Both
names are separated by a point operator.

<op>

Structure_name.variable_name = value;

</op>

Example:
<let name="info" type="struct">

<element name="id" type="int" />

<element name="name" type="string" />

<element name="phone" type="string" />

</let>

<op>

info.id = 1;

info.name = _T"my name";

info.phone
= _T"0034 45634";

</op>

Initialization of structures:
Structures can be initialized when the variables are created by specifying an initial value
for each structure element. In an array of structures, each structure must be separated
from the others by braces.
MSG The operator component shows the message which is indicated in the tag.

Example:
<MSG text ="my message" />

Function Manual
6FC5397-7EP40-0BA4, 07/2018 317
Tag identifier Meaning
MSGBOX The instruction opens a message box whose return value can be used for branching.

Syntax:
<MSGBOX text="<Message>" caption="<caption>" retvalue="<variable
name>" type="<button type>" />

Attributes:
• text

Text
• retvalue

Name of the variables to which the return value is copied:

1 – OK

0 – CANCEL
• type

Acknowledgment options:

"BTN_OK"

"BTN_CANCEL"

"BTN_OKCANCEL"

Example:
<MSGBOX text="Test message" retvalue="result" type="BTN_OK" />

Function Manual
318 6FC5397-7EP40-0BA4, 07/2018
Tag identifier Meaning
OP The tag executes the specified operations.
The operations listed in Section "Operators (Page 329)" can be executed.
For the purpose of accessing the NC, PLC, and drive data, the complete variable name
should be placed in quotation marks. Section "Addressing components (Page 358) " de-
scribes how addresses are formed.
PLC: "PLC/MB170"
NC: "NC/Channel/…"

Example:
<LET name = "tmpVar" type="INT"> </LET>
<OP> tmpVar = "plc/mb170" </OP>
<OP> tmpVar = tmpVar *2 </OP>
<OP> "plc/mb170" = tmpVar </OP>

More than one equation can be used within an operation tag. A semicolon marks the end
of the instruction.

Example:
<op>
x = x+1;
y = y+1;
</op>

Character string processing:


The operation instruction is able to process character strings and assign the results to the
string variable specified in the equation.
The identifier _T should be placed at the start as a means of identifying text terms. For-
matting of variable values is also possible. The identifier _F should be placed at the start
of the formatting regulation, followed by the format instruction. The address is then speci-
fied for the variable.

Example:
<LET name="buffer" type="string"></LET>



<OP> buffer = _T"unformatted value R0= " +
"nck/Channel/Parameter/R[0]" + _T" and " + _T"$$85051" + _T" for-
matted value R1 " + _F%9.3f"nck/Channel/Parameter/R[1]" </OP>

Function Manual
6FC5397-7EP40-0BA4, 07/2018 319
Tag identifier Meaning
OPERATION Operation
Instructions can be moved within an equation.
Move left "<<" operator
The << function moves bits to the left. You can specify the value and the number of move
increments directly or with a variable. If the limit of the data format is reached, the bits will
be moved beyond the limit without an error message being issued.
Execution rule
Execution from left to right; '+' and '-' have priority over '<<' and '>>'

Example:
<op> idx = idx << 2 </op>
<op> idx = 3 + idx << 2 </op>

Move right ">>" operator


The >> function moves bits to the right. You can specify the value and the number of
move increments directly or with a variable. If the limit of the data format is reached, the
bits will be moved beyond the limit without an error message being issued.
Execution rule
Execution from left to right; '+' and '-' have priority over '<<' and '>>'

Example:
<op> idx = idx >> 2 </op>
<op> idx = 3+idx >> 2</op>
POWER_OFF A message prompts the operator to switch the machine off. The message text is perma-
nently saved in the system.

Function Manual
320 6FC5397-7EP40-0BA4, 07/2018
Tag identifier Meaning
PRINT The tag outputs a text in the dialog line or copies the text to the variable specified.
If the text contains formatting identifiers, the variable values are inserted at the appropri-
ate places.

Syntax:
<PRINT name="Variable name " text="text %Formatting "> Variable, …
</PRINT>
<PRINT text="text %Formatting"> Variable, … </PRINT>
Attributes:
• name

Name of the variable where the text is to be stored (optional)


• text

Text

Formatting:
The character "%" causes the variable specified as the value to be formatted.
%[Flags] [Width] [.decimal places] type
• Flags:
Optional character for defining output formatting:
– Right-justified or left-justified ("-") for left-justified
– Add leading zeros ("0")
– Fill with blanks
• Width:
The argument defines the minimum output width for a non-negative number. If the
value to be output has fewer places than the argument defined, the missing spaces
are filled with blanks.
• Decimal places:
With floating-point numbers, the optional parameter defines the number of decimal
places.
• Type:
The type character defines which data formats are transferred for the print instruction.
These characters need to be specified.
– d: Integer value
– f: Floating-point number
– s: String
PRINT Continued Values:
Number of variables whose values are to be inserted into the text.
The variable types must match the corresponding type identifier for the formatting instruc-
tion and must be separated from one another with a comma.

Example:
Output of a text in the information line
<PRINT text="Infotext" />
Output of a text with variable formatting
<LET name="trun_dir"></LET>
<PRINT text="M%d">trun_dir</PRINT>
Output of a text in a string variable with variable formatting
<LET name="trun_dir"></LET>
<LET name="str" type="string" ></LET>
<print name="str" text="M%d ">trun_dir</print>

Function Manual
6FC5397-7EP40-0BA4, 07/2018 321
Tag identifier Meaning
PROGRESS_BAR The tag opens or closes a progress bar. The bar is displayed below the application win-
dow.

Syntax:
<PROGRESS_BAR type="<true/false>"> value </ PROGRESS_BAR>

Attributes:
• type = "TRUE" - opens the progress bar
• type = "FALSE" - closes the progress bar
• min

(optional) – minimum value


• max

(optional) – maximum value

Value:
• Value

Percentage position of the bar

Example:
<PROGRESS_BAR type="true" min="0" max="101" >20<
/PROGRESS_BAR>......<PROGRESS_BAR >50<
/PROGRESS_BAR>......<PROGRESS_BAR type="false" >100<
/PROGRESS_BAR>
SEND_MESSAGE The tag sends a message with two parameters to the active form, which is processed in
the tag message.

Syntax:
<SEND_MESSAGE>p1, p2</SEND_MESSAGE>

Example:
<SOFTKEY POSITION="3">
<caption>Set%nParameter</caption>
<send_message>1, 0</send_message>
</SOFTKEY>

<FORM>


<MESSAGE>
<SWITCH>
<CONDITION>$message_par1</CONDITION>
<CASE value="1">


</CASE>
</SWITCH>
</MESSAGE>

</FORM>

Function Manual
322 6FC5397-7EP40-0BA4, 07/2018
Tag identifier Meaning
SHOW_CONTROL The visibility of a control can be controlled using the tag.

Syntax:
<SHOW_CONTROL name="<name>" type="<type>" />

Attributes:
• name

Name of the control


• type = "TRUE" - control becomes visible
• type = "FALSE" - control becomes invisible (hidden)

Example:
<SHOW_CONTROL name="myEditfield" type="false" />


<SHOW_CONTROL name="myEditfield" type="true" />
SLEEP The tag interrupts script execution for the specified period. The interruption time is ob-
tained from the transferred value multiplied by the time base.

Syntax:
<SLEEP value="Interruption time" />

Example:
Wait time, 30 * time base.
<SLEEP value="30" />
STOP Interpretation is canceled at this point.
SWITCH The SWITCH instruction describes a multiple choice. A term is evaluated once and com-
pared with a number of constants. If the expression matches the constants, the instruc-
tions are executed within the CASE instruction.
The DEFAULT instruction is executed when none of the constants match the expression.

Syntax:
<SWITCH>
<CONDITION> Value </CONDITION>
<CASE value="Constant 1">
Instructions

</CASE>
<CASE value="Constant 2">
Instructions

</CASE>
<DEFAULT>
Instructions

</DEFAULT>
</SWITCH>
THEN Instruction if the condition has been fulfilled (IF, THEN, ELSE)

Function Manual
6FC5397-7EP40-0BA4, 07/2018 323
Tag identifier Meaning
TYPE_CAST The tag converts the data type of a local variable.

Syntax:
<type_cast name="variable name" type=" new type" />
Attributes:
• name

Variable name
• type

The new data type is assigned to the variable.


• convert

The new data type is assigned to the variable. The variable value is also converted to
the new data type.
TYPEDEF A new identifier for a data type can be defined with the “typedef” tag. This has the benefit
for the structure definitions that the data type can be defined once and then used as a
data type in a LET instruction.
The identifier and type are expected as attributes.
The parser supports only the specification of structure definitions.

In the type definition, a variable is declared with the “element” tag. The attributes of the
tag correspond to the attributes of the let instruction.

<typedef name="<identifier>" type="struct">


<element name="<name>" type="<variable type>" />



</typedef>

After definition, the identifier can be used as a data type for the LET instruction.

<let name="<variable name>" type="<identifier>"></let>

Example:
<typedef name="my_struct" type="struct">
<element name="id" type="int" />
<element name="name" type="string" />
<element name="phone" type="string" />
</typedef>

<let name="info" type="my_struct"></let>




<op>
info.id = 1;
info.name = _T"my name";
info.phone= _T"0034 45634";
</op>

Function Manual
324 6FC5397-7EP40-0BA4, 07/2018
Tag identifier Meaning
TYPEDEF Continued Some predefined functions expect variables of structure type RECT, POINT, or SIZE as
the call parameter. These structures are defined in the file struct_def.xml.

RECT:
<typedef name="StructRect" type="struct" >
<element name="left" type="int">0</element>
<element name="top" type="int">0</element>
<element name="right" type="int">0</element>
<element name="bottom" type="int">0</element>
</typedef>

POINT:
<typedef name="StructPoint" type="struct" >
<element name="x" type="int">0</element>
<element name="y" type="int">0</element>
</typedef>

SIZE:
<typedef name="StructSize" type="struct" >
<element name="width" type="int">0</element>
<element name="height" type="int">0</element>
</typedef>
WAITING The tag waits for the component to undergo a hot restart after an NC or drive reset.

Attributes:
• WAITINGFORNC = "TRUE" - the system waits for the NC to restart

Syntax:
<WAITING WAITINGFORNC = "TRUE"/>

Example:
...
<CONTROL_RESET resetnc = "true"/>
<WAITING waitingfornc = "true"/>
...
WHILE WHILE loop
WHILE (Test)
Instruction

Syntax:
<WHILE>
<CONDITION>…</CONDITION>
Instructions

</WHILE>
The While loop executes a sequence of instructions repeatedly while a condition is met.
This condition is tested before the sequence of instructions is executed.

Example:
<WHILE>
<CONDITION> "plc/ib9" == 0 </CONDITION>
<DATA name = "PLC/qb11"> 15 </DATA>
</WHILE>

Function Manual
6FC5397-7EP40-0BA4, 07/2018 325
Tag identifier Meaning
XML_PARSER The “XML_PARSER” tag can be used to parse XML files.
The parser interprets an XML file and calls defined call-back functions. Each call-back
function belongs to a predefined event. The programmer can process the XML data within
this function.

Predefined events:
• start document
The parser opens the document and starts parsing.
• end document
The parser closes the document.
• start element
The parser has found an element and creates a list with all attributes and attribute val-
ues.

These lists are forwarded to the call-back function.


• end element
The end of the element has been found.
• characters
The parser forwards all characters of an element.
• error
The parser has detected a syntax error.
When an event occurs, the parser calls the call-back function and checks the function
return value. If the function returns "true," the parser continues the process.

Interfaces
The value of the name attribute contains the path to the XML file.
To assign events to the call-back functions, the following properties must be specified:
Standard
startElementHandler
endElementHandler
charactersHandler
Optional
errorHandler
documentHandler
The value of an attribute defines the name of the call-back function.

Example:
<XML_PARSER name="f:\appl\xml_test.xml">
<!-- standard handler -->
<property startElementHandler="startElementHandler" />
<property endElementHandler="endElementHandler" />
<property charactersHandler="charactersHandler" />
<!-- optional handler -->
<property errorHandler="errorHandler" />
<property documentHandler="documentHandler" />
</XML_PARSER>

Function Manual
326 6FC5397-7EP40-0BA4, 07/2018
Tag identifier Meaning
XML_PARSER Continued The parser also supplies variables so that the call-back functions can access the event
data.

startElementHandler:
Function parameters
tag_name - tag name
num - number of attributes found
System variables
$xmlAttribute String array that contains the 0-num attribute name range.
$xmlValue String array that contains the 0-num attribute value range.

Example:
<function_body name="startElementHandler" return="true"
parameter="tag_name, num">
<print text="attribute name %s"> $xmlAttribute[0]</print>
<print text="attribute value %s"> $xmlValue [0]</print>
</function_body>

endElementHandler:
Function parameters
tag_name - tag name

Example:
<function_body name="endElementHandler" parameter="tag_name">
<print text="name %s"> tag_name </print>
</function_body>

Function Manual
6FC5397-7EP40-0BA4, 07/2018 327
Tag identifier Meaning
XML_PARSER Continued charactersHandler:
System variables
$xmlCharacters String with data
$xmlCharactersStart Always 0
$xmlCharactersLength Number of bytes

Example:
<function_body name="charactersHandler" return="true" >
<print text="chars %s"> $xmlCharacters </print>
</function_body>

documentHandler:
Function parameters
state 1 start document, 2 end document

errorHandler:
System variables
$xmlErrorString Contains the invalid line (system variable)

Example:
<function_body name="errorHandler" >
<print text="error %s">$xmlErrorString</print>
</function_body>

Call-back result:
$return If 1 (true), the parser continues parsing the file

27.10.6.3 System variables


The system variables can be used in the EasyXLanguage scripts for the data exchange between a script parser and a
program flow.
The table below provides the automatically created system variables that can be used in the relevant tags.
System variable Description Tags where valid
$actionresult Notifies a script parser of whether the event can be execut- KEY_EVENT
ed
$focus_name Contains the name of the control that has the input focus FOCUS_IN
$focus_item_data Contains the numeric value of item_data, which was as- INDEX_CHANGED
signed to the control EDIT_CHANGED
$return Transfers the return values of a subfunction FUNCTION_BODY
$message_par1 Contains the parameters for calling the SEND_MESSAGE MESSAGE
$message_par2 function
$keycode Contains the key codes with executable scripts KEY_EVENT
$actionresult
$xmlAttribute Contains the attribute list of the obtained variables XML_PARSER - startEl-
$xmlValue Contains the value list of the obtained variables ementHandler
$xmlCharacters Contains the data stream
$xmlCharactersStart Contains the start index XML_PARSER - character-
sHandler
$xmlCharactersLength Contains the number of characters saved in a data stream

Function Manual
328 6FC5397-7EP40-0BA4, 07/2018
System variable Description Tags where valid
$mouse_event.type Contains the structures for handing over mouse event pa- MOUSE_EVENT
$mouse_event.x rameters
$mouse_event.y
$mouse_event.id
$mouse_event.buttons
$mouse_event.button

27.10.6.4 Color coding


The color attribute uses the color coding scheme for the HTML language.
In terms of syntax, color specifications consist of the "#" (hash) character and six digits from the hexadecimal system, with
each color represented by two digits.
R – Red
G – Green
B – Blue
#RRGGBB
Example:
color = "#ff0011"

27.10.6.5 Special XML syntax


Characters with special meanings in XML syntax have to be rewritten if they are to be displayed correctly by a general XML
editor.
The following characters are affected:
Character Notation in XML
< &lt;
> &gt;
& &amp;
" &quot;
' &apos;

27.10.6.6 Operators
The operation instruction processes the following operators:
Operator Meaning
= Assignment
== Equal to
<, &lt; Less than
>, &gt; Greater than
<=, &lt;= Less than or equal to
>=, &gt;= Greater than or equal to
| OR operation in bits
|| Logic OR operation
&, &amp; AND operation in bits
&&, &amp;&amp; Logic AND operation
+ Addition
- Subtraction
* Multiplication

Function Manual
6FC5397-7EP40-0BA4, 07/2018 329
Operator Meaning
/ Division
! Not
!= Not equal to
Operation instructions are processed from left to right. It may make sense to place terms in parentheses under certain
circumstances in order to define the priority for executing subterms.

27.10.6.7 Generating softkey menus and dialog forms


User menus can only be inserted if there is a main-menu tag with the name "main" in the XML description. This tag is called
by the system after the user-defined operating area has been activated. Further menu branches and dialog-box activation
can be defined within the tag.

Function Manual
330 6FC5397-7EP40-0BA4, 07/2018
Tag identifier Meaning
FORM This tag contains the description of a user dialog.

Attributes:
• color

Background color of the dialog box (for color coding, see Section "Color coding
(Page 329)")
• name

Identifier of the form


• type

cycle -attribute specifies a cycle form


• xpos

X-position of the top left corner of the dialog box (optional)


• ypos

Y position of the top left corner (optional)


• width

Extension in the X direction (in pixels) (optional)


• height

Extension in the Y direction (in pixels) (optional)


• truetypefont

Whether the font of the dialog form is of the true type (optional)
FORM continued Dialog messages:
• INIT
• PAINT
• TIMER
• CLOSE
• FOCUS_IN
• INDEX_CHANGED
• EDIT_CHANGED
• KEY_EVENT
• MESSAGE

Function Manual
6FC5397-7EP40-0BA4, 07/2018 331
Tag identifier Meaning
FORM continued

FORM continued Syntax:


<FORM name = "<dialog name>" color = "#ff0000">
Example:
<FORM name = "R-Parameter">
<INIT>
<DATA_ACCESS type = "true" />
<CAPTION>R - Parameter</CAPTION>
<CONTROL name = "edit1" xpos = "322" ypos = "34" refvar =
"nck/Channel/Parameter/R[1]" />
<CONTROL name = "edit2" xpos = "322" ypos = "54" refvar =
"nck/Channel/Parameter/R[2]" />
<CONTROL name = "edit3" xpos = "322" ypos = "74"
</INIT>

<PAINT>
<TEXT xpos = "23" ypos = "34">R - Parameter 1</TEXT>
<TEXT xpos = "23" ypos = "54">R - Parameter 2</TEXT>
<TEXT xpos = "23" ypos = "74">R - Parameter 3</TEXT>

</PAINT>

</FORM>
INIT Dialog box message
The tag is executed immediately after the dialog box is generated. All the input elements and
hotlinks for the dialog form should be created here.

Function Manual
332 6FC5397-7EP40-0BA4, 07/2018
Tag identifier Meaning
KEY_EVENT Dialog message
The tag KEY_EVENT can be integrated in the form to evaluate keyboard events. The sys-
tem sends the MF2 keyboard code to the active form if the tag is available in a form. If the
variable $actionresult is not set to zero, the system then subsequently processes the key-
board event.
The keyboard code is provided in the variable $keycode as an integer value.

Example:
The character entered into the variable exclude_key should be filtered-out of the input
stream.

<LET name="stream" type="string"/>


<LET name="exclude_key" type="string"/>

<FORM name = "keytest_form">


<INIT>
<CONTROL name = "p1" xpos = "120" ypos = "84" width ="200"
refvar="stream" hotlink="true" />
<CONTROL name = "p2" xpos = "160" ypos = "104" width ="8"
refvar="exclude_key" hotlink="true" />
</INIT>

<PAINT>
<text xpos = "8" ypos = "84">data stream</text>
<text xpos = "8" ypos = "104">exclude key</text>
</PAINT>

<KEY_EVENT>
<LET name="excl_keycode" type="string"/>
<OP>excl_keycode = exclude_key</OP>
<type_cast name="excl_keycode" convert="int" />
<PRINT text="%d %d">$keycode, excl_keycode</PRINT>

<IF>
<CONDITION>$keycode == excl_keycode</CONDITION>
<THEN>
<op> $actionresult = 0</op>
</THEN>
</IF>

</KEY_IVENT>

</FORM>

Function Manual
6FC5397-7EP40-0BA4, 07/2018 333
Tag identifier Meaning
MESSAGE Dialog message
If the Send_message operation is executed in the script, then the parser processes the tag
message. Values P1 and P2 are provided in the variables $message_par1 and $mes-
sage_par2 (see the "SEND_MESSAGE" tag).

Syntax:
<MESSAGE>
</MESSAGE>

Example:
<LET name="user_selection" />

<SOFTKEY POSITION="3">
<CAPTION>Set%nParameter</CAPTION>
<SEND_MESSAGE>1, 10</SEND_MESSAGE>
</SOFTKEY>

<FORM>


<MESSAGE>
<SWITCH>
<CONDITION>$message_par1</CONDITION>
<CASE value="1">
<OP> user_selection = $message_par2 </OP>


</CASE>
</SWITCH>
</MESSAGE>


</FORM>

Function Manual
334 6FC5397-7EP40-0BA4, 07/2018
Tag identifier Meaning
SEND_MESSAGE The tag sends a message with two parameters to the active form, which is processed in the
tag message (see also MESSAGE).

Syntax:
<SEND_MESSAGE>p1, p2</SEND_MESSAGE>

Example:
<LET name="user_selection" />

<SOFTKEY POSITION="3">
<CAPTION>Set%nParameter</CAPTION>
<SEND_MESSAGE>1, 10</SEND_MESSAGE>
</SOFTKEY>


<FORM>


<MESSAGE>
<SWITCH>
<CONDITION>$message_par1</CONDITION>
<CASE value="1">
<OP> user_selection = $message_par2 </OP>

</CASE>
</SWITCH>
</MESSAGE>


</FORM>
FOCUS_IN Dialog box message
The tag is called if the system places the focus on a control. To identify the control, the sys-
tem copies the name of the control into variable $focus_name and the value of the attribute
item_data into variable $focus_item_data.
This message can be used, for example, to output images depending on the focus position.
Example:
<focus_in>
<PRINT text="focus on filed:%s, %d">$focus_name,
$focus_item_data </PRINT>
</focus_in>
PAINT Dialog box message
The tag is executed when the dialog box is displayed. All the texts and images which are to
be displayed in the dialog box should be specified here.
Further, the tag is executed if the system identifies that parts of the dialog box are to be
redisplayed. For example, this can be initiated by closing high-level windows.
TIMER Dialog box message
The tag is executed cyclically.
Each form is assigned a timer. The tag is executed within a period less than 100 ms.

Function Manual
6FC5397-7EP40-0BA4, 07/2018 335
Tag identifier Meaning
CAPTION The tag contains the title of the dialog box.
This tag should be used within the INIT tag.

Syntax:
<CAPTION>Titel</CAPTION>

Example:
<CAPTION>my first dialogue</CAPTION>
CLOSE Dialog box message
This tag is executed before the dialog box is closed.
CLOSE_FORM The tag closes the active dialog.
This instruction is only necessary if the dialog is opened by the MMC command and the user
is offered a softkey function to close the dialog. Generally, dialogs are automatically man-
aged and do not have to be explicitly closed.

Syntax:
<CLOSE_FORM/>

Example:
<softkey_ok>
<caption>OK</caption>
<CLOSE_FORM />
<navigation>main_menu</navigation>
</softkey_ok>

Function Manual
336 6FC5397-7EP40-0BA4, 07/2018
Tag identifier Meaning
CONTROL The tag is used to generate control elements.
Syntax:
<CONTROL name = "<control name>" xpos = "<X position>" ypos = "<Y
position>" refvar = "<NC variable>" hotlink = "true" format = "<for-
mat>" />

Attributes:
• name

Identifier of the field.

The identifier simultaneously represents a local variable, and must not be used a multiple
number of times in the form.
• xpos

X position of the top left corner


• ypos

Y position of the top left corner


• fieldtype

Field type

If no type is specified, the field is set as an edit field.


– edit

Data can be changed


– readonly

Data cannot be changed

combobox

The field displays the corresponding identifiers instead of numerical values.

If field type combobox is selected, the expressions to be displayed must also be as-
signed to the field.

The <ITEM> tag should be used for this purpose.

The combo box saves the index of the currently selected text in the variable belong-
ing to the control (see the attribute refvar).
– progressbar

A progress bar with a value range of 0 to 100 appears.

The valley value and peak value properties can be used to adapt the value range to
the data to be displayed.

Function Manual
6FC5397-7EP40-0BA4, 07/2018 337
Tag identifier Meaning
CONTROL Continued • fieldtype
– graphicbox

The field type generates a 2D broken line graphic control. Using the tag <ITEM> a
graphical element can be inserted into the control. Parameters width and height
specify the width and height of the box.

After the control has been created, additional elements can be inserted using the
functions loadItem, addItem or insertItem. Parameter itemdata is not evaluated for
this control.
Example:
<control name= "c_gbox1" xpos = "250" ypos="24" width="240"
height="356" fieldtype="graphicbox" refvar="val" hotlink="true"
<property ORDINATE="Y sinus" />
<property ABSCISSA="time *100 ms" />
</control>
CONTROL continued • fieldtype
– listbox

The field type generates an empty list box control.

Using the tag <ITEM> a list box element can be inserted in the list box.

The ITEM attribute value allows this element to be assigned a unique value.

For example, this can be used to identify the element.

Parameters width and height specify the width and height of the list box.

After the control has been created, additional list box elements can be inserted using
the function addItem, insertItem or loadItem. Parameter itemdata is not evaluated for
this control.
– itemlist

The field type generates a static control, which displays the corresponding identifier
instead of numerical values.

The <ITEM> tag can be used to assign an identifier to the field.


• item_data

A user-specific integer value can be assigned to the attribute. This value is given as part
of the FOCUS_IN message for identifying the focus field.
• refvar

Identifier of the reference variable that can be linked to the field (optional).
• hotlink = "TRUE" " If the value of the reference variable changes, then the field is auto-
matically updated (optional).
• format

The attribute defines the display format of the specified variable.

Formatting data, see print-Tag (optional).

Function Manual
338 6FC5397-7EP40-0BA4, 07/2018
Tag identifier Meaning
CONTROL continued Attributes:
• font

The attribute defines the font size used.


– 0
– 1
– 2
– 3
– 4
– 5
• color_bk

The attribute sets the background color of the control.


• color_fg

The attribute sets the foreground color of the control.

Color coding (see Section "Color coding (Page 329)")


• display_format

The attribute defines the processing format of the specified variable. This attribute must
be used when accessing a PLC float variable, as the access is realized by reading a
double word.

The following data formats are permitted:


– FLOAT
– INT
– DOUBLE
– STRING
Assigning expressions (e.g. text or graphic element to be displayed) to a list box, graphics
box or combo box:
Syntax:
<ITEM>Expression</ITEM>
<ITEM value ="<Value>">Expression</ITEM>

Function Manual
6FC5397-7EP40-0BA4, 07/2018 339
Tag identifier Meaning
CONTROL continued Example:
<CONTROL name = "button1" xpos = "10" ypos = "10" fieldtype = " com-
bobox ">
<ITEM>text1</ITEM>
<ITEM>text2</ITEM>
<ITEM>text3</ITEM>
<ITEM>text4</ITEM>
</CONTROL>
If any integer value is to be assigned to an expression, the attribute value = "value" should
be added to the tag.
Rather than consecutive numbers, the control variable now contains the item's assigned
value.

Example:
<CONTROL name = "button1" xpos = "10" ypos = "10" fieldtype = " com-
bobox ">
<ITEM value = "10">text1</ITEM>
<ITEM value = "20">text2</ITEM>
<ITEM value = "12">text3</ITEM>
<ITEM value = "1">text4</ITEM>
</CONTROL>
Example of a progress bar:
<CONTROL name = "progress1" xpos = "10" ypos = "10" width = "100"
fieldtype = "progressbar" hotlink = "true" refvar =
"nck/Channel/GeometricAxis/actProgPos[1]">
<PROPERTY min = "0" />
<PROPERTY max = "1000" />
</CONTROL>
Example, list box:
<let name="item_string" type="string"></let>
<let name="item_data" ></let>

<CONTROL name="listbox1" xpos = "360" ypos="150" width="200"


height="200" fieldtype="listbox" />
• Adding elements:

Elements are added using the function insertitem, additem or loaditem.


• Deleting the content:

The content is deleted using the function empty.

<op> item_string = _T"text1\\n" </op>


<function name="control.additem">_T"listbox1", item_string,
item_data </function>
<op> item_string = _T"text2\\n" </op>
<function name="control.additem">_T"listbox1", item_string,
item_data </function>
CONTROL continued Example itemlist:
<CONTROL name = "itemlist1" xpos = "10" ypos = "10" fieldtype = "
itemlist">
<ITEM value = "10">text1</ITEM>
<ITEM value = "20">text2</ITEM>
<ITEM value = "12">text3</ITEM>
<ITEM value = "1">text4</ITEM>
</CONTROL>

Function Manual
340 6FC5397-7EP40-0BA4, 07/2018
Tag identifier Meaning
CONTROL Continued Changing the control after creation
A control tag changes the properties of an existing control after it has been created. The tag
must be specified with the name of the control to be changed and the new properties. It can
be executed only within a form tag. The following properties can be changed:
• xpos
• ypos
• width
• height
• color_bk
• color_fg
• access level
• fieldtype
• itemdata
• min
• max
• default
The reference variable cannot be modified. If a property is to be changed by triggering by a
softkey event, the send message tag must transfer this request into the form context. The
message tag is used to acquire the message.
Note:
When the script file in an earlier software version is used, check display completeness for a
control due to the changed behavior of the control.
CONTROL Continued Example:
<menu name = "main">
<open_form name = "attrib_form" />
<softkey POSITION="3">
<caption>Set%nro</caption>
<send_message>1, 0</send_message>
</softkey>
<softkey POSITION="4">
<caption>Set%nrw</caption>
<send_message>2, 0</send_message>
</softkey>
</menu>
<form name="attrib_form">
<init>
<control name="c_p0" xpos="60" ypos="70" width="272" />
</init>
<message>
<switch>
<condition>$message_par1</condition>
<case value="1">
<control name="c_p0" fieldtype="static" />
</case>
<case value="2">
<control name="c_p0" fieldtype="edit" />
</case>
</switch>
</message>
</form>

Function Manual
6FC5397-7EP40-0BA4, 07/2018 341
Tag identifier Meaning
CONTROL Continued The following properties can be changed in an operation statement. For this purpose, the
control name and property have to be specified. The property has to be separated by a point
from the control name.
• xpos
• ypos
• width
• height
• color_bk
• color_fg
• access level
• fieldtype
• itemdata
• min
• max
• default
• disable
• tooltip
• font
• factor

Syntax:
<name>.<property>

Example:
<let name="value" />
<let name="w" />
<let name="h" />
<menu name = "main">
<open_form name = "attrib_form" />
<softkey POSITION="3">
<caption>Set%nro</caption>
</softkey>
<op>
c_move.xpos = 300;
value = c_move.xpos;
h = c_move.height;
w = c_move.width;
</op>
</menu>
<form name="attrib_form">
<init>
<control name="c_move" xpos="$xpos" ypos="124" />
</init>
</form>

Function Manual
342 6FC5397-7EP40-0BA4, 07/2018
Tag identifier Meaning
DATA_ACCESS The tag controls the behavior of the dialog forms when user inputs are being saved.
The behavior should be defined within the INIT tag.
If the tag is not used, inputs are buffered in each case.
Exception: Controls for which the hotlink attribute is set to true are always written to and
read directly.

Attribute:
• type = "TRUE" – the input values are not buffered. The dialog form copies the input val-
ues to the reference variables directly.
• type = "FALSE" – the values are only copied to the reference variable with the
UPDATE_CONTROLS type = "FALSE" tag.

Example:
<DATA_ACCESS type = "true" />
EDIT_CHANGED Dialog box message
This tag is called if the contents of an edit control have changed.
To identify the control, the system copies the name of the control into variable $focus_name
and the value of the attribute item_data into variable $focus_item_data.

Example:
<EDIT_CHANGED>
<print text="index changed filed:%s, %d"> $focus_name, $fo-
cus_item_data </print>


</EDIT_CHANGED>
INDEX_CHANGED Dialog box message
The tag is called, if the operator changes the selection of a combo box.
To identify the control, the system copies the name of the control into the variable
$focus_name and the value of the attribute item_data into the variable $focus_item_data.
Note:
A reference variable assigned to the control, has not been aligned to the control variable at
this point in time and contains the index of the previous selection of the combo box.

Example:
<INDEX_CHANGED>
<print text="index changed filed:%s, %d"> $focus_name, $fo-
cus_item_data </print>


</INDEX_CHANGED>

Function Manual
6FC5397-7EP40-0BA4, 07/2018 343
Tag identifier Meaning
MENU The tag defines a menu containing the softkey description and the dialog to be opened.

Attribute:
• name

Menu name

Syntax:
<MENU name = "<menu name>">

<open_form …>

<SOFTKEY …>
</SOFTKEY>
</MENU>
NAVIGATION This tag defines the menu to be called. It can be used within a softkey block, a menu block,
and in a form. If a variable name is assigned to the tag as its value, the parser will activate
the menu stored in the variable.
In a menu block, the navigation is at the position in the instruction. Subsequent instructions
are no longer executed.

Syntax:
<NAVIGATION>menu name</NAVIGATION>

Example:
<menu name = "main">
<softkey POSITION="1">
<caption>sec. form</caption>
<navigation>sec_menu</navigation>
</softkey>
</menu>

<menu name = "sec_menu">


<open_form name = "sec_form" />
<softkey_back>
<navigation>main</navigation>
</softkey_back>
</menu>

Function Manual
344 6FC5397-7EP40-0BA4, 07/2018
Tag identifier Meaning
OPEN_FORM The tag opens the dialog form given under the name.

Attribute:
• name

Name of the dialog form

Syntax:
<OPEN_FORM name = "<form name>" />

Example:
<menu name = "main">
<open_form name = "main_form" />
<softkey POSITION="1">
<caption>main form</caption>
<navigation>main</navigation>
</softkey>
</menu>

<form name="main_form">
<init>
</init>

<paint>
</paint>

</form>

Function Manual
6FC5397-7EP40-0BA4, 07/2018 345
Tag identifier Meaning
PROPERTY This tag can be used to define additional properties for an operator control.

Attributes:
• max = "<maximum value>"
• min = "<minimum value>"
• default = "<pre-assignment>"
• factor = "conversion factor"
• color_bk = "<background color coding>"
• color_fg = "<font color coding>"
• password = "<true>" - entered character is displayed with "*"
• disable = "<true/false>" - locks/permits the input in an edit control
• transparent= "Transparent color of a bitmap"

Color coding (see Chapter "Color coding (Page 329)")


• tooltip = information text is displayed if the cursor is set to the control.
The syntax is: <property tooltip="note text" />
• abscissa = "Name of the first coordinate axis" (only permissible for a graphic box)
• ordinate = "Name of the second coordinate axis" (only permissible for a graphic box)
Example:
<CONTROL name = "progress1" xpos = "10" ypos = "10" width = "100"
fieldtype = "progressbar" hotlink = "true" refvar =
"nck/Channel/GeometricAxis/actProgPos[1]">
<PROPERTY min = "0" />
<PROPERTY max = "1000" />
</CONTROL>
<CONTROL name = "edit1" xpos = "10" ypos = "10">
<PROPERTY min = "20" />
<PROPERTY max = "40" />
<PROPERTY default = "25" />
</CONTROL>

Function Manual
346 6FC5397-7EP40-0BA4, 07/2018
Tag identifier Meaning
SOFTKEY The tag defines the properties and responses of a softkey.
Attributes:
• position
Number of the softkey. 1-8 horizontal softkeys, 9-16 vertical softkeys
The following attributes become effective from:
• type
Defines the property of the softkey.
user_controled - The script defines how the softkey is displayed
toggle_softkey - The softkey is displayed alternating between pressed and not pressed
• refvar
Should only be used in conjunction with toggle_softkey .
Reference variable, into which the actual softkey property is copied.
A variable, type "String" should be specified, which includes the properties pressed, not
pressed or locked (see tag state).
• picture
Using the attribute, a bitmap can be output left justified on the softkey. The complete
path name should be specified.
The number of text characters that can be displayed is reduced to the width of the bit-
map.

The following additional actions can be defined within the softkey block:
• picturealignment
The image orientation is specified by this attribute.
The image is aligned with the left side of the softkey by default.
The following values can be specified for alignment:
– top
Top edge
– bottom
Bottom edge
– left
Left edge
– right
Right edge
– center
Centered
• caption
Softkey text
• state
Should only be used in conjunction with user_controlled .
The tag assigns the required softkey display to the system.
Syntax:
<state type="<state>" />
The following strings can be specified:
– notpressed
The softkey is displayed as being not pressed.
– pressed
The softkey is displayed as being pressed.
– disabled
The softkey is locked and is displayed in gray.
• navigation
• update_controls
• function

Function Manual
6FC5397-7EP40-0BA4, 07/2018 347
Tag identifier Meaning
SOFTKEY continued Syntax:
Standard softkey:
<state type="<softkey state>" />
<softkey position = "<1>">


</softkey>
or
Script-controlled softkey:
<softkey position = "<1>" type="<user_defined>" >
<state type="<softkey state>" />


</softkey>

or
Toggle softkey:
<softkey position = "<1>" type="<toggle_softkey>" refvar="<variable
name>" >


</softkey>

Example:

<let name="define_sk_type" type="string">PRESSED</let>


<let name="sk_type">1</let>

<softkey POSITION="1" type="user_controled" >


<caption>Toggle%nSK</caption>
<if>
<condition>sk_type == 0 </condition>
<then>
<op> sk_type = 1 </op>
<op> define_sk_type = _T"PRESSED" </op>
</then>
<else>
<op> define_sk_type = _T"NOTPRESSED" </op>
<op> sk_type = 0 </op>
</else>
</if>
<state type="$$$define_sk_type" />

</softkey>

Function Manual
348 6FC5397-7EP40-0BA4, 07/2018
Tag identifier Meaning
SOFTKEY continued Example:
or

<let name="curr_softkey_state" type="string">PRESSED</let>


</softkey>

<softkey POSITION="3" type="toggle_softkey"


refvar="curr_softkey_state">
<caption>Toggle%nSK</caption>

</softkey>

SOFTKEY_OK The tag defines the response of the softkey "OK".

The following additional actions can be defined within the softkey block:
• navigation
• update_controls
• function

Syntax:
<SOFTKEY_OK>


</SOFTKEY_OK>
SOFTKEY_CANCEL The tag defines the response of the softkey "Cancel".

The following additional actions can be defined within the softkey block:
• navigation
• update_controls
• function

Syntax:
<SOFTKEY_CANCEL>


</SOFTKEY_CANCEL>

Function Manual
6FC5397-7EP40-0BA4, 07/2018 349
Tag identifier Meaning
SOFTKEY_BACK The tag defines the response of the softkey "Back".

The following additional actions can be defined within the softkey block:
• navigation
• update_controls
• function

Syntax:
<SOFTKEY_BACK>


</SOFTKEY_BACK>
SOFTKEY_ACCEPT The tag defines the response of the softkey "Accept".

The following additional actions can be defined within the softkey block:
• navigation
• update_controls
• function

Syntax:
<SOFTKEY_ACCEPT>


</SOFTKEY_ACCEPT>
TEXT The tag is used to display a text in the specified position.

Syntax:
<TEXT xpos = "<X position>" ypos = "<Y position>"> Text </TEXT>

Attributes:
• xpos

X position of the top left corner


• ypos

Y position of the top left corner


• color

Text color (see Section "Color coding (Page 329)")

Value:
Text to be displayed

Function Manual
350 6FC5397-7EP40-0BA4, 07/2018
Tag identifier Meaning
IMG The tag is used to display an image in the specified position. The BMP and PNG image
formats are supported.

Syntax:
<IMG xpos = "<X position>" ypos = "<Y position>" name = "<name>" />
<IMG … xrot="angle X axis" yrot=" angle Y axis " zrot=" angle Z axis
" />

Attributes:
• xpos

X position of the top left corner


• ypos

Y position of the top left corner


• name

complete path name


• transparent

Transparent color of the bitmap (see Section "Color coding (Page 329)"):
IMG Continued Example:
The image is rotated through 34 degrees around the Z axis:
<img xpos = "5" ypos = "23" name = "f:/appl/pic3.bmp" height="355"
width="550" zrot="34" color_bk="#ffffff" >
</img>

Optional:
If the image display is to differ from the original size, the dimensions can be defined using
the attributes width and height.
• width

Width in pixels
• height

Height in pixels

Examples:
<IMG xpos = "20" ypos = "40" name = "f:/appl/test.bmp" />
<IMG xpos = "5" ypos = "23" name = "f:/appl/test.bmp" height =
"355" width = "550"/>

Function Manual
6FC5397-7EP40-0BA4, 07/2018 351
Tag identifier Meaning
BOX The tag draws a rectangle at the specified position, colored as indicated.

Syntax:
<BOX xpos = "<X position>" ypos = "<Y position>" width = "<X exten-
sion>" height = "<Y extension>" color = "<Color code>" />

Attributes:
• xpos

X position of the top left corner


• ypos

Y position of the top left corner


• width

Extension in X direction (in pixels)


• height

Extension in Y direction (in pixels)


• color

Color coding (see Section "Color coding (Page 329)")


FUNCTION Function call
The tag executes the function body, which is specified under the attribute "name.

Attributes:
• name = "Name of the function body"
• return = "Variable name for saving the result of the function"

Values:
List of variables to be transferred to the function body. The variables must be separated by a
comma. A maximum of 10 parameters can be transferred.
It is also possible to specify constants or text expressions as call parameters. The identifier
_T should be placed at the start as a means of identifying text terms.

Syntax:
<FUNCTION name = "<function name>" />
Calling function expects a return value
<FUNCTION name = "<function name>" return = "<Variablenname>" />
Parameter transfer
<FUNCTION name = "<function name>"> var1, var2, var3 </FUNCTION>
<FUNCTION name = "<function name>"> _T"Text", 1.0, 1 </FUNCTION>

Examples:
See "FUNCTION_BODY".

Function Manual
352 6FC5397-7EP40-0BA4, 07/2018
Tag identifier Meaning
FUNCTION_BODY Function body
The tag contains the function body of a subfunction. The function body needs to be pro-
grammed within the DialogGui tag.

Attributes:
• name = "Name of the function body"
• parameter = "Parameter list" (optional)

The attribute lists the transfer parameters that are required. The parameters must be
separated by a comma.

When the function body is called, the values of the parameters specified in the function
call are copied to the transfer parameters listed.
• return = "true" (optional)

If the attribute is set to true then the local variable $return is created. The function's re-
turn value which is forwarded to the calling function on quitting the function should be
copied to this variable.

Syntax:

Function body without parameter


<FUNCTION_BODY name = "<function name>">



</ FUNCTION_BODY>

Function body with parameter


<FUNCTION_BODY name = "<function_name>" parameter = "<p1, p2, p3>">

<LET name = "tmp></LET>
<OP> tmp = p1 </OP>

</FUNCTION_BODY>

Function body with return value


<FUNCTION_BODY name = "<function_name>" parameter = "<p1, p2, p3>"
return = "true">

<LET name = "tmp></LET>
<OP> tmp = p1 </OP>

<OP> $return = tmp </OP>
</FUNCTION_BODY>

Function Manual
6FC5397-7EP40-0BA4, 07/2018 353
Tag identifier Meaning
FUNCTION_BODY contin- Example:
ued <function_body name = "test" parameter = "c1,c2,c3" return = "true">
<LET name = "tmp">0</LET>
<OP> tmp = c1+c2+c3 </OP>
<OP> $return = tmp </OP>
</function_body>



<LET name = "my_var"> 4 </LET>
<function name = "test" return = " my_var "> 2, 3,4</function>
<print text = "result = %d"> my_var </print>


REQUEST The tag is used to add a variable to the cyclic reading service (hotlink). As a consequence,
the access time to variables, which are not linked to the control, is reduced.
If a function is to be called automatically when a value changes, then the name of the func-
tion should be specified as an additional attribute.
This tag is only processed within the INIT operation.

Attributes:
• name

Address identifier
• function

Function name

Syntax:
<REQUEST name = "<NC-Variable>" />
or

<REQUEST name = "<NC-Variable>" function="<function name>"/>

Example:
<request name ="plc/mb10" />

or

<function_body name="my_function" >


<print text="value changed" />
</function_body>



<request name ="plc/mb10" function="my_function"/>

Function Manual
354 6FC5397-7EP40-0BA4, 07/2018
Tag identifier Meaning
UPDATE_CONTROLS The tag runs a comparison between the operator controls and the reference variables.

Attribute:
• type

The attribute defines the direction of the data comparison.

= TRUE – data is read from the reference variables and copied to the operator controls.

= FALSE – Data is copied from the operator controls to the reference variables.

Syntax:
<UPDATE_CONTROLS type = "<Direction>"/>

Example:
<SOFTKEY_OK>
< UPDATE_CONTROLS type="false"/>
</SOFTKEY_OK>

27.10.7 Generating user menus

27.10.7.1 Creating processing cycle forms


The cycle support function allows the automatic creation and decompilation of a cycle call through the form dialog.
To manage this functionality, the following tags are available:
● NC_INSTRUCTION
● CREATE_CYCLE
To mark a cycle form, in the FORM tag, the attribute type should be specified with the value cycle. This marking allows the
NC_INSTRUCTION to be processed.

Example
<FORM name = "cycle100_form" type= "CYCLE">


</FORM>
The NC_INSTRUCTION tag contains the cycle call to be generated. All cycle parameters should be reserved using space
retainers.

Example
<FORM name = "cycle100_form" type= "CYCLE">
<NC_INSTRUCTION refvar= "cyc_string" >Cycle100 ($p1, $p2, $p3)</ NC_INSTRUCTION>



</FORM
The CREATE_CYCLE tag prepares the values saved in the space retainer variables and generates the NC instruction.
This is then copied to the specified variable.

Function Manual
6FC5397-7EP40-0BA4, 07/2018 355
Tag identifier Description
NC_INSTRUCTION This tag is used to define the NC instruction to be generated.
All listed cycle parameters are automatically created as string variables of the
FORM and are available to the FORM.

Precondition: The FORMattribute type is set to the value CYCLE.

Attribute:
• refvar

If the tag is assigned a reference variable, all parameters are pre-assigned


with the values from the NC block saved in the reference variables.

Syntax:
<NC_INSTRUCTION> NC instruction with placeholders </
NC_INSTRUCTION>

Example:
<let name="cyc_string" type="string"> Cycle100(0, 1000,
5)</let>
...
...
...
<FORM name = "cycle100_form" type= "CYCLE">
<NC_INSTRUCTION refvar= "cyc_string" >Cycle100($p1, $p2,
$p3)</ NC_INSTRUCTION>
..


</FORM>

Function Manual
356 6FC5397-7EP40-0BA4, 07/2018
Tag identifier Description
CREATE_CYCLE The tag generates an NC block, whose syntax is defined by the value of the
NC_INSTRUCTION tag.
Before generating the NC instruction, the parser calls the
CYCLE_CREATE_EVENT tag of the FORM. This tag can be used to calculate
the cycle parameters.
Syntax:
<CREATE_CYCLE/>

Option:
If a reference variable is specified, the instruction copies the generated call into
this variable.
<create_cycle refvar="name" />

Attribute:
• refvar

If the tag is assigned a reference variable, the NC instruction is copied to this


variable.

Example:
<LET name="cyc_string" type="string"> Cycle100(0, 1000,
5)</LET>

<SOFTKEY_OK>
<caption>OK</caption>
<CREATE_CYCLE />
<close_form />
<navigation>main_menu</navigation>
</SOFTKEY_OK>

or

<SOFTKEY_OK>
<caption>OK</caption>
<CREATE_CYCLE refvar= "cyc_string" />
<close_form />
<navigation>main_menu</navigation>
</SOFTKEY_OK>

27.10.7.2 Substitution characters


The system offers the option of defining control properties (attribute values) for the runtime. In order to use this function, the
desired property must be set in a local variable and the variable name must be transferred to the tag as an attribute value
preceded by the character $.
If the tag expects a string as attribute value or value, the $$$ characters must be placed in front of the variable name.
Example:
<let name="my_ypos">100</let>
<let name="field_name" type="string"></let>

<control name = "edit1" xpos = "322" ypos = "$my_ypos" refvar="nck/Channel/Parameter/R[1]"


/>

<op>my_ypos = my_ypos +20 </op>

Function Manual
6FC5397-7EP40-0BA4, 07/2018 357
<control name = "edit2" xpos = "322" ypos = "$my_ypos" refvar="nck/Channel/Parameter/R[2]"
/>

<print name =" field_name" text="edit%d">3</print>


<op>my_ypos = my_ypos +20 </op>

<control name = "$field_name" xpos = "322" ypos = "$my_ypos"


refvar="nck/Channel/Parameter/R3]" />

<caption>$$$field_name</caption>

27.10.8 Addressing components


Address identifiers for the desired data must be created to address NC variables, PLC blocks or drive data. An address
consists of the subpaths component name and variable address. A slash should be used as a separating character.
For detailed information about all system variables, see the SINUMERIK 840D sl/828D List Manual System variables under
the following link:
https://support.industry.siemens.com/cs/ww/en/ps/14593/man

27.10.8.1 PLC addressing


Addressing the PLC starts with the path section plc.
The following addresses are permissible:
DBx.DB(f) Data block
I(f)x Input
Q(f)x Output
M(f)x Bit memory
V(f)x Variable

DBx.DBXx.b Data block


Ix.b Input
Qx.b Output
Mx.b Bit memory
Vx.b Variable
Data format f:
B Byte
W Word
D Double word
Data format identification is not applicable to bit addressing.

Address x:
Valid S7-200 address identifier
Bit addressing:
b – Bit number
Examples:
<data name = "plc/mb170">1</data>
<data name = "i0.1"> 1 </data>
<op> "m19.2" = 1 </op>

Function Manual
358 6FC5397-7EP40-0BA4, 07/2018
27.10.8.2 Addressing NC variables
Addressing the NC variables starts with the path section nck.
This section is followed by the data address; its structure should be taken from the SINUMERIK 828D List Manual NC
variable and interface signals under the following link:
https://support.industry.siemens.com/cs/ww/en/ps/14593/man
Example:
<LET name = "tempStatus"></LET>
<OP> tempStatus ="nck/channel/state/chanstatus" </OP>

Frequently used NC variables


See the following table for the common NC variables used for generating user dialogs.
Variable address Meaning Remarks
Nck/Channel/MachineAxis/actToolBasePos[n] Machine coordinates • n = 0: axis X
nck/Channel/GeometricAxis/actprogpos[n] Workpiece coordinates (where the tool tip • n = 1: axis Y
is located in WCS) • n = 2: axis Z
nck/Channel/GeometricAxis/actToolEdgeCenter Where the tool edge center is located in • n = 3: spindle
Pos[n] WCS
nck/Channel/State/actTNumber Actual tool number
nck/Channel/State/actDNumber Actual tool edge number
nck/Channel/State/actFeedRateIpo Actual feedrate
nck/Channel/State/cmdFeedRateIpo Programmed feedrate
nck/Channel/Spindle/actSpeed Actual spindle speed
nck/Channel/Spindle/cmdSpeed Programmed spindle speed
For turning nck/Tool/Compensation/cuttEdge Length X of tool n tool edge m • n = tool number
machines Param[u1,cn,p+2] • m = tool edge number
nck/Tool/Compensation/cuttEdge Length Z of tool n tool edge m • p = (m - 1) x 35
Param[u1,cn,p+3]
nck/Tool/Compensation/cuttEdge Length X for tool wear of tool n tool edge
Param[u1,cn,p+11] m
nck/Tool/Compensation/cuttEdge Length Z for tool wear of tool n tool edge
Param[u1,cn,p+12] m
For milling nck/Tool/Compensation/cuttEdge Length X of tool n tool edge m
machines Param[u1,cn,p+2]
nck/Tool/Compensation/cuttEdge Length Y of tool n tool edge m
Param[u1,cn,p+3]
nck/Tool/Compensation/cuttEdge Length Z of tool n tool edge m
Param[u1,cn,p+4]
nck/Tool/Compensation/cuttEdge Length X for tool wear of tool n tool edge
Param[u1,cn,p+11] m
nck/Tool/Compensation/cuttEdge Length Y for tool wear of tool n tool edge
Param[u1,cn,p+12] m
nck/Tool/Compensation/cuttEdge Length Z for tool wear of tool n tool edge
Param[u1,cn,p+13] m
nck/Tool/Compensation/cuttEdgeParam[u1,cn,p+ Radius of tool n tool edge m
5]
nck/Tool/Compensation/edgeData[cn,p+14] Radius for tool wear of tool n tool edge m
nck/Channel/ProgramInfo/block[u1,0] Previous line of the currently executed
block
nck/Channel/ProgramInfo/block[u1,1] Currently executed block
nck/Channel/ProgramInfo/block[u1,2] Next line of the currently executed block

Function Manual
6FC5397-7EP40-0BA4, 07/2018 359
Variable address Meaning Remarks
nck/Nck/ChannelDiagnose/poweronTime[u1] Time elapsed since the last normal power-
on (unit: min)
nck/Channel/State/actProgNetTime[u1] Run time of a selected program (unit: s)
nck/Channel/State/reqParts[u1] Required parts to be counted
nck/Channel/State/actParts[u1] Parts actually counted
Nck/Channel/Parameter/R[n] R parameters

27.10.8.3 Generating NC/PLC addresses during the runtime


It is possible to generate an address identifier during runtime.
In this case, the content of a string variable is used as address in an operation statement as well as in the nc.cap.read and
nc.cap.write functions.
Observe the following for this type of addressing mode:
● Write the variable names in quotation marks.
● Use three ‚$’ characters as prefix for variable names.

Syntax:
"$$$variable name"

Example:
<PRINT name="var_adr" text="plc/DB9000.DBW%d"> 2000</PRINT>
<OP> "$$$var_adr" = 1 </OP>

27.10.8.4 Addressing drive components


Addressing the drive components starts with the path section drive.
Then the drive device is specified:
CU - Control Unit
DC - Drive Control
The parameter to be set is added to this section.
Drive component addresses are defined as follows:
● do1: drive with address 11
● do2: drive with address 12
● do3: drive with address 13
● do4: drive with address 14
● do5: drive with address 15
Example:
<LET name="r0002_content"></LET>
<LET name="p1460_content"></LET>

<!— Reading of value r0002 on the CU of drive with address 11 ->


<op> r0002_content = "drive/cu/r2[do1]" </op>

<!— Reading of value r0002 on the CU of drive with address 15 ->


<op> r0002_content = "drive/cu/r0002[do5]" </op>

<!— Reading of value p1460 on dc of drive with address 12 ->


<op> p1460_content = "drive/dc/p1460[do2]" </op>

Function Manual
360 6FC5397-7EP40-0BA4, 07/2018
Example:
Alternatively, the drive index can be read from a local variable using $<variable name> "substitution characters".
for instance DO$local variable

Example:
<DATA name = "drive/dc/p1460[do1]">1</DATA>
Indirect addressing:
<LET name = "driveIndex">1</LET>
<DATA name = "drive/dc/p1460[do$driveIndex]">1</DATA>

27.10.8.5 Addressing machine and setting data


Drive and setting data is identified by the character $ followed by the name of the data.
Machine data:
$Mx_<name[index, AX<axis_number>]>
Setting data:
$Sx_<name[index, AX<axis_number>]>
x:
N – General machine or setting data
C – Channel-specific machine or setting data
A – Axis-specific machine or setting data
Index:
For a field, the parameter indicates the index of the data.
AX<axis_number>:
The required axis (<axis_number>) has to be specified for axis-specific data.
Alternatively, the axis index can be read from a local variable using $<variable name> "substitution characters".
e.g. AX$localvariable
Example:
<DATA name ="$MN_AXCONF_MACHAX_NAME_TAB[0] ">X1</DATA>
Direct addressing of the axis:
<DATA name ="$MA_CTRLOUT_MODULE_NR[0, AX1] ">1</DATA>


Indirect addressing of the axis:
<LET name ="axisIndex"> 1 </LET>
<DATA name ="$MA_CTRLOUT_MODULE_NR[0, AX$axisIndex] ">1</DATA>

27.10.8.6 Addressing the user data


Addressing user data starts with the path section gud, followed by the GUD name.
For a field, after the name, the required field index should be specified in square brackets.
Example:
<DATA name ="gud/syg_rm[0]"
<OP>"gud/syg_rm[0]" 0 10 </op>

Function Manual
6FC5397-7EP40-0BA4, 07/2018 361
Addressing the global user data
Addressing starts with the path section gud, followed by the specification of the area CHANNEL. This address section is
followed by the specification of the GUD areas:
GUD areas Assignment
sgud Siemens GUD
mgud Machine manufacturer GUD
ugud User GUD
Then enter the GUD name. If an array is to be addressed, the name is
followed by the array subscript in square brackets.
Example:
<data name ="gud/channel/mgud/syg_rm[0]">1</data>
<op>"gud/channel/mgud/syg_rm[0]" = 5*2 </op>

27.10.8.7 Creating typical menus in user dialogs by addressing components


This section describes how to create typical menus in user dialogs by generating the script file (xmldial.xml) and XML files
(for example, machine_settings.xml) inserted in the "xmldial. xml" file that are required for addressing the desired
components.

Generating the script file


The "xmldial.xml" control file integrates, with the "INCLUDE" XML tag, XML files containing programmed instructions for
displaying the dialog forms and parameters on the HMI.
HMI Syntax Used identifiers and their meanings
<?xml version="1.0" encoding="gb2312"?>
<DialogGui type="1"> DialogGui: defines all dialog configurations.
<?include src="f:\appl\Main.xml"?> INCLUDE: includes the desired XML description.
<?include src="f:\appl\Setting.xml"?>
<?include src="f:\appl\Parameter.xml"?>
</DialogGui> DialogGui: defines all dialog configurations.

Generating the XML file for creating the start menu


General information
● Type of addressed components: NC variables
● Menu function on the HMI: displaying the system data

Function Manual
362 6FC5397-7EP40-0BA4, 07/2018
User dialog and XML file examples

HMI Syntax Used identifiers and their meanings


<menu name="Main"> MENU: defines the start menu containing the softkey
description and the dialog to be opened.
<OPEN_FORM name="Main" /> OPEN_FORM: opens the desired dialog form given
under the desired name.
<softkey position="1"
① SOFTKEY: defines the properties and responses of
type="user_controlled"> the desired softkeys.
<state type="notpressed" />
<caption>Machine%nOperation</caption>
<navigation>Setting</navigation>
</softkey>
<softkey position="2"
type="user_controlled">
<state type="notpressed" />
<caption>Parameter%nSetting</caption>
<navigation>Parameter</navigation>
</softkey>
</menu> MENU: defines the start menu containing the softkey
description and the dialog to be opened.
<form name="Main"> FORM: defines the description of the desired user
dialog.
</paint>
② PAINT: defines the desired texts and images which
<text xpos="369" color="#000000" are to be displayed in the dialog box.
ypos="28">T, F, S</text>
...
</paint>
<init> INIT: defines the desired input elements and hotlinks
for the dialog form
<caption>User Mask</caption>
③ CAPTION: defines the title of the desired dialog box.
<let name="time_array" dim="7" />
④ LET: defines the desired local variable under the
<function name specified name.
="control.localtime">_T"time_array"</functio
n>

Function Manual
6FC5397-7EP40-0BA4, 07/2018 363
HMI Syntax Used identifiers and their meanings
<control name="InputField1" xpos="489"
⑤ CONTROL: defines the desired control elements.
ypos="54" height="16" width="40"
refvar="nck/Channel/State/actDNumber" hot-
link="true" format="%2d" />
...
</init> INIT: defines the desired input elements and hotlinks
for the dialog form
</form> FORM: defines the description of the desired user
dialog.

Generating the XML file for creating the machine operating menu
General information
● Type of addressed components: PLC data
● Menu function on the HMI: making machine settings by addressing the PLC data to operate the machine.
User dialog and XML file examples

HMI Syntax Used identifiers and their meanings


<menu name="Setting"> MENU: defines the start menu containing the softkey
description and the dialog to be opened.
<OPEN_FORM name="Setting" /> OPEN_FORM: opens the desired dialog form given
under the desired name.
<softkey position="1"
① SOFTKEY: defines the properties and responses of
type="user_controlled"> the desired softkeys.
<state type="pressed" />
<caption>Machine%nOperation</caption>
</softkey>
<softkey position="2"
type="user_controlled">
<state type="notpressed" />
<caption>Parameter%nSetting</caption>
<navigation>Parameter</navigation>
</softkey>
<softkey_back type="user_controlled">

Function Manual
364 6FC5397-7EP40-0BA4, 07/2018
HMI Syntax Used identifiers and their meanings
<state type="notpressed" />
<navigation>Main</navigation>
</softkey_back>
</menu> MENU: defines the start menu containing the softkey
description and the dialog to be opened.
<form name="Setting"> FORM: defines the description of the desired user
dialog.
<paint>
② PAINT: defines the desired texts and images which
<text xpos="15" color="#000000" are to be displayed in the dialog box.
ypos="60">Switch Fixture</text>
...
</paint>
<init> INIT: defines the desired input elements and hotlinks
for the dialog form
<caption>Machine operation set-
③ CAPTION: defines the title of the desired dialog box.
ting</caption>
<control name="Toggle1" xpos="346"
④ CONTROL: defines the desired control elements.
ypos="60" height="16" width="80"
refvar="plc/db1400.dbx9.0" hotlink="true"
fieldtype="combobox">
<item value="1">Vacuum</item>
<item value="0">Pneumatic</item>
</control>
...
</init> INIT: defines the desired input elements and hotlinks
for the dialog form
</form> FORM: defines the description of the desired user
dialog.

Generating the XML file for creating the parameter setting menu
General information
● Type of addressed components: machine and setting data
● Menu function on the HMI: making settings for frequently used Z axis parameters

Function Manual
6FC5397-7EP40-0BA4, 07/2018 365
User dialog and XML file examples

Pressed ⇒

HMI Syntax Used identifiers and their meanings


<let name="var2" type="int"></let> LET: defines the desired local variable under the
specified name.
<menu name="Parameter"> MENU: defines the start menu containing the softkey
description and the dialog to be opened.
<OPEN_FORM name="Parameter" /> OPEN_FORM: opens the desired dialog form given
under the desired name.
<softkey position="1"
① SOFTKEY: defines the properties and responses of
type="user_controlled"> the desired softkeys.
<state type="notpressed" />
<caption>Machine%nOperation</caption>
<navigation>Setting</navigation>
</softkey>

Function Manual
366 6FC5397-7EP40-0BA4, 07/2018
HMI Syntax Used identifiers and their meanings
<softkey position="2"
type="user_controlled">
<state type="pressed" />
<caption>Parameter%nSetting</caption>
</softkey>
<softkey_back type="user_controlled">
<state type="notpressed" />
<navigation>Main</navigation>
</softkey_back>
<softkey position="12">
<caption>Activate</caption>
<msgbox text="This operation will restart
② MSGBOX: opens the desired message box whose
the NCK, drive and HMI. Are you sure to con- return value can be used for branching.
tinue?" caption="1" retvalue="var2"
type="btn_okcancel"/>
<if>
<condition>var2==1</condition>
<then>
<control_reset resetnc="true"/>
<waiting waitingfornc="true"/>
</then>
</if>
</softkey> SOFTKEY: defines the properties and responses of
the desired softkeys.
</menu> MENU: defines the start menu containing the softkey
description and the dialog to be opened.
<form name="Parameter"> FORM: defines the description of the desired user
dialog.
<paint>
③ PAINT: defines the desired texts and images which
<TEXT xpos="10" ypos="30" co- are to be displayed in the dialog box.
lor="#000000">Axial jerk</TEXT>
...
</paint>
<init> INIT: defines the desired input elements and hotlinks
for the dialog form
<caption>Z axis-specific machine data set-
④ CAPTION: defines the title of the desired dialog box.
ting</caption>
<DATA_ACCESS type="true"/>
⑤ CONTROL: defines the desired control elements.
<CONTROL name="III" xpos="350" ypos="30"
height="20" width="75" fieldtype="edit"
refvar="$MA_JOG_AND_POS_MAX_JERK[AX3]" hot-
link="true"/>
...
</init> INIT: defines the desired input elements and hotlinks
for the dialog form
</form> FORM: defines the description of the desired user
dialog.

Function Manual
6FC5397-7EP40-0BA4, 07/2018 367
27.10.9 Predefined functions
The script language offers various string processing and standard mathematical functions. The function names listed below
are reserved and cannot be overloaded.
Function name Description
ncfunc.cap.read The function copies a value from the specified address into a local
variable. If the read operation was error-free, then the return variable
contains the value zero.

Contrary to the operation instruction, in the event of a fault, this func-


tion does not interrupt the processing of the script operations.

Syntax:
<function name="ncfunc.cap.read" return="error">
lokale variable, "address"</function>

Example:
<let name="error"></let>
<function name="ncfunc.cap.read" return="error"> 3,
"drive/cu/p0009"</function>
<if>
<condition>error != 0</condition>
<then>
<break />
</then>
</if>
ncfunc.cap.write The function writes a value into the specified variable. If the write
operation was error-free, then the return variable contains the value
zero.

Contrary to the operation instruction, in the event of a fault, this func-


tion does not interrupt the processing of the script operations.

Syntax:
<function name="ncfunc.cap.write" return="error">
local variable or constant, "address"</function>

Example:
<let name="error"></let>
<function name="ncfunc.cap.write" return="error">
0, "drive/cu/p0009"</function>
<if>
<condition>error != 0</condition>
<then>
<break />
</then>
</if>

Function Manual
368 6FC5397-7EP40-0BA4, 07/2018
Function name Description
ncfunc.pi_service Jobs can be transferred to the NCK using the program invocation
(PI) service.
If the service has been executed error-free, the function returns the
value 1 in the return variable.

Manipulation of the tool list

_N_CREATO - Create tool


_N_DELETO - Delete tool
_N_CREACE - Create tool cutting edge
_N_DELECE - Delete tool cutting edge

Activation of work offsets

_N_SETUFR - Activates the actual user frame


_N_SETUDT - Activates the actual user data

Block search

_N_FINDBL - Activate block search


_N_FINDAB - Cancel block search

Syntax:
<function name="ncfunc.pi_service" return="return
var"> pi name, var1, var2, var3, var4, var5
</function>

Attributes:
• name - function name
• return- Name of the variable in which the execution result is
saved
– Value == 1 – job executed successfully
– Value == 0 – faulty job

Tag values:
• pi name - Name of the PI service (string)
• var1 tovar5 - PI specific arguments

Function Manual
6FC5397-7EP40-0BA4, 07/2018 369
Function name Description
ncfunc.pi_service Continued Arguments:
• _N_CREATO

var1 - Tool number


• _N_DELETO

var1 - Tool number


• _N_CREACE

var1 - Tool number

var2 - Cutting edge number


• _N_DELECE

var1 - Tool number

var2 - Cutting edge number


• _N_SETUFR

No arguments
• _N_SETUDT

var1- User data area to be activated


– 1 - Tool offset data
– 2 - Active basic frame
– 3 - Active adjustable frame
• _N_FINDBL

var1 - Search mode


– 2 - Search with contour calculation
– 4 - Search for the block end point
– 1 - Block search without calculation.
• _N_FINDAB

No arguments

Example:
• Creating a tool – tool number 3

<function name="ncfunc.pi_service">_T"_N_CREATO",
3</function>

• Delete cutting edge 1 of tool 5

<function name="ncfunc.pi_service">_T"_N_DELECE", 5,
1</function>

Function Manual
370 6FC5397-7EP40-0BA4, 07/2018
Function name Description
ncfunc.chan_pi_service The function executes a PI service in a channel-related manner. The
channel number is passed after the PI service name. This is followed
by all other call parameters.

Parameters:
channel - Channel number

Syntax:
<function name="ncfunc.chan_pi_service" re-
turn="error"> _T"_N_SETUFR", channel, …</function>

Example:
<let name="chan" >1</let>
<function name="ncfunc.chan_pi_service" re-
turn="error"> _T"_N_SETUFR", chan</function>

<function name="ncfunc.chan_pi_service" re-


turn="error"> _T"_N_SETUDT", chan, _T"016",
_T"00000", _T"00000"</function>
ncfunc.displayresolution This function supplies the conversion rule for floating point numbers
defined in the control. A string variable must be provided as variable.

See also display machine data MD203 DISPLAY_RESOLUTION and


MD204 DISPLAY_RESOLUTION_INCH

Syntax:
<function name="ncfunc.displayresolution" re-
turn="dislay_res" />

Example:
<let name="dislay_res" type="string"></let>

<function name="ncfunc.displayresolution" re-
turn="dislay_res" />

<control name = "cdistToGo" xpos = "210" ypos =


"156"
refvar="nck/Channel/GeometricAxis/progDistToGo[2]"
hotlink="true" height="34" fieldtype="readonly"
format="$$$dislay_res" time="superfast" col-
or_bk="#ffffff"/>

Function Manual
6FC5397-7EP40-0BA4, 07/2018 371
Function name Description
ncfunc.password This function sets or deletes a password level.
• Set password:

The password should be specified for the required password lev-


el as parameter.
• Delete password:

A blank string deletes the password level.

Syntax:
<function name="ncfunc.password">password
</function>

Example:
<let name="password"type="string"></let>

<function name="ncfunc.password" > pass-


word</function>
<function name="ncfunc.password" > _T"CUSTOMER"
</function>

Delete password:
<function name="ncfunc.password" > _T"" </function>
control.formcolor This function provides the text or background color of the dialog box
as string.
Color coding (see Section "Color coding (Page 329)")

Range:
• BACKGROUND – request color value of the background
• TEXT – request color value of the text (foreground)

Syntax:
<function name="control.formcolor" re-
turn="variable">_T"range"</function>

Example:
<let name="bk_color" type="string"></let>

<function name="control.formcolor" re-


turn="bk_color">_T"BACKGROUND"</function>

Function Manual
372 6FC5397-7EP40-0BA4, 07/2018
Function name Description
control.localtime The function copies the local time in a field with 7 array elements.
The name of the variable is expected as call parameter.
The following is stored in an array element:
• Index 0 - year
• Index 1 - month
• Index 2 - weekday
• Index 3 - day
• Index 4 - hour
• Index 5 - minute
• Index 6 - second

Syntax:
<function name
="control.localtime">_T"time_array"</function>

Example:
<!-- index
0 = Year
1 = Month
2 = Day of week
3 = Day
4 = Hour
5 = Minute
6 = Second
-->
<let name="time_array" dim="7" />

<function name
="control.localtime">_T"time_array"</function>
string.cmp Two strings are compared with one another from a lexicographical
perspective.
The function gives a return value of zero if the strings are the same,
a value less than zero if the first string is smaller than the second
string or a value greater than zero if the second string is smaller than
the first string.
Parameter:
str1 - string
str2 - comparison string

Syntax:
<function name="string.cmp" return ="<int var>" >
str1, str2 </function>

Example:
<let name="rval">0</let>
<let name="str1" type="string">A brown bear hunts a
brown dog.</let>
<let name="str2" type="string">A brown bear hunts a
brown dog.</let>

<function name="string.cmp" return="rval"> str1,


str2 </function>
Result:
rval= 0

Function Manual
6FC5397-7EP40-0BA4, 07/2018 373
Function name Description
string.icmp Two strings are compared from a lexicographical perspective (the
comparison is not case-sensitive).
The function gives a return value of zero if the strings are the same,
a value less than zero if the first string is smaller than the second
string or a value greater than zero if the second string is smaller than
the first string.

Parameter:
str1 - string
str2 - comparison string

Syntax:
<function name="string.icmp" return ="<int var>" >
str1, str2 </function>

Example:
<let name="rval">0</let>

<let name="str1" type="string">A brown bear hunts a


brown dog.</let>
<let name="str2" type="string">A brown Bear hunts a
brown Dog.</let>
<function name="string. icmp" return="rval"> str1,
str2 </function>
Result:
rval= 0
string.left The function extracts the first nCount character from string 1 and
copies this to the return variable.

Parameter:
str1 - string
nCount - number of characters

Syntax:
<function name="string.left" return="<result
string>"> str1, nCount </function>

Example:
<let name="str1" type="string">A brown bear hunts a
brown dog.</let>
<let name="str2" type="string"></let>

<function name="string.left" return="str2"> str1,


12 </function>
Result:
str2="A brown bear"

Function Manual
374 6FC5397-7EP40-0BA4, 07/2018
Function name Description
string.right The function extracts the last nCount character from string 1 and
copies this to the return variable.

Parameter:
str1 - string
nCount - number of characters

Syntax:
<function name="string.right" return="<result
string>"> str1, nCount </function>

Example:
<let name="str1" type="string">A brown bear hunts a
brown dog.</let>
<let name="str2" type="string"></let

<function name="string.right " return="str2"> str1,


10 </function>
Result:
str2="brown dog."
string.middle The function extracts the specified number of characters from string
1, starting from the iFirst index, and copies these to the return varia-
ble.

Parameter:
str1 - string
iFirst - start index
nCount - number of characters

Syntax:
<function name="string.middle" return="<result
string>"> str1, iFirst, nCount </function>

Example:
<let name="str1" type="string">A brown bear hunts a
brown dog.</let>
<let name="str2" type="string"></let

<function name="string.middle " return="str2">


str1, 2, 5 </function>
Result:
str2="brown"

Function Manual
6FC5397-7EP40-0BA4, 07/2018 375
Function name Description
string.length The function gives the number of characters in a string.

Parameter:
str1 - string

Syntax:
<function name="string.length" return="<int var>">
str1 </function>

Example:
<let name="length">0</let>

<let name="str1" type="string">A brown bear hunts a


brown dog.</let>
<function name="string.length" return="length">
str1 </function>
Result:
length = 31
string.replace The function replaces all the substrings found with the new string.

Parameter:
string - string variable
find string - string to be replaced
new string - new string

Syntax:
<function name="string.replace"> string, find
string, new string </function>

Example:
<let name="str1" type="string">A brown bear hunts a
brown dog. </let>

<function name="string.replace" > str1, _T"a brown


dog" , _T"a big salmon"</function>
Result:
str1 = "A brown bear hunts a big salmon!"

Function Manual
376 6FC5397-7EP40-0BA4, 07/2018
Function name Description
string.remove The function removes all the substrings found.

Parameter:
string - string variable
remove string - substring to be deleted

Syntax:
<function name="string.remove"> string, remove
string </function>

Example:
<let name="index">0</let>

<let name="str1" type="string">A brown bear hunts a


brown dog. </let>
<function name="string.remove" > str1, _T"a brown
dog" </function
Result:
str1 = "A brown bear hunts"
string.insert The function inserts a string at the index specified.

Parameter:
string - string variable
index - index (zero based)
insert string - string to be inserted

Syntax:
<function name="string.insert"> string, index, in-
sert string </function>

Example:
<let name="str1" type="string">A brown bear hunts.
</let>
<let name="str2" type="string">a brown dog</let>

<function name="string.insert" > str1, 19,


str2</function>
Result:
str1 = "A brown bear hunts a brown dog"

Function Manual
6FC5397-7EP40-0BA4, 07/2018 377
Function name Description
string.delete The function deletes the defined number of characters starting from
the start position specified.

Parameter:
string - string variable
start index - start index (zero based)
nCount - number of characters to be deleted

Syntax:
<function name="string.delete"> string, start in-
dex , nCount </function>

Example:
<let name="str1" type="string">A brown bear hunts.
</let>

<function name="string.delete" > str1, 2,


5</function>
Result:
str1 = "A bear hunts"
string.find The function searches the transferred string for the first match with
the substring.
If the substring is found, the function provides the index to the first
character (starting with zero) or, failing this, -1.

Parameter:
string - string variable
find string - string to be found
startindex – start index (optional)

Syntax:
<function name="string.find" return="<int val>">
str1, find string </function>

Example:
<let name="index">0</let>
<let name="str1" type="string">A brown bear hunts a
brown dog. </let>
<function name="string.find" return="index"> str1,
_T"brown" </function>
Result:
Index = 2
or
<function name="string.find" return="index"> str1,
_T"brown", 1 </function>

Function Manual
378 6FC5397-7EP40-0BA4, 07/2018
Function name Description
string.reversefind The function searches the transferred string for the last match with
the substring.
If the substring is found, the function provides the index to the first
character (starting with zero) or, failing this, -1.

Parameter:
string - string variable
find string - string to be found
startindex – start index (optional)

Syntax:
<function name="string.reversefind" return="<int
val>"> str1, find string </function>

Example:
<let name="index">0</let>
<let name="str1" type="string">A brown bear hunts a
brown dog. </let>
<function name="string.reversefind" return="index">
str1, _T"brown" </function>
Result:
Index = 21
or
<function name="string.reversefind" return="index">
str1, _T"brown", 10 </function>
Result:
Index = 2
string.trimleft The function trims the starting characters from a string.

Parameter:
str1 - string variable

Syntax:
<function name="string.trimleft" > str1 </function>

Example:
<let name="str1" type="string"> test trim
left</let>
<function name="string.trimleft" > str1 </function>
Result:
str1 = "test trim left"

Function Manual
6FC5397-7EP40-0BA4, 07/2018 379
Function name Description
string.trimright The function trims the closing characters from a string.

Parameter:
str1 - string variable

Syntax:
<function name="string.trimright" > str1
</function>

Example:
<let name="str1" type="string"> test trim right
</let>
<function name="string.trimright" > str1
</function>
Result:
str1 = "test trim right"
sin The function calculates the sine of the value transferred in degrees.

Parameter:
double - angle

Syntax:
<function name="sin" return="<double val>"> double
</function>

Example:
<let name= "sin_val" type="double"></let>
<function name="sin" return="sin_val"> 20.0
</function>
cos The function calculates the cosine of the value transferred in de-
grees.

Parameter:
double - angle

Syntax:
<function name="cos" return="<double val>"> double
</function>

Example:
<let name= "cos_val" type="double"></let>
<function name="cos" return="cos_val"> 20.0
</function>

Function Manual
380 6FC5397-7EP40-0BA4, 07/2018
Function name Description
tan The function calculates the tangent of the value transferred in de-
grees.

Parameter:
double - angle

Syntax:
<function name="tan" return="<double val>"> double
</function>

Example:
<let name= "tan_val" type="double"></let>
<function name="tan" return="tan_val"> 20.0
</function>
arcsin The function calculates the arcsine of the value transferred in de-
grees.

Parameter:
double - x in the range from -PI/2 to +PI/2

Syntax:
<function name="arcsin" return="<double val>"> dou-
ble </function>

Example:
<let name= "arcsin_val" type="double"></let>
<function name="arcsin" return="arcsin_val"> 20.0
</function>
arcos The function calculates the arccosine of the value transferred in
degrees.

Parameter:
double - x in the range from -PI/2 to +PI/2

Syntax:
<function name="arcos" return="<double val>"> dou-
ble </function>

Example:
<let name= "arccos_val" type="double"></let>
<function name="arccos" return="arccos_val"> 20.0
</function>

Function Manual
6FC5397-7EP40-0BA4, 07/2018 381
Function name Description
arctan The function calculates the arctan of the value transferred in de-
grees.

Parameter:
double - arctan of y/x

Syntax:
<function name="arctan" return="<double val>"> dou-
ble </function>

Example:
<let name= "arctan_val" type="double"></let>
<function name="arctan" return="arctan_val"> 20.0
</function>
File processing
doc.readfromfile The function reads the contents of the specified file into a string vari-
able.
The number of characters to be read can optionally be specified as a
second parameter.

Attribute:
return - name of the local variable

Parameter:
progname - file name
number of characters - number of characters to be read in bytes
(optional):

Syntax:
<function name="doc.readfromfile" return="<string
var>"> progname, number of characters </function>

Example:
<let name = "my_var" type="string" ></let>

NC file system
<function name="doc.readfromfile" return="my_var">
_T"n:\mpf\test.mpf" </function>

CompactFlash card
<function name="doc.readfromfile" return="my_var">
_T"f:\appl\test.mpf" </function>

or

<function name="doc.readfromfile" return="my_var">


_T".\test.mpf" </function>

Function Manual
382 6FC5397-7EP40-0BA4, 07/2018
Function name Description
doc.writetofile The function writes the contents of a string variable to the file speci-
fied.

Parameter:
progname - file name
str1 - string

Syntax:
<function name="doc.writetofile" > progname, str1
</function>

Example:
<let name = "my_var" type="string" > file content
</let>

NC file system
<function
name="doc.writetofile">_T"n:\mpf\test.mpf", my_var
</function>

CompactFlash card
<function
name="doc.writetofile">_T"f:\appl\test.mpf", my_var
</function>

or

<function name="doc.writetofile">_T".\test.mpf",
my_var </function>
doc.remove The function removes the file specified from the directory.

Parameter:
progname - file name
Note:
The file name is case-sensitive for a file on the CF card.

Syntax:
<function name="doc.remove" > progname </function>

Example:
NC file system
<function name="doc.remove">_T"n:\mpf\test.mpf"
</function>

CompactFlash card
<function name="doc.remove">_T"f:\appl\test.mpf"
</function>

or

<function name="doc.remove">_T".\test.mpf"
</function>

Function Manual
6FC5397-7EP40-0BA4, 07/2018 383
Function name Description
doc.loadscript The function copies a dialog description embedded in a part program
into the specified local variable.

The call parameters to be specified are the program name, the dialog
name, and a variable for storing the main menu name. If the name of
the dialog description was found in the part program, the return vari-
able contains this description. If the content of the variable is stored
in a file, the script can be executed with an indirect call.

The system provides a script that extracts the dialog description from
the active part program and activates the dialog. This script can be
called in an MMC command to activate the screen associated with
the part program.

Syntax:
<function name="doc.loadscript" re-
turn="<name of script variable>">progname,
_T"dialog part name", main menu </function>

Attribute:
return - variable in which the extracted script is stored

Parameters:
progname - full path to the program. (The path name can be passed
to the function in DOS notation.)
main menu - the menu name found is copied into this variable
dialog part name - tag name in which the dialog description is em-
bedded

Example:
<function name="doc.loadscript" re-
turn="contents">prog_name, _T"main_dialog", en-
try</function>

Function Manual
384 6FC5397-7EP40-0BA4, 07/2018
Function name Description
doc.exist If the file exists, the function returns the value 1.

Parameter:
progname - file name
Note:
The file name is case-sensitive for a file on the CF card.

Syntax:
<function name="doc.exist" return="<int_var>" >
progname </function>

Example:
<let name ="exist">0</let>

NC file system
<function name="doc.exist" re-
turn="exist">_T"n:\mpf\test.mpf" </function>

CompactFlash card
<function name="doc.exist" re-
turn="exist">_T"f:\appl\test.mpf" </function>

or

<function name="doc.exist" re-


turn="exist">_T".\test.mpf" </function>
ncfunc.select The function selects the program specified for execution. The pro-
gram must be stored in the NC file system.

Parameter:
progname - file name

Syntax:
<function name="ncfunc.select"> progname
</function>

Example:
NC file system
<function name="ncfunc.select"> _T"n:\mpf\test.mpf"
</function>

CompactFlash card
<function name="ncfunc.select">
_T"f:\appl\test.mpf" </function>

or

<function name="ncfunc.select"> _T".\test.mpf"


</function>

Function Manual
6FC5397-7EP40-0BA4, 07/2018 385
Function name Description
ncfunc.bitset The function is used to manipulate individual bits of the specified
variables.
The bits can either be set or reset.

Syntax:
<function name="ncfunc.bitset" refvar="address"
value="set/reset" > bit0, bit1, … bit9 </function>

Attributes:
refvar - specifies the name of the variable, in which the bit combina-
tion should be written
value – bit value, value range 0 and 1

Values:
The bit numbers starting with zero should be transferred as function
values.
A maximum of 10 bits per call can be modified.

Example:
<function name="ncfunc.bitset"
refvar="nck/Channel/Parameter/R[1]" value="1" > 0,
2, 3, 7 </function>

<function name="ncfunc.bitset"
refvar="nck/Channel/Parameter/R[1]" value="0" > 1,
4 </function>
control.delete The function deletes the specified control.

Syntax:
<function name="control.delete"> control name
</function>

Attribute:
name – function name

Value:
control name – name of the control

Example:
<function name="<control.delete>"> _T"my_editfield"
</function>

Function Manual
386 6FC5397-7EP40-0BA4, 07/2018
Function name Description
control.additem The function inserts a new element at the end of the list.
Note:
The function is only available for the control types "listbox" and
"graphicbox".

Syntax:
<function name="control.additem"> control name,
item </function>

Attribute:
name – function name

Values:
control name – control name
item - expression to be inserted
itemdata - integer value; defined by the user

Example:
<let name ="itemdata">1</let>



<op> item_string = _T"text1" </op>
<function name="control.additem">_T"listbox1",
item_string, itemdata
</function>

Function Manual
6FC5397-7EP40-0BA4, 07/2018 387
Function name Description
control.insertitem The function inserts a new element at the specified position.
Note:
The function is only available for the control types "listbox" and
"graphicbox".

Syntax:
<function name="control.insertitem"> control name,
index, item, itemdata </function>

Attribute:
name – function name

Values:
control name – control name
index – position starting with zero
item - expression to be inserted
itemdata - integer value; defined by the user

Example:
<let name ="itemdata">1</let>



<op> item_string = _T"text2" </op>
<function name="control.insertitem">_T"listbox1",
1, item_string, itemdata </function>
control.deleteitem The function deletes an element at the specified position.
Note:
The function is only available for the control type "listbox".

Syntax:
<function name="control.deleteitem"> control name,
index </function>

Attribute:
name – function name

Values:
control name – control name
index– index starting at 0

Example:
<function name="control.deleteitem">_T"listbox1",
1</function>

Function Manual
388 6FC5397-7EP40-0BA4, 07/2018
Function name Description
control.loaditem The function inserts a list of expressions into the control.
The function is only available for the control types "listbox" and
"graphicbox".

Syntax:
<function name="control.loaditem"> control name,
list </function>

Attribute:
name – function name

Values:
control name – control name
list- string variable

Structure of the list:


The list contains a number of expressions, which must be separated
from one another using a \n.

Example:
<let name="item_string" type="string"></let>
<let name="plotlist" type="string"></let>


<print name ="item_string"
text="p; %f; %f; %f; %f\n">s_z, s_x</print>
<op>plotlist = plotlist + item_string</op>
<print name ="item_string"
text="l; %f; %f; %f; %f\n">s_z, s_x, e_z, e_x
</print>
<op>plotlist = plotlist + item_string</op>
<op> s_x = e_x </op>
<op> s_z = e_z</op>
<op> e_x = s_x + 10 </op>
<op> e_z = s_z - 100 </op>
<print name ="item_string"
text="l; %f; %f; %f; %f\n">s_z, s_x, e_z, e_x
</print>
<op>plotlist = plotlist + item_string</op>

<function name="control.loaditem">_T"gbox",
plotlist</function>

Function Manual
6FC5397-7EP40-0BA4, 07/2018 389
Function name Description
control.empty The function deletes the contents of the specified list box or graphic
box controls.

Syntax:
<function name="control.empty"> control name,
</function>

Attribute:
name – function name

Values:
control name – control name

Example:
<function
name="control.empty">_T"listbox1"</function>
control.getfocus The function supplies the name of the control, which has the input
focus.

Syntax:
<function name="control.getfocus" re-
turn="focus_name" />

Attributes:
name – function name
return – a string variable should be specified, into which the control
name is copied.

Example:
<let name>="focus_field" type="string"></let>
<function name="control.getfocus" re-
turn="focus_field"/>
control.setfocus The function sets the input focus to the specified control.
The control name should be transferred as text expression of the
function.

Syntax:
<function name="control.setfocus"> control name
</function>

Attribute:
name – function name

Value:
control name – name of the control

Example:
<function name="control.setfocus"
">_T"listbox1"</function>

Function Manual
390 6FC5397-7EP40-0BA4, 07/2018
Function name Description
control.getcurssel For a list box, the function supplies the cursor index.
The control name should be transferred as text expression of the
function.

Syntax:
<function name="control.getcurssel" retvar="var">
control name </function>

Example:
<let name>="index"></let>
<function name="control.getcurssel"
">_T"listbox1"</function>
control.setcurssel For a list box, the function sets the cursor to the appropriate line.
The control name should be transferred as text expression of the
function.

Syntax:
<function name="control.setcurssel" > control name,
index</function>

Example:
<let name>="index">2</let>
<function name="control.setcurssel"
">_T"listbox1",index</function>
control.getitem For a list box, the function copies the contents of the selected line to
the specified variable.
A string variable should be specified as reference variable.
The control name should be transferred as text expression of the
function.

Syntax:
<function name="control.getitem" return="var"> con-
trol name, index </function>

Example:
<let name>="index">2</let>
<let name>="item" type="string"></let>

<function name="control.getitem" return="item"


">_T"listbox1",index</function>

Function Manual
6FC5397-7EP40-0BA4, 07/2018 391
Function name Description
control.getitemdata For a list box, the function copies the user-specific allocated value of
an element to the specified variable.
For an edit control, the function copies the user-specific allocated
value (item_data) to the specified variable.
An integer variable should be specified as reference variable.
The control name should be transferred as text expression of the
function.

Syntax:
<function name="control.getitemdata" return="var">
control name, index </function>

Example:
<let name>="index">2</let>
<let name>="itemdata"></let>

<function name="control.getitemdata" re-


turn="itemdata" ">_T"listbox1",index</function>
bitmap.dim The function copies the dimension of a bitmap back into a variable
with structure type SIZE. To define the type, file struct_def.xml must
be included in the project.

Syntax:
<function name="bitmap.dim" >name, variable type
</function>

Parameters:
name - file path
variable type - variable name of a variable of type SIZE

Example:
<let name="bmp_size" type="size" />

<function name="bitmap.dim" >_T"test.bmp", bmp_size


</function>
hmi.get_hmi_resolution The function copies the absolute screen resolution of the system
back into a variable with structure type StructSize. To define the type,
file struct_def.xml must be included in the project.

Syntax:
<function name="hmi.screen_resolution" >vari-
alble type </function>
hmi.get_hmi_resolution The function copies the screen resolution used by SINUMERIK Op-
erate back into a variable with structure type StructSize. To define
the type, file struct_def.xml must be included in the project.

Syntax:
<function name="hmi.get_hmi_resolution" >varia-
ble type </function>

Function Manual
392 6FC5397-7EP40-0BA4, 07/2018
Function name Description
hmi.get_caption_heigt The function returns the title bar height in pixels.

Syntax:
<function name="hmi.get_caption_heigt" re-
turn="<return var>" />

Attributes:
return - integer variable
abs This function returns the absolute value of the specified number.

Syntax:
<function name="abs" return="var"> value
</function>
sdeg The function converts the specified value into degrees.

Syntax:
<function name="sdeg" return="var"> value
</function>
srad The function converts the specified value into RADian.

Syntax:
<function name="srad" return="var"> value
</function>
sqrt The function calculates the square root of the specified value.

Syntax:
<function name="sqrt" return="var"> value
</function>
round The function rounds of the transferred number to the specified num-
ber of decimal places. If the number of decimal places is not speci-
fied, then the function rounds off the number, taking into account the
first decimal place.

Syntax:
<function name="round" return="var"> value, nDeci-
malPlaces </function>
floor The function supplies the largest possible integer value, which is less
than or equal to the transferred value.

Syntax:
<function name="floor" return="var"> value
</function>
ceil The function supplies the smallest possible integer value, which is
greater than or equal to the transferred value.

Syntax:
<function name="ceil" return="var"> value
</function>

Function Manual
6FC5397-7EP40-0BA4, 07/2018 393
Function name Description
log The function calculates the logarithm of the specified value.

Syntax:
<function name="log" return="var"> value
</function>
log10 The function calculates the common (decadic) logarithm of the speci-
fied value.

Syntax:
<function name="log10" return="var"> value
</function>
pow The function calculates the value "ab".

Syntax:
<function name="pow" return="var"> a, b </function>
min The function compares the transferred value and returns the lower of
the values.

Syntax:
<function name="min" return="var"> value1, value2
</function>
max The function compares the transferred value and returns the higher
of the values.

Syntax:
<function name="max" return="var"> value1, value2
</function>
random The function returns a pseudo random number.

Syntax:
<function name="random" return="var" </function>

27.11 Hot keys


The following functions can be carried out with certain key combinations on the full PPU keyboard:
Key combination Description
<ALT> + <X> Opens the machining operating area:

<ALT> + <V> Opens the program editing operating area:

<ALT> + <C> Opens the offset operating area:

<ALT> + <B> Opens the program management operating area:

<ALT> + <D> Exports action logs to a USB stick

Function Manual
394 6FC5397-7EP40-0BA4, 07/2018
Key combination Description
<ALT> + <M> Opens the alarm operating area:

• <ALT> + <N> Opens the system data operating area:

• +
<ALT> + <H> Calls the online help system
<ALT> + <L> Enables input of lowercase letters, with the following icon displayed in the tip area:

<ALT> + <S> Applicable only when the user interface language is Chinese
Calls the input method editor for entering Chinese characters
<=> Calls the pocket calculator.
Note that this function is not applicable in "MDA" mode.
<CTRL> + <B> Selects text in program blocks
<CTRL> + <C> Copies the selected text
<CTRL> + <D> Shows pre-defined slides on the screen
<CTRL> + <P> Captures screens
<CTRL> + <R> Restarts the HMI
<CTRL> + <S> Exports start-up archives and action logs to a USB stick
Increases the screen backlight brightness

<CTRL> +
Decreases the screen backlight brightness

<CTRL> +

27.12 Playing a slide show


The control system has the function of playing a slide show. By default, the slide show of Siemens product information is
provided.
You can press this key combination on the PPU to play a slide show and press the key combination
+ again to exit the slide show.

Playing the machine manufacturer's slide show


You can create your own slides and play them on the control system. The control system supports the slide show of images
in ".png" or ".bmp" format. To achieve the best display effect, the recommended image size is 800*600 pixels.
Proceed through the following steps to playing your own slide show:
1. Prepare the images for the slide show and name each image according to the following
syntax:
• slide%u.png, or
• slide%u.bmp
Here "%u" stands for the number sequence starting with "1". For example, slide1.png,
slide2.png, slide3.png ...
If your slides include both PNG-format images and BMP-format images, number them sepa-
rately. During the slide show, the PNG-format images will have a higher priority over the
BMP-format images.

Function Manual
6FC5397-7EP40-0BA4, 07/2018 395
2. Store all the images in a folder on a USB memory stick, and name the folder with the corre-
sponding language code, for example, "chs" for Chinese, "eng" for English. For more infor-
mation about other available language codes, see Section "Multi-language support for the
machine manufacturer's HMI data (Page 278)". Note that a slide show in a non-standard
language works only if this language is loaded on the control system.
3. Insert the USB stick into the USB interface on the front panel of the PPU.
4. Select the system data operating area.
+
5. Locate the folder(s) containing the slides under the USB directory through the following
softkey operations:


6. Select the folder(s) and press this softkey to copy.

7. Press this softkey to open the window of system data.

8. Select the HMI data folder and press this key to open it.

9. Move the cursor to the folder highlighted as follows:

10. Press this key to open this folder.

11. Paste the copied folder(s) containing the slides with this softkey.

Function Manual
396 6FC5397-7EP40-0BA4, 07/2018
12. Now you can press this key combination to play your own slide show.
+

Note
You can set the time interval of the slide show with MD9001 TIME_BTWEEN_SLIDES. This parameter can be found through
the following operations:

+ → → →

27.13 Defining the service planner


With the service planning function, you can set up maintenance tasks that have to be performed at certain intervals (for
example, top up oil, change coolant). An alarm appears as a reminder when the interval expires.
A list is displayed of all the maintenance tasks that have been set up together with the time remaining until the end of the
specified maintenance interval.

① Position of the maintenance task in the PLC interface

② Name of the maintenance task

③ Maximum time until next servicing in hours

④ Time in hours at which an initial warning is displayed

⑤ Number of warnings that can be acknowledged by the operator before an alarm message is output for the last time

⑥ Time until the interval expires in hours. The remaining time cannot be edited.

⑦ Display of the current status of a maintenance task


: The maintenance task has been started.
: The maintenance task is completed.

Creating a new maintenance task


Proceed as follows to create a new maintenance task:
1. Open the system data operating area.
+
2. Press this key on the PPU to view the extended softkeys.

3. Open the window of service planning.

4. Press this softkey to open the dialog box for creating a new task.

5. Enter desired data in the respective input fields.

Function Manual
6FC5397-7EP40-0BA4, 07/2018 397
6. Press this softkey to confirm your settings, and the new maintenance task displays on the
screen.

7. You can also select the vertical softkeys as required in the service planning window to com-
plete the following operations:
Acknowledges the selected task which has been completed

Edits the selected task

Deletes the selected task

Resets the remaining time for all tasks

After you have created at least one maintenance task on the control system, you can find a task name file (.txt) which
contains the name(s) of all maintenance task(s) created under the current system language. You can access this file through
the following operations:

+ → → → →

A task name file is language-dependent. You can copy the file in the desired language to your computer using a USB
memory stick for backup or batch editing of the maintenance task descriptions.

Function Manual
398 6FC5397-7EP40-0BA4, 07/2018
27.14 Using the machine manufacturer's startup screen and machine logo
Using the machine manufacturer startup screen
The control system uses the Siemens startup screen as follows by default. If necessary, you can use your own startup
screen.

Proceed as follows to use your own startup screen:


1. Prepare the image for the startup screen in BMP format. To achieve the best display effect,
the recommended image size is 750*450 pixels. Name the image "startup.bmp" and save it
on a USB memory stick.
2. Insert the USB stick into the USB interface on the front panel of the PPU.
3. Select the system data operating area.
+
4. Locate the startup screen file under the USB directory through the following softkey opera-
tions:


5. Select the file with cursor keys and press this softkey to copy the file.

6. Press this softkey to open the window of system data.

7. Select the HMI data folder and press this key to open it.

Function Manual
6FC5397-7EP40-0BA4, 07/2018 399
8. Move the cursor to the folder highlighted as follows:

9. Press this key to open this folder.

10. Press this softkey to replace the default startup screen file with your own file.

11. Press these two keys to restart the HMI. Then you can see your own startup screen during
+ the startup of the control system.

Note
To restore the default startup screen, delete the customized bitmap file (startup.bmp) from the control system.

Using the machine manufacturer machine logo


The default machine logo is displayed in the machining operating area as follows. If necessary, you can use your own
machine logo.

Function Manual
400 6FC5397-7EP40-0BA4, 07/2018
Proceed as follows to use your own machine logo:
1. Prepare the image of your own machine logo in BMP format. To achieve the best display
effect, the recommended image size is 153*24 pixels. Name the image "mtbico.bmp" and
save it on a USB memory stick.
2. Insert the USB stick into the USB interface on the front panel of the PPU.
3. Select the system data operating area.
+
4. Locate the machine logo file under the USB directory through the following softkey opera-
tions:


5. Select the file with cursor keys and press this softkey to copy the file.

6. Press this softkey to open the window of system data.

7. Select the HMI data folder and press this key to open it.

8. Move the cursor to the folder highlighted as follows:

9. Press this key to open this folder.

10. Press this softkey to replace the default machine logo file with your own machine logo file.

11. Press these two keys to restart the HMI. Then you can see your own machine logo in the
+ machining operating area.

Function Manual
6FC5397-7EP40-0BA4, 07/2018 401
Note
To restore the default display of "SIEMENS" logo, delete the customized bitmap file (mtbico.bmp) from the control system.

27.15 Configuring the operating area after startup


The machining operating area is displayed by default after the startup of the control system. Alternatively, you can select
another operating area which you desire to enter after the system starts up.

Operating sequence
1. Select the system data operating area.

+
2. Open the window for setting the startup operating area through the following softkey opera-
tions:


3. Use the cursor keys to select the desired operating area in the following window:

4. Press this softkey to confirm your setting, and the configured operating system will display
after the control system restarts.

27.16 CNC lock function


27.16.1 Function overview
Note
The CNC lock function is a licensed option (article number: 6FC5800-0AS71-0YB0).
The use of the CNC lock function requires purchase of the appropriate license from SIEMENS.

Note
It's machine manufacturer's responsibility to ensure that the CNC lock function works properly and reliably.

NOTICE
License certificate
The company that created the CNC lock function (machine manufacturer or dealer) must retain the license certificate for
this option (CoL).
This certificate can be used as legitimation for SIEMENS should the PIN be forgotten. The owner of the certificate (CoL)
can have the machine unlocked.

The machine manufacturer can use the CNC lock function and the encrypted file that is created with the commissioning tool
Access MyMachine (AMM) to activate a lock date in the control system. This allows the use of the machine to be limited to

Function Manual
402 6FC5397-7EP40-0BA4, 07/2018
the time until the lock date is reached. The NC start of the control system is locked when the lock date is exceeded. An NC
program being processed in "AUTO" mode at this time is not interrupted.
The CNC lock function can be lengthened or deactivated with an additional encrypted file. The machine manufacturer sends
this file to the end user if the user has fulfilled the agreed obligations.

27.16.2 Requirements
The following preconditions must be met for using the CNC lock function:
● The option of the CNC lock function must be activated with a license key. For more information about how to activate the
optional functions, see Section "Activating the optional functions (Page 417)".
● A PLC project (of type 808D PPU15x/PPU16x) especially adapted to your machine tool must be downloaded into the
control system with PLC Programming Tool. The compatibility mode must be deactivated. The default PLC program
should never be used together with the CNC lock function. For more information about downloading a PLC project, see
the SINUMERIK 808D ADVANCED Commissioning Manual.
● The AMM tool must be installed on your computer. For more information about AMM installation, see the SINUMERIK
808D ADVANCED Commissioning Manual.

27.16.3 Restrictions
The CNC lock function supports the business model with time-limited use. This protects against unauthorized use beyond
the set interval. The direct access to the CNC, however, makes it possible to circumvent the function. The CNC lock function
does not offer an absolute protection against manipulation. Unauthorized use of the machine is precluded by locking "AUTO"
mode of the CNC. Because a running automatic program cannot be interrupted, this can extend the runtime beyond the lock
date. All other functions of the SINUMERIK control system remain available.
To permit the CNC lock function to act, support of the machine manufacturer is required. Consequently, the following note
and supplementary conditions must be observed when the CNC lock function is used.

Note
The CNC lock function is based on a connection of the PLC project to the SINUMERIK 808D ADVANCED control system.
The control system consists of a combination of Panel Processing Unit (PPU) and CF card with system software.

Supplementary conditions

NOTICE
Circumvention of the CNC lock function due to improper operations
Any of the following operations allow circumvention of the CNC lock function:
• Using an unlocked PLC project
• Using the default PLC project
• Reimplementing the PLC project of the machine tool
• Applying no password protection to the PLC project, or failing to keep the password secret
To avoid the circumvention, do as follows:
• Never give the PLC project to the customer without saved OEM PIN.
• Never reimplement the PLC project.
• Never run your machine tool with the default PLC project delivered with the control system.
• Always use the password protection of the program organization units in the PLC of the control system (activation in
PLC Programming Tool is possible), which prevents users from copying the machine-specific know-how and using it in
their own PLC user program, and then replacing the PLC user program with the PLC user program of the machine
manufacturer that contains the PLC key of the CNC lock function. The password of the PLC project must be kept
secret.

● Manipulation attempts and/or inconsistencies can lead to the CNC lock function causing a machine standstill.
● The use of the CNC lock function may require additional service calls of the machine manufacturer or dealer at the
customer site.
● To provide better protection, each machine must be given its own OEM PIN.

Function Manual
6FC5397-7EP40-0BA4, 07/2018 403
● Before setting up the lock function for the first time, the setting up engineer must correctly set the date and the time in the
control system. If the date lies in the past, then the operating time of the machine extends corresponding to the
difference to the real date.
● The CNC lock function is built on the real-time clock of the control system. The maintenance-free design of the control
system can cause the time of day to be lost. The CNC lock function performs a computerized numerical plausibility check
of the time of day. This check can be impaired by power loss to the real-time clock. In this case, the time without power
supply is ignored.
● A software malfunction can cause unintentional locking of the control system.

27.16.4 Protection from manipulation


The CNC lock function as part of the currently expected use and misuse of the control system serves to permit use only
within the set time period. Despite the available protective mechanisms against an impermissible manipulation of the CNC
lock function, a residual risk that the protective mechanisms can be circumvented remains. The CNC lock function cyclically
checks the installed combination of PPU, CF card and PLC project. The lock function is not applicable when replacing all
three components. To protect against manipulation, it is absolutely essential that the secondary conditions listed in Section
"Restrictions (Page 403)" are carefully complied with.

Note
The CNC lock function uses a cryptographic technique. When first marketed, the technique used corresponds to state-of-
the-art technology. As time goes by, the probability that this technique will be able to be bypassed (manipulated) increases.

27.16.5 Creating the activation file


To use the CNC lock function, an encrypted activation file (.clc) appropriate for the hardware must be generated. The file is
created with the AMM tool.
Proceed through the following steps to create the encrypted file for activating the CNC lock function:
1. Start Access MyMachine on your computer.
2. Select the following menu command:

3. Click this button in the displayed dialog box to proceed to the next step.

Function Manual
404 6FC5397-7EP40-0BA4, 07/2018
4. Enter the data required in the dialog box, for example:

① The software version 4.7 SP4 must be selected for the SINUMERIK 808D
ADVANCED control system.
② The serial number of the CF card can be found on the PPU HMI through the following
operations:

+ → → → →
③ The serial number of the hardware (PPU) can be found on the PPU rating plate.

④ The OEM PIN must be limited to 8 to 32 English characters and contain a mixture of
upper and lower case letters, numbers, and special characters (spaces are not al-
lowed). The machine manufacturer is responsible for maintaining the confidentiality of
the OEM PIN.
⑤ The machine manufacturer must set a date when the NC start is locked for the control
system.
5. Click this button to save the activation data in the form of .clc file.

Note
The OEM PIN increases the protection against manipulation of the CNC lock function.
The OEM PIN is stored by the system when activating the CNC lock function in the PLC user program. The OEM PIN cannot
be viewed, changed or deleted by the user in the PLC user program.

27.16.6 Importing the activation file


The activation file must be transferred to the control system either directly via an Ethernet connection or alternatively via a
storage medium, e.g. USB flash drive. The end-user or higher access level is required for the import. The control system
must be in the reset state for the import.

Note
Before importing the activation file into the control system, the machine manufacturer must set the time and date of the
control system correctly, because the time of activating the CNC lock function is saved as the start value for monitoring.

Proceed through the following steps to import the activation file:


1. • To import the file via USB, store the file in a USB memory stick and insert the USB
memory stick into the USB interface at the front of the PPU.
• To import the file via Ethernet, store the file in a shared folder (network drive) on your
computer and connect the network drive via Ethernet connection.

Function Manual
6FC5397-7EP40-0BA4, 07/2018 405
2. Select the system data operating area.
+
3. Press this key to view the extended softkeys.

4. Open the license key dialog box through the following softkey operations:

→ →
5. Check and make sure the screen displays as follows, which indicates the CNC lock option
is licensed and set properly:

6. Press this softkey to open the file opening dialog box.

7. Select the target directory and press this key to enter it.

8. Find the desired activation file and press this softkey to import.

If no error occurs when importing the activation file, the CNC lock function is active in the
control system. You can find the lock date being displayed on the HMI screen, for example:

Function Manual
406 6FC5397-7EP40-0BA4, 07/2018
Note
If an error occurs when importing the activation file, an error-specific alarm will be issued. The state of the CNC lock function
remains unchanged.

Note
We recommend that the machine manufacturer creates a complete commissioning archive over all control system
components after commissioning the machine and activating the CNC lock function. This ensures data consistency for the
CNC lock function. If necessary, this commissioning archive can be used to recommission the control system without
requiring a service call to reactivate the CNC lock function.

Setting the prewarning time


The prewarning time is the time range before reaching the lock date above which alarm 8063 is displayed once daily. The
alarm is a reminder of the lock date, indicating the remaining days before the NC start is locked. The prewarning time is set
via the machine data MD17300 (default = 30) which can be accessed through the following operations:

+ → → →

27.16.7 Extending the CNC lock function


To extend the CNC lock function, the machine manufacturer must use the AMM tool to create a new activation file with new
lock date for the CNC lock function.
Creating the activation file
The following data is required to create a new activation file:
● Serial number of the CF card
● Serial number of the PPU
● OEM PIN
● New lock date
Note
The serial numbers of the CF card and the PPU as well as the OEM PIN must match the values used when the CNC lock
function was activated initially.

The process of creating an activation file for extending the CNC lock function is almost the same as that for activating the
CNC lock function (see Section "Creating the activation file (Page 404)"), except that the button must be
clicked at step 3.
Importing the activation file
The new activation file must be imported into the control system to extend the CNC lock function. The machine manufacturer
can import the new activation file directly or send the file to the end user who transfers the file to the control system. For
more information about how to import the activation file, see Section "Importing the activation file (Page 405)".
If no error occurs when importing the activation file, the CNC lock function with the new lock date is active in the control
system. You can find the extended lock date being displayed on the HMI screen, for example:

Function Manual
6FC5397-7EP40-0BA4, 07/2018 407
Note
If an error occurs when importing the activation file, an error-specific alarm will be issued. The state of the CNC lock function
remains unchanged.

27.16.8 Deactivating the CNC lock function


To deactivate the CNC lock function, the machine manufacturer must use the AMM tool to create a deactivation file without
lock date.

Creating the deactivation file


Proceed through the following steps to create the deactivation file:
1. Start Access MyMachine on your computer.
2. Select the following menu command:

3. Click this button in the displayed dialog box to proceed to the next step.

4. Enter the data required in the dialog box, for example:

Note: The serial numbers of the CF card and the PPU as well as the OEM PIN must match
the values used when the CNC lock function was activated initially. For more information,
see Section "Creating the activation file (Page 404)".
5. Click this button to save the deactivation data in the form of .clc file.

Importing the deactivation file


The deactivation file must be imported into the control system to deactivate the CNC lock function. The machine
manufacturer can import the deactivation file directly or send the file to the end user who transfers the file to the control
system. For more information about how to import the file, see Section "Importing the activation file (Page 405)".

Function Manual
408 6FC5397-7EP40-0BA4, 07/2018
If no error occurs when importing the deactivation file, the CNC lock function is deactivated. You can find the CNC lock
status as follows:

Note
If an error occurs when importing the deactivation file, an error-specific alarm will be issued. The state of the CNC lock
function remains unchanged.

Note
We recommend that the end user creates a complete commissioning archive over all control system components after
deactivating the CNC lock function. If necessary, this commissioning archive can be used to recommission the control
system without re-deactivating the CNC lock function.

27.16.9 Replacing a defective control system hardware (PPU) and/or CF card


If your PPU and/or CF card is defective, both the PPU and the CF card must be replaced at the same time.
After the replacement, the optional functions purchased earlier cannot be activated since the original license key is invalid.
You must first contact the Siemens Hotline to unassign the licenses of the options, and then assign licenses and activate the
optional functions again. For more information, see Section "Activating the optional functions (Page 417)".

Restoring the machine


Method 1
After the initial power up of the control system with the new PPU and new CF card, an existing commissioning archive
created after you deactivate the CNC lock function must be imported.
To create the CNC lock function again, the end user must request a new activation file appropriate for the control system
(.clc) from the machine manufacturer or dealer.
Method 2
After the initial power up of the control system with the new PPU and new CF card, an existing commissioning archive
created after you activate the CNC lock function must be imported. After the next power up of the control system, alarm
8062 is displayed and the NC start is disabled. The cause of the alarm is the new serial numbers of the new control system
hardware and new CF card.
To unlock the control system, the end user must request an activation file for deactivating the CNC lock function for the
existing control system from the machine manufacturer or dealer. When creating this activation file, make sure you use the
serial numbers of the new PPU and new CF card as well as the original assigned OEM PIN. For more information about how
to deactivate the CNC lock function with AMM, see Section "Deactivating the CNC lock function (Page 408)".
To create the CNC lock function again, the end user must request a new activation file appropriate for the control system
(.clc) from the machine manufacturer or dealer.

Function Manual
6FC5397-7EP40-0BA4, 07/2018 409
Creating the activation file
The following data is required to create the activation file:
● Serial number of the new CF card
● Serial number of the new control system (PPU)
● OEM PIN
● Lock date in accordance with the status of the CNC lock function (last lock date or new lock date)

Note
The OEM PIN is newly created here according to the creation rules mentioned earlier.

For more information about how to create an activation file with AMM, see Section "Creating the activation file (Page 404)".

Importing the activation file


The new activation file must be imported into the control system to replace a defective PPU and/or CF card. The machine
manufacturer can import the new activation file directly or send the file to the end user who transfers the file to the control
system. For more information about how to import the activation file, see Section "Importing the activation file (Page 405)".
If no error occurs when importing the activation file, the CNC lock function is active in the new control system.

Note
If an error occurs when importing the activation file, an error-specific alarm will be issued. The state of the CNC lock function
remains unchanged.

27.16.10 OEM PIN forgotten


The machine manufacturer or dealer has forgotten the OEM PIN that was assigned during the initial creation and so can no
longer create a valid activation file for the associated control system.
Unlocking the machine
To allow the machine manufacturer or dealer to operate the machine, the technician must contact the Siemens Hotline and
provide the following information:
● License certificate (CoL) for the option of the CNC lock function
● Serial number of the CF card
● Serial number of the control system (PPU)
● Software version of the CNC software

Note
For more information about how to obtain the serial numbers of the CF card and of the control system (PPU), see Section
"Creating the activation file (Page 404)".
The software version of the CNC software can be found on the PPU HMI through the following operations:

+ → → →

The machine manufacturer or dealer receives from the Hotline the activation file to unlock the machine. The unlocking acts,
however, only on the hardware of the control system (PPU). The PLC project is not unlocked. For this reason, the original
PLC project appropriate for the machine must be available.
Further information concerning the procedure can be obtained from the Siemens Hotline.

Function Manual
410 6FC5397-7EP40-0BA4, 07/2018
27.16.11 Other information

Project file
The AMM tool can be used to create an unencrypted project file (.ucls) that contains the following data:
● Serial number of the CF card
● Serial number of the hardware (PPU)
● OEM PIN
● Creation date
● Lock date
Proceed through the following steps to create the unencrypted project file:
1. Start Access MyMachine on your computer.
2. Select the following menu command:

3. Enter the data required in the dialog box, for example:

4. Click this button to save the data in the form of .ucls file.

Clicking this button allows you to reimport the unencrypted data stored in the project file.

Faulty settings of date


If a date earlier than the actual date is set for activated CNC lock function, alarm 8065 is issued after NC restart and then NC
start is disabled. In this case, you must correct the date and perform an NC restart again to clear the alarm.
If during the correcting, a future date is set inadvertently, alarm 8066 is issued. Provided no NC restart has been performed,
the date can still be corrected. After NC restart, a date set in the future is considered as being an actual date and can no
longer be reset.

Function Manual
6FC5397-7EP40-0BA4, 07/2018 411
NOTICE
Shorter service life
After NC restart, a future date set earlier than the lock date reduces the service life until the lock date. If a date equal to or
later than the lock date is set, alarm 8064 is issued and the NC start disabled.
Make sure you set the date correctly prior to NC restart.

Further information
Reference:
● Online help for the communication tool Access MyMachine (AMM)
● Online help for PLC Programming Tool

27.17 Switching geometry axes


Which channel axes are assigned to the geometry axis of the channel can be specified with the GEOAX command.
As shown in the figure below, you can use axis Z1 as the third geometry axis named axis Z, which, together with axes X1
and Y1, form a geometry coordinate system used for interpolatory compensation. Alternatively, you can use axis Z2 as the
third geometry axis named axis Z, which also, together with axes X1 and Y1, form a geometry coordinate system used for
interpolatory compensation. In this way, axes Z1 and Z2 can be alternatively used as geometry axis Z in a part program.

Machine data for switching geometry axes


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.
The required assignment for switching geometry axes is as follows:
MD10000 AXCONF_MACHAX_NAME_TAB Machine axis name
MD20050 AXCONF_GEOAX_ASSIGN_TAB Assignment of geometry axis to channel axis
MD20060 AXCONF_GEOAX_NAME_TAB Geometry axis names in channel
MD20070 AXCONF_MACHAX_USED Valid machine axis numbers in channel
MD20080 AXCONF_CHANAX_NAME_TAB Channel axis names in channel

Format
The GEOAX command is formatted as follows:
GEOAX(n, channel axis name) ; Activation of the geometry axis switchover
GEOAX() ; Deactivation of the geometry axis switchover

Function Manual
412 6FC5397-7EP40-0BA4, 07/2018
n = 1 to 3: number of the geometry axis to which a channel axis is assigned
Channel axis name: name of the channel axis that is assigned to a geometry axis

Example
Prerequisites:
● MD10000[4] = MZ2
● MD20080[0] = X1
● MD20080[1] = Y1
● MD20080[2] = Z1
● MD20080[4] = Z2
The following takes the workpiece machining process shown in the above figure for example to show how to switch
geometry axes.
GEOAX() ; basic configuration of the geometry axis active
G0 X0Y0Z0 ; channel axis Z1 used as the third geometry axis Z by
default
GEOAX(3, Z2) ; channel axis Z2 used as the third geometry axis Z
G0 Z100 ; tool movement command for axis Z called on axis Z2;
then Z2 moves to Z100 in the WCS
GEOAX(3, Z1) ; channel axis Z1 used as the third geometry axis Z
G0 Z100 ; tool movement command for axis Z called on axis Z1;
then Z1 moves to Z100 in the WCS
GEOAX() ; geometry axis switchover deactivated

Note
The assigned channel axis names and geometry axis names must differ; otherwise alarm 14414 "GEOAX function: incorrect
call" is triggered.
• MD20080 AXCONF_CHANAX_NAME_TAB
• MD20060 AXCONF_GEOAX_NAME_TAB

Note
The GEOAX command is used for switching a geometry axis. For an additional axis, you can switch it with the GEOAX
command only after assigning a geometry axis to the additional axis.
The GEOAX command is used for switching an existing geometry axis when the control system is powered on, but not for
creating a new geometry axis.
The GEOAX() command is used for calling the basic configuration of a geometry axis, that is, restoring its original
configuration status before the GEOAX command is called. Failing to call the GEOAX() command after calling the GEOAX
command keeps the operation of geometry axis switchover still active even when you execute another part program.

27.18 Cycle protection


Overview

Note
You require the software option "Lock MyCycles" (article number: 6FC5800-0AP54-0YB0) in order to use this function.

With cycle protection function, cycles can be encrypted and then protected in the control after you encrypt the cycle files
(.SPF) with Access MyMachine (AMM) tool and transfer the generated encrypted cycle files (.CPF) to the control.
In order to protect the manufacturer's know-how, any type of view is inhibited for cycles with cycle protection. If service is
required, the machine manufacturer must provide the unencrypted cycle.

Note
This type of encryption is in compliance with export restrictions and embargo regulations.

Function Manual
6FC5397-7EP40-0BA4, 07/2018 413
Note
End user
When using encrypted cycles of a machine manufacturer, if problems occur, then only the service department of the
machine manufacturer should be contacted.
Machine manufacturer
When using encrypted cycles, the machine manufacturer must ensure that original, unencrypted cycles are archived with the
appropriate version management.

Requirements
● The option "Lock MyCycles" must be activated with a license key. For more information about how to activate the
optional functions, see Section "Activating the optional functions (Page 417)".
● The AMM tool must be installed on your computer. For more information about AMM installation, see Section "Installing
the software tools" in the SINUMERIK 808D ADVANCED Commissioning Manual.

27.18.1 Encrypting cycle file(s)


Proceed through the following steps to use the AMM tool to encrypt the cycle files (.SPF):
1. Start Access MyMachine on your computer.
2. Select one or more cycle files (.SPF) as desired from the PC file system, for example:

Function Manual
414 6FC5397-7EP40-0BA4, 07/2018
3. Right-click the file to open the context menu and select the cycle encrypting function as fol-
lows:

Alternatively, you can select this function via the main menu:

Function Manual
6FC5397-7EP40-0BA4, 07/2018 415
4. Select the following encryption option from the dialog box:

5. Click this button and the encryption process starts.

After the encryption process completes successfully, the following message appears and an
encrypted cycle file is generated in the same directory as the original file. The name of the
new created file is "Original file name.CPF".

27.18.2 Handling the encrypted cycles


The machine manufacturer must transfer the encrypted cycles (.CPF files) to the control and perform a power-on reset
before executing the encrytped cycles. If no power-on reset is performed, the processing of a .CPF file causes the NC alarm
15176.
An encrypted cycle can be deleted or unloaded just like an .SPF or .MPF file. All the encrypted .CPF files are also backed up
when an archive is generated.

Executing an encrypted cycle


● An encrypted cycle cannot be directly selected for execution. It can only be called from a part program - or directly in MDI.
● An encrypted cycle cannot be executed with the external execution function.

Using encrypted cycles at one or more machines


● Using encrypted cycles at only one machine
If a cycle must not be used at another machine, then it can be permanently linked to a particular machine. The machine
data MD18030 $MN_HW_SERIAL_NUMBER can be used for this purpose.
When the control powers on, the unique hardware serial number of the CF card is saved in this machine data. If a cycle
is to be permanently linked to a machine, then the serial number of the CF card (MD18030) must be queried in the call of
the cycle. If the cycle identifies a serial number that does not match, then an alarm can be output in the cycle and so
prevents further processing. As the code of the cycle is encrypted, there is always a fixed link to a defined hardware.
● Using encrypted cycles at several machines
If a cycle is to be permanently linked to several defined machines, then each of the hardware serial numbers must be
entered in the cycle. The cycle must be re-encrypted with these hardware serial numbers.

Function Manual
416 6FC5397-7EP40-0BA4, 07/2018
28 Licensing in the SINUMERIK 808D ADVANCED
28.1 Activating the optional functions
The following optional functions can be purchased for the control system:
● Additional axis
● Additional positioning axis/auxiliary spindle *
● Contour handwheel
● Bidirectional leadscrew error compensation
● Generic Coupling 'CP-BASIC' (for the turning variant of the control system only)
● Manual Machine Plus (for the turning variant of the control system only)
● Lock MyCycles
● Transmit/Tracyl
● Gantry (BASIC) *
● CNC lock
* This optional function is available on PPU16x.3 only.

Note
Before activating the Manual Machine Plus function, make sure that MD20050 is set to default.

Note
The control system with PPU16x.3 supports up to three additional axes (configured as standard NC axes or positioning
axes) for the turning variant and two for the milling variant. The control system with PPU15x.3 only supports one additional
axis configured as standard NC axis for the turning variant only.
To use a purchased option, you must first activate it with a license key on the control system. After you purchase the desired
option(s), you can obtain the corresponding license key from the Web License Manager.

Operating sequence
1. Select the system data operating area.
+
2. Press this key to view the extended softkeys.

3. Open the dialog box for entering the license key through the following softkey operations:

→ →
Then you can find the serial number of the CF card in the following dialog box:

4. Go to the Web License Manager (http://www.siemens.com/automation/license) on a comput-


er with Internet access, and login via "Direct access".
Function Manual
6FC5397-7EP40-0BA4, 07/2018 417
5. Follow the instructions in the Web License Manager to assign the licenses of your purchased
options to the specified PPU. A license key is generated after the licenses are assigned suc-
cessfully.
6. Enter the license key generated by the Web License Manager in the following dialog box:

7. Press this softkey to confirm your entry.

8. Press this softkey to open the window of available options. You can find the licensing status
in this window, for example:

If you have licensed one or more additional axes, you can find the number of the licensed
axes in the column of licensing status. For other licensed options, a "☑" symbol displays in
this column.
Note: The last option (see below) in this window indicates the variant information and the
licensing status of your control system, for example:

In case of any problems with the licensing status of your control system, contact Siemens
service personnel.
9. Set the licensed options.
• For the additional axes, enter a number as required in the setting column and press the
following key:

• For the other options, press the following key to select:

Function Manual
418 6FC5397-7EP40-0BA4, 07/2018
10. Press this softkey to restart the NCK, so that the licensed options are activated.

Note
To use the CNC lock function, further activation operations are required after the CNC lock option is activated. For more
information, see Section "CNC lock function (Page 402)".

28.2 Internet links


Overview of Internet links used:
No. Topic Address
1 Web License Manager http://www.siemens.com/automation/license
2 Siemens A&D Mall: Customer login http://mall.automation.siemens.com
3 Download server http://software-download.automation.siemens.com

28.3 Important licensing terms


The terms below are important and helpful for you to understand the license management of SINUMERIK software products.
Term Description
Software product "Software product" is generally used to describe a product that is installed on a piece of
hardware to process data. Within the license management of SINUMERIK software products,
a corresponding license is required to use each software product.
Hardware In the context of the license management of SINUMERIK software products, "hardware"
refers to the component of a SINUMERIK control system to which licenses are assigned on
the basis of its unique identifier. License information is also saved to the retentive memory on
this component.
• SINUMERIK 808D ADVANCED: CompactFlash card system
License A license gives the user a legal right to use the software product. Evidence of this right is
provided by the following:
• CoL (Certificate of License)
• License key
CoL The CoL is the proof of the license. The product may only be used by the holder of the li-
(Certificate of License) cense or authorized persons. The CoL includes the following data relevant for the license
management:
• Product name
• License number
• Delivery note number
• Hardware serial number
Note:
The hardware serial number is only found on a system software CoL or is only available if a
bundled license was ordered, in other words, the system software included options.
License number The license number is the feature of a license that is used for its unique identification.
CompactFlash card system The CompactFlash card system represents, as the carrier of all the retentive data of a
SINUMERIK control system, the identity of this control system. The CompactFlash card sys-
tem includes the following data that is of relevance to license management:
• Hardware serial number
• License information including the license key

Function Manual
6FC5397-7EP40-0BA4, 07/2018 419
Term Description
Hardware serial number The hardware serial number is a permanent part of the CompactFlash card system. It is used
to identify a control system uniquely. The hardware serial number can be determined by:
• CoL (see: Certificate of License > "Note")
• HMI user interface (perform the following operations on the PPU)

+ → → →
• Printing on the CompactFlash card system
License key The license key is the "technical representative" of the sum of all the licenses that are as-
signed to one particular piece of hardware, which is uniquely marked by its hardware serial
number.
Option One option is a SINUMERIK software product that is not contained in the basic version and
which requires the purchase of a license for its use.
Product A product is marked by the data below within the license management of SINUMERIK soft-
ware products:
• Product designation
• Article number
• License number

A Appendix
System variable list
System variable Description
$AA_FIX_POINT_SELECTED [<Axis>] Number of fixed point to be approached
$AA_FIX_POINT_ACT [<Axis>] Number of the fixed point on which the axis is currently
located
$P_PROG_EVENT Event-driven program call active
$P_SEARCH_S Search run: speed, cutting rate
$P_SEARCH_SDIR Block search: programmed direction of spindle rotation in
part program
$P_SEARCH_SGEAR Search run: Gear stage M code
$P_SEARCH_SPOS Search run: Spindle position, path
$P_SEARCH_SPOSMODE Search run: Position approach mode
$AA_ENC_COMP_MIN EEC table: Starting position
$AA_ENC_COMP_MAX EEC table: End position
$AA_ENC_COMP EEC table: Compensation value
$AN_CEC[<t>,<N>] Compensation value for interpolation point <N> of com-
pensation table [<t>]
$AN_CEC_INPUT_AXIS[<t>] Basic axis
$AN_CEC_OUTPUT_AXIS[<t>] Compensation axis
$AN_CEC_STEP[<t>] Interpolation point distance
$AN_CEC_MIN[<t>] Initial position
$AN_CEC_MAX[<t>] End position
$AN_CEC_DIRECTION[<t>] Direction-dependent compensation
$AN_CEC_IS_MODULO[<t>] Compensation with modulo function
$AC_MEA[1] Query measurement job status signal
$AA_MM[axis] Access to measured value in the machine coordinate
system (MCS)

Function Manual
420 6FC5397-7EP40-0BA4, 07/2018
System variable Description
$AA_MW[axis] Access to measured value in the workpiece coordinate
system
$C_T Cycle parameter for address T
$P_ISTEST Program testing status; boolean variable
$P_SEARCH Program searching status; boolean variable
$P_SEARCHL Program searching status; real numbers: 1-, 2-, 3-
$P_TOOLNO Tool number in the spindle turret
$P_TOOLP Programming tool number
$C_T Programming tool number
$P_TOOLP is inactive when the program code T calls a
tool changing cycle that is defined with MD10717. The tool
number is then represented with "$C_T".
$TC_DP1[Tool number, 1] Tool type
$TC_DP3[Tool number, 1] Tool's geometrical parameter: tool length 1
$TC_DP6[Tool number, 1] Tool's geometrical parameter: tool radius
$TC_DP12[Tool number, 1] Tool wear: the direction of length 1
$TC_DP15[Tool number, 1] Tool wear: the direction of radius
$TC_DP24[Tool number, 1] Tool's dimension:
0: normal
1: oversize
$TC_DP25[Tool number, 1] Number of the tool turret
_TM[n] Global user data (integral)
_ZSFR[n] Global user data (float)
NOTE:
Since this data has been used in the Siemens standard
technology cycles, make sure that there is no conflict with
the technology cycles when you are using this data.
$AC_OPERATING_TIME Total time for running programs in "AUTO" mode
$AC_CYCLE_TIME Run time of a selected program
$AC_CUTTING_TIME Cutting time (G01, G02, G03) of a selected program
$AN_SETUP_TIME Time elapsed since the last power-on with default values
$AN_POWERON_TIME Time elapsed since the last normal power-on
$AC_REQUIRED_PARTS Required parts to be counted
Activated by setting MD27880 BIT0 = 1:
• BIT 1 = 0: if "Part count" = "Parts required", alarm or
interface DB3300.DBX4001.1 = 1
$AC_TOTAL_PARTS Total number of counted parts
Activated by setting MD27880 BIT 4 = 1:
• BIT 5 = 0: M02/M30 increases "Parts in total" to "1"
• BIT 5 = 1: the M code defined by MD27882 increases
"Parts in total" to "1"
• BIT 6 = 0/1: the counter does not work when "Program
test" is inactive

Function Manual
6FC5397-7EP40-0BA4, 07/2018 421
System variable Description
$AC_ACTUAL_PARTS Parts actually counted
Activated by setting MD27880 BIT 8 = 1:
• BIT 9 = 0: M02/M30 increases "Parts in total" to "1"
• BIT 9 = 1: the M code defined by MD27882 increases
"Parts in total" to "1"
• BIT 10 = 0/1: the counter does not work when "Pro-
gram test" is inactive
$A_OUT Digital output
$AA_COUP_ACT [axis name] Current coupling state of the coupled-motion axis/spindle
$AA_ACCLIMA Main run acceleration correction set with ACCLIMA
$AA_VELOLIMA Main run speed correction set with VELOLIMA
$PA_ACCLIMA Preprocessing acceleration correction set with ACCLIMA
$PA_VELOLIMA Preprocessing speed correction set with VELOLIMA
$AC_PLTBB Path length from the beginning of the block in the BCS
$AC_PATHACC Path acceleration for real-time events
$AC_PATHJERK Path jerk for real-time events
$AC_PATHN Normalized path parameter
$AC_PLTEB Path length to the end of the block in the BCS
$AA_SNGLAX_STAT Display status of a PLC-controlled axis
$AA_MOTEND Current motion end criterion for single-axis interpolation
$P_COUP_OFFS [coupled-motion spindle] Programmed offset of the synchronous spindle
$AA_COUP_OFFS [coupled-motion spindle] Position offset for synchronous spindle (setpoint)
$VA_COUP_OFFS [coupled-motion spindle] Position offset for synchronous spindle (actual value)

Trademarks
All names identified by ® are registered trademarks of 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
Division Digital Factory
Postfach 48 48
90026 NÜRNBERG
GERMANY

Function Manual Function Manual


6FC5397-7EP40-0BA4,
422 07/2018 6FC5397-7EP40-0BA4, 07/2018

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy