FB1sl 0313 en en-US
FB1sl 0313 en en-US
Preface
A2: Various NC/PLC
interface signals and 1
functions
A3: Axis Monitoring,
___________________
Protection Zones 2
B1: Continuous-path mode,
SINUMERIK ___________________
Exact stop, Look Ahead 3
___________________
B2: Acceleration 4
SINUMERIK 840D sl / 828D
Basic Functions ___________________
F1: Travel to fixed stop 5
G2: Velocities, setpoint /
___________
6
actual value systems,
closed-loop control
Function Manual H2: Auxiliary function outputs
7
___________________
to PLC
K1: Mode group, channel,
program operation, reset 8
response
K2: Axis Types, Coordinate
___________________
Systems, Frames 9
___________________
N2: Emergency stop 10
___________________
P1: Transverse axes 11
P3: Basic PLC program for
___________________
SINUMERIK 840D sl 12
P4: PLC for SINUMERIK
___________________
828D 13
___________________
R1: Referencing 14
___________________
S1: Spindles 15
___________________
V1: Feedrates 16
Valid for
___________________
W1: Tool offset 17
SINUMERIK 840D sl / 840DE sl
SINUMERIK 828D Controls ___________________
Z1: NC/PLC interface signals 18
Software CNC
software version 4.5 SP2
___________________
Appendix A
03/2013
6FC5397-0BP40-3BA1
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.
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.
SINUMERIK documentation
The SINUMERIK documentation is organized in the following categories:
● General documentation
● User documentation
● Manufacturer/service documentation
Additional information
You can find information on the following topics at www.siemens.com/motioncontrol/docu:
● Ordering documentation/overview of documentation
● Additional links to download documents
● Using documentation online (find and search in manuals/information)
Please send any questions about the technical documentation (e.g. suggestions for
improvement, corrections) to the following address:
[email protected]
Training
For information about the range of training courses, refer under:
● www.siemens.com/sitrain
SITRAIN - Siemens training for products, systems and solutions in automation technology
● www.siemens.com/sinutrain
SinuTrain - training software for SINUMERIK
FAQs
You can find Frequently Asked Questions in the Service&Support pages under Product
Support. http://support.automation.siemens.com
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 3
Preface
SINUMERIK
You can find information on SINUMERIK under the following link:
www.siemens.com/sinumerik
Target group
This publication is intended for:
● Project engineers
● Technologists (from machine manufacturers)
● System startup engineers (Systems/Machines)
● Programmers
Benefits
The function manual describes the functions so that the target group knows them and can
select them. It provides the target group with the information required to implement the
functions.
Standard version
This documentation only describes the functionality of the standard version. Extensions or
changes made by the machine tool manufacturer are documented by the machine tool
manufacturer.
Other functions not described in this documentation might be executable in the control. This
does not, however, represent an obligation to supply such functions with a new control or
when servicing.
Further, for the sake of simplicity, this documentation does not contain all detailed
information about all types of the product and cannot cover every conceivable case of
installation, operation or maintenance.
Technical Support
You will find telephone numbers for other countries for technical support in the Internet under
http://www.siemens.com/automation/service&support
Basic Functions
4 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
Preface
Installation
Structure of this Function Manual:
● Inner title (page 3) with the title of the Function Manual, the SINUMERIK controls as well
as the software and the version for which this version of the Function Manual is
applicable and the overview of the individual functional descriptions.
● Description of the functions in alphabetical order (e.g. A2, A3, B1, etc.)
● Appendix with:
– List of abbreviations
– Documentation overview
● Index of terms
Note
For detailed descriptions of data and alarms see:
• For machine and setting data:
Detailed description of machine data (only electronically on DOConCD or DOConWEB)
• For NC/PLC interface signals:
– Function Manual, Basic Functions; NC/PLC Interface Signals (Z1)
– Function Manual, Basic Functions; NC/PLC Interface Signals (Z2)
– Function Manual, Special Functions; NC/PLC Interface Signals (Z3)
• For alarms:
Diagnostics Manual
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 5
Preface
Note
Signal address
The description of functions include as <signal address> of an NC/PLC interface signal, only
the address valid for SINUMERIK 840D sl. The signal address for SINUMERIK 828D should
be taken from the data lists "Signals to/from ..." at the end of the particular description of
functions.
Quantity structure
Explanations concerning the NC/PLC interface are based on the absolute maximum number
of sequential components:
● Mode groups (DB11)
● Channels (DB21, etc.)
● Axes/spindles (DB31, etc.)
Data types
The control provides the following data types that can be used for programming in part
programs:
Basic Functions
6 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
Table of Contents
Preface ...................................................................................................................................................... 3
1 A2: Various NC/PLC interface signals and functions ............................................................................... 33
1.1 Brief description ...........................................................................................................................33
1.2 NC/PLC interface signals - only 840D sl......................................................................................33
1.2.1 General ........................................................................................................................................33
1.2.2 Ready signal to PLC ....................................................................................................................35
1.2.3 Status signals to PLC...................................................................................................................35
1.2.4 Signals to/from the operator panel front ......................................................................................36
1.2.5 Signals to channel........................................................................................................................38
1.2.6 Signals to axis/spindle .................................................................................................................38
1.2.7 Signals from axis/spindle .............................................................................................................48
1.2.8 Signals to axis/spindle (digital drives)..........................................................................................49
1.2.9 Signals from axis/spindle (digital drives)......................................................................................51
1.3 Functions......................................................................................................................................53
1.3.1 Screen settings ............................................................................................................................53
1.3.2 Settings for involute interpolation - only 840D sl..........................................................................55
1.3.3 Activate DEFAULT memory - only 840D sl..................................................................................58
1.3.4 Read and write PLC variable - only 840D sl ................................................................................58
1.3.5 Access protection via password and keyswitch...........................................................................62
1.3.5.1 Password .....................................................................................................................................63
1.3.5.2 Keyswitch positions (DB10, DBX56.4 to 7)..................................................................................64
1.3.5.3 Parameterizable protection levels................................................................................................65
1.3.6 "Parking" of a machine axis .........................................................................................................66
1.3.7 Switchover of motor/drive data sets.............................................................................................67
1.3.7.1 General Information .....................................................................................................................67
1.3.7.2 Validity and format of the request/display interfaces ...................................................................68
1.3.7.3 Request for a new motor data set and/or drive data set..............................................................68
1.3.7.4 Display of the active motor and/or drive data set.........................................................................69
1.3.7.5 Example .......................................................................................................................................69
1.3.7.6 Overview of the interfaces ...........................................................................................................70
1.3.7.7 Supplementary conditions............................................................................................................71
1.4 Examples .....................................................................................................................................71
1.5 Data lists ......................................................................................................................................73
1.5.1 Machine data................................................................................................................................73
1.5.1.1 Display machine data...................................................................................................................73
1.5.1.2 NC-specific machine data ............................................................................................................73
1.5.1.3 Channelspecific machine data .....................................................................................................73
1.5.1.4 Axis/spindlespecific machine data ...............................................................................................74
1.5.2 System variables..........................................................................................................................74
1.5.3 Signals .........................................................................................................................................74
1.5.3.1 Signals to NC ...............................................................................................................................74
1.5.3.2 Signals from NC...........................................................................................................................74
1.5.3.3 Signals to operator panel front.....................................................................................................75
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 7
Table of Contents
Basic Functions
8 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
Table of Contents
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 9
Table of Contents
Basic Functions
10 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
Table of Contents
4.2.12.2 Programming..............................................................................................................................250
4.2.13 Path-jerk limitation (channel-specific) ........................................................................................251
4.2.13.1 General Information ...................................................................................................................251
4.2.13.2 Parameterization ........................................................................................................................251
4.2.13.3 Programming..............................................................................................................................251
4.2.14 Path jerk for real-time events (channel-specific)........................................................................252
4.2.14.1 General Information ...................................................................................................................252
4.2.14.2 Programming..............................................................................................................................253
4.2.15 Jerk with programmed rapid traverse (G00) (axis-specific).......................................................254
4.2.15.1 General Information ...................................................................................................................254
4.2.15.2 Parameterization ........................................................................................................................254
4.2.16 Excessive jerk for block transitions without constant curvature (axis-specific) .........................255
4.2.16.1 General Information ...................................................................................................................255
4.2.16.2 Parameterization ........................................................................................................................255
4.2.17 Velocity-dependent jerk adaptation (axis-specific) ....................................................................255
4.2.18 Jerk filter (axis-specific) .............................................................................................................258
4.2.18.1 General Information ...................................................................................................................258
4.2.18.2 Parameterization ........................................................................................................................260
4.2.19 Kneeshaped acceleration characteristic curve ..........................................................................261
4.2.19.1 Adaptation to the motor characteristic curve .............................................................................261
4.2.19.2 Effects on path acceleration.......................................................................................................263
4.2.19.3 Substitute characteristic curve ...................................................................................................264
4.2.19.4 Parameterization ........................................................................................................................266
4.2.19.5 Programming..............................................................................................................................267
4.2.19.6 Boundary conditions ..................................................................................................................268
4.2.20 Acceleration and jerk for JOG motions ......................................................................................269
4.2.20.1 Parameterization ........................................................................................................................269
4.2.20.2 Supplementary conditions..........................................................................................................271
4.3 Examples ...................................................................................................................................272
4.3.1 Acceleration ...............................................................................................................................272
4.3.1.1 Path velocity characteristic ........................................................................................................272
4.3.2 Jerk ............................................................................................................................................274
4.3.2.1 Path velocity characteristic ........................................................................................................274
4.3.3 Acceleration and jerk .................................................................................................................275
4.3.4 Knee-shaped acceleration characteristic curve .........................................................................277
4.3.4.1 Activation....................................................................................................................................277
4.4 Data lists ....................................................................................................................................278
4.4.1 Machine data..............................................................................................................................278
4.4.1.1 NC-specific machine data ..........................................................................................................278
4.4.1.2 Channel-specific machine data..................................................................................................278
4.4.1.3 Axis/spindlespecific machine data .............................................................................................279
4.4.2 Setting data ................................................................................................................................280
4.4.2.1 Channelspecific setting data ......................................................................................................280
4.4.3 System variables........................................................................................................................280
5 F1: Travel to fixed stop .......................................................................................................................... 281
5.1 Brief description .........................................................................................................................281
5.2 Detailed description ...................................................................................................................281
5.2.1 Programming..............................................................................................................................281
5.2.2 Functional sequence..................................................................................................................285
5.2.2.1 Selection ....................................................................................................................................285
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 11
Table of Contents
Basic Functions
12 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
Table of Contents
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 13
Table of Contents
7.13.6 Auxiliary function output with a type 5 block search (SERUPRO) ............................................ 422
7.13.7 ASUB at the end of the SERUPRO .......................................................................................... 426
7.14 Implicitly output auxiliary functions............................................................................................ 433
7.15 Information options.................................................................................................................... 434
7.15.1 Group-specific modal M auxiliary function display .................................................................... 434
7.15.2 Querying system variables........................................................................................................ 435
7.16 Supplementary conditions......................................................................................................... 437
7.16.1 General constraints ................................................................................................................... 437
7.16.2 Output behavior......................................................................................................................... 438
7.17 Examples................................................................................................................................... 440
7.17.1 Extension of predefined auxiliary functions............................................................................... 440
7.17.2 Defining auxiliary functions ....................................................................................................... 441
7.18 Data lists.................................................................................................................................... 446
7.18.1 Machine data............................................................................................................................. 446
7.18.1.1 NC-specific machine data ......................................................................................................... 446
7.18.1.2 Channelspecific machine data .................................................................................................. 446
7.18.2 Signals....................................................................................................................................... 447
7.18.2.1 Signals to channel..................................................................................................................... 447
7.18.2.2 Signals from channel................................................................................................................. 447
7.18.2.3 Signals to axis/spindle............................................................................................................... 449
7.18.2.4 Signals from axis/spindle .......................................................................................................... 449
8 K1: Mode group, channel, program operation, reset response .............................................................. 451
8.1 Product brief.............................................................................................................................. 451
8.2 Mode group ............................................................................................................................... 454
8.2.1 Mode group stop ....................................................................................................................... 457
8.2.2 Mode group reset ...................................................................................................................... 457
8.3 Mode types and mode type change.......................................................................................... 458
8.3.1 Monitoring functions and interlocks of the individual modes..................................................... 463
8.3.2 Mode change ............................................................................................................................ 463
8.4 Channel ..................................................................................................................................... 465
8.4.1 Global start disable for channel ................................................................................................ 468
8.5 Program test.............................................................................................................................. 469
8.5.1 Program execution without setpoint outputs ............................................................................. 469
8.5.2 Program execution in single-block mode .................................................................................. 471
8.5.3 Program execution with dry run feedrate .................................................................................. 473
8.5.4 Skip part-program blocks .......................................................................................................... 474
8.6 Workpiece simulation ................................................................................................................ 475
8.7 Block search.............................................................................................................................. 476
8.7.1 Sequence for block search of the type 1, 2 and 4 .................................................................... 478
8.7.2 Block search in connection with other NCK functions .............................................................. 480
8.7.2.1 ASUB after and during block search......................................................................................... 480
8.7.2.2 PLC actions after block search ................................................................................................. 481
8.7.2.3 Spindle functions after block search ......................................................................................... 482
8.7.2.4 Reading system variables for a block search ........................................................................... 483
8.7.3 Automatic start of an ASUB after a block search...................................................................... 483
8.7.4 Cascaded block search............................................................................................................. 485
Basic Functions
14 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
Table of Contents
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 15
Table of Contents
Basic Functions
16 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
Table of Contents
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 17
Table of Contents
Basic Functions
18 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
Table of Contents
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 19
Table of Contents
Basic Functions
20 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
Table of Contents
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 21
Table of Contents
Basic Functions
22 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
Table of Contents
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 23
Table of Contents
Basic Functions
24 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
Table of Contents
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 25
Table of Contents
Basic Functions
26 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
Table of Contents
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 27
Table of Contents
Basic Functions
28 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
Table of Contents
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 29
Table of Contents
Basic Functions
30 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
Table of Contents
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 31
Table of Contents
Basic Functions
32 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
A2: Various NC/PLC interface signals and functions 1
1.1 Brief description
Contents
The PLC/NCK interface comprises a data interface on one side and a function interface on
the other. The data interface contains status and control signals, auxiliary functions and G
functions, while the function interface is used to transfer jobs from the PLC to the NCK.
This Description describes the functionality of interface signals, which are of general
relevance but are not included in the Descriptions of Functions.
● Asynchronous events
● Status signals
● PLC variable (read and write)
1.2.1 General
NC/PLC interface
The NC/PLC interface comprises the following parts:
● Data interface
● Function interface
Data interface
The data interface is used for component coordination:
● PLC user program
● NC
● HMI (operator control component)
● MCP (machine control panel)
Data exchange is organized by the basic PLC program.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 33
A2: Various NC/PLC interface signals and functions
1.2 NC/PLC interface signals - only 840D sl
Function interface
The function interface is generated by function blocks (FB) and function calls (FC). Function
requests, e.g. to traverse axes, are sent from the PLC to the NC via the function interface.
Basic Functions
34 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
A2: Various NC/PLC interface signals and functions
1.2 NC/PLC interface signals - only 840D sl
References
● Description of the basic PLC program:
→ Function Manual, Basic Functions, Basic PLC Program (P3)
● Description of the event-driven signal exchange (auxiliary and G functions):
→ Function Manual, Basic Functions; Auxiliary Function Output to PLC (H2)
● Overview of all interface signals, functional and data components:
→ List Manual 2
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 35
A2: Various NC/PLC interface signals and functions
1.2 NC/PLC interface signals - only 840D sl
Note
In order to prevent accidental operator actions when the screen is darkened via the
interface signal, we recommend disabling the keyboard at the same time.
DB19 DBX0.1 = 1 AND DB19 DBX0.2 = 1 (key disable)
Basic Functions
36 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
A2: Various NC/PLC interface signals and functions
1.2 NC/PLC interface signals - only 840D sl
DB19 DBX 0.3 / 0.4 (Delete cancel alarms / Delete recall alarms) (HMI Advanced)
Request to delete all currently pending alarms with Cancel or Recall delete criterion. Deletion
of the alarms is acknowledged via the following interface signals.
● DB19 DBX20.3 (cancel alarm deleted)
● DB19 DBX20.4 (recall alarm deleted)
DB19 DBB13 (control of the file transfer via hard disk) (HMI Advanced only)
Job byte to control file transfer via hard disk. The jobs relate to the user control file in the
interface signals:
DB19 DBB16 (part program handling: Number of the control file for user file names)
DB19 DBB17 (part program handling: Index of the file to be transmitted from the user list)
DB19 DBB16 (control of file transfer via hard disk) (HMI Advanced only)
Control byte for file transfer via hard disk to define the index for the control file (job list). This
file is handled according to the job in the interface signal:
DB19 DBB13
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 37
A2: Various NC/PLC interface signals and functions
1.2 NC/PLC interface signals - only 840D sl
DB19 DBB17 (part program handling: Index of the file to be transferred from the user list)
Control byte for file transfer via hard disk to indicate the line in the user control file in which
the control file to be transferred is stored
NOTICE
Specifications for the drive test
It is the sole responsibility of the machine manufacturer / system startup engineer to take
suitable action / carry out appropriate tests to ensure that the machine axis can be
traversed during the drive test without putting personnel or machinery at risk.
If machine axes are traversed by special test functions such as "function generator", an
explicit drive-test-specific enable is requested for the motion:
DB31, ... DBX61.0 = 1 (drive test travel request)
The motion is carried out once the motion is enabled:
DB31, ... DBX1.0 == 1 (drive test travel enable)
Basic Functions
38 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
A2: Various NC/PLC interface signals and functions
1.2 NC/PLC interface signals - only 840D sl
Function: Follow-up
During follow-up, the setpoint position of the machine axis is continuously corrected to the
actual position (setpoint position = actual position).
The following interface signals have to be set for the follow-up function:
DB31, ... DBX2.1 = 0 (controller enable)
DB31, ... DBX1.4 = 1 (follow-up mode)
Feedback:
DB31, ... DBX61.3 = 1 (follow-up active)
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 39
A2: Various NC/PLC interface signals and functions
1.2 NC/PLC interface signals - only 840D sl
Note
When the controller enable is set from follow-up mode, if the part program is active, the last
programmed position is approached again internally in the NC (REPOSA: Approach along line
on all axes). In all other cases, all subsequent motions start at the actual position.
Note
With the "hold" function, once the controller enable has been set, the setpoint/actual-value
difference is corrected directly by the position controller, i.e. without following the axial
acceleration characteristic.
Application example
Positioning response of machine axis Y following clamping when "controller enable" set.
Clamping pushed the machine axis from the actual position Y1 to the clamping position Yk.
3RVLWLRQVHWSRLQW
IURP,32
3RVLWLRQ
B FRQWUROOHU
&RQWUROOHU
HQDEOHFDQFHOHG
)ROORZXSVHWSRLQW
3RVLWLRQDFWXDOYDOXH
Basic Functions
40 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
A2: Various NC/PLC interface signals and functions
1.2 NC/PLC interface signals - only 840D sl
< ,6)ROORZXSPRGH
5HPRYH,66HUYRHQDEOH
6HTXHQFH 7HUPLQDOV
'LVFRQQHFWWHUPLQDOV
6HW,66HUYRHQDEOH
<. 1
<
5HWXUQXVLQJSRVLWLRQFRQWUROOHUWR
1 <. SUHFODPSLQJSRVLWLRQ<ZKHQ
VHWWLQJVHUYRHQDEOH
3RVLWLRQVKLIWUHVXOWLQJIURP
FODPSLQJ
<
;
,6)ROORZXSPRGH
< 5HPRYH,66HUYRHQDEOH
6HTXHQFH 7HUPLQDOV
'LVFRQQHFWWHUPLQDOV
6HW,66HUYRHQDEOH
3DWKIROORZHGLIQRSDUWSURJUDPLVDFWLYH
7UDMHFWRU\LILQ1RQO\;LV
SURJUDPPHGDQGWKHSDUWSURJUDPLV
<. DFWLYH
< 1 5HWXUQXVLQJ5(326$LISDUW
SURJUDPLVDFWLYHLQ$8720$7,&
1 <. PRGH
$[LVPRYHPHQWJHQHUDWHGIURP
3RVLWLRQVKLIWUHVXOWLQJIURP SURJUDPPHGSRVLWLRQ<
FODPSLQJ <
;
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 41
A2: Various NC/PLC interface signals and functions
1.2 NC/PLC interface signals - only 840D sl
Note
"Follow-up mode" does not have to be canceled because it only has an effect in
combination with "controller enable".
Note
If "follow-up mode" is deactivated for a machine axis, which is part of an active
transformation (e.g. TRANSMIT), this can generate motions as part of repositioning
(REPOS) other machine axes involved in the transformation.
Basic Functions
42 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
A2: Various NC/PLC interface signals and functions
1.2 NC/PLC interface signals - only 840D sl
Monitoring
If a machine axis is in follow-up mode, the following monitoring mechanisms will not act:
● Zero-speed monitoring
● Clamping monitoring
● Positioning monitoring
Effects on other interface signals:
● DB31, ... DBX60.7 = 0 (position reached with exact stop fine)
● DB31, ... DBX60.6 = 0 (position reached with exact stop coarse)
3RVLWLRQVHWSRLQW
IURPWKHLQWHUSRODWRU
LVHW
3RVLWLRQ 6SHHG &XUUHQW 0RWRU (QF (QF
B FRQWUROOHU B FRQWUROOHU FRQWUROOHU
LDFW
QDFW
/0
/0
/0
/0
3DUNLQJD[LV
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 43
A2: Various NC/PLC interface signals and functions
1.2 NC/PLC interface signals - only 840D sl
The table below shows the functionality of the interface signals in conjunction with the
"controller enable".
DB31, ... DBX1.5 DB31, ... DBX1.6 DB31, ... DBX2.1 Function
1 0 (or 1) 1 Position measuring system 1 active
0 1 1 Position measuring system 2 active
0 0 0 "Parking" active
0 0 1 Spindle without position measuring system (speed-
controlled)
1 -> 0 0 -> 1 1 Switchover: Position measuring system 1 → 2
0 -> 1 1 -> 0 1 Switchover: Position measuring system 2 → 1
Basic Functions
44 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
A2: Various NC/PLC interface signals and functions
1.2 NC/PLC interface signals - only 840D sl
Note
The controller enable is canceled at the latest when the cutout time expires:
MD36610 $MA_AX_EMERGENCY_STOP_TIME
● The machine axis position control loop opens. Feedback via interface signal:
DB31, ... DBX61.5 == 0 (position controller active).
The time for the parameterized cut-off delay of the controller enable is started by the
machine data:
MD36620 $MA_SERVO_DISABLE_DELAY_TIME (OFF delay of the controller enable)
● As soon as the actual speed has reached the zero speed range, the drive controller
enable is canceled. Feedback via interface signal:
DB31, ... DBX61.6 == 0 (speed controller active)
● The position actual value of the machine axis continues to be acquired by the controller.
● At the end of the braking operation, the machine axis is switched to follow-up mode,
regardless of the corresponding NC/PLC interface signal. Zero-speed and clamping
monitoring are not effective. See the description above for the interface signal:
DB31, ... DBX1.4 (follow-up mode).
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 45
A2: Various NC/PLC interface signals and functions
1.2 NC/PLC interface signals - only 840D sl
3RVLWLRQFRQWUROOHURSHQHGLPPHGLDWHO\
)3 )3
DFW
$[LVLVPRYLQJ
5DSLGVWRS
ZLWKRSHQFLUFXLWSRVLWLRQFRQWUROORRS
0'67$1'67,//B9(/2B72/ )3
VHW
W
0'$;B(0(5*(1&<B6723B7,0(
,66HUYRHQDEOH 0'6(592B',6$%/(B'(/$<B7,0(
W
,63RVLWLRQFRQWUROOHUDFWLYH
W
6HUYRHQDEOHWRGULYH
,66SHHGFRQWUROOHUDFWLYH
W
Figure 1-5 Canceling the controller enable when the machine axis is in motion
Basic Functions
46 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
A2: Various NC/PLC interface signals and functions
1.2 NC/PLC interface signals - only 840D sl
Parameter set changeover must be enabled via the machine data (not required for spindles):
MD35590 $MA_PARAMSET_CHANGE_ENABLE = 1 or 2
For detailed information on the parameter set changeover, see Section "Parameter set
selection during gear step change (Page 1275)".
Parameter set changeover when machine axis is in motion
The response to a parameter set changeover depends on the consequential change in the
closed-loop control circuit gain factor Kv:
MD32200 $MA_POSCTRL_GAIN (servo gain factor)
● "Identical servo gain factors" or "position control not active":
The NC responds immediately to the parameter set changeover. The parameter set is
also changed during the motion.
● "Non-identical servo gain factors" or "position control active":
In order to effect a changeover as smoothly as possible, changeover is not activated until
the axis "is stationary", i.e. once the parameterized zero speed has been reached or
undershot:
DB31, ... DBX61.4 = 1 (axis/spindle stationary)
MD36060 $MA_STANDSTILL_VELO_TOL (threshold velocity/speed 'axis/spindle
stationary')
Parameter set changeover from the part program
For parameter set changeover from the part program, the user (machine manufacturer) must
define corresponding user-specific auxiliary functions and evaluate them in the PLC user
program. The PLC user program will then set the changeover request on the corresponding
parameter set.
For detailed information on the auxiliary function output, see Section "H2: Auxiliary function
outputs to PLC (Page 369)".
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 47
A2: Various NC/PLC interface signals and functions
1.2 NC/PLC interface signals - only 840D sl
Basic Functions
48 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
A2: Various NC/PLC interface signals and functions
1.2 NC/PLC interface signals - only 840D sl
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 49
A2: Various NC/PLC interface signals and functions
1.2 NC/PLC interface signals - only 840D sl
Basic Functions
50 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
A2: Various NC/PLC interface signals and functions
1.2 NC/PLC interface signals - only 840D sl
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 51
A2: Various NC/PLC interface signals and functions
1.2 NC/PLC interface signals - only 840D sl
Note
Temperature prewarning DB31, ... DBX94.0 and DBX94.1
The interface signals are derived from the following signals of the cyclic drive telegram:
• Case 1: Temperature warning in the message word
– DB31, ... DBX94.0 = MELDW, bit 6 (no motor overtemperature warning)
– DB31, ... DBX94.1 = MELDW, bit 7 (no thermal overload in power unit warning)
• Case 2: Warning of warning class B (only in interface mode "SIMODRIVE 611U", p2038
= 1)
DB31, ... DBX94.0 == 1 and DBX94.1 == 1, if the following applies:
Cyclic drive telegram, status word 1 (ZSW1), bits 11/12 == 2 (warning class B)
The interface signals are derived from the warning of warning class B if there is no specific
information from the message word.
An alarm is displayed. Alarm number = 200.000 + alarm value (r2124)
For a detailed description of the motor temperature monitoring setting, see:
References:
• S120 Commissioning Manual, Section "Commissioning" > "Temperature sensors for
SINAMICS components"
• S120 Function Manual, Section "Monitoring and protective functions"
• S120 List Manual
– MELDW, bit 6 ≙ BO: r2135.14 → function diagram: 2548, 8016
– MELDW, bit 7 ≙ BO: r2135.15 → function diagram: 2548, 2452, 2456, 8016
Basic Functions
52 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
A2: Various NC/PLC interface signals and functions
1.3 Functions
1.3 Functions
Contrast
MD9000 $MM_LCD_CONTRAST (contrast)
For slimline operator panel fronts with a monochrome LCD, the contrast to be applied
following system startup can be set.
There are 16 different contrast settings (0: dark, 15: light).
Monitor type
MD9001 $MM_DISPLAY_TYPE (monitor type)
The relevant monitor type must be specified for optimum color matching.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 53
A2: Various NC/PLC interface signals and functions
1.3 Functions
Foreground language
MD9003 $MM_FIRST_LANGUAGE (foreground language)
In the case of SINUMERIK 840D sl, two languages are available simultaneously. The
foreground language can be used to set the language to be displayed following control ramp-
up.
The language can be changed in the DIAGNOSTICS operating area on the HMI user
interface. Once the control has ramped up, the foreground language will be restored.
Display resolution
MD9004 $MM_DISPLAY_RESOLUTION (display resolution)
The number of places after the decimal point for the position display of the axes is defined in
the display resolution. The position display consists of max. 12 characters including sign and
decimal point. The number of digits after the decimal point can be set to between 0 and 5.
The default setting for the number of digits after the decimal point is 3, corresponding to a
display resolution of 10–3 [mm] or [degrees].
REFRESH suppression
MD10131 $MN_SUPPRESS_SCREEN_REFRESH (screen refresh in case of overload)
Default setting for screen-refresh strategy with high NC utilization:
● Value 0: Refresh of current values is suppressed in all channels.
● Value 1: Refresh of current values is suppressed in time-critical channels.
● Value 2: Refresh of current values is never suppressed.
Basic Functions
54 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
A2: Various NC/PLC interface signals and functions
1.3 Functions
Introduction
The involute of the circle is a curve traced out from the end point on a "piece of string"
unwinding from the curve. Involute interpolation allows trajectories along an involute.
<
%DVHFLUFOHFHQWHU ; <
;<
6WDUWSRLQW
5
) ;
)
%DVHFLUFOH
(QGSRLQW
Programming
A general description of how to program involute interpolation can be found in:
References:
Programming Manual, Fundamentals
In addition to the programmed parameters, machine data is relevant in two instances of
involute interpolation; this data may need to be set by the machine manufacturer / end user.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 55
A2: Various NC/PLC interface signals and functions
1.3 Functions
Accuracy
If the programmed end point does not lie exactly on the involute defined by the starting point,
interpolation takes place between the two involutes defined by the starting and end points
(see illustration below).
The maximum deviation of the end point is determined by the machine data:
MD21015 $MC_INVOLUTE_RADIUS_DELTA (end point monitoring for involute)
6WDUWSRLQW
5
(QGSRLQW
%DVHFLUFOH
0D[GHYLDWLRQ
Basic Functions
56 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
A2: Various NC/PLC interface signals and functions
1.3 Functions
Limit angle
If AR is used to program an involute leading to the base circle with an angle of rotation that is
greater than the maximum possible value, an alarm is output and program execution
aborted.
$5PD[
$5
6WDUWSRLQW
The alarm display can be suppressed using the following parameter settings:
MD21016 $MC_INVOLUTE_AUTO_ANGLE_LIMIT = TRUE (automatic angle limitation for
involute interpolation)
The programmed angle of rotation is then also limited automatically and the interpolated path
ends at the point at which the involute meets the base circle. This, for example, makes it
easier to program an involute which starts at a point outside the base circle and ends directly
on it.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 57
A2: Various NC/PLC interface signals and functions
1.3 Functions
Dynamic response
Involutes that begin or end on the base circle have an infinite curvature at this point. To
ensure that the velocity is adequately limited at this point when tool radius compensation is
active, without reducing it too far at other points, the "Velocity limitation profile" function must
be activated:
MD28530 $MC_MM_PATH_VELO_SEGMENTS > 1 (number of memory elements for
limiting the path velocity)
A setting of 5 is recommended. This setting need not be made if only involute sections are
used which have radii of curvature that change over a relatively small area.
Basic Functions
58 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
A2: Various NC/PLC interface signals and functions
1.3 Functions
Access from NC
System variables are available in the NC for fast access to PLC variables from a part
program or synchronized action. The data is read/written directly by the NC. The data type
results from the identifier of the system variables. The position within the memory area is
specified as index in bytes.
1&$B'%'>@ 3/&&$//)&
'DWDW\SH'%'E\WHV
Supplementary conditions
● The structuring of the DPR memory area is the sole responsibility of the user. No checks
are made for matching configuration.
● A total of 4096 bytes are available in the input and output directions.
● Single-bit operations are not supported and must be linked back to byte operations by the
user.
● Since the contents of variables are manipulated directly in the communications buffer, the
user must remember that intermediate changes in values occur as a result of multiple
access operations where a variable is evaluated several times or when variables are
linked (i.e. it may be necessary to store values temporarily in local variables or R
parameters or to set up a semaphore).
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 59
A2: Various NC/PLC interface signals and functions
1.3 Functions
● The user's programming engineer is responsible for coordinating access operations to the
communications buffer from different channels.
● Data consistency can be guaranteed only for access operations up to 16 bits (byte and
word). The user is solely responsible for ensuring consistent transmission of 32-bit
variables (double and real). A simple semaphore mechanism is available in the PLC for
this purpose.
● The PLC stores data in 'Little Endian' format in the DPR.
● Values transferred with $A_DBR are subject to data conversion and hence to loss of
accuracy. The data format for floating-point numbers is DOUBLE (64 bits) in the NC, but
only FLOAT (32 bits) in the PLC. The format used for storage in the dual-port RAM is
FLOAT. Conversion takes place respectively before/after storage in the dual-port RAM.
If a read/write access is made from the NC to a variable in the dual-port RAM, the
conversion is performed twice. It is impossible to prevent differences between read and
written values because the data is stored in both formats.
Example
Bypassing the problem by means of comparison on "EPSILON" (minor deviation)
Program code
N10 DEF REAL DBR
N12 DEF REAL EPSILON = 0.00001
N20 $A_DBR[0]=145.145
N30 G4 F2
N40 STOPRE
N50 DBR=$A_DBR[0]
N60 IF ( ABS(DBR/145.145-1.0) < EPSILON ) GOTOF ENDE
N70 MSG ( "error" )
N80 M0
N90 END:
N99 M30
Activation
The maximum number of simultaneously writable output variables is adjustable via:
MD28150 $MC_MM_NUM_VDIVAR_ELEMENTS (number of elements for writing PLC
variables)
Basic Functions
60 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
A2: Various NC/PLC interface signals and functions
1.3 Functions
Example
A variable of type WORD is to be transferred from the PLC to the NC.
The position offset within the NC input (PLC output area) should be the fourth byte. The
position offset must be a whole-number multiple of the data width.
References
A detailed description of the data exchange by the PLC with FC 21 can be found in:
SINUMERIK 840D sl: Section "FC 21: transfer PLC NCK data exchange (Page 1011)"
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 61
A2: Various NC/PLC interface signals and functions
1.3 Functions
Access authorization
Access to functions, programs and data is useroriented and controlled via 8 hierarchical
protection levels. These are subdivided into:
● Password levels for Siemens, machine manufacturer and end user
● Keyswitch positions for end user
Basic Functions
62 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
A2: Various NC/PLC interface signals and functions
1.3 Functions
Access features
● Protection level 0 provides the greatest number of access rights, protection level 7 the
least.
● If certain access rights are granted to a protection level, these protection rights
automatically apply to any higher protection levels.
● Conversely, protection rights for a certain protection level can only be altered from a
higher protection level.
● Access rights for protection levels 0 to 3 are permanently assigned by Siemens and
cannot be altered (default).
● Access rights can be set by querying the current keyswitch positions and comparing the
passwords entered. When a password is entered it overwrites the access rights of the
keyswitch position.
● Options can be protected on each protection level. However, option data can only be
entered in protection levels 0 and 1.
● Access rights for protection levels 4 to 7 are only suggestions and can be altered by the
machine tool manufacturer or end user.
1.3.5.1 Password
Set password
The password for a protection level (0 – 3) is entered via the HMI user interface.
Example:
DIAGNOSTIC operating area, softkey: SET PASSWORD
References:
Commissioning Manual SINUMERIK 840D sl base software and HMI sl
Delete password
Access rights assigned by means of setting a password remain effective until they are
explicitly revoked by deleting the password.
Example:
DIAGNOSTIC operating area, softkey: DELETE PASSWORD
References:
Commissioning Manual SINUMERIK 840D sl base software and HMI sl
Note
Access rights and password status (set/deleted) are not affected by POWER OFF/ON!
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 63
A2: Various NC/PLC interface signals and functions
1.3 Functions
Defaults
The following default passwords are defined for protection levels 1 to 3:
● Protection level 1: SUNRISE
● Protection level 2: EVENING
● Protection level 3: CUSTOMER
Note
Following NC-CPU ramp-up in commissioning mode (NCK commissioning switch:
position 1) the passwords for protection levels 1 – 3 are reset to the default settings. For
reasons of data protection, we strongly recommend that you change the default settings.
Key switch
The keyswitch has four positions, to which protection levels 4 to 7 are assigned. The
keyswitch comprises a number of keys in a variety of colors which can be set to different
switch positions.
3RVLWLRQ %LW
RU
3RVLWLRQ EODFNNH\ %LW
RURU
3RVLWLRQ JUHHQNH\ %LW
RURU
3RVLWLRQ RU %LW
UHGNH\
Basic Functions
64 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
A2: Various NC/PLC interface signals and functions
1.3 Functions
Switch positions
Switch position 0 has the most restricted access rights. Switch position 3 has the least
restricted access rights.
DB10, DBX56.4 / .5 / .6 / .7 (switch positions 0 / 1 / 2 / 3)
Machine-specific enables for access to programs, data and functions can be assigned to the
switch positions. For detailed information, please refer to:
References
● CNC Commissioning Manual: NCK, PLC, Drives, Fundamentals,
Section: Basics on the protection levels
● Commissioning Manual SINUMERIK Operate (IM9); General Settings,
Section: Access levels
Default values
On delivery or following standard commissioning, with very few exceptions, the default value
for the protection level will be set to 7, i.e. the lowest protection level.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 65
A2: Various NC/PLC interface signals and functions
1.3 Functions
Canceling "Parking"
The "Parking" state is canceled by setting the NC/PLC interface signals:
● DB31, ... DBX1.5/.6 = 1 (position measuring system 1/2)
● DB31, ... DBX2.1 = 1 (controller enable)
The position control of the machine axis then becomes active again at the current position.
The encoder state of the measuring system depends on the measuring system type:
● Incremental measuring system: "Not referenced" state
DB31, ... DBX60.4/.5 == 0 (referenced/synchronized, encoder 1/2)
● Absolute measuring system: "Referenced" state
DB31, ... DBX60.4/.5 == 1 (referenced/synchronized, encoder 1/2)
WARNING
Incorrect synchronization of the measuring system caused by displacement of the actual
machine axis position
If changes have been made on the measuring system during parking that require a change
of the parameterized machine data, e.g. mounting of another encoder, the measuring
system must be completely remeasured and referenced (see Section "R1: Referencing
(Page 1173)").
Basic Functions
66 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
A2: Various NC/PLC interface signals and functions
1.3 Functions
Note
References
Commissioning Manual: CNC: NCK, PLC, Drive, Section "Commissioning NC-controlled
drives"
The following duplication and management of the data sets is performed via the user
interface:
SINUMERIK Operate: Operating area "Start-up" > "Drive system" > "Drives" > "Data sets"
The activation of the motor data set (MDS) or drive data set (DDS) required for a machine
axis in a specific machining situation, must be made from the PLC user program via the
interfaces described below.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 67
A2: Various NC/PLC interface signals and functions
1.3 Functions
Validity
As soon as the control has received all the required information from the drive and has been
evaluated by the NC, the request and display interfaces are shown as valid:
DB31, ... DBX130.7 == 1 (interface is valid)
If no or incompatible information is transferred from the drive, the request and display
interfaces remain invalid.
Note
With invalid request and display interfaces, it is the sole responsibility of the user / machine
manufacturer to perform a data set switchover via the request and display interfaces.
Format
The current format of the interfaces, i.e. which of the five bits of the request and display
interfaces are used for the addressing of the motor data set and which for the drive data set,
depends on the number of motor and drive data sets in the drive. The format is specified via:
DB31, ... DBX130.0-4, with bit x = <value>
<value> Meaning
0 Bit position for motor data set switchover (MDS) or invalid bit position
1 Bit position for drive data set switchover (DDS)
See also
Example (Page 69)
Overview of the interfaces (Page 70)
1.3.7.3 Request for a new motor data set and/or drive data set
The request to activate a specific motor and drive data set is performed via:
DB31, ... DBX21.0 - .4 = <MDS/DDS index>
Range of values
The addressing of a data set is performed via the index i, with i = 0, 1, 2, ...
Basic Functions
68 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
A2: Various NC/PLC interface signals and functions
1.3 Functions
Formatting
The formatting of the interface, i.e. which bits are available for the motor data set index and
which for the drive data set index is displayed via:
DB31, ... DBX130.0 - .4 (see Section "Validity and format of the request/display interfaces
(Page 68)")
1.3.7.5 Example
Two motor data sets (MDS) and two drive data sets (DDS) are available in the drive. This
corresponds to "No.": 9 of the possible data set combinations displayed in Figure 1-11
Motor/drive data set switchover (Page 70).
Format
Bit positions for drive data set switchover (DDS):
● DB31, ... DBX130.0 == 1
Bit positions for motor data set switchover (MDS):
● DB31, ... DBX130.1 == 0
Invalid bit positions:
● DB31, ... DBX130.2 == 0
● DB31, ... DBX130.3 == 0
● DB31, ... DBX130.4 == 0
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 69
A2: Various NC/PLC interface signals and functions
1.3 Functions
See also
Overview of the interfaces (Page 70)
Basic Functions
70 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
A2: Various NC/PLC interface signals and functions
1.4 Examples
Variable number of drive data sets for the "last" motor data set
The "last" motor data set is the motor data set with the highest number or index.
Generally, the same number of drive data sets is created for each motor data set (number of
"DDS per MDS") in the drive. Only the "last" motor data set can differ from this; any number
(a) of drive data sets can be parameterized:
1 ≤ a ≤ (number of "DDS per MDS")
Example
Four motor data sets (MDS) and eight drive data sets (DDS) per motor data set (DDS per
MDS) are to be parameterized. This corresponds to "No.": 22 of the possible data set
combinations displayed in Figure 1-11 Motor/drive data set switchover (Page 70):
● Motor data sets: MDS[ 0 ], MDS[ 1 ], ... MDS[ 3 ] ("last" motor data set)
● Drive data sets per motor data set: DDS[ 0 ] ... DDS[ 7 ]
The number of drive data sets for the individual motor data sets is therefore:
Motor data set Number of drive data sets per motor data set
MDS[ 0 ] ... MDS[ 2 ] 8 DDS
MDS[ 3 ] 1 - 8 DDS
See also
Overview of the interfaces (Page 70)
1.4 Examples
Preconditions
The parameter set changeover must be enabled by the machine data:
MD35590 $MA_PARAMSET_CHANGE_ENABLE [AX1] = 1 or 2 (parameter set change
possible)
The 1st parameter set for machine axis X1 is set, in accordance with machine data with
index "0" NC/PLC interface:
DB31, … DBX9.0 - DBX9.2 = 0 (controller parameter set)
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 71
A2: Various NC/PLC interface signals and functions
1.4 Examples
Changeover
In order to switch over the position-control gain, the PLC user program selects the 4th
parameter set for machine axis X1.
● Request by PLC user program:
DB31, … DBX9.0 – DBX9.2 = 3 (parameter set servo)
– A request to change over to the 4th parameter set is sent for machine axis AX1.
– The parameter set is changed over once a delay has elapsed.
– Parameter set 4 is now active, in accordance with machine data with index "3"
● Feedback by NC:
DB31, … DBX69.0 – DBX69.2 = 3 (parameter set servo)
– The NC confirms/acknowledges the parameter-set changeover.
Basic Functions
72 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
A2: Various NC/PLC interface signals and functions
1.5 Data lists
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 73
A2: Various NC/PLC interface signals and functions
1.5 Data lists
Names Description
$P_FUMB Unassigned part program memory (Free User Memory Buffer)
$A_DBB[n] Data on PLC (data type BYTE)
$A_DBW[n] Data on PLC (WORD type data)
$A_DBD[n] Data on PLC (DWORD type data)
$A_DBR[n] Data on PLC (REAL type data)
1.5.3 Signals
1.5.3.1 Signals to NC
Basic Functions
74 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
A2: Various NC/PLC interface signals and functions
1.5 Data lists
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 75
A2: Various NC/PLC interface signals and functions
1.5 Data lists
Basic Functions
76 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
A2: Various NC/PLC interface signals and functions
1.5 Data lists
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 77
A2: Various NC/PLC interface signals and functions
1.5 Data lists
Basic Functions
78 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
A3: Axis Monitoring, Protection Zones 2
2.1 Brief description
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 79
A3: Axis Monitoring, Protection Zones
2.2 Axis monitoring functions
Basic Functions
80 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
A3: Axis Monitoring, Protection Zones
2.2 Axis monitoring functions
Function
In control engineering terms, traversing along a machine axis always produces a certain
following error, i.e. a difference between the set and actual position.
The following error that arises depends on:
● Position control loop gain
MD32200 $MA_POSCTRL_GAIN (servo gain factor)
● Maximum acceleration
MD32300 $MA_MAX_AX_ACCEL (maximum axis acceleration)
● Maximum velocity
MD32000 $MA_MAX_AX_VELO (maximum axis velocity)
● With activated feedforward control:
Precision of the path model and the parameters:
MD32610 $MA_VELO_FFW_WEIGHT (factor for the velocity feedforward control)
MD32800 $MA_EQUIV_CURRCTRL_TIME (equivalent time constant current control loop
for feedforward control)
MD32810 $MA_EQUIV_SPEEDCTRL_TIME (equivalent time constant speed control loop
for feedforward control)
In the acceleration phase, the following error initially increases when traversing along a
machine axis. After a time depending on the parameterization of the position control loop,
the following error then remains constant in the ideal case. Due to external influences, more
or less large fluctuations in the following error always arise during a machining process. To
prevent these fluctuations in the following error from triggering an alarm, a tolerance range
within which the following error may change must be defined for the following-error
monitoring:
MD36400 $MA_CONTOUR_TOL (Contour monitoring tolerance range)
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 81
A3: Axis Monitoring, Protection Zones
2.2 Axis monitoring functions
)ROORZLQJHUURU
7ROHUDQFHEDQG
GV )LUVWFXW
0HDVXUHG
IROORZLQJHUURU 0'0$B&217285B72/
&DOFXODWHGIROORZLQJHUURU
PRGHO
%HJLQ
PDFKLQLQJ
W
Effectiveness
The following-error monitoring only operates with active position control and the following
axis types:
● Linear axes with and without feedforward control
● Rotary axes with and without feedforward control
● Position-controlled spindles
Fault
If the configured tolerance limit is exceeded, the following alarm appears:
25050 "Axis <Axis name> Contour monitoring"
The affected axis/spindle is stopped via the configured braking ramp in follow-up mode:
MD36610 $MA_AX_EMERGENCY_STOP_TIME
(maximum time for braking ramp when an error occurs)
Basic Functions
82 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
A3: Axis Monitoring, Protection Zones
2.2 Axis monitoring functions
Overview
The following overview shows the correlation between the positioning, zero speed and
clamping monitoring functions:
9RUV
(IIHFWLYHWROHUDQFH
IRUVWDQGVWLOODQGFODPSLQJ
PRQLWRULQJ
$FWXDOYDOXH
'%'%;FODPSLQJLQSURJUHVV
0'0$B&/$03B326B72/
6HWSRLQW
0'0$B67$1'67,//B326B72/
0'0$B6723B/,0,7B&2$56(
0'0$B6723B/,0,7B),1(
0' ([DFWVWRSILQHVLJQDO W
0$B67$1'67,//
B'(/$<B7,0( ([DFWVWRSFRDUVHVLJQDO
0'0$B326,7,21,1*B7,0(
Function
At the end of a positioning operation:
● Set velocity = 0 AND
● DB31, ... DBX64.6/7 (motion command minus/plus) = 0
checks the position monitoring to ensure that the following error of every participating
machine axis is smaller than the exact-stop fine tolerance during the delay time.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 83
A3: Axis Monitoring, Protection Zones
2.2 Axis monitoring functions
Note
The smaller the exact stop fine tolerance is, the longer the positioning operation takes and
the longer the time until block change.
Effectiveness
The position monitoring only operates with active position control and the following axis
types:
● Linear axes
● Rotary axes
● Position-controlled spindles
Fault
If the configured position-monitoring time is exceeded, the following alarm appears:
25080 "Axis <Axis name> Position monitoring"
The affected axis is stopped via the configured braking ramp in follow-up mode:
MD36610 $MA_AX_EMERGENCY_STOP_TIME
(maximum time for braking ramp when an error occurs)
Basic Functions
84 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
A3: Axis Monitoring, Protection Zones
2.2 Axis monitoring functions
Function
At the end of a positioning operation:
● Set velocity = 0 AND
● DB31, ... DBX64.6/7 (motion command minus/plus) = 0
checks the zero-speed monitoring to ensure that the following error of every participating
machine axis is smaller than the standstill tolerance during the delay time.
MD36040 $MA_STANDSTILL_DELAY_TIME (zero-speed monitoring delay time)
MD36030 $MA_STANDSTILL_POS_TOL (standstill tolerance)
After reaching the required exact-stop state, the positioning operation is completed:
DB31, ... DBX60.6/7 (position reached with exact stop coarse/fine) = 1
The position-monitoring function is deactivated and is replaced by the zero-speed
monitoring.
Zero-speed monitoring monitors the adherence to the standstill tolerance. If no new travel
request is received, the machine axis must not depart from the standstill tolerance.
Effectiveness
The zero-speed monitoring only operates with active position control and the following axis
types:
● Linear axes
● Rotary axes
● Position-controlled spindles
Fault
If the delay time and/or the standstill tolerance is exceeded, the following alarm appears:
25040 "Axis <Axis name> Zero-speed monitoring"
The affected axis is stopped via the configured braking ramp in follow-up mode:
MD36610 $MA_AX_EMERGENCY_STOP_TIME
(maximum time for braking ramp when an error occurs)
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 85
A3: Axis Monitoring, Protection Zones
2.2 Axis monitoring functions
Function
For machine axes that are mechanically clamped upon completion of a positioning operation,
larger motions can result from the clamping process (> standstill tolerance). As a result,
zero-speed monitoring is replaced by clamping monitoring during the clamping process.
Clamping monitoring monitors the adherence to the configured clamping tolerance:
MD36050 $MA_CLAMP_POS_TOL (clamping tolerance)
Activation
The clamping monitoring is activated by the following interface signal:
DB31, ... DBX2.3 (clamping in progress)
Note
The clamping monitoring is not active in "follow-up mode" (DB31, ... DBX1.4 = 1).
Fault
If the clamping tolerance is exceeded, the following alarm appears:
26000 "Clamping monitoring"
The affected axis is stopped via the configured braking ramp in follow-up mode:
MD36610 $MA_AX_EMERGENCY_STOP_TIME
(maximum time for braking ramp when an error occurs)
Basic Functions
86 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
A3: Axis Monitoring, Protection Zones
2.2 Axis monitoring functions
Parameterization:
MD36052 $MA_STOP_ON_CLAMPING = 'H01' (special function for clamped axis)
Note
The NC detects whether an axis is clamped based on the "servo enable" state of the axis:
DB31, ... DBX2.2 = 0: No servo enable ⇒ axis is clamped
DB31, ... DBX2.2 = 1: Servo enable ⇒ axis is not clamped
5HOHDVHD[LVFODPSLI
0'0$B6723B21B&/$03,1*>@ ಬ+ಬ
7UDYHOUHTXHVW
&ODPSD[LV
$[LVFODPSLQJSUHVVXUH
)HHGVWRS
&RQWUROOHUHQDEOH
3DWKYHORFLW\
1 1
*= *$WXUQURWDU\WDEOHWKURXJKGHJUHHV
W>PV@
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 87
A3: Axis Monitoring, Protection Zones
2.2 Axis monitoring functions
The part program blocks N310 and N410 refer to the following programming example:
Note
The travel command is set a maximum of two rapid traverse blocks prior (including
intermediate blocks) to retain the reference to the initiating part program block.
Parameterization:
MD36052 $MA_STOP_ON_CLAMPING = 'H03' (special function for clamped axis)
Requirements for the PLC user program
● The axis is removed from the clamp as soon as a travel command is pending.
● The axis may be removed from the clamping even when only positioning is being
performed (G0).
The following figure shows an example of the interface signals and states upon releasing of
the axis clamp:
Basic Functions
88 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
A3: Axis Monitoring, Protection Zones
2.2 Axis monitoring functions
5HOHDVHD[LVFODPSLI
0'0$B6723B21B&/$03,1*>@ ಬ+ಬ
7UDYHOUHTXHVW
&ODPSD[LV
$[LVFODPSLQJSUHVVXUH
)HHGVWRS
&RQWUROOHUHQDEOH
3DWKYHORFLW\
W>PV@
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 89
A3: Axis Monitoring, Protection Zones
2.2 Axis monitoring functions
● The axis is clamped if the feedrate override of a machining block is not equal to 0.
If the axis is clamped before the next machining block, i.e. the feedrate override is other
than 0 again, no stop is generated.
The following figure shows an example of the interface signals and states upon setting of the
axis clamp. The part program blocks N410, N510, N520 and N610 refer to the schematic
example under supplementary conditions.
6HWD[LVFODPSLI
0'0$B6723B21B&/$03,1*>@
+
7UDYHOUHTXHVW
&ODPSD[LV
$[LVFODPSLQJSUHVVXUH
)HHGVWRS
&RQWUROOHUHQDEOH
)HHGUDWHRYHUULGH
3DWKYHORFLW\
W>PV@
Basic Functions
90 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
A3: Axis Monitoring, Protection Zones
2.2 Axis monitoring functions
Supplementary conditions
Continuous-path mode
For the above-mentioned functions:
● Automatic stop to release the clamping
● Optimized release of the axis clamping via travel command
● Automatic stop to set the clamping
the "Look Ahead" function must be active.
Part program blocks without path motion (e.g. M82/M83) interrupt continuous-path mode and
thus also the "Look Ahead" function.
Example:
The part program blocks N320 and N420 are inserted in the programming example used.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 91
A3: Axis Monitoring, Protection Zones
2.2 Axis monitoring functions
Note
MD36052 $MA_STOP_ON_CLAMPING = 'H01' or 'H04'
Both functions can be used irrespective of the clamping of axes:
• MD36052 $MA_STOP_ON_CLAMPING = 'H01'
Generates a Look Ahead stop for the path motion if no servo enable signal is active
for the relevant axis.
• MD36052 $MA_STOP_ON_CLAMPING = 'H04'
Generates a Look Ahead stop for the path motion if the feedrate override = 0% at the
transition from the part program blocks with rapid traverse to part program blocks
without rapid traverse.
Both functions ensure that the path motion in continuous-path mode is already stopped
before the start of the relevant part program block and not just within the part program
block.
Note
The following interface signals can be evaluated by the PLC user program as the criterion for
activation of the "Follow-up mode":
DB31, ... DBX60.6 / 7 (position reached with exact stop coarse / fine)
Basic Functions
92 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
A3: Axis Monitoring, Protection Zones
2.2 Axis monitoring functions
Function
The speed setpoint comprises:
● Speed setpoint of the position controller
● Speed setpoint portion of the feedforward control (with active feedforward control only)
● Dift compensation (only for drives with analog setpoint interface)
'ULIWYDOXH
)HHGIRUZDUGFRQWUROYDOXH DSSOLHVRQO\WRDQDORJGULYHV
7RVSHHG
.9 FRQWUROOHU
)ROORZLQJ
HUURU 6SHHG
VHWSRLQW
3RVLWLRQFRQWUROOHU PRQLWRULQJ
The speed-setpoint monitoring ensures by limiting the control or output signal (10 V for
analog setpoint interface or rated speed for digital drives) that the physical limitations of the
drives are not exceeded:
MD36210 $MA_CTRLOUT_LIMIT (maximum speed setpoint)
6SHHGVHWSRLQW>@
0'0$B&75/287B/,0,7>Q@
0'0$B&75/287B/,0,7>Q@
(J
IRUWHVWPRGH
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 93
A3: Axis Monitoring, Protection Zones
2.2 Axis monitoring functions
Effectiveness
The speed-setpoint monitoring is only active for closed-loop position-controlled axes and
cannot be deactivated.
Fault
If the configured delay time is exceeded, the following alarm appears:
25060 "Axis <Axis name> Speed-setpoint limitation"
The affected axis is stopped via the configured braking ramp in follow-up mode:
MD36610 $MA_AX_EMERGENCY_STOP_TIME
(maximum time for braking ramp when an error occurs)
Note
Upon reaching the speed-setpoint monitoring, the position feedback loop of the axis
becomes non-linear due to the limitation. Contour errors result if the axis is involved in
generating the contour.
Function
The actual-velocity monitoring checks that the actual velocity of a machine axis/spindle does
not exceed the configured threshold:
MD36200 $MA_AX_VELO_LIMIT (velocity-monitoring threshold)
The threshold should be 10-15% above the configured maximum velocity.
● For axes:
MD32000 $MA_MAX_AX_VELO (maximum axis velocity)
● For spindles:
MD35110 $MA_GEAR_STEP_MAX_VELO_LIMIT[n] (maximum speed of gear stage)
If you use this setting the speed will not normally exceed the velocity-monitoring threshold
(exception: Drive error).
Basic Functions
94 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
A3: Axis Monitoring, Protection Zones
2.2 Axis monitoring functions
Activation
The actual-velocity monitoring is activated as soon as the active measuring system returns
valid actual values (encoder limit frequency not exceeded).
Effectiveness
The actual-velocity monitoring only operates with active position control and the following
axis types:
● Linear axes
● Rotary axes
● Open-loop-controlled and position-controlled spindles
Fault
If the threshold is exceeded, the following alarm is displayed:
25030 "Axis <Axis name> Actual-velocity alarm limit"
The affected axis is stopped via the configured braking ramp in follow-up mode:
MD36610 $MA_AX_EMERGENCY_STOP_TIME
(maximum time for braking ramp when an error occurs)
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 95
A3: Axis Monitoring, Protection Zones
2.2 Axis monitoring functions
Value Meaning
=0 Monitoring of HW faults: ON
If a hardware fault is detected in the active measuring system,
POWER ON alarm 25000 is displayed:
"Axis <Axis name> Hardware fault active encoder"
The affected axis is stopped via the configured braking ramp in
follow-up mode:
MD36610 $MA_AX_EMERGENCY_STOP_TIME (maximum time
for braking ramp when a fault occurs)
If a hardware fault is detected in the passive measuring system,
alarm 25001 is displayed:
"Axis <Axis name> Hardware fault passive encoder"
There is no further alarm response.
Zero-mark monitoring: OFF
Alarms 25020 and 25021 (see below) are suppressed.
= 100 No zero-mark monitoring as well as hiding of all encoder monitoring functions (i.e. in addition to alarm
25020 (25021)), alarms 25000 (25001) and 25010 (25011) are suppressed.
> 0 but < 100 Monitoring of HW faults: ON (see above)
Zero-mark monitoring: ON
If zero-mark monitoring is tripped in the active measuring system,
alarm 25020 is displayed:
"Axis <Axis name> Zero-mark monitoring active encoder"
The affected axis is stopped via the configured braking ramp in
follow-up mode:
MD36610 $MA_AX_EMERGENCY_STOP_TIME (maximum time
for braking ramp when a fault occurs)
If zero-mark monitoring is tripped in the passive measuring
system, alarm 25021 is displayed:
"Axis <Axis name> Zero-mark monitoring passive encoder"
There is no further alarm response.
> 100 Monitoring of HW faults: ON with attenuated error message:
The POWER ON alarm 25000 is replaced by the reset alarm
25010 and the reset alarm 25001 replaced by the cancel alarm
25011.
Zero-mark monitoring: ON (see above)
Note
For hardware faults, the referencing status of the machine axis is reset:
DB31, ... DBX60.4/5 (referenced/synchronized 1/2) = 0
Basic Functions
96 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
A3: Axis Monitoring, Protection Zones
2.2 Axis monitoring functions
Function
The NC encoder-limit-frequency monitoring is based on the configuration and telegram
information of the drive. It monitors that the encoder frequency does not exceed the
configured encoder limit frequency:
MD36300 $MA_ENC_FREQ_LIMIT (encoder limit frequency)
Encoder-limit-frequency monitoring always refers to the active measuring system selected in
the NC/PLC interface:
DB31, ... DBX1.5/1.6 (position measuring system 1/2)
Effectiveness
The encoder limit frequency is operative for:
● Linear axes
● Rotary axes
● Open-loop-controlled and position-controlled spindles
Fault
Upon exceeding of the encoder limit frequency, the following occurs:
● Message to the PLC:
DB31, ... DBX60.2 or 60.3 = 1 (encoder limit frequency exceeded 1 or 2)
● Spindles
Spindles are not stopped but continue to turn with speed control.
If the spindle speed is reduced so much that the encoder frequency passes below the
encoder limit frequency, the actual value system of the spindle is automatically
resynchronized.
● Axes
The following alarm is displayed:
21610 "Channel <Channel number> Axis <Axis name> Encoder <Encoder number >
Frequency exceeded"
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 97
A3: Axis Monitoring, Protection Zones
2.2 Axis monitoring functions
The affected axis is stopped via the configured braking ramp in follow-up mode:
MD36610 $MA_AX_EMERGENCY_STOP_TIME
(maximum time for braking ramp when an error occurs)
Note
If the encoder limit frequency is exceeded, a position-controlled machine axis must be re-
referenced (see Section "R1: Referencing (Page 1173)").
Function
With absolute encoders (MD30240 $MA_ENC_TYPE = 4), absolute values supplied by the
measuring system are used to check the plausibility of the actual value.
During the check, the NC compares the cyclic position value held in the position control cycle
clock based on the incremental information from the encoder with a new position value
generated directly from the absolute and incremental information and checks that the
calculated position difference does not exceed the permissible deviation.
MD36310 $MA_ENC_ZERO_MONITORING (permissible deviation in 1/2 coarse increments
between the absolute and the incremental encoder track)
Note
The plausibility check of absolute encoders specifically detects all deviations caused by dirt
on the absolute track or by faults when transferring the absolute value. However, small
errors in the incremental track (burst interference, impulse errors) are not detected. In such
instances the plausibility check only responds to deviations in the millimeter range. This form
of monitoring should therefore serve as additional monitoring to assist the diagnosis of
absolute-position faults.
Note
Rotary absolute encoders
If the plausibility check is to be used for a rotary absolute encoder, the SINAMICS parameter
p0979 must be taken into account when setting the modulo range (MD34220
$MA_ENC_ABS_TURNS_MODULO).
Note
Upgrading the NCK software
If the plausibility check is activated in absolute encoders (MD36310 > 0), the existing
MD36310 settings must be checked and, if necessary, increased during an upgrade of the
NCK software.
Basic Functions
98 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
A3: Axis Monitoring, Protection Zones
2.2 Axis monitoring functions
Value Meaning
0 No zero mark diagnostics
>0 Permissible deviation in 1/2 coarse increments between the absolute and the incremental
encoder track
Note
Depending on the rigidity of the machine (minimal load masses / moments of inertia are
optimum) and the controller settings, the control play "oscillates" with varying degrees of
intensity. Account must be taken of this by entering machine-specific limit values in
MD36310.
Fault
Alarm 25020
If the plausibility check is tripped in the active measuring system, alarm 25020 is displayed:
"Axis <Axis name> Zero-mark monitoring active encoder"
The affected axis is stopped via the configured braking ramp in follow-up mode:
MD36610 $MA_AX_EMERGENCY_STOP_TIME
(maximum time for braking ramp when an error occurs)
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 99
A3: Axis Monitoring, Protection Zones
2.2 Axis monitoring functions
Alarm 25021
If the plausibility check is tripped in the passive measuring system, alarm 25021 is displayed:
"Axis <Axis name> Zero-mark monitoring passive encoder"
There is no further alarm response.
Note
In the event of a fault, the adjustment of the absolute encoder is lost and the axis is no
longer referenced. The absolute encoder must be readjusted (see Section "Referencing with
absolute encoders (Page 1203)").
Note
Errors in the incremental track that cannot be detected with amplitude monitoring can cause
position deviations in the millimeter range. The deviation depends on the lattice pitch/line
count and the traversing velocity of the axis when the error occurs.
Complete position monitoring is only possible through redundancy, i.e. through comparison
with an independent second measuring system.
Example:
Users can adjust the alarm and reaction behavior so that when machining an expensive
workpiece, which could be damaged if the axis is stopped as a result of an alarm, machining
stops before the machining quality of the workpiece is assessed using appropriate
synchronized action commands.
Basic Functions
100 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
A3: Axis Monitoring, Protection Zones
2.2 Axis monitoring functions
Effectiveness
Customized monitoring can be activated in parallel to or as an alternative to standard zero-
mark monitoring, depending on the setting in machine data:
MD36310 $MA_ENC_ZERO_MONITORING
Value Meaning
0 If only user-specific monitoring is to be implemented, the default zero-mark
monitoring must be deactivated:
MD36310 = 0
and
MD36312 = 0
>0 Customized monitoring and standard zero-mark monitoring operate in parallel.
100 All encoder monitoring functions are deactivated.
If both monitoring functions are active (MD36310 > 0), you can perform cascaded
monitoring.
Example:
If a value falls below the threshold specified in MD36310, customized monitoring triggers a
prewarning; standard zero-marking monitoring will only detect a fault if the threshold is
exceeded and will then deactivate automatically.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 101
A3: Axis Monitoring, Protection Zones
2.2 Axis monitoring functions
System variables
You can implement customized error reactions using the following system variables:
Basic Functions
102 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
A3: Axis Monitoring, Protection Zones
2.2 Axis monitoring functions
7UDYHUVLQJUDQJHPLQXV 7UDYHUVLQJUDQJHSOXV
:RUNLQJDUHDOLPLWDWLRQ
QGVRIWZDUHOLPLWVZLWFK
VWVRIWZDUHOLPLWVZLWFK
+DUGZDUHOLPLWVZLWFK
(PHUJHQF\VWRS
0HFKDQLFDOWUDYHUVLQJOLPLW
Function
A hardware limit switch is normally installed at the end of the traversing range of a machine
axis. It serves to protect against accidental overtravelling of the maximum traversing range of
the machine axis while the machine axis is not yet referenced.
If the hardware limit switch is triggered, the PLC user program created by the machine
manufacturer sets the corresponding interface signal:
DB31, ... DBX12.0/1 = 1 (hardware limit switch minus/plus)
Parameterization
The braking behavior of the machine axis upon reaching the hardware limit switch is
configurable via the machine data:
MD36600 $MA_BRAKE_MODE_CHOICE (braking behavior on hardware limit switch)
Value Meaning
0 Braking with the configured axial acceleration
1 Rapid stop (set velocity = 0)
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 103
A3: Axis Monitoring, Protection Zones
2.2 Axis monitoring functions
Effectiveness
The hardware limit-switch monitoring is active after the controller has ramped up in all
modes.
Effect
Upon reaching the hardware limit switch, the following occurs:
● Alarm 21614 "Channel <Channel number> Axis <Axis name> Hardware limit switch
<Direction>"
● The machine axis is braked according to the configured braking behavior.
● If the axis/spindle is involved in interpolation with other axes/spindles, these are also
braked according to their configured braking behavior.
● The traversing keys of the affected machine axis are blocked based on the direction.
Function
Software limit switches serve to limit the traversing range of a machine axis. Per machine
axis and per traversing direction, two (1st and 2nd) software limit switches are available:
MD36100 POS_LIMIT_MINUS (1st software limit switch minus)
MD36110 POS_LIMIT_PLUS (1st software limit switch plus)
MD36120 POS_LIMIT_MINUS2 (2nd software limit switch minus)
MD36130 POS_LIMIT_PLUS2 (2nd software limit switch plus)
By default, the 1st software limit switch is active. The 2nd software limit switch can be
activated for a specific direction with the PLC user program:
DB31, ... DBX12.2 / 12.3 (2nd software limit switch minus/plus)
Effectiveness
The software limit switches are active:
● Immediately after the successful referencing of the machine axis.
● In all operating modes.
Boundary conditions
● The software limit switches refer to the machine coordinate system.
● The software limit switches must be inside the range of the hardware limit switches.
● The machine axis can be moved to the position of the active software limit switch.
Basic Functions
104 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
A3: Axis Monitoring, Protection Zones
2.2 Axis monitoring functions
● PRESET
After use of the function PRESET, the software limit-switch monitoring is no longer active.
The machine must first be re-referenced.
● Endlessly rotating rotary axes
No software limit-switch monitoring takes place for endlessly rotating rotary axes:
MD30310 $MA_ROT_IS_MODULO == 1 (modulo conversion for rotary axis and spindle)
Exception: Setup-rotary axes
Effects
Automatic operating modes (AUTOMATIC, MDA)
● Without transformation, without overlaid motion, unchanged software limit switch:
A part program block with a programmed traversing motion that would lead to
overrunning of the software limit switch is not started.
● With transformation:
Different reactions occur depending on the transformation type:
– Behavior as above.
or
– The part program block with a programmed traversing motion that would lead to
overrunning of the software limit switch is started. The affected machine axis stops at
the active software limit switch. The other machine axes participating in the traversing
motion are braked. The programmed contour is left during this process.
● With overlaid motion
The part program block with a programmed traversing motion that would lead to
overrunning of the software limit switch is started. Machine axes that are traveling with
overlaid motion or have traveled with overlaid motion stop at the active software limit
switch in question. The other machine axes participating in the traversing motion are
braked. The programmed contour is left during this process.
Manual operating modes
● JOG without transformation
The machine axis stops at the software limit switch position.
● JOG with transformation
The machine axis stops at the software limit switch position. Other machine axes
participating in the traversing motion are braked. The preset path is left during this
process.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 105
A3: Axis Monitoring, Protection Zones
2.2 Axis monitoring functions
General
● Changing of the software limit switch (1st ↔ 2nd software limit switch)
If the actual position of the machine axis after changing lies behind the software limit
switch, it is stopped with the maximum permissible acceleration.
● Overrunning the software limit switch in JOG mode
If the position of the software limit switch is reached and renewed pressing of the
traversing button should cause further travel in this direction, an alarm is displayed and
the axis is not traversed farther:
Alarm 10621 "Channel <Channel number> Axis <Axis name> is at the software limit
switch <Direction>"
2.2.7.1 General
Function
The "working area limitation" function can be used to limit the traversing range of a channel's
geometry and special axes to a permissible operating range. The function monitors
compliance with working area limits both in AUTOMATIC mode and in JOG mode.
The following versions are available:
● Working area limitation in the Basic Coordinate System (BCS)
The traversing range limits are specified relative to the Basic Coordinate System.
● Working area limitation in the workpiece coordinate system (WCS) or adjustable zero
system (AZS)
The traversing range limits are specified relative to the workpiece coordinate system or to
the adjustable zero system.
The two types of monitoring are independent of each other. If they are both active at the
same time, the traversing range limit which most restricts the access will take effect,
depending on the direction of travel.
Basic Functions
106 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
A3: Axis Monitoring, Protection Zones
2.2 Axis monitoring functions
Note
The machine data $MC_TRAFO_INCLUDES_TOOL_... is analyzed only in certain
transformations. Condition for a possible evaluation is that the orientation of the tool
with respect to the base coordinate system cannot be changed by the transformation.
With standard transformations, the condition is only fulfilled for the "inclined axis" type
of transformation.
Response
Automatic operating modes
● With / without transformation
The parts program block with a programmed traversing motion that would lead to
overrunning of the working area limits is not executed.
● With superimposed motion
The axis, which would violate the working area limitation due to a superimposed motion,
is braked with maximum acceleration and without jerk limits (BRISK), and will come to a
stop in the position of the working area limitation. Other axes involved in the movement
are braked according to current acceleration behavior (e.g. SOFT). The path correlation
may be lost due to different braking accelerations (contour violation).
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 107
A3: Axis Monitoring, Protection Zones
2.2 Axis monitoring functions
Powerup response
If an axis moves outside the permissible working area when activating the working area
limits, it will be immediately stopped with the maximum permissible acceleration.
Geo-axis replacement
Through the following machine data it is adjustable, whether during geometry axis change
the active working area limitation is retained or deactivated:
MD10604 $MN_WALIM_GEOAX_CHANGE_MODE = <value>
<value> Meaning
0 The working area limitation is deactivated during the geometry axis change.
1 The working area limitation remains activated during the geometry axis change.
Application
Using the "working area limitation in BCS", the working area of a machine tool is limited so
that the surrounding devices (e.g. tool revolver, measuring stations) are protected against
damage.
Basic Functions
108 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
A3: Axis Monitoring, Protection Zones
2.2 Axis monitoring functions
G25 X… Y… Z…
lower working area limitation
G26 X… Y… Z…
upper working area limitation
3URJUDPPDEOHZRUNLQJ
;
DUHDOLPLWDWLRQ
*
; PD[
=
:
*
; PLQ * *
= PLQ = PD[
The programmed working area limitation has priority and overwrites the values entered in
SD43420 and SD43430.
Activation/Deactivation
Working area limitation through setting data
The activation/deactivation of the working area limitation for each axis takes place in a
direction-specific manner via the immediately effective setting data:
SD43400 $SA_WORKAREA_PLUS_ENABLE (working area limitation active in the positive
direction)
SD43410 $SA_WORKAREA_MINUS_ENABLE (working area limitation active in the negative
direction)
Value Meaning
0 The working area limitation in positive or negative direction is switched off.
1 The working area limitation in positive or negative direction is active.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 109
A3: Axis Monitoring, Protection Zones
2.2 Axis monitoring functions
WALIMON
Working area limitation ON
or
WALIMOF
Working area limitation OFF
Reset position
The reset position for the working area limitation (WALIMON or WALIMOF) is configurable via:
MD20150 $MC_GCODE_RESET_VALUES (RESET position of G groups)
Application
The working area limitation enables a channel-specific, flexible workpiece-specific limitation
of the traversing range of the channel axes in the workpiece coordinate system (WCS) or
settable zero system (SZS). It is intended mainly for use in conventional lathes.
Basic Functions
110 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
A3: Axis Monitoring, Protection Zones
2.2 Axis monitoring functions
<value> Meaning
1 Working area limitation based on the workpiece coordinate system
3 Working area limitation based on the AZS
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 111
A3: Axis Monitoring, Protection Zones
2.2 Axis monitoring functions
Data storage
The system variables of the working area limits are stored retentively in the static memory of
the NC.
Note
For the storage of the limiting values for the linear axes, the default setting is considered for
the system of units (MD10240 $MN_SCALING_SYSTEM_IS_METRIC).
Data backup
The system variables of the working area limits can be backed up in separate files:
Note
The system variables of the working area limits are part of the "_N_INITIAL_INI" file.
Basic Functions
112 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
A3: Axis Monitoring, Protection Zones
2.2 Axis monitoring functions
<Mode> Meaning
0 The working area group takes effect in accordance with MD20150
1 The last active working area group remains active
Note
The axis must be re-referenced after the "Park" state has been canceled.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 113
A3: Axis Monitoring, Protection Zones
2.3 Protection zones
2.3.1 General
Function
Protection zones are static or moveable in 2- or 3-dimensional ranges within a machine to
protect machine elements against collisions.
The following elements can be protected:
● Permanent parts of the machine and attachments (e.g. toolholding magazine, swiveling
probe). Only the elements that can be reached by possible axis constellations are
relevant.
● Moving parts belonging to the tool (e.g. tool, toolholder)
● Moving parts belonging to the workpiece (e.g. parts of the workpiece, clamping table,
clamping shoe, spindle chuck, tailstock).
Protection zones are defined via part program instructions or system variables so that they
completely surround the element to be protected. The activation and deactivation of
protection zones also takes place via part program instructions.
Protection-zone monitoring by the NC is channelspecific, i.e. all the active protection zones
of a channel monitor one another for collisions.
Basic Functions
114 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
A3: Axis Monitoring, Protection Zones
2.3 Protection zones
Coordinate system
The definition of a protection zone takes place with reference to the geometric axis of a
channel in the basic coordinate system.
Reference
● Tool-related protection zones
Coordinates for toolrelated protection zones must be given as absolute values referred to
the tool carrier reference point F.
● Workpiece-related protection zones
Coordinates for workpiecerelated protection zones must be given as absolute values
referred to the zero point of the basic coordinate system.
Note
If no toolrelated protection zone is active, the tool path is checked against the workpiece-
related protection zones.
If no workpiece-oriented protection zone is active, protection-zone monitoring does not
take place.
Orientation
The orientation of the protection zones is determined by the plane definition
(abscissa/ordinate), in which the contour is described, and the axis perpendicular to the
contour (vertical axis).
The orientation of the protection zones must be the same for the tool and workpiecerelated
protection zones.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 115
A3: Axis Monitoring, Protection Zones
2.3 Protection zones
Coordinates
The coordinates of a protection zone must always be programmed as absolute values with
respect to the reference point of the protection zone. When the protection zone is activated
via the part program it is possible to apply a relative offset to the reference point of the
protection zone.
Examples
In the following figures some examples for protection zones have been presented:
:RUNSLHFHUHODWHG
; SURWHFWLRQ]RQHIRU 7RROKROGHU
VSLQGOHFKXFN
:RUNSLHFHUHODWHG
SURWHFWLRQ]RQHIRU
WRROKROGHU
'ULOO
0 3
=
:
;
Basic Functions
116 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
A3: Axis Monitoring, Protection Zones
2.3 Protection zones
< 7RROUHODWHG
SURWHFWLRQ]RQH
7RROUHODWHG
SURWHFWLRQ]RQH
:RUNSLHFHUHODWHG
; SURWHFWLRQ]RQH
=
:RUNSLHFHUHODWHG
SURWHFWLRQ]RQHIRU
3 WDLOVWRFN
: =
Figure 2-10 Example of a turning machine with relative protection zone for tailstock
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 117
A3: Axis Monitoring, Protection Zones
2.3 Protection zones
General
A protection-zone definition must contain the following information:
● Protection zone type (workpiece- or tool-related)
● Orientation of the protection zone
● Type of limitation in the third dimension
● Upper and lower limits of the protection zone in the third dimension
● Activation type ("Protection zone immediately active": only possible via system variable)
● Contour elements
Definition beginning
The definition start is defined by the corresponding subroutine:
● CPROTDEF(n, t, applim, appplus, appminus)
Basic Functions
118 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
A3: Axis Monitoring, Protection Zones
2.3 Protection zones
([WHUQDOSURWHFWLRQ]RQH
;
,QWHUQDOSURWHFWLRQ]RQH
3
: =
,QWHUQDOSURWHFWLRQ]RQH
;
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 119
A3: Axis Monitoring, Protection Zones
2.3 Protection zones
Toolrelated protection zones must be convex. If a concave protection zone is required, the
protection zone must be divided up into several convex protection zones.
&RQYH[SURWHFWLRQ]RQHV
&RQFDYHSURWHFWLRQ]RQHVQRWSHUPLVVLEOH
Contour elements
The following contour elements are permissible:
● G0, G1 for straight contour elements
● G2 for circle segments in the clockwise direction
Permissible only for workpiece-related protection zones.
Not permissible for tool-related protection zones because they must be convex.
● G3 for circular segments in the counterclockwise direction
A protection zone cannot be described by a complete circle. A complete circle must be
divided into two half circles.
The sequence G2, G3 or G3, G2 is not permitted. A short G1 block must be inserted between
the two circular blocks.
Constraints
During the definition of a protection zone, the following functions must not be active or used:
● Tool radius compensation (cutter radius compensation, tool nose radius compensation)
● Transformation
● Reference point approach (G74)
● Fixed point approach (G75)
● Dwell time (G4)
● Block search stop (STOPRE)
Basic Functions
120 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
A3: Axis Monitoring, Protection Zones
2.3 Protection zones
End of definition
The end of definition is defined by the following subroutine:
EXECUTE(NOT_USED)
General
When the protection zones are defined via part program instructions (see Section "Definition
via part program instruction (Page 118)"), the protection zone data is stored in system
variables. The system variables can also be written directly so that the definition of protection
areas can also be performed directly in the system variables.
The same supplementary conditions apply for the definition of the contour of a protection
zone as for a protection zone definition via part program instructions.
System variables
The protection zone definitions cover following system variables:
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 121
A3: Axis Monitoring, Protection Zones
2.3 Protection zones
Note
The system variables of the protection zone definitions are not restored with REORG.
Basic Functions
122 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
A3: Axis Monitoring, Protection Zones
2.3 Protection zones
File Blocks
_N_NCK_PRO Data block for NC-specific protection zones
_N_CHAN1_PRO Data block for channel-specific protection zones in channel 1
_N_CHAN2_PRO Data block for channel-specific protection zones in channel 2
Data backup
The protection zone definitions are saved in the following files:
File Blocks
_N_INITIAL_INI All data blocks of the protection zones
_N_COMPLETE_PRO All data blocks of the protection zones
_N_CHAN_PRO All data blocks of the channel-specific protection zones
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 123
A3: Axis Monitoring, Protection Zones
2.3 Protection zones
Note
A protection zone is only taken into account after the referencing of all geometry axes of the
channel in which it has been activated.
Note
The activation of preactivated protection zones must be performed prior to the traversing
motion of the geometry axes.
Basic Functions
124 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
A3: Axis Monitoring, Protection Zones
2.3 Protection zones
Note
With automatic activation, no relative offset of a protection zone is possible.
Note
A protection zone is only taken into account after the referencing of all geometry axes of
the channel in which it has been activated.
Preactivated protection zones are displayed via the following NC/PLC interface signals:
● DB21, ... DBX272.0 - 273.1 == 1 (machine-related protection zone 1 - 10 preactivated)
● DB21, ... DBX274.0 - 275.1 == 1 (channel-specific protection zone 1 - 10 preactivated)
; 3UHDFWLYDWHGSURWHFWLRQ]RQH
: =
Figure 2-13 Example: Turning machine with preactivated protection zone for a sensor.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 125
A3: Axis Monitoring, Protection Zones
2.3 Protection zones
NOTICE
Protection zone violation possible
If a preactivated protection zone with conditional stop is not activated in good time, the NC
may no longer be able to stop before the protection zone in good time because the braking
distance after the activation point has not been taken into account.
The preactivation of protection zones with conditional stop is performed in the part program
via:
CPROT or NPROT (<protection zone number>, 3)
In the case of a preactivated protection zone with conditional stop, a traversing motion is not
stopped before this if the traversing motion goes into the protection zone. A stop is only
performed when the protection zone has been activated. This behavior is to enable
uninterrupted machining controlled by the user when the protection zone is only required
temporarily.
Note
It is recommended that protection zones which are to be activated via the PLC user program,
be configured specially for this. Preactivation in the part program is only useful for these
protection zones.
Basic Functions
126 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
A3: Axis Monitoring, Protection Zones
2.3 Protection zones
Program test
In the AUTOMATIC and MDI modes, activated and preactivated protection zones are also
monitored in the "Program test" state.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 127
A3: Axis Monitoring, Protection Zones
2.3 Protection zones
Memory requirements
The memory required for protection zones is parameterized via the following machine data:
● Persistent memory
– MD18190 $MN_MM_NUM_PROTECT_AREA_NCK (number of available machine-
defined protection zones)
– MD28200 $MC_MM_NUM_PROTECT_AREA_CHAN (number of available channel-
defined protection zones)
● Dynamic memory
– MD28210 $MC_MM_NUM_PROTECT_AREA_ACTIVE (maximum number of
protection zones that can be activated simultaneously in the channel)
– MD28212 $MC_MM_NUM_PROTECT_AREA_CONTUR (maximum number of
definable contour elements per protection zone)
See also
Definition via part program instruction (Page 118)
Definition as per system variable (Page 121)
2.3.6 Protection zone violation and temporary enabling of individual protection zones
Basic Functions
128 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
A3: Axis Monitoring, Protection Zones
2.3 Protection zones
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 129
A3: Axis Monitoring, Protection Zones
2.3 Protection zones
After the end of the traversing motion, the alarm is cleared automatically. If the current
position is within an activated or preactivated protection zone, the following is performed:
● Alarm 10702 or 10703 is displayed
● Further traversing motions are disabled
● The NC/PLC interface signal for the relevant protection zone is set
DB21, … DBX276.0 - 277.1 or DBX278.0 - 279.1 (protection zone violated)
To continue, see the paragraph below "Temporary enabling of protection zones" and Section
"Activating and deactivating protection zones (Page 123)".
Example: Three protection zones activated and simultaneous traversing of two geometry
axes
3URWHFWLRQ]RQH
6WDUWLQJSRLQW
;D[LV
3URWHFWLRQ]RQH
<D[LV
3URWHFWLRQ]RQH
0D[LPXPWUDYHUVLQJUDQJH
$EVROXWHWUDYHUVLQJUDQJHOLPLW DWWKHVWDUWWLPH
5HODWLYHWUDYHUVLQJUDQJHOLPLW 0D[LPXPD[LDOWUDYHUVLQJUDQJH
GXHWRWKHSURWHFWLRQ]RQH DWWKHVWDUWWLPH
Figure 2-14 Motion range of the geometry axes at the start time
At the start time of the traversing motions of the axes X and Y, the axial traversing range
limits are determined from the start time:
● X axis
– Positive traversing direction: Protection zone 2
– Negative traversing direction: Absolute traversing range limit, e.g. software limit switch
● Y axis
– Positive traversing direction: Protection zone 1
– Negative traversing direction: Absolute traversing range limit, e.g. working area
limitation
Basic Functions
130 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
A3: Axis Monitoring, Protection Zones
2.3 Protection zones
The resulting maximum traversing range at the start time does not take protection zone 3
into account. Therefore, a protection zone violation in protection zone 3 is possible.
Note
Activated and preactivated protection zones are also monitored in the manual operating
modes JOG, INC and DRF.
If an axis starts to move towards a protection zone when it is at a protection zone limit, then
a selfresetting alarm "Protection zone reached in JOG" is output and the motion is not
started.
Temporary enabling of protection zones
If a traversing motion is started within or on the limit of an activated protection zone, alarm
10702 or 10703 is displayed and the traversing motion is not started. The traversing motion
can be performed when the relevant protection zone is temporarily enabled. The following
actions must be performed for this:
● Create a positive edge at the NC/PLC interface signal:
DB21, ... DBX1.1 (enable protection zone)
● Start the same traversing motion again
Note
The NC/PLC interface signal "Protection zone violated" is still set when the temporarily
enabled protection zone is traversed:
DB21, … DBX276.0 – 277.1 or DBX278.0 – 279.1
The enable is reset if a motion is started that does not lead into the enabled protection zone.
If further protection zones are affected by the traversing motion, additional alarms 10702 or
10703 are displayed for each protection zone. The protection zones displayed in the alarms
can be enabled by creating further positive edges on the NC/PLC interface signal:
DB21, ... DBX1.1 (enable protection zone)
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 131
A3: Axis Monitoring, Protection Zones
2.3 Protection zones
Reset of an enable
The enable is reset internally and on the NC/PLC interface at the next standstill of a
geometry axis for which the temporarily enabled protection zone has been completely exited:
DB21, … DBX276.0 - 277.1 or DBX278.0 - 279.1 = 0 (protection zone violated)
Basic Functions
132 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
A3: Axis Monitoring, Protection Zones
2.3 Protection zones
Positioning axes
For positioning axes, only the programmed block end point is monitored.
An alarm is displayed during the traversing motion of the positioning axes:
Alarm: "10704 Protection-zone monitoring is not guaranteed".
Axis interchange
If an axis intended for the axis interchange is not active in a channel, the position of the axis
last approached in the channel is taken as the current position. If this axis has not yet been
traversed in the channel, zero is taken as the position.
2.3.8 Checking for protection zone violation, working area limitation and software limit
switches (CALCPOSI)
Function
As of the start position, the CALCPOSI() function checks whether active limits have been
violated along the traversing distance in the workpiece coordinate system (WCS) with regard
to the geometry axes.
If the distance cannot be fully traversed because of limits, a positive, decimal-coded status
value and the maximum possible traversing distance are returned.
Definition
INT CALCPOSI(VAR REAL[3] <Start>, VAR REAL[3] <Dist>, VAR REAL[5]
<Limit>,
VAR REAL[3] <MaxDist>, BOOL <System>, INT <TestLim>)
Syntax
<Status> = CALCPOSI(VAR <Start>, VAR <Dist>, VAR <Limit>, VAR
<MaxDist>, <System>, <TestLim>)
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 133
A3: Axis Monitoring, Protection Zones
2.3 Protection zones
Meaning
CALCPOSI: Test for limit violations with regard to the geometry axes.
Preprocessing No
stop:
Alone in the block: Yes
<Status>: Function return value. Negative values indicate error states.
(Part 1) Data type: INT
Range of values: -8 ≤ x ≤ 100000
Values Meaning
0 The distance can be traversed completely.
-1 At least one component is negative in <Limit>.
-2 Error in a transformation calculation.
Example: The traversing distance passes through a singularity
so that the axis positions cannot be defined.
-3 The specified traversing distance <Dist> and the maximum
possible traversing distance <MaxDist> are linearly
dependent.
Note
Can only occur in conjunction with <TestLim>, bit 4 == 1.
-4 The projection of the traversing direction contained in <Dist>
on to the limitation surface is the zero vector, or the traversing
direction is perpendicular to the violated limitation surface.
Note
Can only occur in conjunction with <TestLim>, bit 5 == 1.
-5 In <TestLim>, bit 4 == 1 AND bit 5 == 1
-6 At least one machine axis that has to be considered for
checking the traversing limits has not been homed.
-7 Collision avoidance function: Invalid definition of the kinematic
chain or the protection zones.
-8 Collision avoidance function: This command cannot be
executed because of insufficient memory.
<Status>: Units digit
(Part 2) Note
If several limits are violated simultaneously, the limit with the greatest restriction on
the specified traversing distance is signaled.
1 Software limit switches are limiting the traversing distance
2 Working area limits are limiting the traversing distance
3 Protection zones are limiting the traversing distance
Tens digit
1x The initial value violates the limit
2x The specified straight line violates the limit.
This value is also returned if the end point does not violate
any limit itself, but the path from the starting point to the end
point would cause a limit value to be violated (e.g. by passing
through a protection zone, curved software limit switches in
the WCS for non-linear transformations, e.g. transmit).
Basic Functions
134 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
A3: Axis Monitoring, Protection Zones
2.3 Protection zones
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 135
A3: Axis Monitoring, Protection Zones
2.3 Protection zones
Basic Functions
136 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
A3: Axis Monitoring, Protection Zones
2.3 Protection zones
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 137
A3: Axis Monitoring, Protection Zones
2.3 Protection zones
Example
In the example (see figure), the active software limit switches and working area limits in the
X-Y plane and the following three protection zones are displayed
● C2: Tool-related, channel-specific protection zone, active, circular, radius = 2 mm
● C4: Workpiece-related, channel-specific protection zone, preactivated, square, side
length = 10 mm
● N3: NC-specific protection zone, active, rectangular, side length = 10 mm x 15 mm
The protection zones and working area limits are defined first in the NC program. The
CALCPOSI() function is then called with different parameterizations.
<
6RIWZDUHOLPLWVZLWFK
&
1
1
:RUNLQJDUHDOLPLWDWLRQ
1
11
;
&
5
11
NC program
Program code
N10 DEF REAL _STARTPOS[3]
N20 DEF REAL _MOVDIST[3]
N30 DEF REAL _DLIMIT[5]
N40 DEF REAL _MAXDIST[3]
N50 DEF INT _SB
N60 DEF INT _STATUS
: Toolrelated protection zone C2
N70 CPROTDEF(2, TRUE, 0)
N80 G17 G1 X-2 Y0
N90 G3 I2 X2
N100 I-2 X-2
N110 EXECUTE(_SB)
; Workpiece-related protection zone C4
Basic Functions
138 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
A3: Axis Monitoring, Protection Zones
2.3 Protection zones
Program code
N120 CPROTDEF(4, FALSE, 0)
N130 G17 G1 X0 Y15
N140 X10
N150 Y25
N160 X0
N170 Y15
N180 EXECUTE(_SB)
; Machine-related protection zone N3
N190 NPROTDEF(3, FALSE, 0)
N200 G17 G1 X10 Y5
N210 X25
N220 Y15
N230 X10
N240 Y5
N250 EXECUTE(_SB)
; Activate or preactivate protection zones
N260 CPROT(2, 2, 0, 0, 0)
N270 CPROT(4, 1, 0, 0, 0)
N280 NPROT(3, 2, 0, 0, 0)
; Define working area limits
N290 G25 XX=-10 YY=-10
N300 G26 XX=20 YY=21
N310 _STARTPOS[0] = 0.
N320 _STARTPOS[1] = 0.
N330 _STARTPOS[2] = 0.
N340 _MOVDIST[0] = 35.
N350 _MOVDIST[1] = 20.
N360 _MOVDIST[2] = 0.
N370 _DLIMIT[0] = 0.
N380 _DLIMIT[1] = 0.
N390 _DLIMIT[2] = 0.
N400 _DLIMIT[3] = 0.
N410 _DLIMIT[4] = 0.
N420 _STATUS = CALCPOSI(_STARTPOS, _MOVDIST, _DLIMIT, _MAXDIST)
N430 _STATUS = CALCPOSI(_STARTPOS, _MOVDIST, _DLIMIT, _MAXDIST,,3)
N440 _STATUS = CALCPOSI(_STARTPOS, _MOVDIST, _DLIMIT, _MAXDIST,,1)
N450 _STARTPOS[0] = 5.
N460 _STARTPOS[1] = 17.
N470 _STARTPOS[2] = 0.
N480 _MOVDIST[0] = 0.
N490 _MOVDIST[1] =-27.
N500 _MOVDIST[2] = 0.
N510 _STATUS = CALCPOSI(_STARTPOS, _MOVDIST, _DLIMIT, _MAXDIST,,14)
N520 _STATUS = CALCPOSI(_STARTPOS, _MOVDIST, _DLIMIT, _MAXDIST,, 6)
N530 _DLIMIT[1] = 2.
N540 _STATUS = CALCPOSI(_STARTPOS, _MOVDIST, _DLIMIT, _MAXDIST,, 6)
N550 _STARTPOS[0] = 27.
N560 _STARTPOS[1] = 17.1
N570 _STARTPOS[2] = 0.
N580 _MOVDIST[0] =-27.
N590 _MOVDIST[1] = 0.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 139
A3: Axis Monitoring, Protection Zones
2.3 Protection zones
Program code
N600 _MOVDIST[2] = 0.
N610 _DLIMIT[3] = 2.
N620 _STATUS = CALCPOSI(_STARTPOS, _MOVDIST, _DLIMIT, _MAXDIST,,12)
N630 _STARTPOS[0] = 0.
N640 _STARTPOS[1] = 0.
N650 _STARTPOS[2] = 0.
N660 _MOVDIST[0] = 0.
N670 _MOVDIST[1] = 30.
N680 _MOVDIST[2] = 0.
N690 TRANS X10
N700 AROT Z45
N710 _STATUS = CALCPOSI(_STARTPOS,_MOVDIST, _DLIMIT, _MAXDIST)
; Delete frames from N690 and N700 again
N720 TRANS
N730 _STARTPOS[0] = 0.
N740 _STARTPOS[1] = 10.
N750 _STARTPOS[2] = 0.
; Vectors _MOVDIST and _MAXDIST define the motion plane
N760 _MOVDIST[0] = 30.
N770 _MOVDIST[1] = 30.
N780 _MOVDIST[2] = 0.
N790 _MAXDIST[0] = 1.
N800 _MAXDIST[1] = 0.
N810 _MAXDIST[2] = 1.
N820 _STATUS = CALCPOSI(_STARTPOS, _MOVDIST, _DLIMIT, _MAXDIST,,17)
N830 M30
Results of CALCPOSI():
Basic Functions
140 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
A3: Axis Monitoring, Protection Zones
2.3 Protection zones
Supplementary conditions
Axis status
All machine axes considered by CALCPOSI() must be homed.
Rotary axes
Rotary axes are only monitored when they are not modulo rotary axes.
It is permissible that no software limit switches, working area limits or protection zones are
defined for one or more of the relevant axes.
Note
Preprocessing stop
When using CALCPOSI() in conjunction with transformations, it is the sole responsibility of the
user to program a preprocessing stop (STOPRE) with the preprocessing before CALCPOSI() for
the synchronization of the machine axis positions.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 141
A3: Axis Monitoring, Protection Zones
2.3 Protection zones
If bit 4 is set in <TestLim> (see above) (value 16) (calculation of the further direction), then
the direction vector received in _MOVDIST is only valid when the hundred thousands digit is
set in the function return value (status). If such a direction cannot be determined because
either protection zones have been violated or a transformation is active, the input value in
_MOVDIST remains unchanged, no further error message is issued.
References
● Further information on working area limitation can be found in:
Programming Manual, Fundamentals
Section "Supplementary commands" > "Working area limitation"
● Further information on software limit switches can be found in:
Function Manual, Basic Functions; (A3) Axis monitoring, protection zones,
Section "Axis monitoring" > "Limit switch monitoring"
Basic Functions
142 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
A3: Axis Monitoring, Protection Zones
2.4 Supplementary conditions
Settings
For correct operation of the monitoring, the following settings must be made or checked, in
addition to the machine data mentioned:
General
● MD31030 $MA_LEADSCREW_PITCH (leadscrew pitch)
● MD31050 $MA_DRIVE_AX_RATIO_DENOM (denominator load gearbox)
● MD31060 $MA_DRIVE_AX_RATIO_NUMERA (numerator load gearbox)
● MD31070 $MA_DRIVE_ENC_RATIO_DENOM (denominator measuring gearbox)
● MD31080 $MA_DRIVE_ENC_RATIO_NUMERA (numerator measuring gearbox)
● MD32810 $MA_EQUIV_SPEEDCTRL_TIME (equivalent time constant speed control loop
for feedforward control)
● Encoder resolution
For the appropriate machine data, see Section "G2: Velocities, setpoint / actual value
systems, closed-loop control (Page 307)".
Only drives with analog speed setpoint interface
● MD32260 $MA_RATED_VELO (rated motor speed)
● MD32250 $MA_RATED_OUTVAL (rated output voltage)
2.5 Examples
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 143
A3: Axis Monitoring, Protection Zones
2.5 Examples
Basic Functions
144 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
A3: Axis Monitoring, Protection Zones
2.5 Examples
...
N100 WALCS2 ...
...
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 145
A3: Axis Monitoring, Protection Zones
2.5 Examples
Requirement
The following internal protection zones are to be defined for a turning machine:
● One machine- and workpiece-related protection zone for the spindle chuck, without
limitation in the third dimension
● One channel-specific protection zone for the workpiece, without limitation in the third
dimension
● One channel-specific, tool-related protection zone for the toolholder, without limitation in
the third dimension
The workpiece zero is placed on the machine zero to define the protection zone for the
workpiece.
When activated, the protection zone is then offset by 100 mm in the Z axis in the positive
direction.
6WDUWSRLQW
)
3URWHFWLRQ]RQH 7RROKROGHU
;
IRUVSLQGOHFKXFN
6WDUWSRLQW
6WDUWSRLQW
'ULOO
0 3
: 5 =
3URWHFWLRQ]RQH
IRUWRROKROGHU
3URWHFWLRQ]RQH
IRUZRUNSLHFH
;
Basic Functions
146 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
A3: Axis Monitoring, Protection Zones
2.5 Examples
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 147
A3: Axis Monitoring, Protection Zones
2.5 Examples
Basic Functions
148 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
A3: Axis Monitoring, Protection Zones
2.5 Examples
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 149
A3: Axis Monitoring, Protection Zones
2.5 Examples
Basic Functions
150 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
A3: Axis Monitoring, Protection Zones
2.5 Examples
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 151
A3: Axis Monitoring, Protection Zones
2.5 Examples
Basic Functions
152 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
A3: Axis Monitoring, Protection Zones
2.5 Examples
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 153
A3: Axis Monitoring, Protection Zones
2.5 Examples
Basic Functions
154 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
A3: Axis Monitoring, Protection Zones
2.6 Data lists
Activation
Table 2- 4 Part program excerpt for activating the three protection zones for spindle chuck,
workpiece, and toolholder:
Axis monitoring
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 155
A3: Axis Monitoring, Protection Zones
2.6 Data lists
Protection zones
Basic Functions
156 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
A3: Axis Monitoring, Protection Zones
2.6 Data lists
Protection zones
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 157
A3: Axis Monitoring, Protection Zones
2.6 Data lists
Protection zones
None
Protection zones
None
Basic Functions
158 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
A3: Axis Monitoring, Protection Zones
2.6 Data lists
2.6.3 Signals
Protection zones
Protection zones
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 159
A3: Axis Monitoring, Protection Zones
2.6 Data lists
Protection zones
None
Basic Functions
160 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
B1: Continuous-path mode, Exact stop, Look Ahead 3
3.1 Brief Description
Continuous-path mode
In continuous-path mode, the NC attempts to keep the programmed path velocity as
constant as possible. In particular, deceleration of the path axes at the block limits of the part
program is to be avoided.
LookAhead
LookAhead is a function for optimizing the continuous path mode.
Smooth machining of workpieces is necessary to ensure a high-quality surface finish. For
this reason, path velocity variations should be avoided during machining whenever possible.
Without LookAhead, the NC only takes the traversing block immediately following the current
traversing block into consideration when determining the possible path velocity. If the
following block contains only a short path, the NC must reduce the path velocity (decelerate
in the current block) to be able to stop in time at the end of the next block, if necessary.
When the NC "looks ahead" over a configurable number of traversing blocks following the
current traversing block, a much higher path velocity can be attained under certain
circumstances because the NC now has considerably more traversing blocks and more path
available for calculation.
This results in the following advantages:
● Machining with higher path velocities on average
● Improved surface quality by avoiding deceleration and acceleration processes
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 161
B1: Continuous-path mode, Exact stop, Look Ahead
3.1 Brief Description
Basic Functions
162 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
B1: Continuous-path mode, Exact stop, Look Ahead
3.1 Brief Description
NC block compression
When a workpiece design is completed with a CAD/CAM system, the CAD/CAM system
generally also compiles the corresponding part program to create the workpiece surface. To
do so, most CAD/CAM systems use linear blocks to describe even curved sections of the
workpiece surface. Many interpolation points are generally necessary to maintain the
required contour accuracy. This results in many linear blocks, typically with very short paths.
The "NC block compressor" function uses polynomial blocks to perform a subsequent
approximation of the contour specified by the linear blocks. During this process, an
assignable number of linear blocks is replaced by a polynomial block. Furthermore, the
number of linear blocks that can be replaced by a polynomial block also depends on the
specified maximum permissible contour deviation and the contour profile.
Use of polynomial blocks provides the following advantages:
● Reduction of the number of required part program blocks for describing the workpiece
contour
● Higher maximum path velocities
Note
NC block compressor
The NC block compressor (COMPON, COMPCURV or COMPCAD) cannot be employed
while compressing spline blocks since it can only be used to compress linear blocks.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 163
B1: Continuous-path mode, Exact stop, Look Ahead
3.2 Exact stop mode
Application
Exact stop mode should always be used when the programmed contour must be executed
exactly.
Activation
Exact stop mode can be activated on a modal basis or in blocks in the part program:
G command Meaning
G60 Exact stop with modal effect
G9 Exact stop with block-by-block effect
Basic Functions
164 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
B1: Continuous-path mode, Exact stop, Look Ahead
3.2 Exact stop mode
Exact stop criteria "Exact stop coarse" and "Exact stop fine".
The exact stop criteria "Exact stop coarse" and "Exact stop fine" are used to specify
tolerance windows for a machine axis reaching the "exact stop" state.
([DFWVWRSILQH 6(7326,7,21
$[LVGLUHFWLRQ $[LVGLUHFWLRQ
QHJDWLYH SRVLWLYH
([DFWVWRS
FRDUVH
$&78$/326,7,21
Parameters are assigned to the two exact stop criteria via the machine data:
MD36010 $MA_STOP_LIMIT_FINE (exact stop fine)
MD36000 $MA_STOP_LIMIT_COARSE (exact stop coarse)
Note
The tolerance windows of the exact stop criteria "Exact stop coarse" and "Exact stop fine"
should be assigned in such a way that the following requirement is fulfilled:
"Exact stop coarse" > "Exact stop fine"
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 165
B1: Continuous-path mode, Exact stop, Look Ahead
3.2 Exact stop mode
Y %ORFNFKDQJH
:LWK*
$FWXDOYDOXH :LWK*
:LWK*
6HWSRLQW
Basic Functions
166 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
B1: Continuous-path mode, Exact stop, Look Ahead
3.2 Exact stop mode
● Machining commands: G1, G2, G3, CIP, ASPLINE, BSPLINE, CSPLINE, POLY, G33, G34, G35, G331,
G332, OEMIPO01, OEMIPO02, CT
The setting is done in a channel-specific manner via the following machine data:
MD20550 $MC_EXACT_POS_MODE (exact stop conditions for G0 and G1)
Coding
Each exact stop criterion is location-coded:
MD20550 $MC_EXACT_POS_MODE = <ZE>
● Ones position E: Rapid traverse
● Tens position Z: all other part program commands in the first G function group
Example
MD20550 $MC_EXACT_POS_MODE = 02
Ones position = 2:
With rapid traverse, exact stop criterion G602 (Exact stop window coarse) is always active,
irrespective of any programming in the parts program.
Tens digit = 0:
For traversing with all other parts program commands of the first G function group, the exact
stop criterion programmed in the parts program is active.
Assignable exact stop criterion for rapid traverse transitions in continuous path mode
The behavior at the block transition of part program blocks before and after rapid traverse
blocks can be parameterized as follows:
MD20552 $MC_EXACT_POS_MODE_G0_TO_G1 = <value>
Value Meaning
0 No additional stop at the block transition.
1 Stop at block transition: Same behavior as in the case of G601 (Exact stop window fine)
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 167
B1: Continuous-path mode, Exact stop, Look Ahead
3.3 Continuous-path mode
Value Meaning
2 Stop at block transition: Same behavior as G602 (Exact stop window coarse).
3 Stop at block transition: Same behavior as G603 (Interpolator end).
4 Like 0, in addition, the override of the next non-G0 block is taken into account with
LookAhead in the G0 block during the transition from G0 to non-G0.
5 Like 0; in addition, the override of the next block is taken into account with LookAhead during
the transition from G0 to non-G0 and from non-G0 to G0.
Continuous-path mode
In the continuous-path mode, the path velocity is not decelerated for the block change in
order to permit the fulfillment of an exact stop criterion. The objective of this mode is to avoid
rapid deceleration of the path axes at the block-change point so that the axis velocity
remains as constant as possible when the program moves to the next block. To achieve this
objective, the "LookAhead" function is also activated when the continuous-path mode is
selected.
Continuous-path mode causes the smoothing and tangential shaping of angular block
transitions by local changes in the programmed contour. The extent of the change relative to
the programmed contour can be limited by specifying the overload factor or rounding criteria.
Continuous-path mode:
● Contour rounding.
● Reduces machining times by eliminating braking and acceleration processes that are
required to fulfill the exact-stop criterion.
● Improves cutting conditions because of the more constant velocity.
Continuous-path mode is suitable if:
● A contour must be traversed as quickly as possible (e.g. with rapid traverse).
● The exact contour may deviate from the programmed contour within a specific tolerance
for the purpose of obtaining a continuous contour
Continuous-path mode is not suitable if:
● A contour is to be traversed precisely.
● An absolutely constant velocity is required.
Basic Functions
168 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
B1: Continuous-path mode, Exact stop, Look Ahead
3.3 Continuous-path mode
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 169
B1: Continuous-path mode, Exact stop, Look Ahead
3.3 Continuous-path mode
Function
The function lowers the path velocity in continuou-path mode until the non-tangential block
transition can be traversed in one interpolation cycle while respecting the deceleration limit
and taking an overload factor into account.
With the reduced velocity, axial jumps in velocity are produced with a non-tangential contour
at the block transition. These jumps in velocity are also performed by the coupled motion
synchronized axes. The jump in velocity prevents the path velocity dropping to zero. This
jump is performed if the axial velocity was reduced with the axial acceleration to a velocity
from which the new setpoint can be reached with the jump. The magnitude of the setpoint
jump can be limited using an overload factor. Because the magnitude of the jump is axial,
the minimum jump of the path axes which are active during the block change is considered
during block transition.
<D[LV
%ORFNFKDQJH
;D[LV
3DWKYHORFLW\
%ORFNFKDQJH W
9HORFLW\RI /HDGD[
WKH;D[LV
,32 W
F\FOH
9HORFLW\RI
WKH<D[LV /HDGD\
/HDGI\
D\
D[LDO
I\!I[! YHORFLW\MXPS
,32 W
I2YHUORDGIDFWRU F\FOH
With a practically tangential block transition, the path velocity is not reduced if the
permissible axial accelerations are not exceeded. This means that very small bends in the
contour (e.g. 0.5°) are overtraveled directly.
Basic Functions
170 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
B1: Continuous-path mode, Exact stop, Look Ahead
3.3 Continuous-path mode
Overload factor
The overload factor restricts step changes in the machine axis velocity at block ends. To
ensure that the velocity jump does not exceed the maximum load on the axis, the jump is
derived from the acceleration of the axis.
The overload factor indicates the extent by which the acceleration of the machine axis
(MD32300 $MA_MAX_AX_ACCEL) may be exceeded for an IPO-cycle.
The velocity jump results as follows:
Velocity jump = axis acceleration * (overload factor-1) * interpolator cycle.
The overload factor is saved in the machine data:
MD32310 $MA_MAX_ACCEL_OVL_FACTOR (overload factor for axial velocity jumps)
Factor 1.0 means that only tangential transitions with finite velocity can be traversed. For all
other transitions, the velocity is reduced to zero by changing the setpoint. This behavior is
equivalent to the function "Exact stop with interpolator end". This is undesirable for
continuous-path mode, so the factor must be set to greater than 1.0.
Note
For startup and installation, please note that the factor must be reduced if the machine is
likely to be subject to vibrations during angular block transitions and rounding is not to be
used.
By setting the following machine data, the block transitions are rounded independent of the
set overload factor with G641/G642:
MD20490 $MC_IGNORE_OVL_FACTOR_FOR_ADIS
Activation/deactivation
Continuous-path mode with a reduction in speed according to the overload factor can be
activated in any NC part program block by the modal command G64.
Selecting the exact stop which works on a block-by-block basis enables rounding to be
interrupted (G9).
Continuous-path mode G64 can be deactivated by selecting:
● Modal exact stop G60
● Rounding G641, G642, G643, G644 or G645
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 171
B1: Continuous-path mode, Exact stop, Look Ahead
3.3 Continuous-path mode
3.3.3 Rounding
Function
The "Rounding" function adds intermediate blocks (positioning blocks) along a programmed
contour (path axes) at non-continuous (angular) block transitions so that the resulting new
block transition is continuous (tangential).
Synchronized axes
The rounding considers not only the geometry axes but also all synchronous axes. Although
a continuous block transition cannot be created for both axis types concurrently for the
parallel travel of path and synchronous axes. In this case, to favor path axes that always
travel exactly, only an approximately continuous block transition is created for synchronous
axes.
Note
We recommend that when the "Rounding" function is used, synchronization conditions apply
to the end of the block before the rounding location rather than the end of the inserted
rounding block. The following block would then not be started and with a stop at the block
end, the contour of the following block can still be changed manually.
Exceptions
In the following cases, no rounding occurs at the block transition, for example, between the
N10 blocks after N20, i.e. no rounding block is added:
Basic Functions
172 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
B1: Continuous-path mode, Exact stop, Look Ahead
3.3 Continuous-path mode
● In N20, an axis that was previously a path axis traverses as a positioning axis for the first
time
● Geometry axes traverse in N10 but not in N20
● Geometry axes traverse in N20 but not in N10
● Activation of thread-cutting G33 in N20
● Change from BRISK and SOFT
● Transformation-relevant axes are not completely assigned to the path motion (e.g. for
oscillation axes, positioning axes).
The insertion of the rounding block would slow part program machining overproportionally
Possible causes:
● A program or program section consists of a number of very short traversal blocks (≈ 1
interpolator cycle / traversal block; because each traversal block requires at least one
interpolator cycle, the inserted intermediate block would almost double the machining
time)
● G64 (path control operation without rounding) without speed reduction active for block
change
● The parameterized overload factor (MD32310 $MA_MAX_ACCEL_OVL_FACTOR)
permits the traversal of the programmed contour without the path speed needing to be
reduced. See also: MD20490 $MC_IGNORE_OVL_FACTOR_FOR_ADIS
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 173
B1: Continuous-path mode, Exact stop, Look Ahead
3.3 Continuous-path mode
Note
We recommend that when the "Rounding" function is used, synchronization conditions apply
to the end of the block before the rounding location rather than the end of the inserted
rounding block. The following block would then not be started and with a stop at the block
end, the contour of the following block can still be changed.
Function
In continuous-path mode with rounding according to a path criterion, the size of the rounding
area is influenced by the path criteria ADIS and ADISPOS.
The path criteria ADIS and ADISPOS describe the maximum distances which a rounding
block can occupy before and after a block.
3DWKFULWHULRQ 3URJUDPPHGEORFNLQWHUPHGLDWHSRLQW
$',6
$',6326
5RXQGLQJFRQWRXU
3URJUDPPHG
LQSXWEORFN 3URJUDPPHG
RXWSXWEORFN
Note
Acute angles produce rounding curves with a large degree of curvature and therefore cause
a corresponding reduction in velocity.
Note
ADISPOS is programmed in the same way as ADIS, but must be used specifically for
movements in rapid traverse mode G00.
Basic Functions
174 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
B1: Continuous-path mode, Exact stop, Look Ahead
3.3 Continuous-path mode
1RFRUQHUURXQGLQJ
1
YE UHPDLQLQJSDWK
1
1
$',6
YESDWK1
1
$',6 $',6
YESDWK1 YESDWK1
%HJLQQLQJRI
EORFN1 $',6
Activation/deactivation
Continuous-path mode with rounding based on a path criterion can be activated in any NC
part program block by the modal command G641. Before or on selection, the path criteria
ADIS/ADISPOS must be specified.
Selecting the exact stop which works on a block-by-block basis enables rounding to be
interrupted (G9).
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 175
B1: Continuous-path mode, Exact stop, Look Ahead
3.3 Continuous-path mode
Continuous-path mode with rounding based on a path criterion (G641) can be deactivated by
selecting:
● Modal exact stop (G60)
● Continuous-path mode G64, G642, G643, G644 or G645
Program example
Function
In continuous-path mode involving rounding in compliance with defined tolerances, the
rounding normally takes place while adhering to the maximum permissible path deviation.
Instead of these axis-specific tolerances, the maintenance of the maximum contour deviation
(contour tolerance) or the maximum angular deviation of the tool orientation (orientation
tolerance) can be configured.
Activation
Continuous-path mode with rounding in compliance with defined tolerances can be activated
in any NC part program block by the modal command G642 or G643.
Selecting the exact stop which works on a block-by-block basis enables rounding to be
interrupted (G9).
Continuous-path mode with rounding in compliance with defined tolerances (G642/G643)
can be deactivated by selecting:
● Modal exact stop (G60)
● Continuous-path mode G64, G641, G644 or G645
Basic Functions
176 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
B1: Continuous-path mode, Exact stop, Look Ahead
3.3 Continuous-path mode
G642 G643
With G642, the rounding path is determined on In the case of G643, each axis may have a
the basis of the shortest distance for rounding all different rounding path. The rounding travels are
axes. This value is taken into account when taken into account axis-specifically and block-
generating a rounding block. internally (⇒ no separate rounding block).
With G642, the rounding area results from the Very different specifications for the contour
smallest tolerance setting. tolerance and the tolerance of the tool orientation
can only have effect with G643.
Parameterization
Maximum path deviation
The maximum path deviation permitted with G642/G643 is set for each axis in the machine
data:
MD33100 $MA_COMPRESS_POS_TOL
Contour tolerance and orientation tolerance
The contour tolerance and orientation tolerance are set in the channel-specific setting data:
SD42465 $SC_SMOOTH_CONTUR_TOL (maximum contour deviation)
SD42466 $SC_SMOOTH_ORI_TOL (maximum angular deviation of the tool orientation)
The settings data can be programmed in the NC program and can in this way be specified
differently for each block transition.
Note
The setting data SD42466 $SC_SMOOTH_ORI_TOL is effective only in active orientation
transformation.
Rounding behavior
Rounding behavior with G642 and G643 is configured via the machine data:
MD20480 $MC_SMOOTHING_MODE (rounding behavior with G64x)
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 177
B1: Continuous-path mode, Exact stop, Look Ahead
3.3 Continuous-path mode
The units positions (E) define the behavior for G643, the tens positions (Z) the behavior for
G642:
Value E or Z Meaning
0 All axes:
Rounding by maintaining the maximum permitted path deviation:
MD33100 $MA_COMPRESS_POS_TOL
1 Geometry axes:
Rounding by maintaining the contour tolerance:
SD42465 $SC_SMOOTH_CONTUR_TOL
Remaining axes:
Rounding by maintaining the maximum permitted path deviation:
MD33100 $MA_COMPRESS_POS_TOL
2 Geometry axes:
Rounding by maintaining the orientation tolerance:
SD42466 $SC_SMOOTH_ORI_TOL
Remaining axes:
Rounding by maintaining the maximum permitted path deviation:
MD33100 $MA_COMPRESS_POS_TOL
3 Geometry axes:
Rounding by maintaining the contour tolerance and the orientation tolerance:
SD42465 $SC_SMOOTH_CONTUR_TOL
SD42466 $SC_SMOOTH_ORI_TOL
Remaining axes:
Rounding by maintaining the maximum permitted path deviation:
MD33100 $MA_COMPRESS_POS_TOL
4 All axes:
The rounding length programmed with ADIS or with ADISPOS is used (as in case of
G641).
Any axis-specific tolerance or contour and orientation tolerance specifications are
ignored.
Basic Functions
178 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
B1: Continuous-path mode, Exact stop, Look Ahead
3.3 Continuous-path mode
Value Meaning
< 100: A profile of the limit velocity is calculated within the rounding area, based on the defined
maximum values for acceleration and jerk on the participating axes or path.
This can lead to an increase in the path velocity in the rounding area and therefore to
the acceleration of the participating axes.
≥100: A profile of the limit velocity is not calculated for rounding blocks with G641/G642. A
constant velocity limit is specified instead.
This prevents the participating axes being accelerated into the rounding area during
rounding with G641/G642. However, in certain cases, this setting can cause the
rounding blocks to be traversed too slowly, especially in large rounding areas.
1xx: No velocity profile for G641
2xx: No velocity profile for G642
Note
MD28530 $MC_MM_PATH_VELO_SEGMENTS (number of memory elements for limiting
the path velocity)
Supplementary conditions
Restriction for protection zones with active radius compensation and tool orientation:
Although tool radius compensation is applied for a tool orientation, which is not perpendicular
to one of the three datum planes of the basic coordinate system, the protection zones are
not rotated onto the corresponding plane.
For G643 the following must apply:
MD28530 $MC_MM_PATH_VELO_SEGMENTS > 0 (number of memory elements for
limiting the path velocity)
If this condition is met, then it must be applicable for all axes:
MD35240 $MC_ACCEL_TYPE_DRIVE = FALSE (acceleration characteristic DRIVE for axes
on/off)
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 179
B1: Continuous-path mode, Exact stop, Look Ahead
3.3 Continuous-path mode
Function
Maximizing the dynamic response of the axes is key to this type of continuous-path mode
with rounding.
Note
Rounding with G644 is only possible if:
• All the axes involved contain only a linear motion in both the observed blocks.
• No kinematic transformation is active
In case an involved axis contains a polynomial (polynomial programmed, spline active,
compressor active) or a kinematic transformation is active, the block transition is rounded
with G642.
Activation
Continuous-path mode with rounding with the maximum possible axial dynamic response
can be activated in any NC part program block by the modal command G644.
Selecting the exact stop which works on a block-by-block basis enables rounding to be
interrupted (G9).
Continuous-path mode with rounding with the maximum possible axial dynamic response
(G644) can be deactivated by selecting:
● Modal exact stop (G60)
● Continuous-path mode G64, G641, G642, G643 or G645
Parameterization
Rounding behavior with G644 is configured via the thousands and tens of thousands places
in the machine data:
MD20480 $MC_SMOOTHING_MODE (rounding behavior with G64x)
Value Meaning
Thousand's place:
0xxx: When rounding with G644, the maximum deviations for each axis specified by the
following machine data are respected:
MD33100 $MA_COMPRESS_POS_TOL
If the dynamics of the axis permit, then any specified tolerance is not utilized.
1xxx: Input the maximum rounding path by programming ADIS=... or ADISPOS=...(as for G641)
Basic Functions
180 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
B1: Continuous-path mode, Exact stop, Look Ahead
3.3 Continuous-path mode
Value Meaning
2xxx: Input the maximum possible frequencies of each axis in the rounding area using the
machine data:
MD32440 $MA_LOOKAH_FREQUENCY (smoothing frequency for LookAhead)
The rounding area is defined so that no frequencies in excess of the specified maximum
can occur while the rounding motion is in progress.
3xxx: Any axis that has a velocity jump at a corner traverses around the corner with the
maximum possible dynamic response (maximum acceleration and maximum jerk).
SOFT:
If SOFT is active, the maximum acceleration and the maximum jerk of each axis is
maintained.
BRISK:
If BRISK is active, only the maximum acceleration and not the maximum jerk of each axis
is maintained.
With this setting, neither the maximum deviations nor the rounding distance are checked.
The resulting deviations or rounding distances are determined exclusively by the dynamic
limits of the respective axis and the current path velocity.
4xxx: As in case of 0xxx, the maximum deviations of each axis specified with the following
machine data are used:
MD33100 $MA_COMPRESS_POS_TOL
Contrary to 0xxx, the specified tolerance is also utilized, if possible. Therefore, the axis
does not attain its maximum possible dynamics.
5xxx: As in case of 1xxx, the maximum possible rounding path is specified through
programming of ADIS=... or ADISPOS= respectively.
Contrary to 1xxx, the specified rounding path is also utilized, if possible. Therefore, the
axes involved do not attain their maximum possible dynamics.
Note
Apart from the ones mentioned, the following limitation can also become active additionally:
The rounding distance cannot exceed half the length of the original participating blocks.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 181
B1: Continuous-path mode, Exact stop, Look Ahead
3.3 Continuous-path mode
Jerk limitation
The smoothing of the velocity jump on each axis and thus the shape of the rounding path
depends on whether an interpolation is performed with or without jerk limitation.
Without jerk limitation the acceleration of each axis reaches its maximum value in the entire
rounding area.
9HORFLW\
3RVLWLRQ
7LPH
With jerk limitation, the jerk of each axis is limited to its maximum value within the rounding
area. The rounding motion thus generally consists of three phases:
Basic Functions
182 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
B1: Continuous-path mode, Exact stop, Look Ahead
3.3 Continuous-path mode
● Phase 1
During phase 1, each axis builds up its maximum acceleration. The jerk is constant and
equal to the maximum possible jerk on the respective axis.
● Phase 2
During phase 2, the maximum permissible acceleration is applied.
● Phase 3
During phase 3, which is the last phase, the acceleration of each axis is reduced back to
zero with the maximum permissible jerk.
9HORFLW\
3RVLWLRQ
7LPH
Function
In continuous-path mode with rounding, rounding blocks are also only generated on
tangential block transitions if the curvature of the original contour exhibits a jump in at least
one axis.
The rounding motion is defined here so that the acceleration of all axes involved remains
smooth (no jumps) and the parameterized maximum deviations from the original contour
(MD33120 $MA_PATH_TRANS_POS_TOL) are not exceeded.
In the case of angular, non-tangential block transitions, the rounding behavior is the same as
with G642 (see Section "Rounding in compliance with defined tolerances (G642/G643)
(Page 176)").
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 183
B1: Continuous-path mode, Exact stop, Look Ahead
3.3 Continuous-path mode
Activation/deactivation
Continuous-path mode with rounding of tangential block transitions can be activated in any
NC part program block by the modal command G645.
Selecting the exact stop which works on a block-by-block basis enables rounding to be
interrupted (G9).
Continuous-path mode with rounding of tangential block transitions (G645) can be
deactivated by selecting:
● Modal exact stop (G60)
● Continuous-path mode G64, G641, G642, G643 or G644
Parameterization
The following machine data indicates the maximum permissible path deviation for each axis
during rounding with G645:
MD33120 $MA_PATH_TRANS_POS_TOL
This value is only of relevance to tangential block transitions with variable acceleration.
When angular, non-tangential block transitions are rounded, (as with G642) the tolerance
from MD33100 $MA_COMPRESS_POS_TOL becomes effective.
See also
Free-form surface mode: Basic functions (Page 211)
Basic Functions
184 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
B1: Continuous-path mode, Exact stop, Look Ahead
3.3 Continuous-path mode
Example
Programmed: Two traversing blocks N10 and N20 with programmed rounding G641.
The traversing motion is interrupted in the rounding area. The axes, e.g. manually, are then
traversed to the REPOS start point. Depending on the selected REPOS mode, the
repositioning on the contour is made at the points ①, ② or ③.
5(326VWDUWLQJSRLQW
50%%/
50,%/50(%/
,QWHUUXSWLRQSRLQW
501%/
1
7UDYHOGLUHFWLRQ
$SSUR[LPDWHSRVLWLRQLQJ
EORFN 1
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 185
B1: Continuous-path mode, Exact stop, Look Ahead
3.3 Continuous-path mode
3.3.4 LookAhead
Function
LookAhead is a function which is active in continuous-path mode (G64, G64x) and
determines a foreseeable velocity control for multiple NC part program blocks over and
beyond the current block.
Note
LookAhead is only available for path axes, not for spindles and positioning axes.
If a part program contains consecutive blocks with very small paths, only one velocity is
reached per block without LookAhead, enabling deceleration of the axes at the end of the
block while maintaining acceleration limits. This means that the programmed velocity is not
reached at all. With LookAhead, however, it is possible to implement the acceleration and
deceleration phase over multiple blocks with approximately tangential block transitions,
thereby achieving a higher feedrate with shorter distances.
)HHG
SURJUDPPHG
)
*/RRN$KHDGYHORFLW\FRQWURO
*&RQVWDQWYHORFLW\SKDVHFDQQRWEHDFKLHYHG
Figure 3-5 Velocity control with short distances and exact stop G60 or continuous-path mode G64
with LookAhead
Deceleration to velocity limits is possible with LookAhead such that violation of the
acceleration and velocity limit is prevented.
LookAhead takes plannable velocity limits into consideration such as:
● Exact stop at block end
● Velocity limit in the block
● Acceleration limit in the block
● Velocity limit on block transition
● Synchronization with block change at block transition.
Basic Functions
186 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
B1: Continuous-path mode, Exact stop, Look Ahead
3.3 Continuous-path mode
Mode of operation
LookAhead carries out a block-specific analysis of velocity limits and specifies the required
brake ramp profile based on this information. LookAhead is adapted automatically to block
length, braking capacity and permissible path velocity.
For safety reasons, the velocity at the end of the last prepared block must initially be
assumed to be zero because the next block might be very small or be an exact-stop block,
and the axes must have been stopped by the end of the block.
With a series of blocks with high set velocity and very short paths, the speed can be
increased in each block depending on the velocity value currently calculated by the
LookAhead function in order to achieve the required set velocity. After this it can be reduced
so that the velocity at the end of the last block considered by the LookAhead function can be
zero. This results in a serrated velocity profile (see the following fig.) which can be avoided
by reducing the set velocity or increasing the number of blocks considered by the
LookAhead function.
YVHW
Y Y DFW
Figure 3-6 Example for modal velocity control (number of blocks considered by the LookAhead
function = 2)
Activation/deactivation
LookAhead is activated by selecting continuous-path mode G64, G641, G642, G643, G644
or G645.
Selecting the exact stop which works on a non-modal basis enables rounding to be
interrupted (G09).
LookAhead is deactivated by selecting the modal exact stop (G60).
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 187
B1: Continuous-path mode, Exact stop, Look Ahead
3.3 Continuous-path mode
Parameterization
Number of blocks
To achieve reliable axis traversal in continuous-path mode, the feedrate must be adapted
over several blocks. The number of blocks considered by the LookAhead function is
calculated automatically and can, if required, be limited by a machine data. The default
setting is "1", which means that LookAhead only considers the following block for velocity
control.
Because LookAhead is especially important for short blocks (relative to the deceleration
path), the number of blocks required is of interest for LookAhead braking. It is sufficient to
consider the path length to be equal to the deceleration path that is required to brake from
maximum velocity to standstill.
For a machine with a low axial acceleration of a = 1 m/s2 and a high feedrate of
vpath = 10 m/min, the following number of nLookAhead blocks are allocated to the controller
where it has has an attainable block cycle time of TB = 10 ms:
nLookAhead = Deceleration path/Block length = ( vpath2 / (2a)) / (vpath * TB) = 9
Considering these conditions, it is advisable to adapt the feedrate over 10 blocks. The
number of blocks entered for the LookAhead function forecast does not change the
LookAhead algorithm and memory requirement.
Since the machining velocity is very often set to a lower value than the maximum velocity in
a program, more blocks than are required would be predicted, overloading the processor
unnecessarily. For this reason, the required number of blocks is derived from the velocity
which is calculated from the following multiplication:
● Programmed velocity * MD12100 $MN_OVR_FACTOR_LIMIT_BIN
(when using a binary-coded feedrate override switch)
● Programmed velocity * MD12030 $MN_OVR_FACTOR_FEEDRATE[30]
(when using a gray-coded feedrate override switch)
The value for MD12100 or the 31st override value for MD12030 defines the dynamic
response reserves which the velocity control provides for when the path feed is overshot.
Note
The 31st override value for MD12030 should correspond to the highest override factor which
is actually used.
Note
The number of blocks considered by the LookAhead function is limited by the possible
number of NC blocks in the IPO buffer.
Basic Functions
188 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
B1: Continuous-path mode, Exact stop, Look Ahead
3.3 Continuous-path mode
Velocity profiles
In addition to the fixed, plannable velocity limitations, LookAhead can also take account of
the programmed velocity. This makes it possible to achieve a lower velocity by applying
LookAhead beyond the current block.
● Determination of the following block velocity
One possible velocity profile contains the determination of the following block velocity.
Using information from the current and the following NC block, a velocity profile is
calculated from which, in turn, the required velocity reduction for the current override is
derived.
The calculated maximum value of the velocity profile is limited by the maximum path
velocity.
With this function it is possible to initiate a speed reduction in the current block taking
override into account such that the lower velocity of the following block can be achieved.
If the reduction in velocity takes longer than the travel time of the current block, the
velocity is further reduced in the following block. Velocity control is only ever considered
for the following block.
The function is activated via the machine data:
MD20400 $MC_LOOKAH_USE_VELO_NEXT_BLOCK
Value Meaning
TRUE Function active
FALSE Function not active
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 189
B1: Continuous-path mode, Exact stop, Look Ahead
3.3 Continuous-path mode
In this way, a reduction of the velocity continuing into the block in which it is programmed
can be avoided.
If velocity reductions across block boundaries are required at a 100% override, a point
should be set in the lower override range as well.
The number of override points used per channel is specified in the machine data:
MD20430 $MC_LOOKAH_NUM_OVR_POINTS (number of override switch points for
LookAhead)
The associated points are stored in the machine data:
MD20440 $MC_LOOKAH_OVR_POINTS (prepared override velocity characteristics with
LookAhead)
Example:
Limiting velocity characteristics, whereby:
– Override = 50%, 100% or 150%
– Number of LookAhead blocks = 4
– MD20430 $MC_LOOKAH_NUM_OVR_POINTS = 2
– MD20440 $MC_LOOKAH_OVR_POINTS = 1.5, 0.5
– MD20400 $MC_LOOKAH_USE_VELO_NEXT_BLOCK = 1
Y 9HORFLW\SURJUHVVLRQZLWKDQGRYHUULGH
Y PD[
3URJUDPPHG
VHWSRLQW
9HORFLW\SURILOHDQG
Basic Functions
190 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
B1: Continuous-path mode, Exact stop, Look Ahead
3.3 Continuous-path mode
Note
If neither of the procedures has been activated, the setpoint velocity is always applied in the
current block.
Note
Plannable velocity limits restrict override-specific velocity limits.
Supplementary conditions
Axis-specific feed stop/axis disable
Axis-specific feed stop and axis-specific axis disable are ignored by LookAhead.
If an axis is to be interpolated that should on the other hand be made stationary by axis-
specific feed stop or axis disable, LookAhead does not stop path motion before the block in
question but decelerates in the block itself.
If this response is not wanted, an axis-specific feed stop can be transferred to a channel via
the PLC to stop the path immediately (see also Section "Clamping monitoring (Page 86)").
Function
The "Free-form surface mode: Extension function" is an extension of the LookAhead
standard functionality and is used to calculate the path velocity profile during free-form
surface processing (see also Section "Free-form surface mode: Basic functions
(Page 211)").
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 191
B1: Continuous-path mode, Exact stop, Look Ahead
3.3 Continuous-path mode
Applications
The "Free-form surface mode: Extension function" is used to process workpieces which
primarily comprise free-form surfaces.
Note
As better results are not achieved for standard processing applications, standard LookAhead
functionality should be used in these cases.
Requirements
● The function is only effective:
– In AUTOMATIC
– In acceleration mode: acceleration with jerk limit (SOFT)
● Activation is only possible if the requisite memory is configured:
MD28533 $MC_MM_LOOKAH_FFORM_UNITS = <value>
Sensible value assignment depends upon the part program, the block lengths, the axial
dynamic response, as well as upon an active kinematic transformation.
The following setting applies as a guideline for processing free-form surfaces: 18
Note
Due to the additional storage requirements, MD28533 should only be set for the channels
in which free-form surfaces are being processed.
Basic Functions
192 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
B1: Continuous-path mode, Exact stop, Look Ahead
3.3 Continuous-path mode
Activation/deactivation
The function can be switched on or off independently for every dynamic response mode (see
Section "Dynamic response mode for path interpolation (Page 209)"):
MD20443 $MC_LOOKAH_FFORM[<n>]= <value>
Index <n> Dynamic response mode <value> Free-form surface mode: Extension
function
0 Standard dynamic response 0 Off
settings (DYNNORM) 1 On
1 Positioning mode, tapping 0 Off
(DYNPOS) 1 On
2 Roughing (DYNROUGH) 0 Off
1 On
3 Finishing (DYNSEMIFIN) 0 Off
1 On
4 Smooth finishing (DYNFINISH) 0 Off
1 On
The "Free-form surface mode: Extension function" is typically only active if the "Free-form
surface mode: Basic functions" are also active. Therefore, the settings in
MD20443 $MC_LOOKAH_FFORM[<n>] should correspond to the settings in
MD20606 $MC_PREPDYN_SMOOTHING_ON[<n>].
The standard LookAhead functionality is active in the dynamic response modes in which the
"Free-form surface mode: Extension function" is switched off.
Programming
Generally speaking, the "Free-form surface mode: Extension function" becomes effective as
a result of a change in the dynamic response mode in the part program.
Example
The following parameters are assumed:
MD20443 $MC_LOOKAH_FFORM[0] = 0
MD20443 $MC_LOOKAH_FFORM[1] = 0
MD20443 $MC_LOOKAH_FFORM[2] = 1
MD20443 $MC_LOOKAH_FFORM[3] = 1
MD20443 $MC_LOOKAH_FFORM[4] = 1
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 193
B1: Continuous-path mode, Exact stop, Look Ahead
3.3 Continuous-path mode
Note
When switching between the standard LookAhead functionality and the "Free-form surface
mode: Extension function" or vice versa, continuous-path mode is interrupted by an
interpolator stop.
Supplementary conditions
Automatic function switchover
Applying the following functions when the "Free-form surface mode: Extension function"
leads to an automatic switchover to standard LookAhead functionality:
● Thread cutting/tapping (G33, G34, G35, G331, G332, G63)
● Path master-value coupling
● Punching, nibbling
● Cartesian PTP travel
The "Free-form surface mode: Extension function" is then switched on again automatically.
Basic Functions
194 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
B1: Continuous-path mode, Exact stop, Look Ahead
3.4 Dynamic adaptations
Introduction
The velocity control function utilizes the specified axial dynamic response. If the programmed
feedrate cannot be achieved, the path velocity is brought to the parameterized axial limit
values and the limit values of the path (velocity, acceleration, jerk). This can lead to repeated
braking and acceleration on the path.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 195
B1: Continuous-path mode, Exact stop, Look Ahead
3.4 Dynamic adaptations
If a short acceleration takes place during a machining function with high path velocity, and is
thus followed almost immediately by braking, the reduction in the machining time is only
minimal. Acceleration of this kind can, however, have undesirable effects if, for example, it
results in machine resonance.
In some applications in mold making, especially in the case of high-speed cutting, it is
desirable to achieve a constant path velocity. In these cases, it can therefore be reasonable
to sacrifice transient acceleration processes in favor of a smoother tool path velocity.
Function
If the "smoothing the path velocity" function is active, a smoothing factor, which determines
the maximum permissible productivity loss, takes effect with a view to achieving smoother
path velocity control: Acceleration processes which contribute less than this factor to a
shorter program runtime are not performed. Account is only taken of acceleration processes
whose frequencies lie above the configurable limit frequencies of of the axes involved.
Benefits:
● Avoidance of excitations of possible machine resonance due to continuous, transient
braking and acceleration processes (in the area of less IPO cycles).
● Avoidance of constantly varying cutting rates due to acceleration which brings no
significant shortening of the program running time.
Note
The smoothing of the path velocity does not lead to contour errors.
Variations in axis velocity due to curvatures in the contour at constant path velocity may
continue to occur and are not reduced with this function.
Variations in path velocity due to the input of a new feedrate are not changed either. This
remains the responsibility of the programmer of the subprogram.
Requirements
● The smoothing of the path velocity is only effective in continuous-path mode with
LookAhead over multiple blocks with SOFT and BRISK. Smoothing is not effective with
G0.
● The controller's cycle times must be configured in such a way that preprocessing can
prepare sufficient blocks to enable an acceleration process to be analyzed.
Basic Functions
196 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
B1: Continuous-path mode, Exact stop, Look Ahead
3.4 Dynamic adaptations
Activation/deactivation
The "smoothing of the path velocity" function is activated/deactivated with the machine data:
MD20460 $MC_LOOKAH_SMOOTH_FACTOR (smoothing factor for LookAhead)
Value Meaning
0.0 Smoothing of the path velocity not active (default)
>0 Smoothing of the path velocity active
Parameterization
Smoothing factor
The smoothing factor is set via the channel-specific machine data:
MD20460 $MC_LOOKAH_SMOOTH_FACTOR (smoothing factor for LookAhead)
The percentage value defines how much longer a processing step without
accelerations/decelerations may be than the corresponding step with
accelerations/decelerations.
This would be a "worst-case" value, if all accelerations within the part program, except the
initial approach motion, were smoothed. The actual extension will always be smaller, and
may even be 0, if the criterion is not met by any of the accelerations. Values between 50 and
100% may also be entered without significantly increasing the machining time.
Consideration of the programmed feed
The path velocity can be smoothed with or without taking the programmed feedrate into
consideration. The selection is made via the machine data:
MD20462 $MC_LOOKAH_SMOOTH_WITH_FEED (path smoothing with programmed
feedrate)
Value Meaning
0 Programmed feedrate is not taken into consideration.
1 Programmed feedrate is considered (default setting).
When considering the programmed feedrate, the specified smoothing factor (see MD20460)
is maintained better when the override is 100%.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 197
B1: Continuous-path mode, Exact stop, Look Ahead
3.4 Dynamic adaptations
Note
If vibrations are generated in the mechanical system of an axis and if the corresponding
frequency is known, MD32440 should be set to a value smaller than this frequency.
The needed resonance frequencies can be calculated using the built-in measuring functions.
Mode of operation
The minimum value for MD32440 is calculated as fpath on the basis of the axes involved in
the path. For the smoothing only those acceleration processes are taken into consideration,
in which the start and the end velocity of this motion are reached within the time given below:
t = t2 - t1 = 2 / fpath
These acceleration processes are dispensed with if the resulting extension in the processing
time does not exceed the limit specified in excess of the smoothing factor (MD20460).
Example
The following parameters are assumed:
MD20460 $MC_LOOKAH_SMOOTH_FACTOR = 10%
MD32440 $MA_LOOKAH_FREQUENCY[AX1] = 20 Hz
MD32440 $MA_LOOKAH_FREQUENCY[AX2] = 20 Hz
MD32440 $MA_LOOKAH_FREQUENCY[AX3] = 10 Hz
The path involves the three axes X = AX1, Y = AX2, Z = AX3.
The minimum value of MD32440 for these three axes is thus 10 Hz. This means that any
acceleration, which is completed within a period of t2 - t1 = 2/10 Hz = 200 ms, is examined.
The time t2 is the time it takes to reach velocity v1 again following an acceleration process
starting from velocity v1. The extending of the execution time is also only considered within
this range.
Basic Functions
198 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
B1: Continuous-path mode, Exact stop, Look Ahead
3.4 Dynamic adaptations
If the time t2 - t1 is greater than 200 ms or if the additional program execution time t3 - t2 is
more than 10% (= MD20460) of t2 - t1, the following time characteristic applies:
Y
Y
W W W
If, however, the time t2 - t1 is less than 200 ms or if the additional program execution time t3 -
t2 is no more than 10% of t2 - t1, the following time characteristic applies:
Y
Y
W
W W W
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 199
B1: Continuous-path mode, Exact stop, Look Ahead
3.4 Dynamic adaptations
Function
Highly dynamic acceleration and deceleration processes during machining can cause
excitation of mechanical vibrations of machine elements and consequently a reduction of the
surface quality of the workpiece.
The dynamic response of the acceleration and deceleration processes can be adapted to the
machine conditions using the "adaptation of the dynamic path response" function.
Note
The "adaptation of the dynamic path response" function only concerns the resulting path and
not the deceleration and acceleration processes of the individual axes involved in the path.
For this reason, critical deceleration and acceleration processes of the axes with respect to
the excitation of mechanical vibrations can occur due to discontinuous contour profiles or
kinematic transformations, even with a constant path velocity profile.
Effectiveness
The "adaptation of the dynamic path response" function is only effective during path motions:
● Continuous-path mode (G64, G64x)
In continuous-path mode, the optimal effect of the dynamic response adaptation is
attained with an active 100% override. Considerable deviations from this value or
functions that cause the path axes to decelerate (e.g. auxiliary function outputs to the
PLC) greatly reduce the desired action.
● Exact stop (G60)
In addition, the "adaptation of the dynamic path response" function is not active during path
motions:
● Programmed rapid traverse (G0)
● Changes in the override value
● Stop requests during motion (e.g. NC Stop, NC Reset)
● "Velocity-dependent path acceleration" function (DRIVE) is active
Basic Functions
200 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
B1: Continuous-path mode, Exact stop, Look Ahead
3.4 Dynamic adaptations
Activation/deactivation
The function is activated/deactivated with the machine data:
MD20465 $MC_ADAPT_PATH_DYNAMIC (adaptation of the dynamic path response)
Value Meaning
= 1.0 Dynamic adaptation not active (default setting)
> 1.0 Dynamic adaptation active
When activation takes place, the "smoothing the path velocity" function is always activated
internally in continuous-path mode as well (see Section "Smoothing of the path velocity
(Page 195)").
If the smoothing factor (MD20460 $MC_LOOKAH_SMOOTH_FACTOR) is set to 0%
(= function deactivated; default!), a smoothing factor of 100% is used as a substitute. For a
smoothing factor other than 0%, the set value takes effect.
Parameterization
Adaptation factor of the dynamic path response
Via the adaptation factor of the dynamic path response, temporary changes in the path
velocity are executed with smaller dynamic response limit values.
The adaptation factor is to be set on a channel-specific basis:
● For traversing motions with acceleration without jerk limitation (BRISK) via:
MD20465 $MC_ADAPT_PATH_DYNAMIC[ 0 ]
→ The adaptation factor acts on the acceleration.
● For traversing motions with acceleration with jerk limitation (SOFT) via:
MD20465 $MC_ADAPT_PATH_DYNAMIC[ 1 ]
→ The adaptation factor acts on the jerk.
Axis-specific limit frequencies
The dynamic response limiting should only be active during deceleration and acceleration
processes that trigger mechanical vibrations larger than a specific limiting frequency, thus
causing excitation of machine resonances.
This limit frequency from which the dynamic response limiting activates, is specified on an
axis-specific basis via the machine data:
MD32440 $MA_LOOKAH_FREQUENCY (smoothing frequency for LookAhead)
For further information, see Section "Smoothing of the path velocity (Page 195)".
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 201
B1: Continuous-path mode, Exact stop, Look Ahead
3.4 Dynamic adaptations
Mode of operation
During processing and via all the axes involved in the path, the controller cyclically
establishes the minimum of all the limit frequencies to be the limit frequency (f) for the
adaptation of the dynamic response and calculates the relevant time window (tadapt) from this:
tadapt = 1 / f
The size of the relevant time window tadapt determines the further behavior:
1. The time needed to change the velocity is less than tadapt:
The acceleration rates are reduced by a factor > 1 and ≤ the value written in machine
data:
MD20465 ADAPT_PATH_DYNAMIC (adaptation of the path dynamics)
The reduction in acceleration rate increases the time taken to change the velocity.
The following cases are different:
– The acceleration rate is reduced with a value less than MD20465 so that the process
lasts for tadapt [s]. The permitted reduction does not need to be fully utilized.
– The acceleration time is reduced with the value written in MD20465. The process lasts
less than tadapt despite the reduced acceleration. The permitted reduction was fully
utilized.
2. The time needed to change the velocity is greater than tadapt:
No dynamic response adaptation is required.
Example
The following example is intended to show the effect of the "adaptation of the dynamic path
response" function on traversing motions with acceleration and without jerk limitation
(BRISK).
The following parameters are assumed:
Note
To illustrate the effect of dynamic response adaptation, the value for the smoothing factor
(MD20460) is set to "1", whereby the "smoothing of the path velocity" function is practically
deactivated.
Basic Functions
202 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
B1: Continuous-path mode, Exact stop, Look Ahead
3.4 Dynamic adaptations
If only axes AX1 and/or AX3 are involved in path motions, all deceleration and acceleration
processes that would last less than TAX1 = TAX3 are adapted.
The relevant time window is marked tadapt... in the figures below.
Y
%
WDGDSW
Y WDGDSW
WDGDSW WDGDSW
W W W W W W W W W
Figure 3-9 Path velocity profile optimized for time without smoothing or dynamic adaptation
response
Y
%
WDGDSW
WDGDSW
WDGDSW
Y
W
W W W W W W W W
Figure 3-10 Path velocity profile with adaptation of dynamic path response
Intervals t0 - t1 and t2 - t3: The acceleration process between t0 - t1 and the deceleration
process between t2 - t3 are extended in terms of time to
tadapt01 or tadapt23 as a result of the acceleration being adapted.
Interval t4 - t5: The acceleration process between t4 - t5 is executed with an
acceleration reduced by the maximum adaptation factor of
1.5. However, the acceleration process is completed before
time tadapt45.
Interval t6 - t7: The deceleration process between t6 - t7 remains unchanged
as it lasts longer than tadapt67.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 203
B1: Continuous-path mode, Exact stop, Look Ahead
3.4 Dynamic adaptations
Procedure
The determination of the dynamic response limits for the traversing of path axes by means of
acceleration with jerk limiting (SOFT) is described below. This procedure can be applied by
analogy to the case of acceleration without jerk limiting (BRISK).
1. Deactivate the "adaptation of the dynamic path response" function:
MD20465 $MC_ADAPT_PATH_DYNAMIC[1] = 1
2. Observe the positioning behavior of each path axis at different traversing velocities.
When doing so, set the jerk such that the desired positioning tolerance is maintained.
Note
The higher the traversing velocity from which the positioning process is started, the
higher in general the jerk can be set.
3. Use the maximum permissible jerk determined for the least critical traversing velocity:
MD32431 $MA_MAX_AX_JERK (maximum jerk)
4. Determine the FAPD factor for all of the path axes using:
FAPD = (largest determined jerk) / (smallest determined jerk)
Note
The smallest determined jerk is the value for the jerk during the most critical traversing
velocity.
5. Enter the largest FAPD factor that was determined via all the path axes as the value for the
adaptation factor for the path dynamic response:
MD20465 $MC_ADAPT_PATH_DYNAMIC[ 1 ] = FAPD
Basic Functions
204 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
B1: Continuous-path mode, Exact stop, Look Ahead
3.4 Dynamic adaptations
3.4.4 Interaction between the "smoothing of the path velocity" and "adaptation of the
path dynamic response" functions
The following examples serve to illustrate the interaction between the "smoothing of the path
velocity" and "adaptation of the path dynamic response" functions in continuous-path mode.
Example 1
Acceleration mode: BRISK
The path involves the 3 axes X = AX1, Y = AX2, Z = AX3.
The following parameters are assumed:
MD20465 $MC_ADAPT_PATH_DYNAMIC[0] = 3
MD20460 $MC_LOOKAH_SMOOTH_FACTOR = 80.0
MD32440 $MA_LOOKAH_FREQUENCY[AX1] = 20 TAX1 = 1/20 Hz = 50 ms
MD32440 $MA_LOOKAH_FREQUENCY[AX2] = 20 TAX2 = 1/20 Hz = 50 ms
MD32440 $MA_LOOKAH_FREQUENCY[AX3] = 20 TAX3 = 1/20 Hz = 50 ms
Y
%
Y
Y
W W W W W W
Figure 3-11 Path velocity profile optimized for time without smoothing or dynamic adaptation
response
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 205
B1: Continuous-path mode, Exact stop, Look Ahead
3.4 Dynamic adaptations
Y
%
Y
W
W
W
W W
W
Figure 3-12 Path velocity profile with smoothing of the path velocity and adaptation of dynamic path
response
Interval t1 - t2: The acceleration and deceleration process between t1 and t2 does not
take place because the lengthening of the machining time without the
acceleration process to v12 is less than the resulting time if a smoothing
factor of 80 % is applied.
Interval t3 - t5: The acceleration and braking profile between t3 and t5 does not fulfill
this condition or takes longer than the parameterized smoothing time
TAxn = 2/20 Hz = 100 ms.
Effects of the dynamic response adaptation:
Note
The example shows that those acceleration or deceleration processes that are not
eliminated by the smoothing of the path velocity can be subsequently optimized by adapting
the dynamic path response. For this reason, both functions should always be activated, if
possible.
Basic Functions
206 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
B1: Continuous-path mode, Exact stop, Look Ahead
3.4 Dynamic adaptations
Example 2
Acceleration mode: SOFT
The path involves the 3 axes X = AX1, Y = AX2, Z = AX3.
The following parameters are assumed:
MD20465 $MC_ADAPT_PATH_DYNAMIC[1] = 1
MD20460 $MC_LOOKAH_SMOOTH_FACTOR = 0.0
MD32440 $MA_LOOKAH_FREQUENCY[AX1] = 10 TAX1 = 1/20 Hz = 100 ms
MD32440 $MA_LOOKAH_FREQUENCY[AX2] = 10 TAX2 = 1/20 Hz = 100 ms
MD32440 $MA_LOOKAH_FREQUENCY[AX3] = 20 TAX3 = 1/20 Hz = 50 ms
This leads to a path velocity profile which is optimized in terms of time without smoothing the
path velocity or adapting the dynamic path response:
/LPLWLQJRISDWKYHORFLW\EDVHGRQG\QDPLF
D[LVUHVSRQVHRUSURJUDPPHGIHHG
3DWKYHORFLW\FKDUDFWHULVWLF
7LPHLQLQWHUSRODWLRQF\FOHV
%ORFNFKDQJHPDUNHUV
MD20465 $MC_ADAPT_PATH_DYNAMIC[1] = 4
MD20460 $MC_LOOKAH_SMOOTH_FACTOR = 1.0
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 207
B1: Continuous-path mode, Exact stop, Look Ahead
3.4 Dynamic adaptations
This results in a path velocity profile with adaptation of the dynamic path response and with
minimum, and thus virtually deactivated, smoothing of the path velocity:
6PRRWKHUSDWKYHORFLW\GXHWRORZHUSDWKMHUN
7LPHLQLQWHUSRODWLRQF\FOHV
The smoothing factor is set to 0% instead of 1% (in accordance with the default!):
1RDFFHOHUDWLRQRUEUDNLQJHIIHFWRISDWKVPRRWKLQJ
6PRRWKHUSDWKYHORFLW\GXHWR
UHGXFHGSDWKMHUN
7LPHLQLQWHUSRODWLRQF\FOHV
Basic Functions
208 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
B1: Continuous-path mode, Exact stop, Look Ahead
3.4 Dynamic adaptations
Function
Technology-specific, dynamic response settings can be saved in machine data and can be
activated in the part program via the commands from G function group 59 (dynamic
response mode for path interpolation).
Note
The dynamic response of the path axes alone is determined by the commands from G
function group 59 (dynamic response mode for path interpolation). They have no effect on:
• Positioning axes
• PLC axes
• Command axes
• Motions based on axis coupling
• Overlaid motions with handwheel
• JOG motions
• Reference point approach (G74)
• Fixed-point approach (G75)
• Rapid traverse motion (G0)
The standard dynamic response setting (DYNNORM) always takes effect for these axis
motions.
Application
By switching the dynamic response settings, roughing can be optimized in terms of time and
smoothing can be optimized in terms of the surface, for example.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 209
B1: Continuous-path mode, Exact stop, Look Ahead
3.4 Dynamic adaptations
Parameterization
Note
Writing the machine data without an index places the same value in all field elements of the
relevant machine data.
Reading the machine data without an index always supplies the value of the field with
index 0.
Basic Functions
210 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
B1: Continuous-path mode, Exact stop, Look Ahead
3.4 Dynamic adaptations
Suppressing G commands
It is recommended that G commands from G function group 59 (dynamic response mode for
path interpolation) which are not intended for use should be suppressed via the following
machine data:
MD10712 $MN_NC_USER_CODE_CONF_NAME_TAB[<n>] (list of reconfigured NC
commands)
When using a suppressed G command, an alarm is displayed in order to ensure that no non-
parameterized machine data takes effect.
Example
The G commands DYNPOS and DYNSEMIFIN can be suppressed with the following settings:
● MD10712 $MN_NC_USER_CODE_CONF_NAME_TAB[0]="DYNPOS"
● MD10712 $MN_NC_USER_CODE_CONF_NAME_TAB[1]=" "
● MD10712 $MN_NC_USER_CODE_CONF_NAME_TAB[2]="DYNSEMIFIN"
● MD10712 $MN_ NC_USER_CODE_CONF_NAME_TAB[3]=" "
References
You can find further information about programming the G commands from G function group
59 (dynamic response mode for path interpolation) in:
References:
Programming Manual, Fundamentals; Section: Path action
Introduction
In applications in tool and mold making, it is important that the surfaces on the workpiece are
as uniform as possible. This requirement is generally more important than the precision of
the surface of the workpiece.
Workpiece surfaces which lack uniformity can be attributable to the following causes, for
example:
● The part program for manufacturing the workpiece contains a non-uniform geometry.
This, most notably, affects the profile of the curvature and torsion.
Note
The curvature k of a contour is the inverse of radius r of the nestling circle in a contour
point (k = 1/r). The torsion is the change in curvature (first derivative).
As a result of the lack of uniformity in geometry, the machine's dynamic response limits
are reached during processing of the part program, and needless deceleration and
acceleration processes occur. Depending on the extent of the effective over-travel of the
axes, this leads to different deviations in contours.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 211
B1: Continuous-path mode, Exact stop, Look Ahead
3.4 Dynamic adaptations
● Needless deceleration and acceleration processes can trigger machine vibrations which
result in unwanted marks on the workpiece.
There are various options available for eliminating these causes:
● The part programs generated by the CAD/CAM system contain a very uniform curvature
and torsion profile, preventing needless reductions in path velocity.
● The maximum path velocity is determined in such a way that unwanted geometric
fluctuations in the curvature and torsion profile have no effect.
Function
"Free-form surface mode: Basic functions" can be used to make the definition of path
velocity limits insensitive to small geometric fluctuations in curvature and torsion without
exceeding the machine's dynamic limits in terms of the acceleration and jerk of the axes.
This has the following advantages:
● Greater uniformity in the profile of the path velocity
● Greater uniformity in the surface of the workpiece
● Reduction in the processing time (if the dynamic response of the machine permits it)
Applications
The function is used to process workpieces which primarily comprise free-form surfaces.
Requirements
The function can only be activated if the requisite memory capacity is reserved during
memory configuration:
MD28610 $MC_MM_PREPDYN_BLOCKS = 10
The value entered prescribes the number of blocks which have to be taken into
consideration in the determination of the path velocity (velocity preparation).
A sensible value is "10".
If MD28610 has a value of "0", only the motions of the axes in a particular block are taken
into consideration when determining the maximum velocity of the path for that block. If the
geometry of neighboring blocks is also taken into consideration when determining the
velocity of the path (value > 0), a more uniform profile in path velocity is achieved.
Basic Functions
212 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
B1: Continuous-path mode, Exact stop, Look Ahead
3.4 Dynamic adaptations
Activation/deactivation
The function can be switched on or off independently for every dynamic response mode (see
Section "Dynamic response mode for path interpolation (Page 209)"):
MD20606 $MC_PREPDYN_SMOOTHING_ON[<n>] = <value>
Index <n> Dynamic response mode <value> Free-form surface mode: Basic
functions
0 Standard dynamic response 0 Off
settings (DYNNORM) 1 On
1 Positioning mode, tapping 0 Off
(DYNPOS) 1 On
2 Roughing (DYNROUGH) 0 Off
1 On
3 Finishing (DYNSEMIFIN) 0 Off
1 On
4 Smooth finishing (DYNFINISH) 0 Off
1 On
Note
Due to the additional storage requirements, the function should only be activated in the
relevant processing channels.
Parameterization
Change in the contour sampling factor
The secant error which occurs during the interpolation of curved contours is dependent on
the following factors:
● Curvature
● Interpolation cycle (display in the MD10071 $MN_IPO_CYCLE_TIME)
● Velocity with which the relevant contour is traversed
The maximum possible secant error is defined for each axis in the machine data:
MD33100 $MA_COMPRESS_POS_TOL (maximum tolerance with compression)
If the set interpolation cycle is not sufficiently small, the max. path velocity may be reduced in
the case of contours with greater curvature. This is necessary for ensuring that the surface of
the workpiece is also produced with an adequate degree of precision in this case.
By changing the contour sampling factor, the time interval with which a curved contour is
sampled in the interpolator (contour sampling time) can be set at variance with the
interpolation cycle. A contour sampling time which is shorter than the interpolation cycle can
prevent a reduction in path velocity in the case of contours with greater curvature.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 213
B1: Continuous-path mode, Exact stop, Look Ahead
3.4 Dynamic adaptations
Note
MD10680 is specifically set for every controller model and cannot be changed.
Programming
Depending on the setting in machine data MD20606 $MC_PREPDYN_SMOOTHING_ON,
"Free-form surface mode: Basic functions" can be switched on and off in the part program by
changing the active dynamic response mode.
Example:
By assigning the parameters MD20606 $MC_PREPDYN_SMOOTHING_ON[2-4] = 1 and
MD20606 $MC_PREPDYN_SMOOTHING_ON[0-1] = 0, the function can be switched on via
the commands DYNROUGH, DYNSEMIFIN, and DYNFINISH and switched off via the commands
DYNNORM and DYNPOS.
See also
Rounding of tangential block transitions (G645) (Page 183)
Velocity-dependent jerk adaptation (axis-specific) (Page 255)
Free-form surface mode: Extension function (Page 191)
Basic Functions
214 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
B1: Continuous-path mode, Exact stop, Look Ahead
3.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
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
For SINUMERIK 828D, NC block compression is only available for the milling versions.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 215
B1: Continuous-path mode, Exact stop, Look Ahead
3.5 Compressor functions
Parameterization
The following machine and setting data must be set for the parameterization of the NC block
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.
Basic Functions
216 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
B1: Continuous-path mode, Exact stop, Look Ahead
3.5 Compressor functions
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:
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 217
B1: Continuous-path mode, Exact stop, Look Ahead
3.5 Compressor functions
Deactivation
All compressor functions are deactivated using the COMPOF command.
References
The programming of the compressor functions is described in:
Programming Manual Work Preparation
The use of the compressor function with active orientation transformation is described in:
Function Manual Special Functions; Multi-Axis Transformations (F2),
Section: Compression of the orientation
See also
Tolerance and compression of G0 blocks (Page 223)
Function
During the preparation of spline blocks, blocks with short lengths can always occur between
blocks with long lengths. This can mean that the path velocity must always be significantly
reduced before these short blocks.
With the "Combine short spline blocks" function, the spline blocks are prepared in such a
way that blocks with short lengths are avoided and therefore traversing can be performed
smoothly with a high path velocity.
Note
NC block compressor
The NC block compressor (COMPON, COMPCURV or COMPCAD) cannot be employed while
compressing spline blocks, since with this only linear blocks can be compressed.
Availability
System Availability
SINUMERIK 840D sl Standard (basic scope)
SINUMERIK 828D Option
Basic Functions
218 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
B1: Continuous-path mode, Exact stop, Look Ahead
3.5 Compressor functions
Activation
The "Combine short spline blocks" function can be activated for the following spline types:
● BSPLINE
● BSPLINE/ORICURVE
● CSPLINE
Supplementary conditions
● Spline blocks can only be combined if no other functions are programmed except
traversing motions and feedrate. With, for example, auxiliary functions that are output on
the PLC, the spline blocks cannot be combined.
● The maximum number of blocks that can be combined into a program section in
succession, depends on the size of the memory available for blocks in the block
preparation.
MD28070 $MC_MM_NUM_BLOCKS_IN_PREP (number of blocks for block preparation)
Example
In order to attain a higher path velocity when executing the following program, the "Combine
short spline blocks" function is activated for BSPLINE interpolation:
MD20488 $MC_SPLINE_MODE, Bit 0 = 1
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 219
B1: Continuous-path mode, Exact stop, Look Ahead
3.6 Contour/Orientation tolerance
Basic Functions
220 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
B1: Continuous-path mode, Exact stop, Look Ahead
3.6 Contour/Orientation tolerance
Note
The programmed tolerance also acts upon functions which are only implicitly dependent
upon the tolerance. These are currently:
• Limiting the chord error in the setpoint value calculation
• The basic functions of the free-form surface mode
Note
The following rounding functions are not affected by the programming of CTOL, OTOL, and
ATOL:
• Rounding orientation with OSD
Reason: OSD does not use a tolerance, it uses a distance from the block transition.
• Rounding with G644
Reason: G644 is not used for processing, it is used for optimizing tool changes and other
movements in air.
• Rounding block transitions with uniform tangents and non-uniform curvature with G645
G645 virtually always behaves like G642 and, thus, uses the programmed tolerances.
The tolerance value from machine data MD33120 $MA_PATH_TRANS_POS_TOL is only
used in uniformly tangential block transitions with a jump in curvature, e.g. a tangential
circle/straight line transition. The rounding path at these points may also be located
outside the programmed contour, where many applications are less tolerant.
Furthermore, it generally takes a small, fixed tolerance to compensate for the sort of
changes in curvature which need not concern the NC programmer.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 221
B1: Continuous-path mode, Exact stop, Look Ahead
3.6 Contour/Orientation tolerance
Note
If no tolerance values have been programmed, the $A variables will not be differentiated
sufficiently to distinguish potential differences in the tolerances of the individual functions,
since they can only declare one value.
Circumstances like this can occur if the machine data and the setting data set different
tolerances for compressor functions, smoothing and orientation smoothing. The variables
then return the greatest value prevailing with regard to the currently active functions.
If, for example, a compressor function is active with an orientation tolerance of 0.1° and
ORISON orientation smoothing with 1°, the $AC_OTOL variable will return the value "1". If
orientation smoothing is deactivated, only the value "0.1" will remain to be read.
Basic Functions
222 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
B1: Continuous-path mode, Exact stop, Look Ahead
3.7 Tolerance and compression of G0 blocks
Note
If no tolerance values have been programmed, the $P variables return the value "-1".
Function
The function "Tolerance and compression of G0 blocks" allows rapid traverse motion to be
executed faster.
It consists of the following components:
1. Configuring/programming an independent tolerance factor for G0 motion
Using this factor, the tolerances for G0 motion can be set differently to the workpiece
machining tolerances.
2. Compressing G0 blocks
If this functionality is selected, for active NC block compression, in addition to traversing
blocks with G1 (straight line interpolation), traversing blocks with G0 (rapid traverse) are
compressed.
Effectiveness
1. The G0 tolerance factor is only effective, if:
● One of the following functions is active:
– Compressor functions: COMPON, COMPCURV and COMPCAD
– Smoothing functions: G642 and G645
– Orientation smoothing: OST
– Orientation smoothing: ORISON
– Smoothing for path-relevant orientation: ORIPATH
● Several (≥ 2) consecutive G0 blocks in the part program.
For a single G0 block, the G0 tolerance factor is not effective, as at the transition from a
non G0 motion to a G0 motion (and vice versa), the "lower tolerance" always applies
(workpiece machining tolerance)!
2. The compression of G0 blocks becomes effective:
● For NC block compression (COMPON, COMPCURV or COMPCAD).
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 223
B1: Continuous-path mode, Exact stop, Look Ahead
3.7 Tolerance and compression of G0 blocks
Configuration
G0 tolerance factor
The G0 tolerance factor is set channel-specific with the machine data:
MD20560 $MC_G0_TOLERANCE_FACTOR (tolerance factor for G0)
The G0 tolerance factor can be both greater or less than 1.0. If the factor equals 1.0 (default
value), then the same tolerances for G0 blocks are effective as for non-G0 blocks. Normally,
the G0 tolerance factor is set to ≥ 1.0.
Compressing G0 blocks
The compression of G0 blocks is set for specific channels using the hundreds position in the
machine data:
MD20482 $MC_COMPRESSOR_MODE (mode of compression)
Value Meaning
0xx Circular blocks and G0 blocks are not compressed.
1xx Circular blocks are compressed. Only COMPCAD.
2xx G0 blocks are compressed.
See also MD20560 $MC_G0_TOLERANCE_FACTOR or NC command STOLF
3xx Circular blocks and G0 blocks are compressed.
Programming
The tolerance factor set using MD20560 $MC_G0_TOLERANCE_FACTOR can be
temporarily overwritten by programming STOLF in the part program:
Syntax: STOLF=<…>
Example:
Basic Functions
224 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
B1: Continuous-path mode, Exact stop, Look Ahead
3.7 Tolerance and compression of G0 blocks
The value in MD20560 is not changed by programming the tolerance factor. After a reset or
end of part program, the value set using MD20560 is effective again.
● Without preprocessing stop in the part program via the system variable:
If no value with STOLF is programmed in the active part program, then these two system
variables supply the value set using MD20560 $MC_G0_TOLERANCE_FACTOR.
If no rapid traverse (G0) is active in a block, then these system variables always supply a
value of 1.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 225
B1: Continuous-path mode, Exact stop, Look Ahead
3.8 RESET behavior
MD20150
The channel-specific initial state is activated via a RESET for G function groups:
MD20150 $MC_GCODE_RESET_VALUES (initial setting of the G groups)
The following G function groups are of relevance to "continuous-path mode, exact stop,
LookAhead":
● Group 10: Exact stop - continuous-path mode
● Group 12: Block-change criterion for exact stop
● Group 21: Acceleration profile
● Group 30: NC block compression
● Group 59: Dynamic response mode for path interpolation
For detailed information on setting initial states, see Section "K1: Mode group, channel,
program operation, reset response (Page 451)".
Basic Functions
226 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
B1: Continuous-path mode, Exact stop, Look Ahead
3.10 Data lists
Effects
If a block change cannot be executed in continuous path mode, all axes programmed in this
part program block (except cross-block traversing special axes) are stopped. In this case,
contour errors do not occur.
The stopping of path axes during machining can cause undercuts on the workpiece surface.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 227
B1: Continuous-path mode, Exact stop, Look Ahead
3.10 Data lists
Basic Functions
228 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
B1: Continuous-path mode, Exact stop, Look Ahead
3.10 Data lists
3.10.3 Signals
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 229
B1: Continuous-path mode, Exact stop, Look Ahead
3.10 Data lists
Basic Functions
230 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
B2: Acceleration 4
4.1 Brief description
4.1.1 General
Scope of functions
The Description of Functions covers the following sub-functions:
● Acceleration
● Jerk
● Kneeshaped acceleration characteristic
Acceleration and jerk
The effective acceleration and jerk can be optimally matched to the machine and machining
situation concerned using axis- and channel-specific programmable maximum values,
programmable acceleration profiles in part programs and synchronized actions, and dynamic
adaptations and limitations.
Kneeshaped acceleration characteristic
The knee-shaped acceleration characteristic means that, in the case of machine axes
featuring a motor (in particular stepper motors) with a torque characteristic that is highly
dependent upon speed, acceleration can be set at the level required to ensure optimum
utilization of the motor whilst at the same time protecting it against overload.
4.1.2 Features
Acceleration
Axis-specific functions:
● Programmable maximum acceleration value
● Acceleration profile that can be selected via part-program instruction:
Acceleration without jerk limitation (BRISKA)
● Setting of maximum value using part-program instruction (ACC)
● Specific maximum value for programmed rapid traverse (G00).
● Specific maximum value for traverse with active jerk limitation
● Excessive acceleration for non-tangential block transitions
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 231
B2: Acceleration
4.1 Brief description
Channel-specific functions:
● Acceleration profile that can be selected via part-program instruction:
Acceleration without jerk limitation (BRISK)
● Programmable constant travel time for the purpose of avoiding extreme sudden
acceleration
● Programmable acceleration margin for overlaid traversing
● Adjustable acceleration limitation
● Adjustable acceleration for specific real-time events
● Programmable acceleration margin for radial acceleration
Jerk
Axis-specific functions:
● Acceleration profile that can be selected via part-program instruction:
Acceleration with jerk limitation (SOFTA)
● Programmable maximum jerk value for single-axis interpolation
● Programmable maximum jerk value for path interpolation
Channel-specific functions:
● Acceleration profile that can be selected via part-program instruction:
Acceleration with jerk limitation (SOFT)
● Adjustable jerk limitation
● Adjustable path jerk for specific real-time events
● Specific maximum value for programmed rapid traverse (G00)
● Excessive jerk for block transitions without constant curvature
Basic Functions
232 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
B2: Acceleration
4.2 Functions
4.2 Functions
General Information
In the case of acceleration without jerk limitation (jerk = infinite) the maximum value is
applied for acceleration immediately. As regard to acceleration with jerk limitation, it differs in
the following respects:
● Advantages
Shorter processing times with the same maximum values for velocity and acceleration.
● Disadvantages
Increased load on the machine's mechanical components and risk of inducing high-
frequency and difficult-to-control mechanical vibrations.
Acceleration profile
D
DPD[
DPD[
YPD[
W W W W
Figure 4-1 Velocity and acceleration schematic for stepped acceleration profile
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 233
B2: Acceleration
4.2 Functions
The following features of the acceleration profile can be identified from the figure above:
● Time: t0
Sudden acceleration from 0 to +amax
● Interval: t0 - t1
Constant acceleration with +amax; linear increase in velocity
● Time: t1
Sudden acceleration from 2 * amax with immediate switchover from acceleration to braking
Note
The sudden acceleration can normally be avoided by specifying a constant velocity time
(see Section "Constant travel time (channel-specific) (Page 237)").
● Interval: t1 - t2
Constant acceleration with -amax; linear decrease in velocity
4.2.1.2 Parameterization
Note
It is possible for the maximum value to be exceeded in connection with specific machining
situations (see Section "Acceleration matching (ACC) (axis-specific) (Page 238)" and "Path
acceleration for real-time events (channel-specific) (Page 241)").
Basic Functions
234 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
B2: Acceleration
4.2 Functions
<mode> Meaning
0 Effective maximum axial acceleration: MD32300 $MA_MAX_AX_ACCEL[ 0 ]
1 Effective maximum axial acceleration: MD32300 $MA_MAX_AX_ACCEL[ 1 ]
4.2.1.3 Programming
Syntax
BRISK
Functionality
The BRISK part-program instruction is used to select the "without jerk limitation" acceleration
profile for the purpose of path acceleration.
G group: 21
Effective: Modal
Reset response
The channel-specific initial setting is activated via a reset:
MD20150 $MC_GCODE_RESET_VALUES[20]
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 235
B2: Acceleration
4.2 Functions
Supplementary conditions
If the acceleration profile is changed in a part program during machining (BRISK/SOFT) an
exact stop is performed at the end of the block.
Syntax
BRISKA (axis{,axis})
Function
The BRISKA part-program command is used to select the "without jerk limitation" acceleration
profile for single-axis movements (JOG, JOG/INC, positioning axis, reciprocating axis, etc.).
G group: -
Effectiveness: Modal
Axis:
● Value range: Axis name of the channel axes
Reset behavior
The axis-specific initial setting is activated via a reset:
MD32420 $MA_JOG_AND_POS_ENABLE
Basic Functions
236 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
B2: Acceleration
4.2 Functions
Overview
In the case of acceleration without jerk limitation, sudden acceleration of 2 * amax occurs on
switchover between acceleration and braking. In order to avoid this sudden acceleration, a
channel-specific constant travel time can be programmed. The constant travel time defines
the time taken to traverse between the acceleration and braking phases at constant velocity:
MD20500 $MC_CONST_VELO_MIN_TIME (minimum time with constant velocity)
Note
The constant travel time is ineffective:
• Active function: Look Ahead
• In traversing blocks with a travel time that is less or equal to the interpolation cycle time.
D
DPD[
DPD[
Y
YPD[
W W W
W W
W W
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 237
B2: Acceleration
4.2 Functions
The effect of the constant travel time can be seen from the figure above:
● Time: t1
End of acceleration phase with sudden acceleration 1 * amax
● Interval: t1 - t2
Acceleration 0; constant velocity using the parameterized constant travel time
● Time: t2
Start of braking phase with sudden acceleration 1 * amax
The times t0, t1' and t2' indicate the characteristic that would have been produced had no
constant travel time been defined.
4.2.2.2 Parameterization
The constant travel time is parameterized for specific channels using machine data:
MD20500 $MC_CONST_VELO_MIN_TIME
(minimum time with constant velocity)
Function
A part-program command (ACC) can be used to match the acceleration of specific axes to the
current machining situation. The range used for this purpose is anywhere between greater
than 0% and less than or equal to 200% of the maximum value programmed in the machine
data.
Effectiveness
Effective Acceleration matching is effective for all types of interpolation in AUTOMATIC and
MDA operating modes as well as with dry-run feed.
Ineffective Acceleration matching is ineffective in JOG and JOG/REF (reference point
approach) operating modes.
Acceleration matching is also ineffective if the machine axes have been brought to a
standstill via a quick stop due to the detection of a fault (setpoint = 0).
4.2.3.2 Programming
Syntax
ACC[axis] = adjustment factor
Basic Functions
238 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
B2: Acceleration
4.2 Functions
Functionality
The ACC part-program command is used to adjust the maximum acceleration value of a
machine axis.
Axis:
● Value range: Axis name for the channel's machine axes
Adjustment factor:
● Value range: 0 < adjustment factor ≤ 200
● Unit: Percent
Deactivate: ACC[axis] = 100
Effectiveness: Modal
Reset behavior
The behavior during channel RESET or M30 can be controlled via MD32320
$MA_DYN_LIMIT_RESET_MASK :
Bit 0: 0 The programmed ACC value is reduced to 100% with channel RESET/M30.
Bit 0: 1 The programmed ACC value is retained beyond channel RESET/M30.
General information
Under normal circumstances, preprocessing makes maximum use of the parameterized
maximum values of the machine axes for the purpose of path acceleration. In order that an
acceleration margin may be set aside for overlaid movements, e.g., within the context of the
"Rapid lift away from the contour" function, path acceleration can be reduced by a
programmable factor. When, for example, a factor of 0.2 is applied, preprocessing will only
use 80% of the maximum possible path acceleration. 20% is set aside as an acceleration
margin for overlaid movements.
4.2.4.2 Parameterization
Parameters for the acceleration margin are assigned for each channel by means of machine
datum:
MD20610 $MC_ADD_MOVE_ACCEL_RESERVE
(acceleration margin for overlaid motions)
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 239
B2: Acceleration
4.2 Functions
General Information
To enable a flexible response to the machining situations concerned, setting data can be
used to limit the path acceleration calculated during preprocessing for specific channels:
SD42500 $SC_SD_MAX_PATH_ACCEL (maximum path acceleration)
The value specified in the setting data is only taken into account if it is smaller than the path
acceleration calculated during preprocessing.
The limitation must be activated for specific channels using setting data:
SD42502 $SC_IS_SD_MAX_PATH_ACCEL = TRUE
4.2.5.2 Parameterization
Parameterization is carried out for specific channels using setting data:
SD42500 $SC_SD_MAX_PATH_ACCEL (maximum path acceleration)
SD42502 $SC_IS_SD_MAX_PATH_ACCEL (activation of path-acceleration limitation)
4.2.5.3 Programming
Limit value
Syntax
$SC_SD_MAX_PATH_ACCEL = limit value
Functionality
The path-acceleration limitation can be adjusted for the situation by programming the setting
data.
Limit value:
● Value range: ≥ 0
● Unit: m/s2
Application:
● Part program
● Static synchronized action
Switch ON/OFF
Basic Functions
240 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
B2: Acceleration
4.2 Functions
Syntax
$SC_IS_SD_MAX_PATH_ACCEL = value
Functionality
The path-acceleration limitation can be activated/deactivated by programming the setting
data.
Parameter: Value
● Value range: TRUE, FALSE
Application:
● Part program
● Static synchronized action
General Information
So that no compromise has to be made between machining-optimized acceleration on the
one hand and time-optimized acceleration in connection with the following real-time events
on the other:
● NC Stop / NC Start
● Changing the feedrate override
● Changing the velocity default for "safely reduced velocity" within the context of the "Safety
Integrated" function
For the real-time events mentioned above, the path acceleration can be specified using a
channel-specific system variable:
$AC_PATHACC = path acceleration
Real-time event acceleration will only be active for the duration of the change in velocity in
respect of one of the real-time events specified above.
Limitation
If the specified path acceleration exceeds the capabilities of the machine axes that are of
relevance for the path, a limit will be imposed on the path acceleration within the controller
so that the resulting axial acceleration (ares) is restricted to less than 2x the parameterized
maximum axial value (amax).
ares = 2 * amax, with amax = MD32300 $MA_MAX_AX_ACCEL
Note
Path acceleration for real-time events is enabled, irrespective of the radial acceleration.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 241
B2: Acceleration
4.2 Functions
Effectiveness
Effective Real-time event acceleration is only enabled in AUTOMATIC and MDA operating
modes in conjunction with the following real-time events:
• NC Stop / NC Start
• Override changes
• Changing the velocity default for "safely reduced velocity" within the context of the
"Safety Integrated" function
Not effective Path acceleration for real-time events is ineffective for changes in path velocity that
are attributable to path planning during preprocessing for the channel, such as
contour curvatures, corners, kinematic transformation limitations, etc.
Real-time-event path acceleration is ineffective if the programmed value is smaller
than the path acceleration calculated during preprocessing for the path section
concerned.
Programming
For information about programming system variables in the part program or synchronized
actions, see Section "Programming (Page 242)".
4.2.6.2 Programming
Syntax
$AC_PATHACC = path acceleration
Functionality
Real-time-event path acceleration is set via the channel-specific system variables.
Parameter: Path acceleration
● Value range: Path acceleration ≥ 0
● Unit: m/s2
Deactivation: $AC_PATHACC = 0
Application:
● Part program
● Static synchronized action
Reset response
Real-time-event path acceleration is deactivated on reset.
Supplementary conditions
Programming $AC_PATHACC in the part program automatically triggers a preprocessing stop
with REORG (STOPRE).
Basic Functions
242 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
B2: Acceleration
4.2 Functions
4.2.7.2 Parameterization
The maximum value for axis-specific acceleration with programmed rapid traverse is
parameterized (G00) using the axis-specific machine data:
MD32434 $MA_G00_ACCEL_FACTOR
(scaling of the acceleration limitation with G00)
This is used to generate the maximum value for axis-specific acceleration with programmed
rapid traverse (G00) that is taken into account by the path planning component during
preprocessing:
Acceleration[axis] =
MD32300 $MA_MAX_AX_ACCEL * MD32434 $MA_G00_ACCEL_FACTOR
Function
Compared with acceleration without jerk limitation, acceleration with jerk limitation results in
a certain degree of time loss, even when the same maximum acceleration value is used. To
compensate for this time loss, a specific maximum value can be programmed for the axis-
specific acceleration as far as traversing of the machine axes with active jerk limitation
(SOFT/SOFTA) is concerned.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 243
B2: Acceleration
4.2 Functions
The maximum value for acceleration with active jerk limitation is parameterized using a
factor calculated in relation to the axis-specific maximum value. This is used to generate the
maximum value for axis-specific acceleration with active jerk limitation that is taken into
account by the path planning component during preprocessing:
Acceleration[axis] =
MD32300 $MA_MAX_AX_ACCEL * MD32433 $MA_SOFT_ACCEL_FACTOR
4.2.8.2 Parameterization
The maximum value for acceleration with active jerk limitation (SOFT/SOFTA) is parameterized
using the axis-specific machine data:
MD32434 $MA_SOFT_ACCEL_FACTOR
(scaling of the acceleration limitation with SOFT)
Function
In the case of non-tangential block transitions (corners), the programmable controller may
have to decelerate the geometry axes significantly in order to ensure compliance with the
parameterized axis dynamics. For the purpose of reducing/avoiding deceleration in
connection with non-tangential block transitions, a higher level of axis-specific acceleration
can be enabled.
Excessive acceleration is parameterized using a factor calculated in relation to the axis-
specific maximum value. This is used to generate the maximum value for axis-specific
acceleration with non-tangential block transitions that is taken into account by the path
planning component during preprocessing:
Acceleration[axis] =
MD32300 $MA_MAX_AX_ACCEL * MD32310 $MA_MAX_ACCEL_OVL_FACTOR
4.2.9.2 Parameterization
Excessive acceleration for non-tangential block transitions is parameterized using the axis-
specific machine data:
MD32310 $MA_MAX_ACCEL_OVL_FACTOR
(overload factor for velocity jumps)
Basic Functions
244 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
B2: Acceleration
4.2 Functions
Overview
In addition to the path acceleration (tangential acceleration), radial acceleration also has an
effect on curved contours. If this is not taken into account during parameterization of the path
parameters, the effective axial acceleration during acceleration and deceleration on the
curved contour can, for a short time, reach 2x the maximum value.
1
1
DSDWK
DUDGLDO
1
Radial acceleration =
MD20602 $MC_CURV_EFFECT_ON_PATH_ACCEL * MD32300 $MA_MAX_AX_ACCEL
Path acceleration =
(1 - MD20602 $MC_CURV_EFFECT_ON_PATH_ACCEL) * MD32300
$MA_MAX_AX_ACCEL
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 245
B2: Acceleration
4.2 Functions
Example
The following machine parameters apply:
● MD32300 $MA_MAX_AX_ACCEL for all geometry axes: 3 m/s
● Maximum path velocity with a path radius of 10 mm due to mechanical constraints of the
machine: 5 m/min.
The radial acceleration is calculated as follows:
Y SDWK >PPLQ@
D UDGLDO PV
U>PP@
>PV @
0'0&B&859B())(&7B21B3$7+B$&&(/
Linear motions
The acceleration margin referred to above is ineffective in the case of linear motions (linear
interpolation) without active kinematic transformation.
4.2.10.2 Parameterization
The proportion of maximum available axis acceleration to be taken into account as an
acceleration margin for radial acceleration on curved contours is parameterized using the
channel-specific machine data:
MD20602 $MC_CURV_EFFECT_ON_PATH_ACCEL
(influence of path curvature on dynamic path response)
Overview
As far as the functionality described in the rest of this document is concerned, constant
acceleration, i.e., acceleration with jerk limitation (jerk = infinite value), is the assumed
acceleration profile. In the case of acceleration with jerk limitation, linear interpolation is
applied in respect of acceleration from 0 to the maximum value.
Basic Functions
246 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
B2: Acceleration
4.2 Functions
Advantages
Minimal load on the machine's mechanical components and low risk of high-frequency and
difficult-to-control mechanical vibrations thanks to constant excessive acceleration.
Disadvantages
Longer machining times compared with stepped acceleration profile when the same
maximum velocity and acceleration values are used.
Acceleration profile
U
UPD[
UPD[
D
DPD[
DPD[
Y
YPD[
W W W W W W W W
Figure 4-4 Jerk, acceleration and velocity schematic with jerk limitation acceleration profile
The following features of the acceleration profile can be identified from the figure above:
● Interval: t0 - t1
Constant jerk with +rmax; linear increase in acceleration; quadratic increase in velocity
● Interval: t1 - t2
Constant acceleration with +amax; linear increase in velocity
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 247
B2: Acceleration
4.2 Functions
● Interval: t2 - t3
Constant jerk with -rmax; linear decrease in acceleration; quadratic decrease in excessive
velocity until maximum value +vmax is reached
● Interval: t3 - t4
Constant jerk with +rmax; linear increase in braking acceleration; quadratic decrease in
velocity
● Interval: t4 - t5
Constant braking acceleration with -amax; linear decrease in velocity
● Interval: t5 - t6
Constant jerk with -rmax; linear decrease in braking acceleration; quadratic decrease in
velocity reduction until zero velocity is reached v = 0
4.2.11.2 Parameterization
Note
It is possible for the maximum value to be exceeded in connection with specific machining
situations (see Section "Path jerk for real-time events (channel-specific) (Page 252)").
Basic Functions
248 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
B2: Acceleration
4.2 Functions
4.2.11.3 Programming
Syntax
SOFT
Functionality
The SOFT part-program instruction is used to select the acceleration profile with jerk
limitation for the traversing operations of geometry axes in the channel.
G group: 21
Effective: Modal
Reset response
The channel-specific initial setting is activated via a reset:
MD20150 $MC_GCODE_RESET_VALUES[20]
Boundary conditions
If the acceleration mode is changed in a part program during machining (BRISK ↔ SOFT), a
block change is performed at the point of transition with an exact stop at the end of the block,
even in continuous-path mode.
4.2.12.1 Parameterization
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 249
B2: Acceleration
4.2 Functions
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]
4.2.12.2 Programming
Syntax
SOFTA (Axis {Axis})
Functionality
The SOFTA part-program command is used to select acceleration with jerk limitation for single-
axis movements (positioning axis, reciprocating axis, etc.)
G group: -
Effectiveness: Modal
Axis:
● Value range: Axis name of the channel axes
Reset behavior
The axis-specific initial setting is activated via a reset:
MD32420 $MA_JOG_AND_POS_ENABLE
Basic Functions
250 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
B2: Acceleration
4.2 Functions
Overview
To enable a flexible response to the machining situations concerned, setting data can be
used to limit the path jerk calculated during preprocessing for specific channels:
SD42510 $SC_SD_MAX_PATH_JERK (maximum path jerk)
The value specified in the setting data is only taken into account in the channel if it is smaller
than the path jerk calculated during preprocessing.
The limitation must be activated for specific channels using setting data:
SD42512 $SC_IS_SD_MAX_PATH_JERK = TRUE
4.2.13.2 Parameterization
Parameterization is carried out for specific channels using setting data:
SD42510 $SC_SD_MAX_PATH_JERK (maximum path jerk)
SD42512 $SC_IS_SD_MAX_PATH_JERK
(activation of path-jerk limitation)
4.2.13.3 Programming
Syntax
$SC_SD_MAX_PATH_JERK = jerk value
Functionality
The path-jerk limitation can be adjusted for the situation by programming the setting data.
Jerk value:
● Value range: ≥ 0
● Unit: m/s3
Application:
● Part program
● Static synchronized action
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 251
B2: Acceleration
4.2 Functions
Switch ON/OFF
Syntax
$SC_IS_SD_MAX_PATH_JERK = value
Functionality
The path-jerk limitation can be activated/deactivated by programming the setting data.
Parameter: Value
● Value range: TRUE, FALSE
Application:
● Part program
● Static synchronized action
Overview
So that no compromise has to be made between machining-optimized jerk on the one hand
and time-optimized jerk in connection with the following real-time events on the other:
● NC Stop / NC Start
● Changing the feedrate override
● Changing the velocity default for "safely reduced velocity" within the context of the "Safety
Integrated" function
for the real-time events mentioned, the path jerk can be specified using a channel-specific
system variable:
$AC_PATHJERK = path jerk
Path jerk for real-time events will only be active for the duration of the change in velocity in
respect of one of the real-time events specified above.
Limitation
As the jerk is not a physical variable of any relevance to the drive, no limit is imposed on the
jerk set.
Basic Functions
252 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
B2: Acceleration
4.2 Functions
Effectiveness
Effective Path jerk for real-time events is only enabled in AUTOMATIC and MDA operating
modes in conjunction with the following real-time events:
• NC Stop / NC Start
• Override changes
• Changing the velocity default for "safely reduced velocity" within the context of
the "Safety Integrated" function
Not effective Path jerk for real-time events is ineffective for changes in the path velocity that are
attributable to path planning during preprocessing for the channel, such as contour
curvatures, corners, kinematic transformation limitations, etc.
Path jerk for real-time events is ineffective if the programmed value is smaller than
the path jerk calculated during preprocessing for the path section concerned.
Programming
For the purpose of setting the jerk for real-time events in accordance with the acceleration,
the system variables can be set as follows:
$AC_PATHJERK = $AC_PATHACC/smoothing time
● $AC_PATHACC: Path acceleration [m/s2]
Smoothing time: Freely selectable, e.g. 0.02 s
For information about programming system variables in the part program or synchronized
actions, see Section "Programming (Page 253)".
4.2.14.2 Programming
Syntax
$AC_PATHJERK = path jerk
Functionality
The path jerk for real-time events is set via the channel-specific system variables.
Jerk value:
● Value range: Path jerk ≥ 0
● Unit: m/s3
Application:
● Part program
● Static synchronized action
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 253
B2: Acceleration
4.2 Functions
Reset behavior
The function is deactivated on reset.
Boundary conditions
Programming $AC_PATHJERK in the part program automatically triggers a preprocessing
stop with REORG (STOPRE).
Overview
Frequently, the maximum jerk for the machine axes involved in the machining process must
be set lower than the machine's performance capability officially allows because of the
supplementary conditions associated with the specific process concerned.
For time-optimized traversing of the machine axes with programmed rapid traverse (part-
program instruction G00), a specific maximum value can be programmed for the axis-
specific jerk.
4.2.15.2 Parameterization
The maximum value for axis-specific jerk with programmed rapid traverse is parameterized
(G00) using the axis-specific machine data:
MD32434 $MA_G00_ACCEL_FACTOR
(scaling of the acceleration limitation with G00)
This is used to generate the maximum value for axis-specific jerk with programmed rapid
traverse (G00) that is taken into account by the path planning component during
preprocessing:
Jerk[axis] =
MD32431 $MA_MAX_AX_JERK * MD32435 $MA_G00_JERK_FACTOR
Basic Functions
254 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
B2: Acceleration
4.2 Functions
4.2.16 Excessive jerk for block transitions without constant curvature (axis-specific)
Overview
In the case of block transitions without constant curvature (e.g. straight line > circle), the
programmable controller has to decelerate movement of the geometry axes significantly in
order to ensure compliance with the parameterized axis dynamics. For the purpose of
reducing/avoiding deceleration in connection with block transitions without constant
curvature, a higher level of axis-specific jerk can be enabled.
The excessive jerk is parameterized using a dedicated axis-specific maximum value.
4.2.16.2 Parameterization
The excessive jerk for block transitions without constant curvature is parameterized using
the axis-specific machine data:
MD32432 $MA_PATH_TRANS_JERK_LIM
(excessive jerk for block transitions without constant curvature)
Function
The dynamic path response results from the parameterized, constant axial maximum values
for velocity, acceleration and jerk of the axes involved in the path:
● MD32000 $MA_MAX_AX_VELO (maximum axis velocity)
● MD32300 $MA_MAX_AX_ACCEL (maximum axis acceleration)
● MD32431 $MA_MAX_AX_JERK (max. axial jerk for path motion)
For contours with non-constant curvature (torsion), as for example in connection with free-
form surfaces, fluctuations in the path velocity, particularly in the upper velocity range, can
result mainly due to the axial jerk. The fluctuations of the path velocity lead to adverse
affects in the surface quality.
The influence of the axial jerk on the path velocity is decreased for contours with non-
constant curvature through a velocity-dependent increase of the permissible axial jerk.
Fluctuations in the path velocity can be avoided with the appropriate parameterization.
The velocity-dependent increase of the permissible axial jerk has no effect on the maximum
possible path acceleration and path jerk. These result from the constant axial maximum
values parameterized in the in the machine data even when jerk adaptation is active.
As both curvature and torsion are zero in the case of linear motion, the velocity-dependent
jerk adaptation has no effect with linear motions.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 255
B2: Acceleration
4.2 Functions
Availability
The "velocity-dependent jerk adaptation" function is available independent of the function
"Free-form surface mode: Basic functions (Page 211)".
Parameterization
The "Velocity-dependent jerk adaptation" function is parameterized with the following
machine data:
● MD32437 $MA_AX_JERK_VEL0[<n>] = <threshold valuelower>
Lower velocity threshold of the jerk adaptation. Velocity-dependent jerk adaptation takes
effective as of this velocity.
The lower velocity threshold can be set separately via index n for each dynamic response
mode (see Section "Dynamic response mode for path interpolation (Page 209)"):
● MD32438 $MA_AX_JERK_VEL1[<n>] = <threshold valueupper>
Upper velocity threshold of the jerk adaptation. The velocity-dependent jerk reaches its
maximum value jmax parameterized with MD32439 $MA_MAX_AX_JERK_FACTOR at this
velocity.
The upper velocity threshold can be set separately via index n for each dynamic
response mode (see Section "Dynamic response mode for path interpolation
(Page 209)"):
● MD32439 $MA_MAX_AX_JERK_FACTOR = <factor>
Factor for the parameterization of the maximum velocity-dependent jerk jmax on reaching
the upper velocity threshold MD32438 $MA_AX_JERK_VEL1[<n>]:
jmax = (MD32431 $MA_MAX_AX_JERK) * (MD32439 $MA_MAX_AX_JERK_FACTOR)
The velocity-dependent jerk adaptation is active at a value > 1.0.
The velocity-dependent jerk adaptation is inactive at a value = 1.0.
Basic Functions
256 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
B2: Acceleration
4.2 Functions
0D[LPXPSHUPLVVLEOHD[LDOMHUN
M
M
Y Y $[LVYHORFLW\
Note
The velocity-dependent jerk adaptation is only active, if:
MD32439 $MA_MAX_AX_JERK_FACTOR > 1.0
Example
Example of parameter assignment:
● MD32437 $MA_AX_JERK_VEL0 = 3000 mm/min
● MD32438 $MA_AX_JERK_VEL1 = 6000 mm/min
● MD32439 $MA_MAX_AX_JERK_FACTOR[AX1] = 2.0
● MD32439 $MA_MAX_AX_JERK_FACTOR[AX2] = 3.0
● MD32439 $MA_MAX_AX_JERK_FACTOR[AX3] = 1.0
Effect
● The velocity-dependent jerk adaptation becomes active for the 1st and 2nd axis, while the
function for the 3rd axis is not active.
● The parameterized jerk is effective at axis velocities in the range of 0 to 3000 mm/min.
● The maximum jerk is linearly increased for axis velocities in the range 3000 mm/min to
6000 mm/min.
● The maximum permitted jerk of the 1st axis is, for axis velocities greater than
6000 mm/min, increased by a factor of 2 - for the 2nd axis, by factor of 3.
● The parameterized values apply in each dynamic response mode.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 257
B2: Acceleration
4.2 Functions
Overview
In certain application scenarios, e.g. when milling free-form surfaces, it may be beneficial to
smooth the position setpoint characteristics of the machine axes. This enables surface
quality to be improved by reducing the mechanical vibrations generated in the machine.
For the purpose of smoothing the position setpoint characteristic of a machine axis, a jerk
filter can be activated at position controller level, independently of the channel- and axis-
specific jerk limitations taken into account at interpolator level.
The effect of the jerk filter must be as strong as possible without having an unacceptable
impact on contour accuracy. The filter should also have as "balanced" a smoothing effect as
possible, i.e. if the same contour is traversed forwards and backwards, the contour
smoothed by the filter should be as similar as possible in both directions.
To enable the jerk filter to be optimally matched to the machine conditions, various filter
modes are available:
● 2nd-order filter (PT2)
● Sliding mean value generation
● Bandstop filter
Basic Functions
258 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
B2: Acceleration
4.2 Functions
V
V
' =
˭
I=
˭
I=
+V
V
V
' 1
˭
I1
˭
I1
where:
fZ: Numerator natural freq.
fN: Denominator natural freq.
DZ: Numerator damping
DN: Denominator damping
Since a vibration-capable filter setting is not expected to yield useful results in any case, as
with the jerk filter's "2nd-order filter" (PT2) low-pass filter (PT2) mode there is no setting
option for the denominator damping DN. The denominator damping DN is permanently set to
1.
The bandstop filter can be parameterized in two different ways:
● Real bandstop filter
● Bandstop filter with additional amplitude response increase/decrease at high frequencies
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 259
B2: Acceleration
4.2 Functions
Supplementary conditions
If too high a numerator natural frequency is selected, the filter is disabled. In this case the
limiting frequency fZmax depends on the position-control cycle:
I =PD[ 6KDQQRQ7KHRUHP
˭
7
=PLQ
˭
7
3RVLWLRQFRQWUROF\FOH
4.2.18.2 Parameterization
Activation
The jerk filter is activated using the machine data:
MD32400 $MA_AX_JERK_ENABLE (axial jerk limitation)
The jerk filter is active in all operating modes and with all types of interpolation.
Filter mode
The filter mode is selected via the machine data:
MD32402 $MA_AX_JERK_MODE
Time constant
The time constant for the axial jerk filter is set with the machine data:
MD32410 $MA_AX_JERK_TIME
The jerk filter is only effective when the time constant is greater than a position-control cycle.
Basic Functions
260 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
B2: Acceleration
4.2 Functions
Function
Various types of motor, particularly stepper motors, have a torque characteristic that is highly
dependent upon speed and shows a steep decrease in torque in the upper speed range. To
ensure optimum utilization of the motor characteristic curve, it is necessary to reduce the
acceleration once a certain speed is reached.
0>1P@
0PD[
0UHG
Q>@
QUHG QPD[
Figure 4-6 Torque characteristic curve of a motor with torque characteristic that is highly dependent
upon speed
0 = Constant characteristic
1 = Hyperbolic characteristic
2 = Linear characteristic
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 261
B2: Acceleration
4.2 Functions
The following figures show typical velocity and acceleration characteristic curves for the
respective types of characteristic:
Constant characteristic
D Y
YPD[
DPD[
DUHG YUHG
YUHG YPD[ Y W
Figure 4-7 Acceleration and velocity characteristic with acceleration reduction: 0 = constant
Hyperbolic characteristic
D Y
YPD[
DPD[
YUHG
DUHG
YUHG YPD[ Y W
Figure 4-8 Acceleration and velocity characteristic with acceleration reduction: 1 = hyperbolic
Linear characteristic
D Y
YPD[
DPD[
YUHG
DUHG
YUHG YPD[ Y W
Figure 4-9 Acceleration and velocity characteristic with acceleration reduction: 2 = linear
Basic Functions
262 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
B2: Acceleration
4.2 Functions
vmax = $MA_MAX_AX_VELO
vred = $MA_ACCEL_REDUCTION_SPEED_POINT * $MA_MAX_AX_VELO
amax = $MA_MAX_AX_ACCEL
ared = (1 - $MA_ACCEL_REDUCTION_FACTOR) * $MA_MAX_AX_ACCEL
Function
The path acceleration characteristic curve is generated on the basis of the types of
characteristic for the axes that are of relevance for the path. If axes with different types of
characteristic curve are interpolated together, the acceleration profile for the path
acceleration will be determined on the basis of the reduction type that is most restrictive.
The following order of priorities applies, whereby 1 = top priority:
1. Acceleration reduction: 0 = constant characteristic
2. Acceleration reduction: 1 = hyperbolic characteristic
3. Acceleration reduction: 2 = linear characteristic
4. No acceleration reduction effective
A situation, whereby no acceleration reduction is active, arises for example when:
MD35220 $MA_ACCEL_REDUCTION_SPEED_POINT = 1
and/or
MD35230 $MA_ACCEL_REDUCTION_FACTOR = 0
Note
Machine axes featuring stepper motor and DC drive can be interpolated together.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 263
B2: Acceleration
4.2 Functions
Function
If the programmed path cannot be traversed using the parameterized acceleration
characteristic curve (e.g., active kinematic transformation), a substitute characteristic curve
is generated by reducing the dynamic limit values. The dynamic limit values are calculated to
ensure that the substitute characteristic curve provides the best possible compromise
between maximum velocity and constant acceleration.
D
DPD[
DHUV
D
/RFNHG]RQH
DUHG
Basic Functions
264 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
B2: Acceleration
4.2 Functions
D
DPD[
Y
D1
U
DHUV
$[LDOFKDUDFWHULVWLFDY
DUHG
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 265
B2: Acceleration
4.2 Functions
Y
YPD[
YUHG
4.2.19.4 Parameterization
The knee-shaped acceleration characteristics can be activated specific to the machine axis
via the machine data:
MD35240 $MA_ACCEL_TYPE_DRIVE = TRUE
The knee-shaped acceleration characteristic curve is parameterized for specific axes using
machine data:
MD32000 $MA_MAX_AX_VELO (maximum axis velocity)
MD35220 $MA_ACCEL_REDUCTION_SPEED_POINT
(speed for reduced acceleration)
MD35230 $MA_ACCEL_REDUCTION_FACTOR (reduced acceleration)
MD32300 $MA_MAX_AX_ACCEL (Maximum axis acceleration)
MD35242 $MA_ACCEL_REDUCTION_TYPE
(type of acceleration reduction: 0 = constant, 1 = hyperbolic, 2 = linear)
Basic Functions
266 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
B2: Acceleration
4.2 Functions
4.2.19.5 Programming
Syntax
DRIVE
Functionality
The knee-shaped characteristic curve is activated for path acceleration using the DRIVE
part-program instruction.
G group: 21
Effective: Modal
Reset response
The channel-specific default setting is activated via a reset:
MD20150 $MC_GCODE_RESET_VALUES[20]
Dependencies
If the knee-shaped acceleration characteristic curve is parameterized for a machine axis,
then this becomes the default acceleration profile for all traversing operations.
If the effective acceleration profile is changed for a specific path section using the SOFT or
BRISK part-program instructions, then an appropriate substitute characteristic curve with
lower dynamic limit values is used in place of the knee-shaped acceleration characteristic
curve.
The knee-shaped acceleration characteristic curve can be reactivated by reprogramming
DRIVE.
Syntax
DRIVEA (Axis {Axis})
Functionality
The knee-shaped characteristic curve is activated for all single-axis interpolations
(positioning axis, reciprocating axis, etc.) for specific axes using the part-program command.
G group: -
Effectiveness: Modal
Axis:
● Value range: Axis name of the channel axes
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 267
B2: Acceleration
4.2 Functions
Reset behavior
The channel-specific default setting is activated via a reset:
MD20150 $MC_GCODE_RESET_VALUES[20]
Dependencies
If the knee-shaped acceleration characteristic curve is parameterized for a machine axis,
then this becomes the default acceleration profile for all traversing operations.
If the effective acceleration profile is changed for a specific axis using the SOFTA or BRISKA
part-program commands, then an appropriate substitute characteristic curve is used in place
of the knee-shaped acceleration characteristic curve.
It is possible to switch back to the knee-shaped acceleration characteristic curve for a
specific axis by programming DRIVEA.
Path interpolation
If for a machine axis involved in a programmed path the knee-shaped acceleration
characteristic parameterized without the part program instruction DRIVE is active, then a
substitute characteristic curve with reduced dynamic limiting values is determined for the
path.
Kinematic transformation
The knee-shaped acceleration characteristic is not considered in an active kinematic
transformation. With internal control, a switchover is done to acceleration without jerk
limitation (BRISK) and a substitute characteristic curve becomes active for the path
acceleration.
Basic Functions
268 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
B2: Acceleration
4.2 Functions
4.2.20.1 Parameterization
Note
MD32436 $MA_JOG_MAX_JERK is only effective when the axial jerk limitation in JOG mode
has been enabled for the machine axes to be traversed:
MD32420 $MA_JOG_AND_POS_JERK_ENABLE [<axis>] == TRUE
This is also possible by programming SOFTA(<Axis1>,<Axis2>, ... ) in the part program.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 269
B2: Acceleration
4.2 Functions
Note
With MD21166 $MC_JOG_ACCEL_GEO [<geometry axis>], there is no direct limitation to
MD32300 $MA_MAX_AX_ACCEL.
Note
When a transformation is active, MD32300 $MA_MAX_AX_ACCEL determines the maximum
possible axial acceleration.
Note
MD21168 $MC_JOG_JERK_GEO is only effective when the axial jerk limitation in JOG
mode has been enabled for the basic machine axes:
MD32420 $MA_JOG_AND_POS_JERK_ENABLE [<axis>] == TRUE
Note
Orientation axes are not affected by the machine data MD32301 $MA_JOG_MAX_ACCEL
and MD32436 $MA_JOG_MAX_JERK.
Basic Functions
270 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
B2: Acceleration
4.2 Functions
Note
Only the dynamic response mode DYNNORM is always effective for JOG mode.
Note
On the other hand the SOFT part program instruction has no effect on the JOG mode.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 271
B2: Acceleration
4.3 Examples
As with SOFTA, the part program instructions BRISKA and DRIVEA are also effective in JOG
mode, i.e. the acceleration is without jerk limitation, even when MD32420
$MA_JOG_AND_POS_JERK_ENABLE is set to "TRUE" for the relevant machine axes.
Note
The manual traversing of orientation axes is not affected by BRISKA/SOFTA/DRIVEA.
4.3 Examples
4.3.1 Acceleration
Key statement
An excerpt from a part program is provided below, together with the associated acceleration
characteristic, by way of an example. These are used to illustrate how the path velocity can
be adapted to take account of various events and the resulting change in acceleration.
Program code
; Acceleration selection in accordance with fast input 1 ($A_IN[1]):
N53 ID=1 WHEN $A_IN[1] == 1 DO $AC_PATHACC = 2.*$MA_MAX_AX_ACCEL[X]
;Approach
N1000 G0 X0 Y0 BRISK
N1100 TRANS Y=-50
N1200 AROT Z=30 G642
; Contour
N2100 X0 Y0
N2200 X = 70 G1 F10000 RNDM=10 ACC[X]=30 ACC[Y]=30
N2300 Y = 70
N2400 X0
N2500 Y0
M30
Basic Functions
272 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
B2: Acceleration
4.3 Examples
Y>PV@
$&B295
$&B295
W>PV@
1 1
Figure 4-13 Switching between path acceleration specified during preprocessing and real-time acceleration
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 273
B2: Acceleration
4.3 Examples
4.3.2 Jerk
Key statement
An excerpt from a part program is provided below, together with the associated acceleration
characteristic, by way of an example. These are used to illustrate how the path velocity can
be adapted to take account of various events and the resulting change in jerk.
Program code
; Setting of path acceleration and path jerk in the event of external intervention:
N0100 $AC_PATHACC = 0.
N0200 $AC_PATHJERK = 4. * ($MA_MAX_AX_JERK[X] + $MA_MAX_AX_JERK[Y]) / 2.
; Synchronized actions for the purpose of varying the override (simulates external
intervention):
N53 ID=1 WHENEVER ($AC_TIMEC > 16) DO $AC_OVR=10
N54 ID=2 WHENEVER ($AC_TIMEC > 30) DO $AC_OVR=100
;Approach
N1000 G0 X0 Y0 SOFT
N1100 TRANS Y=-50
N1200 AROT Z=30 G642
; Contour
N2100 X0 Y0
N2200 X = 70 G1 F10000 RNDM=10
N2300 Y = 70
N2400 X0
N2500 Y0
M30
Basic Functions
274 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
B2: Acceleration
4.3 Examples
Y>PV@
295
W>PV@
1 1
Figure 4-14 Switching between path jerk specified during preprocessing and $AC_PATHJERK
Key statement
In the following example a short part program is used to illustrate the velocity and
acceleration characteristic for the X-axis. It also shows the connection between specific
velocity and acceleration-related machine data and the contour sections they influence.
Part program
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 275
B2: Acceleration
4.3 Examples
1
1
1
1
[
0'0$;B$;B$&&(/>;@ 0'62)7B$&&(/B)$&725>;@
0'0$;B$&&(/B29/B)$&725>;@
0'0$;B$;B-(5.>;@
$[LVDFFHOHUDWLRQ
$[LVYHORFLW\ 0'3$7+B75$16B-(5.B/,0>;@
Basic Functions
276 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
B2: Acceleration
4.3 Examples
4.3.4.1 Activation
Key statement
The example given illustrates how the knee-shaped acceleration characteristic curve is
activated on the basis of:
● Machine data
● Part program instruction
Machine data
● Parameterizing the characteristic curve (example only)
Program code
X axis
MD35220 $MA_ACCEL_REDUCTION_SPEED_POINT[X] = 0.4
MD35230 $MA_ACCEL_REDUCTION_FACTOR[X] = 0.85
MD35242 $MA_ACCEL_REDUCTION_TYPE[X] = 2
MD35240 $MA_ACCEL_TYPE_DRIVE[X] = TRUE
Y axis
MD35220 $MA_ACCEL_REDUCTION_SPEED_POINT[Y] = 0.0
MD35230 $MA_ACCEL_REDUCTION_FACTOR[Y] = 0.6
MD35242 $MA_ACCEL_REDUCTION_TYPE[Y] = 1
MD35240 $MA_ACCEL_TYPE_DRIVE[Y] = TRUE
Z axis
MD35220 $MA_ACCEL_REDUCTION_SPEED_POINT[Z] = 0.6
MD35230 $MA_ACCEL_REDUCTION_FACTOR[Z] = 0.4
MD35242 $MA_ACCEL_REDUCTION_TYPE[Z] = 0
MD35240 $MA_ACCEL_TYPE_DRIVE[Z] = FALSE
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 277
B2: Acceleration
4.4 Data lists
Basic Functions
278 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
B2: Acceleration
4.4 Data lists
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 279
B2: Acceleration
4.4 Data lists
Identifier Description
$AC_PATHACC Path acceleration for real-time events
$AC_PATHJERK Path jerk for real-time events
Basic Functions
280 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
F1: Travel to fixed stop 5
5.1 Brief description
Function
With the "Travel to fixed stop" function, moving machine parts, e.g. tailstock or sleeve, can
be traversed with a defined torque against other machine parts.
Characteristics
● The clamping torque and a fixed stop monitoring window can be programmed in the part
program and can also be altered via setting data once the fixed stop has been reached.
● Travel to fixed stop is possible for axes and spindles.
● Travel to fixed stop is possible simultaneously for several axes and parallel to the
traversing of other axes.
● The reduction of the clamping torque or clamping force can be switched on and off in
synchronized actions.
● The "Travel to fixed stop" functions can also be activated via synchronized actions.
● A multi-channel block search can be performed with calculation of all the required
additional data (SERUPRO).
● The axes can be simulated with FXS and FOC.
● "Vertical" axes can also be moved with FXS to a fixed stop.
5.2.1 Programming
Function
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 281
F1: Travel to fixed stop
5.2 Detailed description
The activation can also be performed without traversing motion of the relevant axis. The
torque is immediately limited. The fixed stop is monitored as soon as the axis is traversed.
Note
Synchronized actions
The "Travel to fixed stop" function can also be controlled via synchronized actions.
References:
Function Manual, Synchronized Actions
Syntax
FXS[<axis>]=<request>
FXST[<axis>]=<clamping torque>
FXSW[<axis>] = <window width>
FOCON[<axis>]
FOCOF[<axis>]
FOC[<axis>]
Meaning
Parameters Meaning
FXS: Travel to fixed stop
Effectiveness: Modal
<Request>: Request to the "Travel to fixed stop" function:
0 = switch off
1 = switch on
FXST: Set clamping torque
<Clamping torque>: Clamping torque in % of the maximum drive torque.
SINAMICS S120: p2003
FXSW: Set monitoring window
<Window width>: Width of the tolerance window around the fixed stop
Unit: mm, inch or degrees
FOCON: Torque/force limitation: Switch on
FOCOF: Torque/force limitation: Switch off
FOC: Non-modal torque/force limitation
<axis>: Name of the channel axis
Type: AXIS
Basic Functions
282 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
F1: Travel to fixed stop
5.2 Detailed description
Axis name
Instead of a machine axis name, the names of geometry or special axes can be used if they
are assigned precisely to a machine axis and one of the following functions is not active for
the machine axis:
● Transformation
● Coupling
● Frame
Ramp-shaped change
A time within which the clamping torque should be changed can be set via the following
machine data. The change of the clamping torque is then no longer sudden, but ramp-
shaped.
MD37012 $MA_FIXED_STOP_TORQUE_RAMP_TIME (time until the new torque limit is
reached)
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 283
F1: Travel to fixed stop
5.2 Detailed description
Boundary conditions
● The traversing motion to the fixed stop can be programmed as a path- or block-related or
modal positioning axis motion.
● Travel to fixed stop can be be selected for several machine axes simultaneously.
● The travel path and the activation of the function must be programmed in one block in the
part program.
● If "Travel to fixed stop" is activated via synchronized actions, the travel path and the
activation of the function can be programmed in separate blocks.
Example
Requirement: Mapping of channel axis X on machine axis X1
Programming with a channel axis name
References:
Programming Manual, Fundamentals
Basic Functions
284 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
F1: Travel to fixed stop
5.2 Detailed description
5.2.2.1 Selection
$FWXDOSRVLWLRQDIWHUWUDYHOWR
IL[HGVWRS
)L[HGVWRS 6WDUWSRVLWLRQ
3URJUHQG PRQLWRULQJZLQGRZ
SRVLWLRQ
Procedure
The NC detects that the function "Travel to fixed stop" is selected via the command FXS[x]=1
and signals the PLC using the IS DB31, ... DBX62.4 ("Activate travel to fixed stop") that the
function has been selected.
If the machine data:
MD37060 $MA_FIXED_STOP_ACKN_MASK (monitoring PLC acknowledgements for travel
to fixed stop)
is set correspondingly, the system waits for the acknowledgement of the PLC using the IS
DB31, ... DBX3.1 ("Enable travel to fixed stop").
The programmed target position is then approached from the start position at the
programmed velocity. The fixed stop must be located between the start and target positions
of the axis/spindle. A programmed torque limit (clamping torque specified via FXST[<axis>])
is effective from the start of the block, i.e. the fixed stop is also approached with reduced
torque. Allowance for this limitation is made in the NC through an automatic reduction in the
acceleration rate.
If no torque has been programmed in the block or since the start of the program, then the
value is valid in the axis-specific machine data:
MD37010 $MA_FIXED_STOP_TORQUE_DEF (default for fixed stop clamping torque)
is entered.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 285
F1: Travel to fixed stop
5.2 Detailed description
Procedure
When the axis has reached the fixed stop, the torque in the drive is increased up to the
programmed clamping torque. How the control detects that the fixed stop has been reached,
can be set via the following machine data:
MD37040 $MA_FIXED_STOP_BY_SENSOR = <value> (fixed stop detection via sensor)
<value> Meaning
0 The fixed stop has been reached when the axial contour deviation (difference between
actual and expected following error) has exceeded the set value in the machine data:
MD37030 $MA_FIXED_STOP_THRESHOLD (threshold for fixed stop detection)
1 An external sensor detects when the fixed stop has been reached and informs the control
via the following axial NC/PLC interface signal:
DB31, ... DBX1.2 == 1 (sensor for fixed stop)
2 The fixed stop has been reached when the condition according to value == 0 or value == 1
applies.
Internal processes
Once the NC has detected the "Fixed stop reached" state, it deletes the distance-to-go and
the position setpoint is corrected. The controller enable remains active.
The PLC is then informed of the state using IS DB31, ... DBX62.5 ("Fixed stop reached").
If the machine data:
MD37060 $MA_FIXED_STOP_ACKN_MASK
is set correspondingly, then the system waits for the acknowledgement of the PLC using the
IS DB31, ... DBX1.1 ("Acknowledge fixed stop reached").
The NC then executes a block change or considers the positioning motion to be completed,
but still leaves a setpoint applied to allow the clamping torque to take effect.
The fixed stop monitoring function is activated as soon as the stop position is reached.
Basic Functions
286 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
F1: Travel to fixed stop
5.2 Detailed description
Monitoring window
If no fixed stop monitoring window was programmed in the block or from program start, then
the value set in the machine data:
MD37020 $MA_FIXED_STOP_WINDOW_DEF
(default for fixed stop-monitoring window)
is entered.
If the axis leaves the position it was in when the fixed stop was detected, then alarm 20093
"Fixed stop monitoring has responded" is displayed and the "Travel to fixed stop" function
deselected.
The window must be selected by the user such that the alarm is activated only when the axis
leaves the fixed stop position.
9$B);6
9$B);6 9$B);6 9$B);6
+LVWRU\
0'0$B),;('B6723B7+5(6+2/'
)ROORZLQJHUURU
(QGVWRSFRUUHFWO\DSSURDFKHG
%ORFNZLWK);6>[@
,6$FWLYDWH);6
,6);6UHDFKHG
%ORFNFKDQJH
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 287
F1: Travel to fixed stop
5.2 Detailed description
Procedure
If the programmed end position is reached, without detecting the state "fixed stop reached",
then depending on the state of the machine data:
MD37050 $MA_FIXED_STOP_ALARM_MASK = 0 (release of fixed stop alarms)
the alarm 20091 "Fixed stop not reached" is output.
Function abort
If the "Travel to fixed stop" function is aborted owing to a pulse disable, cancelation of PLC
acknowledgements or a Reset in the approach block, the display or suppression of alarm
20094 can be controlled via machine data:
MD37050 $MA_FIXED_STOP_ALARM_MASK = 3
Basic Functions
288 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
F1: Travel to fixed stop
5.2 Detailed description
(QGVWRSLVQRWUHDFKHG
)ROORZLQJHUURU
%ORFNZLWK);6>[@
,6$FWLYDWH);6
%ORFNFKDQJH
5.2.2.4 Deselection
Procedure
With the deselection of the function FXS[<axis>]=0, a preprocessing stop (STOPRE) is
triggered.
The torque limitation and monitoring of the fixed stop monitoring window are canceled.
The NC/PLC interface signals are reset:
DB31, ... DBX62.4 = 0 (activate travel to fixed stop)
DB31, ... DBX62.5 = 0 (fixed stop reached)
Depending on the machine data:
MD37060 $MA_FIXED_STOP_ACKN_MASK
wait for the acknowledgement:
DB31, ... DBX3.1 == 0 (enable travel to fixed stop)
DB31, ... DBX1.1 == 0 (acknowledge fixed stop reached)
The axis will then change to position control. The correction of the position setpoint is
terminated and a synchronization to the new actual position is carried out. The axis can be
traversed again.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 289
F1: Travel to fixed stop
5.2 Detailed description
If the pulse enable is removed during an active deselection of the function (state: "Waiting for
PLC acknowledgements"), the torque limit is reduced to zero. During this phase, torque is no
longer built up if the pulse enable is set again. Once the deselection has been completed,
you can continue traversing as normally.
9$B);6 6ZLWFKRQSRVLWLRQFRQWUROOHU
9$B);6 9$B);6
$[LVLVDWHQGVWRS );6H[LWHG
)ROORZLQJHUURU
%ORFNZLWK);6>[@
,6$FWLYDWH);6
,6);6UHDFKHG
%ORFNFKDQJH
Basic Functions
290 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
F1: Travel to fixed stop
5.2 Detailed description
Effectiveness of FOCON/FOCOF
The state of the modal-acting torque/force reduction FOCON/FOCOF is maintained during the
search and is effective in the approach block.
CAUTION
SERUPRO approach does not really take the FXS command into account.
The approach to the programmed end position of the FXS block is only simulated without
torque limitation.
If FXS is located between the beginning of the program and the search target, the command
is not executed by the NC. The motion is only simulated up to the programmed end point.
The user can log the turning on and turning off of FXS in the part program. If necessary, the
user can start an ASUB in order to activate or deactivate FXS in this SERUPRO-ASUP.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 291
F1: Travel to fixed stop
5.2 Detailed description
System variable
The state of the function can be read via the following system variable:
● $AA_FXS (desired state)
● $VA_FXS (actual state)
Value Description
0 Axis not at fixed stop
1 Fixed stop successfully approached
2 Approach to fixed stop failed
3 Travel to fixed stop selection active
4 Fixed stop detected
5 Travel to fixed stop deselection active
SERUPRO: $AA_FXS
During SERUPRO, $AA_FXS supplies the following values depending on the activation
status of the "Travel to fixed stop" function:
FXS[<axis>]=<status>
<status> $AA_FXS
0 (switch off) 0 (axis not at fixed stop)
1 (switch on) 3 (travel to fixed stop selection active)
Outside of SERUPRO, both system variables always supply the same value.
Note
During SERUPRO, the system variable $AA_FXS only supplies the values 0 and 3. As a
result, based on $AA_FXS, the program sequence can be changed with SERUPRO
compared to the normal program execution for program branches.
SERUPRO: $VA_FXS
During SERUPRO, the variable $VA_FXS always supplies the real state of axis on the
machine.
Basic Functions
292 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
F1: Travel to fixed stop
5.2 Detailed description
Program code
N100 WHEN ($AA_FXS[X]==3) AND ($VA_FXS[X]==0) DO FXS[X]=1
N200 WHEN ($AA_FXS[X]==0) AND ($VA_FXS[X]==1) DO FXS[X]=0
N1020 REPOSA
Example:
If the axis is at the fixed stop and the target block is available after deselection of FXS, the
new target position is displayed via DB31, ... DBX62.5 (fixed stop reached) as the REPOS
offset.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 293
F1: Travel to fixed stop
5.2 Detailed description
Deactivating FXS-REPOS
FXS-REPOS is deactivated by:
● An FXS synchronized action which refers to REPOSA
● $AA_FXS[X] = $VA_FXS[X] in the SERUPRO_ASUB
Note
A SERUPRO ASUB without FXS treatment or no SERUPRO ASUB results automatically
in FXS-REPOS.
CAUTION
Speed too high for FXS-REPOS
FXS-REPOS traverse all path axes together to the target position. Axes with and without
FXS treatment thus traverse together with the G code and feedrate valid in the target
block. As a result, the fixed stop may be approached in rapid traverse(G0) or higher
velocity.
Example
Axis X is traversed from position 0 to 100. FOC is switched on every 20 millimeters for 10
millimeters. The resulting torque characteristic is generated with non-modal FOC and cannot
be traced by FOC-REPOS. Axis X is traversed by FOC-REPOS with or without FOC in
accordance with the last programming before the target block.
For programming examples of FXS "Travel to fixed stop", see Section "Program test
(Page 469)".
NC reset
As long as the function is still not in the "Successful travel to fixed stop" state, the travel to
fixed stop can be aborted with NC reset.
Even when the fixed stop has already has been approached, but the specified stop torque
not yet fully reached, then the function can still be aborted with NC reset. The position
setpoint of the axis is synchronized with the current actual position.
As soon as the function is in the "Successful travel to fixed stop" state, the function also
remains active after the NC reset.
Basic Functions
294 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
F1: Travel to fixed stop
5.2 Detailed description
Function abort
A function abort can be triggered by the following events:
● Emergency stop
CAUTION
Dangerous machine situations possible for travel to limit stop
It must be ensured that no dangerous machine situations occur while travel to fixed stop
is active when an "Emergency stop" is triggered or reset.
For example, behavior when setting and canceling the pulse enable:
MD37002 $MA_FIXED_STOP_CONTROL, bit 0 (behavior for pulse disable at the stop)
• Bit 0 = 0: Travel to fixed stop is aborted
• Bit 0 = 1: Travel to fixed stop is interrupted, i.e. the drive is without power
Once the pulse disable is canceled again, the drive presses with the stop torque
again.
Note
NC and drive have no power during "Emergency stop", i.e. the PLC must react.
Contour monitoring
The axis contour monitoring function is inoperative while "Travel to fixed stop" is active.
Positioning axes
For "Travel to fixed stop" with positioning axes POSA, the block change is executed even
when the positioning axis has not yet reached the fixed stop by this time.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 295
F1: Travel to fixed stop
5.2 Detailed description
Vertical axes
The "Travel to fixed stop" function can be used for vertical axes even when alarms are
active.
If a function-specific alarm occurs for a vertical axis when traveling to fixed stop, the NC/PLC
interface signal DB11, DBX6.3 (mode group ready) is not reset: This means that the
corresponding drive is not de-energized.
This corresponds to an electronic weight compensation for the vertical axis and can be
configured via the following machine data:
MD37052 $MA_FIXED_STOP_ALARM_REACTION
References
Further information on vertical axes can be found in:
● SINAMICS S120 Function Manual
● Function Manual, Extended Functions; Compensation (K3),
Section: Electronic counterweight
Clamping torque
SD43510 $SA_FIXED_STOP_TORQUE (clamping torque)
Note
Clamping torque greater than 100%
A value for the clamping torque in SD43510 greater than 100% of the maximum motor
torque is only advisable for a short time. In addition, the maximum motor torque is limited by
the drive. For example, the following drive parameters have a limiting effect:
• p1520/p1521 upper torque limit/force limit / lower torque limit/force limit
• p1522/p1523 upper torque limit/force limit / lower torque limit/force limit
• p1530/p1531 power limit, motoring / power limit, regenerating
• p0640 current limit
• p0326 motor stall force correction factor
Detailed information on the drive parameters and the functions can be found in:
References
• SINAMICS S120/S150 List Manual
• SINAMICS S120 Function Manual
Basic Functions
296 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
F1: Travel to fixed stop
5.2 Detailed description
Monitoring window
SD43520 $SA_FIXED_STOP_WINDOW (monitoring window)
Default setting
The defaults for the setting data are set via the following machine data:
● Clamping torque:
MD37010 $MA_FIXED_STOP_TORQUE_DEF (default clamping torque)
● Monitoring window:
MD37020 $MA_FIXED_STOP_WINDOW_DEF (default monitoring window)
Effectiveness
The setting data for the clamping torque and monitoring window takes effect immediately. In
this way, the clamping state can be adapted to the machining situation at any time by the
operator or via the PLC user program.
References
Further detailed information on the machine and setting data can be found in:
List Manual, Detailed Machine Data Description
See also
Z1: NC/PLC interface signals (Page 1583)
Note
Actual position at fixed stop
After reaching the fixed stop, the actual position of the machine axis can be read, for
example, for evaluation or measuring purposes via the $AA_IM system variables.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 297
F1: Travel to fixed stop
5.2 Detailed description
Program code
X300 Y500 F200 FXS[X1]=1 FXST[X1]=25 FXSW[X1]=5
; IF fixed stop == reached => normal case
IF $AA_FXS[X1]==2 GOTOF FXS_ERROR
; Normal case
G01 X400 Y200
...
GOTOF PROG_END
; ELSE error handling
FXS_ERROR: ...
PROG_END: M30
Basic Functions
298 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
F1: Travel to fixed stop
5.2 Detailed description
Function
For applications in which torque or force are to be changed dynamically depending on the
travel or on the time or on other parameters (e.g. pressing), the functionality FOC (Force
Control) is provided.
Force/travel or force/time profiles are thus possible in the resolution for the interpolation
cycle.
The function allows torque/force to be modified at any time using synchronized actions.
The function can be activated modally or non-modally.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 299
F1: Travel to fixed stop
5.2 Detailed description
Availability
System Availability
SINUMERIK 840D sl Standard (basic scope)
SINUMERIK 828D Option
Bit Meaning
0 Effective after POWER ON:
=0 FOCOF
=1 FOCON
1 Effective after RESET:
=0 FOCOF
=1 FOCON
Programming
The programming of the axis is carried out in square brackets.
The following are permissible:
● Geometry axis name
● Channel axis name
● Machine axis name
Example:
Basic Functions
300 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
F1: Travel to fixed stop
5.2 Detailed description
Priority FXS/FOC
An activation of FXS with FOC active has priority, i.e. FXS is executed.
A deselection of FXS will cancel the clamping.
A modal torque/force limitation remains active.
After POWER ON the activation takes effect with the machine data:
MD37010 $MA_FIXED_STOP_TORQUE_DEF
This torque can be changed at any time by programming FXST.
Synchronized actions
The language commands FOC, FOCON, FOCOF can also be programmed in synchronized actions
as the commands for "Travel to fixed stop".
Value Meaning
0 FOC not active
1 FOC modal active
2 FOC non-modal active
Value Meaning
0 Effective torque < torque limit value
1 Effective torque has reached the torque limit value
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 301
F1: Travel to fixed stop
5.2 Detailed description
Restrictions
The FOC function is subject to the following restrictions:
● The change of the torque/force limitation represented as an acceleration limitation is
taken into account in the traversing motion only at the block limits (see command ACC).
● Only FOC:
No monitoring is possible from the NC/PLC interface to check that the active torque limit
has been reached.
● If the acceleration limitation is not adapted accordingly, an increase in the following error
occurs during the traversing motion.
● If the acceleration limitation is not adapted accordingly, the end-of-block position is
possibly reached later than specified in:
MD36040 $MA_STANDSTILL_DELAY_TIME
.
The machine data:
MD36042 $MA_FOC_STANDSTILL_DELAY_TIME
is introduced for this and monitored in this status.
Basic Functions
302 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
F1: Travel to fixed stop
5.3 Examples
5.3 Examples
Note
Avoidance of multiple selection for FXS
To avoid a multiple selection, we recommend that prior to activating FXS, query either the
$AA_FXS==0 system variable or a user-specific flag. See above, program example N10
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 303
F1: Travel to fixed stop
5.4 Data lists
Note
A block-related synchronized action is machined together with the next main program block.
Basic Functions
304 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
F1: Travel to fixed stop
5.4 Data lists
5.4.3 Signals
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 305
F1: Travel to fixed stop
5.4 Data lists
Basic Functions
306 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
G2: Velocities, setpoint / actual value systems,
closed-loop control 6
6.1 Brief description
The description of functions explains how to parameterize a machine axis in relation to:
● Actual-value/measuring systems
● Setpoint system
● Operating accuracy
● Travel ranges
● Axis velocities
● Control parameters
6.2.1 Velocities
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 307
G2: Velocities, setpoint / actual value systems, closed-loop control
6.2 Velocities, traversing ranges, accuracies
Example:
Interpolation cycle = 12 ms
N10 G0 X0 Y0; [mm]
ಥ
9PLQ ,QFU
&RPSXWDWLRQDOUHVROXWLRQ> PPRUGHJUHHV
@
LQWHUSRODWLRQF\FOH>V@
Example:
MD10200 $MN_INT_INCR_PER_MM = 1000 [incr. /mm];
Interpolation cycle = 12 ms;
⇒ Vmin = 10 -3/(1000 incr/mm x 12 ms) = 0.005 mm/min;
The value range of the feedrates depends on the computational resolution selected.
For the standard assignment of machine data:
MD10200 $MN_INT_INCR_PER_MM
(computational resolution for linear positions) (1000 incr./mm)
or
MD10210 $MN_INT_INCR_PER_DEG
(computational resolution for angular positions) (1000 incr./deg.)
The following value range can be programmed with the specified resolution:
Basic Functions
308 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
G2: Velocities, setpoint / actual value systems, closed-loop control
6.2 Velocities, traversing ranges, accuracies
Range Range
Linear axes X, Y, Z, etc. ∓ 999,999.999 ∓ 399,999.999
Rotary axes A, B, C, etc. ∓ 999,999.999 ∓ 999,999.999
Interpolation parameters I, J, K ∓ 999,999.999 ∓ 399,999.999
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 309
G2: Velocities, setpoint / actual value systems, closed-loop control
6.2 Velocities, traversing ranges, accuracies
The traversing range for rotary axes can be limited via machine data.
References:
Function Manual, Extended Functions; Rotary Axes (R2)
,QWHUQDOLQFUHPHQWVPP
(QFRGHULQFUHPHQWVPP (1&B5(62/>Q@
(1&B38/6(B08/7>Q@
'5,9(B(1&B5$7,2B180(5$>Q@
'5,9(B(1&B5$7,2B'(120>Q@
'5,9(B$;B5$7,2B'(120>Q@
'5,9(B$;B5$7,2B180(5$>Q@
/($'6&5(:B3,7&+
,17B,1&5B3(5B00
Basic Functions
310 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
G2: Velocities, setpoint / actual value systems, closed-loop control
6.2 Velocities, traversing ranges, accuracies
Resolutions: Differences
Resolutions, e.g. resolutions of linear and angular positions, velocities, accelerations and
jerk, must be differentiated as follows:
● Input resolution
Data is input via the control panel or part programs.
● Display resolution
Data is displayed via the control panel.
● Computational resolution
Data input via the control panel or part program is displayed internally.
The input and display resolution is determined by the specified operator panel front used,
whereby the display resolution for position values with the machine data:
MD9004 $MM_DISPLAY_RESOLUTION (display resolution)
can be changed.
The machine data:
MD9011 $MM_DISPLAY_RESOLUTION_INCH (display resolution for INCH measuring
system)
can be used to configure the display resolution for position values with inch setting.
This allows you to display up to six decimal places with the inch setting.
For the programming of part programs, the input resolutions listed in the Programming Guide
apply.
The desired computational resolution is defined using the machine data:
MD10200 $MN_INT_INCR_PER_MM (computational resolution for linear positions)
and
MD10210 $MN_INT_INCR_PER_ DEG (computational resolution for angular positions).
It is independent of the input/display resolution but should have at least the same resolution.
The maximum number of places after the decimal point for position values, velocities, etc., in
the part program and the number of places after the decimal point for tool offsets, zero
offsets, etc. (and therefore also for the maximum possible accuracy) is defined by the
computational resolution.
The accuracy of angle and linear positions is limited to the computational resolution by
rounding the product of the programmed value with the computational resolution to an
integer number.
To make the rounding clear, powers of 10 should be used for the calculation resolution.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 311
G2: Velocities, setpoint / actual value systems, closed-loop control
6.2 Velocities, traversing ranges, accuracies
Example of rounding:
Computational resolution: 1000 incr./mm
Programmed path: 97.3786 mm
Effective value: 97.379 mm
Input/output units
Machine and setting data that possess a physical quantity are interpreted in the input/output
units below depending on whether the metric or inch system is selected:
Basic Functions
312 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
G2: Velocities, setpoint / actual value systems, closed-loop control
6.2 Velocities, traversing ranges, accuracies
The units listed below are used for storage. The control always uses these units internally
irrespective of the basic system selected.
The user can define different input/output units for machine and setting data.
For this, the machine data:
MD10220 $MN_SCALING_USER_DEF_MASK
(activation of scaling factors)
and
MD10230 $MN_SCALING_FACTORS_USER_DEF[n]
(Scaling factors of physical quantities)
allow you to set the adaptation between the newly selected input/output units and the
internal units.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 313
G2: Velocities, setpoint / actual value systems, closed-loop control
6.2 Velocities, traversing ranges, accuracies
,QSXWRXWSXWXQLWVIRUPDFKLQH
DQGVHWWLQJGDWD
'RWKHLQSXW
RXWSXWXQLWV 1R
FRUUHVSRQGWRWKH
VWDQGDUGEDVLFV\VWHP"
8VHUGHILQHG
<HV 0'6&$/,1*B)$&7256B86(5B'()>Q@
0'6&$/,1*B)$&7256B86(5B'()B0$6.
)RUPDWFRQYHUVLRQ
,QWHUQDOXQLWV
Example 1:
Machine data input/output of the linear velocities is to be in m/min instead of mm/min (initial
state).
(The internal unit is mm/s)
⇒ The scaling factor for the linear velocities is to differ from the standard setting. For this
in the machine data:
MD10220 $MN_SCALING_USER_DEF_MASK
the bit number 2 must be set.
⇒ MD10220 $MN_SCALING_USER_DEF_MASK = 'H4'; (bit no. 2 as hex value)
Basic Functions
314 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
G2: Velocities, setpoint / actual value systems, closed-loop control
6.2 Velocities, traversing ranges, accuracies
⇒ The scaling factor for the linear velocities is to differ from the standard setting. For this
in the machine data:
MD10220 $MN_SCALING_USER_DEF_MASK
the bit number 2 must be set.
⇒ MD10220 $MN_SCALING_USER_DEF_MASK = 'H4'; (bit no. 2 as hex value)
,QSXWRXWSXWXQLWVHOHFWHG
0'6&$/,1*B)$&7256B86(5B'()>Q@
,QWHUQDOXQLW
P PP
PLQ V
0'6&$/,1*B)$&7256B86(5B'()>Q@
PP PP
V V
0'6&$/,1*B)$&7256B86(5B'()>Q@
Index n defines the "linear velocity" in the "Scaling factors of physical quantities" list.
Example 2:
In addition to the change in Example 1, the machine data input/output of linear accelerations
must be in ft/s2 instead of m/s2 (initial state).
(The internal unit is mm/s2.)
IW PP
V
V
ය 0'6&$/,1*B)$&7256B86(5B'()>@
PP PP
V V
ය 0'6&$/,1*B)$&7256B86(5B'()>@
Index 4 defines the "linear acceleration" in the "Scaling factors of physical quantities" list.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 315
G2: Velocities, setpoint / actual value systems, closed-loop control
6.3 Metric/inch measuring system
Basic Functions
316 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
G2: Velocities, setpoint / actual value systems, closed-loop control
6.3 Metric/inch measuring system
G functions G700/G710
The G functions G700/G710 extend the functionality of G70/G71 as follows:
1. The feedrate is interpreted in the programmed measuring system:
– G700: length parameters [inch]; feedrates [inch/min]
– G710: length parameters [mm]; feedrates [mm/min]
The programmed feedrate is modal and therefore remains active after subsequent
G70/G71/G700/G710 commands. If the feedrate is to apply in the new G70/G71/G700/G710
context, it must be re-programmed.
2. System variables and machine data specifying lengths in the part program are read and
written in the programmed measuring system.
Differences during the reading and writing of machine data and system variables
The following differences exist between G70/G71 and G700/G710 in terms of reading and writing
machine data and system variables in the part program:
● G70/G71: Reading and writing takes place in the configured basic system.
● G700/G710: Reading and writing takes place in the configured measuring system.
Example
The following part program is executed with an initial metric state:
MD10240 $MN_SCALING_SYSTEM_IS_METRIC = 1
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 317
G2: Velocities, setpoint / actual value systems, closed-loop control
6.3 Metric/inch measuring system
N120: if G70 is replaced by G700, alarm 61000 (N220) does not occur.
Synchronized actions
To ensure in the case of synchronized actions that the current part program context does not
determine the measuring system used in the condition and/or action part, the measuring
system must be defined within the synchronized action (condition and/or action parts). This
is the only way of achieving defined, reproducible behavior in the use of length-related data
within a synchronized action.
Example 1
The measuring system is not specified within the synchronized action. Therefore, the
traversing motion of the X axis takes place in the measuring system of the configured initial
state:
Example 2
The "metric" measuring system is explicitly programmed with G71 within the synchronized
action. This means the traversing motion of the X axis takes place in the metric measuring
system:
Basic Functions
318 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
G2: Velocities, setpoint / actual value systems, closed-loop control
6.3 Metric/inch measuring system
Reading and writing of data in the case of G70/G71 and G700/G710 in the part program
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 319
G2: Velocities, setpoint / actual value systems, closed-loop control
6.3 Metric/inch measuring system
Note
Read position data in synchronized actions
If a measuring system has not been explicitly programmed in the synchronized action
(condition component and/or action component) length-related position data in the
synchronized action are always read in the parameterized basic system.
References:
Programming Manual, Fundamentals; List of Addresses
General
The control system can operate with the metric or inch measuring system. The initial setting
of the measuring system (basic system) is defined using the following machine data:
MD10240 $MN_SCALING_SYSTEM_IS_METRIC (basic system metric).
Depending on the basic system, all length-related data is interpreted either as metric or inch
measurements.
The relevant softkey on the HMI in the "Machine" operating area is used to change the
measuring system of the controller.
Basic Functions
320 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
G2: Velocities, setpoint / actual value systems, closed-loop control
6.3 Metric/inch measuring system
The change in the measuring system occurs only under the following supplementary
conditions:
● MD10260 $MN_CONVERT_SCALING_SYSTEM=1
● Bit 0 of MD20110 $MC_RESET_MODE_MASK is set in every channel.
● All channels are in the Reset state.
● Axes do not traverse with JOG, DRF or PLC.
● Constant grinding wheel peripheral speed (GWPS) is not active.
Actions such as part program start or mode change are disabled for the duration of the
measuring system changeover.
If the measuring system cannot be changed, this is indicated by a message to that effect on
the user interface. These measures ensure that a consistent set of data is always used for a
running program with reference to the measuring system.
The actual change in the measuring system is made by writing all the necessary machine
data and subsequently activating them with a RESET.
The machine data:
MD10240 $MN_SCALING_SYSTEM_IS_METRIC
and the corresponding G70/G71/G700/G710 settings in the machine data:
MD20150 $MN_GCODE_RESET_VALUES
are automatically switched over consistently for all configured channels.
During this process, the value in machine data:
MD20150 $MC_GCODE_RESET_VALUES[12]
changes between G700 and G710.
This process takes place independently of the protection level currently set.
Note
The availability of the softkey and, therefore, its functionality, can be configured using the
compatibility machine data:
MD10260 $MN_CONVERT_SCALING_SYSTEM
If several NCUs are linked by NCU-link, the switchover has the same effect on all linked
NCUs. If the requirements for a switchover are not fulfilled on one of the connected NCUs,
no switchover will take place on any of the NCUs. It is assumed that interpolations between
several NCUs will take place on the existing NCUs, whereby the interpolations can provide
correct results only if the same unit systems are used.
References:
Function Manual, Extended Functions; Several Control Panels on Multiple NCUs, Distributed
Systems (B3)
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 321
G2: Velocities, setpoint / actual value systems, closed-loop control
6.3 Metric/inch measuring system
System data
When changing over the measuring system, from the view of the user, all length-related
specifications are converted to the new measuring system automatically.
This includes:
● Positions
● Feedrates
● Accelerations
● Jerk
● Tool offsets
● Programmable, settable and external zero offsets and DRF offsets
● Compensation values
● Protection zones
● Machine data
● Jog and handwheel factors
After the changeover, all of the above data is available in physical quantities.
Data, for which no unique physical units are defined, is not converted automatically.
This includes:
● R parameters
● GUDs (Global User Data)
● LUDs (Local User Data)
● PUDs (Program global User Data)
● Analog inputs/outputs
● Data exchange via FC21
In this case, the user is requested to take into account the currently valid system of units:
MD10240 $MN_SCALING_SYSTEM_IS_METRIC
The current system of units setting can be read using the signal:
DB10 DBX107.7 (inch measuring system)
Basic Functions
322 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
G2: Velocities, setpoint / actual value systems, closed-loop control
6.3 Metric/inch measuring system
Reference point
The reference point is retained. It is not necessary to repeat referencing.
Example:
1 inch = 25.4 mm ⇒ 0.0001 inch = 0.00254 mm = 2.54 μm
To be able to program and display the last 40 mm, MD10200 must be assigned a value of
100000.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 323
G2: Velocities, setpoint / actual value systems, closed-loop control
6.3 Metric/inch measuring system
Only with this identical setting for both measuring systems is it possible to change the
measuring system without a significant loss of accuracy. Once MD10200 has been set to this
value, it will not need to be changed each time the measuring system is switched over.
Data backup
Data sets which can be separately read out of the controller and have data where the system
of units is relevant, receive - when reading - as a function of machine data:
MD10260 $MN_CONVERT_SCALING_SYSTEM
an INCH or METRIC identification corresponding to machine data:
MD10240 $MN_SCALING_SYSTEM_IS_METRIC
This specifies the measuring system in which the data were originally read out.
This information is intended to prevent data sets from being read into the control system with
a measuring system, which is different from the active system. In this case, alarm 15030 is
triggered and the write process is interrupted.
Since the language instruction is also evaluated in part programs, these can also be
"protected" against operator errors as described above. You can, therefore, prevent part
programs containing only metric data, for example, from running on an inch measuring
system.
Basic Functions
324 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
G2: Velocities, setpoint / actual value systems, closed-loop control
6.3 Metric/inch measuring system
Archive and machine data sets are downwards compatible for a setting:
MD11220 $MN_INI_FILE_MODE = 2
Note
The INCH/METRIC operation is only generated if the compatibility machine data:
MD10260 $MN_CONVERT_SCALING_SYSTEM
is set.
Programming
It should be possible to program the effective machining feedrate in the usual way as a path
feedrate via the F value in processing procedures where the tool, the workpiece or both are
moved by a rotary axis (e.g. laser machining of rotating tubes).
In order to achieve this, it is necessary to specify an effective radius (reference radius) for
each of the rotary axes involved. You can do this by programming the modal NC address:
FGREF[<rotary axis>]=<reference radius>
The unit of the reference radius depends on the G70/G71/G700/G710 setting.
In order to include the axes in the calculation of the path feedrate, they must all be specified
in the FGROUP command.
In order to ensure compatibility with the behavior with no FGREF programming, the evaluation
1 degree = 1 mm is activated on system powerup and RESET.
This corresponds to a reference radius of:
FGREF = 360 mm / (2π) = 57.296 mm
This default is independent of the active basic system
(MD10240 $MN_SCALING_SYSTEM_IS_METRIC) and the currently active
G70/G71/G700/G710 setting.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 325
G2: Velocities, setpoint / actual value systems, closed-loop control
6.3 Metric/inch measuring system
Program code
N100 FGROUP(X,Y,Z,A)
N110 G1 G91 A10 F100
N120 G1 G91 A10 X0.0001 F100
The programmed F value in block N110 is evaluated as a rotary axis feedrate in degrees/min,
while the feedrate weighting in block N120 is either 100 inch/min or 100 mm/min, depending
on the current inch/metric setting.
NOTICE
Different systems of units
The FGREF factor also works if only rotary axes are programmed in the block. The normal F
value interpretation as degree/min applies in this case only if the radius reference
corresponds to the FGREF default:
• For G71/G710: FGREF[A]=57.296
• For G70/G700: FGREF[A]=57.296/25.4
Example
The following example is intended to demonstrate the effect of FGROUP on the path and path
feedrate. The variable $AC_TIME contains the time of the block start in seconds. It can only be
used in synchronized actions.
Basic Functions
326 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
G2: Velocities, setpoint / actual value systems, closed-loop control
6.3 Metric/inch measuring system
Diagnostics
Read reference radius
The value of the reference radius of a rotary axis can be read using system variables:
● For the display in the user interface, in synchronized actions or with a preprocessing stop
in the part program via the system variable:
$AA_FGROUP[<axis>] Returns the value "1" if the specified axis affects the path
velocity in the current main run record by means of the
basic setting or through FGROUP programming. Otherwise,
the variable returns the value "0".
$AC_FGROUP_MASK Returns a bit key of the channel axes programmed with
FGROUP which are to affect the path velocity.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 327
G2: Velocities, setpoint / actual value systems, closed-loop control
6.4 Setpoint/actual-value system
$PA_FGROUP[<axis>] Returns the value "1" if the specified axis affects the path
velocity by means of the basic setting or through FGROUP
programming. Otherwise, the variable returns the value
"0".
$P_FGROUP_MASK Returns a bit key of the channel axes programmed with
FGROUPwhich are to affect the path velocity.
6.4.1 General
Control loop
A control loop with the following structure can be configured for every closed-loop controlled
axis/spindle:
$FWXDOYDOXH (QFRGHU
*
SURFHVVLQJ
$FWXDO
180B(1&6 YDOXH
URXWLQJ
$FWXDOYDOXH (QFRGHU
SURFHVVLQJ *
Setpoint output
A setpoint telegram can be output for each axis/spindle. The setpoint output to the actuator
is realized from the SINUMERIK 840D sl.
Basic Functions
328 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
G2: Velocities, setpoint / actual value systems, closed-loop control
6.4 Setpoint/actual-value system
Actual-value acquisition
A maximum of two measuring systems can be connected for each axis/spindle, e.g. a direct
measuring system for machining processes with high accuracy requirements and an indirect
measuring system for high-speed positioning tasks.
The number of encoders used is recorded in the machine data:
MD30200 $MA_NUM_ENCS (number of encoders)
In the case of two actual-value branches, the actual value is acquired for both branches.
The active measuring system is always used for position control, absolute value calculation
and display. If both measuring systems are activated at the same time by the PLC interface,
positioning measuring system 1 is chosen internally by the controller.
Reference point approach is executed by the selected measuring system.
Each position measuring system must be referenced separately.
For an explanation of encoder monitoring, see Section "A3: Axis Monitoring, Protection
Zones (Page 79)".
For an explanation of actual-value acquisition compensation functions, see:
References:
Function Manual, Extended Functions; Compensations (K3)
Monitoring
The permissible deviation between the actual values of the two measuring systems is to be
entered in the machine data:
MD36510 $MA_ENC_DIFF_TOL
For the cyclic comparison of the two measuring systems used, this difference must not be
exceeded, as otherwise Alarm 25105 "Measuring systems deviate" is generated.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 329
G2: Velocities, setpoint / actual value systems, closed-loop control
6.4 Setpoint/actual-value system
If the axis is not referenced (at least in the current control measuring system), then the
related monitoring is not active if MD36510 = 0 or if neither of the two measuring systems in
the axis is active/available.
Simulation axes
The speed control loop of an axis can be simulated for test purposes.
The axis "traverses" with a following error, similar to a real axis.
A simulation axis is defined by setting the two following machine data to "0":
MD30130 $MA_CTRLOUT_TYPE[n] (output value of setpoint)
MD30240 $MA_ENC_TYPE[n] (type of actual-value acquisition)
As soon as the standard machine data has been loaded, the axes become simulation axes.
The setpoint and actual value can be set to the reference point value with reference point
approach.
The machine data:
MD30350 $MA_SIMU_AX_VDI_OUTPUT (output of axis signals with simulation axes)
can be used to define whether the axis-specific interface signals are to be output on the PLC
during the simulation.
Actual-value correction
If actual-value corrections performed by the NC on the encoder selected for position control
do not influence the actual value of another encoder defined in the same axis, then this
encoder is to be declared as "independent" via the following machine data:
MD30242 $MA_ENC_IS_INDEPENDENT
Actual-value corrections include the following:
● Modulo treatment
● Reference point approach
● Measuring system comparison
● PRESET
Basic Functions
330 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
G2: Velocities, setpoint / actual value systems, closed-loop control
6.4 Setpoint/actual-value system
Setpoint marshalling
The following machine data are relevant for the setpoint assignment of a machine axis.
MD30100 $MA_CTRLOUT_SEGMENT_NR[ n ]
Setpoint assignment, bus segment
System Value Meaning
840D sl 5 PROFIBUS-DP / PROFINET (default)
MD30110 $MA_CTRLOUT_MODULE_NR[ n ]
Setpoint assignment: Drive number / module number
System Value Meaning
840D sl x Index x of MD13050 $MN_DRIVE_LOGIC_ADDRESS[ x ] should be entered,
which refers to the connected drive.
MD30110 $MA_CTRLOUT_MODULE_NR[ n ] = x, refers to:
MD13050 $MN_DRIVE_LOGIC_ADDRESS[ x ]
Note
The machine data is of no significance if the drive is simulated (MD30130
$MA_CTRLOUT_TYPE[ n ] = 0).
MD30120 $MA_CTRLOUT_NR[ n ]
Setpoint assignment: Setpoint output on drive module/module
System Value Meaning
840D sl 1 Modular drive at PROFIBUS / PROFINET with PROFIdrive profile (default)
MD30130 $MA_CTRLOUT_TYPE[ n ]
Setpoint output type
System Value Meaning
840D sl 0 Simulation (operation without drive)
1 Setpoint output active
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 331
G2: Velocities, setpoint / actual value systems, closed-loop control
6.4 Setpoint/actual-value system
Encoder assignment
The following machine data are relevant for assigning the encoder information of the drive -
transferred in the PROFIdrive telegram - to the encoder inputs of the machine axis:
MD30210 $MA_ENC_SEGMENT_NR[ n ]
Actual value assignment, bus segment
System Value Meaning
840D sl 5 PROFIBUS-DP / PROFINET
MD30220 $MA_ENC_MODULE_NR[ n ]
Actual value assignment: Drive module number/measuring circuit number
System Value Meaning
840D sl x The number of the drive assigned using MD13050
$MN_DRIVE_LOGIC_ADDRESS[ x ] should be entered.
MD30220 $MA_ENC_MODULE_NR[ n ] = x, refers to:
MD13050 $MN_DRIVE_LOGIC_ADDRESS[ x ]
MD30230 $MA_ENC_INPUT_NR[ n ]
Actual value assignment: Input on drive module/measuring circuit module
System Value Meaning
840D sl x Number of the encoder interface within the PROFIdrive telegram
Examples
PROFIdrive telegram 103
x = 1 → 1st encoder interface (G1_ZSW, G1_XIST1, G1_XIST2)
x = 2 → 2nd encoder interface (G2_ZSW, G2_XIST1, G2_XIST2)
PROFIdrive telegram 118
x = 1 → 1st encoder interface (G2_ZSW, G2_XIST1, G2_XIST2)
x = 2 → 2nd encoder interface (G3_ZSW, G3_XIST1, G3_XIST2)
Note
For SINAMICS S120:
- encoder 1 (G1_...): Motor encoder
- encoder 2 (G2_...): Direct measuring system
- encoder 3 (G3_...): Additional measuring system
MD30240 $MA_ENC_TYPE[ n ]
Encoder type of the actual value sensing (position actual value)
System Value Meaning
840D sl 0 Simulation (operation without encoder)
1 Incremental encoder
4 Absolute encoder
Note
Corresponds with PROFIdrive parameter p979
Basic Functions
332 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
G2: Velocities, setpoint / actual value systems, closed-loop control
6.4 Setpoint/actual-value system
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 333
G2: Velocities, setpoint / actual value systems, closed-loop control
6.4 Setpoint/actual-value system
Note
Machine data index [ n ]
The machine data index [ n ] for encoder assignment has the following meaning:
• n = 0: The first encoder assigned to the machine axis
• n = 1: Second encoder assigned to the machine axis
The assignment is made using machine data:
• MD30220$MA_ENC_MODULE_NR[ n ]
• MD30230$MA_ENC_INPUT_NR[ n ]
Gear types
The following gear types are available for adapting the mechanical ratios:
0 7RRO
0RWRUORDG ,QWHUPHGLDWH 3RZHUHGWRROV
JHDU JHDU
'5,9(B$;B5$7,2B180(5$ =
1RRIORDGUHYV
'5,9(B$;B5$7,2B'(120 1RRIWRROUHYV
'5,9(B$;B5$7,2B180(5$ 1RRIPRWRUUHYV
=
'5,9(B$;B5$7,2B'(120 1RRIORDGUHYV
Basic Functions
334 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
G2: Velocities, setpoint / actual value systems, closed-loop control
6.4 Setpoint/actual-value system
Motor/load gear
The motor/load gear supported by SINUMERIK is configured via the following machine data:
MD31060 $MA_DRIVE_AX_RATIO_NUMERA (numerator load gearbox)
MD31050 $MA_DRIVE_AX_RATIO_DENOM (denominator load gearbox)
The transmission ratio is obtained from the numerator/denominator ratio of both machine
data. The associated parameter sets are used automatically as default by the controller to
synchronize the position controller with the relevant transmission ratios.
Since a gear stage change is not always carried out automatically, and there are also
several ways to request a gear stage change, the position controller is not always
incorporated via parameter sets.
Note
For further information about the parameter sets for gear stage change, see Section "S1:
Spindles (Page 1225)".
Intermediate gear
Additional, configurable load intermediate gears are also supported by the controller:
MD31066 $MA_DRIVE_AX_RATIO2_NUMERA (intermediate gear numerator)
MD31064 $MA_DRIVE_AX_RATIO2_DENOM (intermediate gear denominator)
Power tools generally have their "own" intermediate gear. Such variable mechanics can be
configured by multiplying the active intermediate gearbox and the motor/load gearbox.
CAUTION
Different gearbox transmission ratios for switching
Unlike the motor/load gear, there is no parameter set for the intermediate gear and,
therefore, no way of controlling the time-synchronized switchover to the part program or
PLC (NC/PLC interface). Part programming during gear change is, therefore, ruled out. It
remains the task of the user to match the synchronization of the relevant changed machine
data to the corresponding mechanical switchover and activate it. On switchover during a
motion, compensations cannot be ruled out due to jumps in the scaling factors. These are
not monitored for violation of the maximum acceleration.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 335
G2: Velocities, setpoint / actual value systems, closed-loop control
6.4 Setpoint/actual-value system
Boundary conditions
If the encoder to be used for position control is connected directly at the tool, the gear stage
change only affects the physical quantities at the speed interface between the NC and the
drive of the motor/load gear. The internal parameter sets are not changed.
CAUTION
Loss of the position reference
The controller cannot detect all possible situations that can lead to loss of the machine
position reference. Therefore, it is the responsibility of the commissioning engineer or user
to initiate explicit referencing of zero marker synchronization in such cases.
In the case of gear changes, it is not possible to make a statement about the effect of the
reference point or machine position reference on the encoder scaling. In such cases, the
controller partially cancels the status "Axis referenced/synchronized".
Basic Functions
336 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
G2: Velocities, setpoint / actual value systems, closed-loop control
6.4 Setpoint/actual-value system
If the position reference to the machine, tool, etc., has been lost, it must first be restored
through appropriate adjustment or referencing of the lost reference point. This is especially
important for the functions Travel to fixed stop, Referencing to Bero, Cam and Zero marker.
Note
In order to permit new referencing without an interrupting RESET,
machine data:
MD34080 $MA_REFP_MOVE_DIST
and
MD34090 $MA_REFP_MOVE_DIST_CORR
are changed over to NewConfig effectiveness.
For further explanations, see Section "R1: Referencing (Page 1173)".
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 337
G2: Velocities, setpoint / actual value systems, closed-loop control
6.4 Setpoint/actual-value system
● Manual comparison
In the machine data:
MD32250 $MA_RATED_OUTVAL
a value not equal to zero is entered.
Note
Velocity adjustment and maximum speed setpoint
Owing to the automatic speed setpoint comparison a velocity adjustment is not necessary
for SINUMERIK 840D sl!
Q 6HW 6SHHGVHWSRLQW
0D[VSHHGVHWSRLQW
0'&75/287B/,0,7
0D[D[LVYHORFLW\
0'0$;B$;B9(/2
W>V@
Basic Functions
338 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
G2: Velocities, setpoint / actual value systems, closed-loop control
6.4 Setpoint/actual-value system
However, due to control processes, the axes should not reach their maximum velocity
(MD32000 $MA_MAX_AX_VELO) at 100% of the speed setpoint, but at 80% to 95%.
In case of axes, whose maximum speed is attained at around 80% of the speed setpoint
range, the default value (80%) of the machine data:
MD32000 $MA_MAX_AX_VELO (maximum axis velocity)
can be taken over.
Actual-value resolution
In order to be able to create a correctly closed position control loop, the control system must
be informed of the valid actual-value resolution. The following axis-specific machine data is
used for this purpose, which is partially specified from the drive (MD31000, 31010, 31020,
31025).
The controller calculates the actual-value resolution based on the machine data. The control
parameter sets of the position control are identified as servo parameter sets.
The machining process of the machine forms the basis of the position actual-value
acquisition.
Depending on the type of axis (linear axis, rotary axis) and the type of actual-value
acquisition (directly at the machine, indirectly at the motor), the following machine data must
be parameterized to calculate the actual-value resolution:
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 339
G2: Velocities, setpoint / actual value systems, closed-loop control
6.4 Setpoint/actual-value system
Machine data
Basic Functions
340 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
G2: Velocities, setpoint / actual value systems, closed-loop control
6.4 Setpoint/actual-value system
Note
Machine data with NEWCONFIG effectiveness criterion can be activated either in the part
program with the command NEWCONF or via the user interface by pressing a softkey.
Linear axes
&RPSXWDWLRQDOUHVROXWLRQ ,QWHUQDOLQFUHPHQWVPP
$FWXDOYDOXHUHVROXWLRQ (QFRGHULQFUHPHQWVPP
Rotary axes
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 341
G2: Velocities, setpoint / actual value systems, closed-loop control
6.4 Setpoint/actual-value system
Recommended setting
The above components and settings that are responsible for the actual-value resolution,
should be selected so that the actual-value resolution is higher than the parameterized
computational resolution.
Computational resolution
≤ 1
Actual-value resolution
Basic Functions
342 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
G2: Velocities, setpoint / actual value systems, closed-loop control
6.4 Setpoint/actual-value system
0',6B527B$;
7DEOH
0 %DOOVFUHZ
/LQHDUVFDOH
/RDGJHDU
0'(1&B,6B/,1($5
0'(1&B*5,'B32,17B',67OLQHDUHQFRGHU
0'(1&B,19(56LQWKHRSSRVLWHGLUHFWLRQ
The ratio of the internal increments to the encoder increments per mm is calculated as
follows:
(1&B,6B/,1($5B ,6B527B$;
n
(QFRGHU (1&B,6B/,1($5B
7DEOH
* 0 %DOOVFUHZ
0HDV /RDG
JHDU JHDU n /($'6&5(:B3,7&+
n 6SLQGOH
0RWRU
(1&B5(62/ '5,9(B$;B5$7,2B180(5$ 1RRIPRWRUUHYV
=
'5,9(B$;B5$7,2B'(120 1RRIVSLQGOHUHYV
'5,9(B(1&B5$7,2B180(5$ 1XPEHURIPRWRUUHYROXWLRQV
=
'5,9(B(1&B5$7,2B'(120 1XPEHURIHQFRGHUUHYROXWLRQV
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 343
G2: Velocities, setpoint / actual value systems, closed-loop control
6.4 Setpoint/actual-value system
The ratio of the internal increments to the encoder increments per mm is calculated as
follows:
,QWHUQDOLQFUHPHQWVPP
(QFRGHULQFUHPHQWVPP (1&B5(62/>Q@
(1&B38/6(B08/7>Q@
'5,9(B(1&B5$7,2B180(5$>Q@
'5,9(B(1&B5$7,2B'(120>Q@
'5,9(B$;B5$7,2B'(120>Q@
'5,9(B$;B5$7,2B180(5$>Q@
/($'6&5(:B3,7&+
,17B,1&5B3(5B00
Example
Assumptions:
● Rotary encoder on the motor: 2048 pulses/revolution
● Internal pulse multiplication: 2048
● Gearbox, motor / ball screw: 5:1
● Leadscrew pitch: 10 mm/revolution
● Computational resolution: 10000 increments per mm
Basic Functions
344 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
G2: Velocities, setpoint / actual value systems, closed-loop control
6.4 Setpoint/actual-value system
,QWHUQDOLQFUHPHQWVPP
(QFRGHULQFUHPHQWVPP
,6B527B$; (1&B,6B',5(&7
(1&B,6B/,1($5
7DEOH
0 *
%DOOVFUHZ (1&B5(62/
/RDG 0HDV
JHDU JHDU
/($'6&5(:B3,7&+
Q 6SLQGOH Q (QFRGHU
'5,9(B(1&B5$7,2B180(5$ 1RRIVSLQGOHUHYV
'5,9(B(1&B5$7,2B'(120 1RRIHQFRGHUUHYV
The ratio of the internal increments to the encoder increments per mm is calculated as
follows:
,QWHUQDOLQFUHPHQWVPP
(QFRGHULQFUHPHQWVPP (1&B5(62/>Q@
(1&B38/6(B08/7>Q@
'5,9(B(1&B5$7,2B180(5$>Q@
'5,9(B(1&B5$7,2B'(120>Q@
/($'6&5(:B3,7&+
,17B,1&5B3(5B00
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 345
G2: Velocities, setpoint / actual value systems, closed-loop control
6.4 Setpoint/actual-value system
(1&B,6B/,1($5
(1&B,6B',5(&7
Q (QFRGHU Q /RDG ,6B527B$;
* 0 /
5RWDU\WDEOH
'5,9(B(1&B5$7,2B180(5$ 1XPEHURIPRWRUUHYROXWLRQV
'5,9(B(1&B5$7,2B'(120 1XPEHURIHQFRGHUUHYROXWLRQV
The ratio of the internal increments to the encoder increments per degree is calculated as
follows:
,QWHUQDOLQFUHPHQWVGHJUHHV GHJUHHV
(QFRGHULQFUHPHQWVGHJUHHV (1&B5(62/>Q@
(1&B38/6(B08/7>Q@
'5,9(B(1&B5$7,2B180(5$>Q@
'5,9(B(1&B5$7,2B'(120>Q@
'5,9(B$;B5$7,2B'(120>Q@
'5,9(B$;B5$7,2B180(5$>Q@
,17B,1&5B3(5B'(*
Basic Functions
346 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
G2: Velocities, setpoint / actual value systems, closed-loop control
6.4 Setpoint/actual-value system
Example
Assumptions:
● Rotary encoder on the motor: 2048 pulses/revolution
● Internal pulse multiplication: 2048
● Gearbox, motor / rotary axis: 5:1
● Computational resolution: 1000 increments per degree
,QWHUQDOLQFUHPHQWVGHJUHHV GHJUHHV
(QFRGHULQFUHPHQWVGHJUHHV
LQFUGHJUHHV
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 347
G2: Velocities, setpoint / actual value systems, closed-loop control
6.4 Setpoint/actual-value system
Q /RDG
5RWDU\WDEOH (1&B,6B',5(&7
Q (QFRGHU
(1&B5(62/
0 / * (1&B,6B/,1($5B
/RDGJHDU 5HVROYHUJHDULQJ
The ratio of the internal increments to the encoder increments per degree is calculated as
follows:
,QWHUQDOLQFUHPHQWVGHJUHHV GHJUHHV
(QFRGHULQFUHPHQWVGHJUHHV (1&B5(62/>Q@
(1&B38/6(B08/7>Q@
'5,9(B(1&B5$7,2B180(5$>Q@
'5,9(B(1&B5$7,2B'(120>Q@
,17B,1&5B3(5B'(*
Basic Functions
348 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
G2: Velocities, setpoint / actual value systems, closed-loop control
6.4 Setpoint/actual-value system
'5,9(B$;B5$7,2B180(5$ 1RRIORDGUHYV
'5,9(B$;B5$7,2B'(120 1RRIVSLQGOHUHYV
(1&B,6B',5(&7
(1&B,6B',5(&7 Q
7RRO
5RWDWLQJWRRO
* 0 7RRO
0HDV /RDG ,QWHUPHGLDWHJHDU
JHDU JHDU
Q Q
(QFRGHU 0RWRU (1&B,6B',5(&7 (1&B,6B',5(&7
(1&B,6B',5(&7 (1&B,6B',5(&7
(1&B5(62/
'5,9(B$;B5$7,2B180(5$ 1RRIPRWRUUHYV
'5,9(B$;B5$7,2B'(120 1RRIVSLQGOHUHYV
'5,9(B(1&B5$7,2B180(5$ 1XPEHURIPRWRUUHYROXWLRQV
'5,9(B(1&B5$7,2B'(120 1XPEHURIHQFRGHUUHYROXWLRQV
Figure 6-9 Intermediate gear with encoder directly on the rotating tool
The ratio of the internal increments to the encoder increments per degree is calculated as
follows:
,QWHUQDOLQFUHPHQWVGHJUHHV GHJUHHV
(QFRGHULQFUHPHQWVGHJUHHV (1&B5(62/>Q@
(1&B38/6(B08/7>Q@
'5,9(B(1&B5$7,2B180(5$>Q@
'5,9(B(1&B5$7,2B'(120>Q@
,17B,1&5B3(5B'(*
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 349
G2: Velocities, setpoint / actual value systems, closed-loop control
6.5 Closed-loop control
6.5.1 General
0'0$B$;B-(5.B(1$%/(
0'0$B$;B-(5.B02'( 0'0$B'(69$/B'(/$<B(1$%/(
0'0$B$;B-(5.B7,0( 0'0$B'(69$/B'(/$<B7,0( 0'0$B326&75/B*$,1>Q@
,6
3RVLWLRQPHDVXUHPHQW
V\VWHP
$FWXDOYDOXH
0'0$B)):B02'( SURFHVVLQJ
0'0$B)):B$&7,9$7,21B02'(
0'0$B9(/2B)):B:(,*+7>Q@
0'0$B$;B,1(57,$ 0'0$B(1&B)(('%$&.B32/>Q@
0'0$B$;B0$66 0'0$B(1&B&203B(1$%/(>Q@
0'0$B(48,9B63(('&75/B7,0(>Q@ 0'0$B%$&./$6+>Q@
0'0$B(48,9B&855&75/B7,0(>Q@ 0'0$B%$&./$6+B)$&725>Q@
Figure 6-10 Principle representation of the setpoint processing and closed-loop control
For information on the jerk limitation, see Section "B2: Acceleration (Page 231)".
For a description of the feedforward control, backlash, friction compensation, and leadscrew
error compensation.
References:
Function Manual Extended Functions; Compensations (K3)
Basic Functions
350 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
G2: Velocities, setpoint / actual value systems, closed-loop control
6.5 Closed-loop control
Fine interpolation
Using the fine interpolator (FIPO), the contour precision can be further increased by reducing
the staircase effect in the speed setpoint. You can set three different types of fine
interpolation:
MD33000 $MA_FIPO_TYPE = <FIPO mode>
9HORFLW\ >PPLQ@
.9
)ROORZLQJHUURU >PP@
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 351
G2: Velocities, setpoint / actual value systems, closed-loop control
6.5 Closed-loop control
6WHSUHVSRQVH
RIWKH
SRVLWLRQFRQWURO
$[LVHTXLYDOHQWWLPH
ORRS
$[LV
HTXLYDOHQW 0'
WLPH 0$B'<1B0$7&+B7,0(
$[LVZLWKKLJKVHUYRJDLQ
DQGG\QDPLFUHVSRQVHDGDSWDWLRQ
$[LVZLWK
KLJKVHUYR
JDLQ
$[LVZLWKORZVHUYRJDLQ
Example of a dynamic response adaptation of three axes without speed feedforward control
With an equivalent time constant of 30 ms, axis 1 is the dynamically weakest axis.
This results in the following new equivalent time constants for the axes:
Basic Functions
352 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
G2: Velocities, setpoint / actual value systems, closed-loop control
6.5 Closed-loop control
Approximation formulas for the equivalent time constant of the position control loop of an axis
The equivalent time constant Tequiv of the position control loop of an axis is approximately
calculated depending on the type of feedforward control:
● Without feedforward control:
76SDUHV ป
0'326&75/B*$,1>V@
76SDUHV ป 0'(48,9B63(('&75/B7,0(
76SDUHV ป 0'(48,9B&855&75/B7,0(
Note
If dynamic response adaptation is realized for a geometry axis, then all other geometry axes
must be set to the same dynamic response.
References:
Commissioning Manual CNC: NCK, PLC, Drives
Machine data
A parameter set comprises the following machine data:
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 353
G2: Velocities, setpoint / actual value systems, closed-loop control
6.5 Closed-loop control
For further information on gear stages for spindles, see Section "S1: Spindles (Page 1225)".
Basic Functions
354 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
G2: Velocities, setpoint / actual value systems, closed-loop control
6.6 Optimization of the control
Function
With feedforward control active, the position setpoint is sent through a socalled balancing
filter before it reaches the controller itself. It is thus possible to control the speed setpoint to
100% in advance, without resulting in overshoots when positioning.
Activation
The feedforward control variant is selected and so also the filter activated using the axis-
specific machine data:
MD32620 $MA_FFW_MODE (feedforward control mode)
Value Meaning
3 Speed precontrol
4 Combined torque/speed precontrol
Parameterization
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 355
G2: Velocities, setpoint / actual value systems, closed-loop control
6.6 Optimization of the control
Setting the equivalent time constant of the speed control loop (MD32810)
We recommend that the axis be allowed to move in and out in "AUTOMATIC" mode with a
part program and that travel-in to the target position, i.e. the actual position value of the
active measuring system, be monitored with the servo trace.
The initial value for setting is the time constant of the speed control loop. This can be read
from the reference frequency characteristic of the speed control loop. In the frequent case of
a PI controller with speed setpoint smoothing, an approximate equivalent time can be read
from drive machine data p1414, p1415, p1416 and p1421.
This start value (e.g. 1.5 ms) is now entered:
MD32810 $MA_EQUIV_SPEEDCTRL_TIME = 0.0015
The axis then travels forward and backward and the operator monitors a greatly-magnified
characteristic of the actual position value at the target position.
The following rules apply to making manual fine adjustments:
Increasing MD32810
Increasing the value of MD32810 slows the axis down and increases the geometric contour
error on curves to some degree.
It has a similar effect to reducing the position controller gain:
MD32200 $MA_POSCTRL_GAIN
This can also be observed in the Diagnostics area in the "Axis Service" screen form based
on the servo gain value calculated.
Reducing MD32810
Reducing the value of MD32810 accelerates the axis.
Therefore, MD32810 should be assigned as small a value as possible, with the overshoot
setting the limit during positioning.
Basic Functions
356 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
G2: Velocities, setpoint / actual value systems, closed-loop control
6.6 Optimization of the control
These can be reduced with the help of the position setpoint filter for dynamic response
adaptation (MD32910 $MA_DYN_MATCH_TIME) and for jerk (MD32410
$MA_AX_JERK_TIME), which also reduces the axis speed.
Setting the equivalent time constant of the current control loop (MD32800)
The activation of the torque feedforward control filter is performed with:
MD32620 $MA_FFW_MODE = 4
The same rules and recommendations apply to setting the time constant of the current
control loop MD32800 $MA_EQUIV_CURRCTRL_TIME as to the speed feedforward control.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 357
G2: Velocities, setpoint / actual value systems, closed-loop control
6.6 Optimization of the control
Note
If DSC is to be activated (MD32640 = 1), no parameters may be assigned for actual-value
inversion in the NC (MD32110 $MA_ENC_FEEDBACK_POL = -1). Otherwise, error 26017
occurs.
In DSC mode, actual-value inversion may only be undertaken in the drive (SINAMICS
parameter p0410).
Function
In some applications, such as when milling sculptured surfaces, it can be advantageous to
smooth the position setpoint curves using the jerk filter to obtain better surfaces by reducing
the excitations of machine vibrations. The filter effect of the position setpoints must be as
strong as possible without impermissibly affecting contour accuracy. The smoothing behavior
of the filter must also be as "symmetrical" as possible, i.e. if the same contour was to be
traversed both forward and backward, the characteristic rounded by the filter should be as
similar as possible in both directions.
The effect of the filter can be monitored by means of the effective servo gain factor (KV),
which is displayed on the "Axis service" screen form. The filtering effect rounds the position
setpoints slightly, thus reducing the path accuracy so that with increasing filter time a smaller
effective servo gain factor (KV) is displayed.
Note
The jerk filter creates a dependent phase offset for each amplitude setting. Only the
additional use of the phase filter (see "Position controller, position setpoint filter: Phase filter
(Page 360)") permits a transparent setting of the axis dynamic response.
Basic Functions
358 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
G2: Velocities, setpoint / actual value systems, closed-loop control
6.6 Optimization of the control
Activation
To activate the axial jerk filter setpoint, the following machine data must be set to "TRUE":
MD32400 $MA_AX_JERK_ENABLE (axial jerk limitation)
Parameterization
The axial jerk filter is parameterized via the machine data:
MD32402 $MA_AX_JERK_MODE (filter type for axial jerk limitation)
MD32410 $MA_AX_JERK_TIME (time constant for the axial jerk filter)
Example:
Note
Generally, the filter is set using:MD32402 $MA_AX_JERK_MODE = 2.
Fine adjustment
The fine adjustment of the jerk filter is carried out as follows:
1. Assess the traversing response of the axis
(e.g. based on positioning processes with servo trace).
2. Modify the filter time in MD32410 $MA_AX_JERK_TIME.
3. Activate the modified time via "Enable machine data" or RESET on the machine control
panel.
Deactivation
Disabling the jerk filter:
1. Block the filter calculation:
MD32400 $MA_AX_JERK_ENABLE = 0
2. Activate the interlock via "Enable machine data" or RESET on the machine control panel.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 359
G2: Velocities, setpoint / actual value systems, closed-loop control
6.6 Optimization of the control
Boundary conditions
Filter times
The jerk filter is only effective when the time constant (MD32410) is greater than one position
control cycle.
Filter effect
● The display of the calculated servo gain factor (KV) in the "Axis service" screen form
displays smaller values than would be appropriate based on the filter effect.
● Path accuracy is better than the displayed servo gain (KV) suggests.
Therefore, on resetting MD32400 = 1 to MD32400 = 2, the displayed servo gain (KV) can
be reduced while retaining the same filter time, although the path accuracy improves.
References
For further information on jerk limitation at the interpolator level, see Sections "Jerk limitation
with single-axis interpolation (SOFTA) (axis-specific) (Page 249)" and "Axis/spindlespecific
machine data (Page 279)".
Function
The axial setpoint phase filter implements a pure phase shift (broken dead time) with which
the setpoint phase response can be set independent of the amplitude response. Together
with the axial setpoint jerk filter "Floating average value formation"
(MD32402_$MA_AX_JERK_MODE = 2; see "Position controller, position setpoint filter: Jerk
filter (Page 358)") it makes it possible for the commissioning engineer to adapt the amplitude
response and the phase response to the weakest axis independent of each other and so
optimize the dynamically different axes for creating a shared contour.
Activation
To activate the axial phase filter setpoint, the following machine data must be set to "TRUE":
MD32890 $MA_DESVAL_DELAY_ENABLE (axial phase filter setpoint)
Basic Functions
360 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
G2: Velocities, setpoint / actual value systems, closed-loop control
6.6 Optimization of the control
Parameterization
The time constant for the axial phase filter setpoint (dead time / delay) is set in the machine
data:
MD32895 $MA_DESVAL_DELAY_TIME
Time constants can be set in the range of 0 to 64 position control cycles. This means, the
phase filter, for example, can delay the setpoints by 0 to 128 ms for 2 ms position control
cycle.
Note
For system reasons, because delays in the setpoint machining chain can slow the response
for tapping, safety retractions, exact stop / block change, etc, time constants should be set
as small as possible.
Delay values larger than 64 position control cycles will be limited to 64 without any alarm
message. The limitation of the maximum value applies to the internal representation of the
delay time and not to the machine data itself.
A negative value cannot be set.
MD32895 $MA_DESVAL_DELAY_TIME acts only when MD32890
$MA_DESVAL_DELAY_ENABLE = TRUE.
Examples:
For the following parameterization examples: Position control cycle = 2 ms
1. MD32890 $MA_DESVAL_DELAY_ENABLE = FALSE
MD32895 $MA_DESVAL_DELAY_TIME = <non-negative value>
The activation data item is set to "FALSE". The filter is correspondingly inactive,
independent of MD32895.
2. MD32890 $MA_DESVAL_DELAY_ENABLE = TRUE
MD32895 $MA_DESVAL_DELAY_TIME = 0.002
The filter is active and the input values are delayed by one position control cycle.
3. MD32890 $MA_DESVAL_DELAY_ENABLE = TRUE
MD32895 $MA_DESVAL_DELAY_TIME = 0.256
The filter is active. The set delay corresponds to 128 position control cycles although the
maximum delay is 64 position control cycles. Accordingly, the internal delay time is limited
to 64 position control cycles. The machine data MD32895 remains unchanged.
Boundary conditions
Safety
The function delays the setpoints; this causes, for example, safety retraction movements
(Stop E) also to be delayed (with maximum 64 position control cycles). This has no impact
on safety shutdown actions, however.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 361
G2: Velocities, setpoint / actual value systems, closed-loop control
6.6 Optimization of the control
Preconditions
● The function can only be used on axes with two encoders:
MD30200 $MA_NUM_ENCS = 2
One of the encoders must be parameterized as an indirect measuring system and the
other as a direct measuring system:
– Direct measuring system:
MD31040 $MA_ENC_IS_DIRECT[1]=1
The encoder for position actual-value acquisition is connected directly to the machine
(load encoder).
– Indirect measuring system:
MD31040 $MA_ENC_IS_DIRECT[0]=0
The encoder for position actual-value acquisition is located on the motor (motor
encoder).
● Telegram type 136 or 138 must be configured as standard telegram type for PROFIdrive
both in the drive and also in the NC (MD13060 $MN_DRIVE_TELEGRAM_TYPE).
Function
For active injected positional deviation, the difference position between the direct and the
indirect measuring system of an axis is determined and in accordance with the weighting-
factor setting is applied as additional current setpoint for the feedforward control in the
position control cycle. The resulting oscillation damping improves the stability and positioning
behavior of the axis.
Application
The function is used for axes with strong tendency to vibrate.
Effectiveness
The function acts only for axes with small natural frequency (to approximately 20 Hz).
Basic Functions
362 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
G2: Velocities, setpoint / actual value systems, closed-loop control
6.6 Optimization of the control
Activation/parameterization
The function is activated by specifying the weighting factor:
MD32950 $MA_POSCTRL_DAMPING (damping of the speed control loop) = <value>
Value range: -100% ... +100%
An input value "100%" means: A supplementary torque in accordance with SINAMICS
parameter p2003 is applied when the determined position difference between the two
measuring systems reaches the following value:
● With linear motors: 1 mm
● With linear axis with rotary motor: MD31030 $MA_LEADSCREW_PITCH (leadscrew
pitch)
● For rotary axis/spindle: 360 degrees
Standard setting is 0. In this case, the injection of positional deviation is inactive.
Note
The weighting factor MD32950 $MA_POSCTRL_DAMPING can be set on the basis of step
responses, for example.
If the control approaches the stability limit (vibration inclination increases), the parameter is
too large or the value has the incorrect sign.
Function
As standard, the core of the position controller is a P controller. It is possible to switch-in an
integral component for special applications (such as an electronic gear). The resulting
proportional-plus-integral-action controller then corrects the error between setpoint and
actual positions down to zero in a finite, settable time period when the appropriate machine
data is set accordingly.
CAUTION
Overshootings of the actual position for activated PI controller
In this instance, you must decide whether this effect is admissible for the application in
question. Knowledge of the control technology and measurements with servo trace are an
absolute prerequisite for using the function. If the appropriate machine data is incorrectly
set, then machines could be damaged due to instability.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 363
G2: Velocities, setpoint / actual value systems, closed-loop control
6.6 Optimization of the control
Procedure
1. First optimize the position control loop as a proportional-action controller using the tools
described in the previous subsections.
2. Increase the tolerances of the following machine data while measurements are being
taken to determine the quality of the position control with proportional-plus-integral-action
controller:
– MD36020 $MA_POSITIONING_TIME
– MD36030 $MA_STANDSTILL_POS_TOL
– MD36040 $MA_STANDSTILL_DELAY_TIME
– MD36400 $MA_CONTOUR_TOL
3. Activate the position control loop as a proportional-plus-integral-action controller by
setting the following machine data:
MD32220 $MA_POSCTRL_INTEGR_ENABLE ; set value 1
MD32210 $MA_POSCTRL_INTEGR_TIME ; integral time [sec.]
Effect of integral time:
– Tn → 0:
The control error is corrected quickly; however, the control loop can become instable.
– Tn → ∞:
Effectiveness of the integral component is almost 0. Behavior of the controller like a
pure proportional controller.
4. Find the right compromise for Tn between these two extreme cases for the application.
Tn must not be chosen too near the stability limit because the occurrence of an instability
can cause machine damage.
5. Use servo trace to trace the travel-in of an automatic program traveling to and from a
target position.
6. Set the servo trace to display the following:
– Following error
– Actual velocity
– Actual position
– Reference position
7. Reset the tolerance values in the following machine data to the required values, once the
optimum value for Tn has been identified:
– MD36020 $MA_POSITIONING_TIME
– MD36030 $MA_STANDSTILL_POS_TOL
– MD36040 $MA_STANDSTILL_DELAY_TIME
– MD36400 $MA_CONTOUR_TOL
Basic Functions
364 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
G2: Velocities, setpoint / actual value systems, closed-loop control
6.6 Optimization of the control
Example
*UDSKLF7U$[LV;7U$[LV;!
7U)ROORZLQJHUURU 0DUNHU;
7U$FWXDOYHORFLW\
*UDSKLF7U$[LV;7U$[LV;!
7U$FWXDOSRVLWLRQPHDVXULQJV\VW 0DUNHU;
7U3RVLWLRQVHWSRLQW
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 365
G2: Velocities, setpoint / actual value systems, closed-loop control
6.7 Data lists
Basic Functions
366 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
G2: Velocities, setpoint / actual value systems, closed-loop control
6.7 Data lists
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 367
G2: Velocities, setpoint / actual value systems, closed-loop control
6.7 Data lists
Basic Functions
368 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
H2: Auxiliary function outputs to PLC 7
7.1 Brief description
7.1.1 Function
Auxiliary functions permit activation of the system functions of the NCK and PLC user
functions. Auxiliary functions can be programmed in:
● Part programs
● Synchronized actions
● User cycles
For detailed information on the use of auxiliary function outputs in synchronized actions, see:
References:
Function Manual, Synchronized Actions
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 369
H2: Auxiliary function outputs to PLC
7.1 Brief description
Basic Functions
370 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
H2: Auxiliary function outputs to PLC
7.1 Brief description
M functions
M (special function)
Address extension Value
Use
Controlling machine functions in synchronism with the part program.
Further information
● The following M functions have a predefined meaning: M0, M1, M2, M17, M30
M3, M4, M5, M6, M19, M70, M40, M41, M42, M43, M44, M45.
● For each M function (M0 - M99), there is a dynamic signal at the NC/PLC interface that
indicates the validity (new output) of the M function. In addition, 64 further signals can be
assigned for user M functions (see Section "P3: Basic PLC program for SINUMERIK
840D sl (Page 809)").
● For subprograms, machine data can be used to set whether an output of the M function
should be undertaken for the end of the part program M17, M2 and M30 to the PLC:
MD20800 $MC_SPF_END_TO_VDI (subprogram end to PLC)
● For the predefined M function M40 – M45, only limited redefinition of the output
specification is possible.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 371
H2: Auxiliary function outputs to PLC
7.1 Brief description
● The predefined auxiliary functions M0, M1, M17, M30, M6, M4, M5 cannot be redefined.
● M function-specific machine data:
MD10800 $MN_EXTERN_CHAN_SYNC_M_NO_MIN
MD10802 $MN_EXTERN_CHAN_SYNC_M_NO_MAX
MD10804 $MN_EXTERN_M_NO_SET_INT
MD10806 $MN_EXTERN_M_NO_DISABLE_INT
MD10814 $MN_EXTERN_M_NO_MAC_CYCLE
MD10815 $MN_EXTERN_M_NO_MAC_CYCLE_NAME
MD20094 $MC_SPIND_RIGID_TAPPING_M_NR
MD20095 $MC_EXTERN_RIGID_TAPPING_M_NR
MD20096 $MC_T_M_ADDRESS_EXT_IS_SPINO
MD22200 $MC_AUXFU_M_SYNC_TYPE
MD22530 $MC_TOCARR_CHANGE_M_CODE
MD22532 $MC_GEOAX_CHANGE_M_CODE
MD22534 $MC_TRAFO_CHANGE_M_CODE
MD22560 $MC_TOOL_CHANGE_M_CODE
S functions
S (spindle function)
Address extension Value
Use
Spindle speed.
Further information
● S functions are assigned to auxiliary function group 3 by default.
● Without an address extension, the S functions refer to the master spindle of the channel.
● S function-specific machine data:
MD22210 $MC_AUXFU_S_SYNC_TYPE (output time of the S functions)
Basic Functions
372 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
H2: Auxiliary function outputs to PLC
7.1 Brief description
H functions
H (aux. function)
Address extension Value
Use
User-specific auxiliary functions.
Further information
● H function-specific machine data:
MD22110 $MC_AUXFU_H_TYPE_INT (type of H-auxiliary function is an integer)
MD22230 $MC_AUXFU_H_SYNC_TYPE (output time of the H functions)
T functions
T (tool number) 5) 6)
Address extension Value
Use
Tool selection.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 373
H2: Auxiliary function outputs to PLC
7.1 Brief description
Further information
● Identification of the tools, optionally via tool number or location number (see Section "W1:
Tool offset (Page 1389)").
References:
Function Manual Tool Management
● When T0 is selected, the current tool is removed from the toolholder but not replaced by
a new tool (default setting).
● T function-specific machine data:
MD22220 $MC_AUXFU_T_SYNC_TYPE (output time of the T functions)
D functions
D (tool offset)
Address extension Value
Use
Selection of the tool offset.
Further information
● Initial setting: D1
● After a tool change, the default tool cutting edge can be parameterized via:
MD20270 $MC_CUTTING_EDGE_DEFAULT (basic position of the tool cutting edge
without programming)
● Deselection of the tool offset: D0
● D function-specific machine data:
MD22250 $MC_AUXFU_D_SYNC_TYPE (output time of the D functions)
Basic Functions
374 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
H2: Auxiliary function outputs to PLC
7.1 Brief description
DL functions
Use
Selection of the additive tool offset with reference to an active tool offset.
Further information
● Initial setting: DL = 0
● DL values cannot be output to the PLC via synchronized actions.
● Default setting of the additive tool offset without an active DL function:
MD20272 $MC_SUMCORR_DEFAULT (basic setting of the additive offset without a
program)
● Deselection of the additive tool offset: DL = 0
● DL function-specific machine data:
MD22252 $MC_AUXFU_DL_SYNC_TYPE (output time DL functions)
F functions
F (feedrate)
Address extension Value
Use
Path velocity.
Further information
● F function-specific machine data:
MD22240 $MC_AUXFU_F_SYNC_TYPE (output time of F functions)
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 375
H2: Auxiliary function outputs to PLC
7.1 Brief description
FA functions
FA (axial feedrate)
Address extension Value
Use
Axial velocity.
Further information
● F function-specific machine data:
MD22240 $MC_AUXFU_F_SYNC_TYPE (output time of F functions)
Meaning of footnotes
1) If tool management is active, neither a T change signal nor a T word is output to the interface
(channel).
2) The type for the values can be selected by the user via MD22110 $MC_AUXFU_H_TYPE_INT.
3) Because of the limited display options on the operator panel screens, the REAL type values
displayed are restricted to:
–999 999 999.9999 to 999 999 999.9999
The NC calculates internally but with complete accuracy.
4) The REAL values are rounded and output to the PLC when setting the machine data:
MD22110 $MC_AUXFU_H_TYPE_INT = 1 (type of H-auxiliary functions is an integer)
The PLC user program must interpret the value transferred according to the machine data setting.
5) If the tool management is active, the meaning of the address extension can be parameterized.
Address extension = 0 means the value must be replaced by that of the master spindle number,
i.e. it is equivalent to not programming the address extension.
Auxiliary functions M19 "Position spindle" collected during a block search are not output to the
PLC.
6) M6: Range of values of the address extension:
- without tool management: 0 ... 99
- with tool management: 0 ... maximum spindle number
0: to be replaced by the value of the master spindle number or master toolholder
7) If tool management is active, the auxiliary function M6 "Tool change" can only be programmed
once in a part program block, irrespective the address extensions that are programmed.
8) Maximum number of auxiliary functions per part program block.
Basic Functions
376 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
H2: Auxiliary function outputs to PLC
7.2 Predefined auxiliary functions
Function
Every pre-defined auxiliary function is assigned to a system function and cannot be changed.
If a pre-defined auxiliary function is programmed in a part program/cycle, then this is output
to the PLC via the NC/PLC interface and the corresponding system function is executed in
the NCK.
Parameter Meaning
Index <n> Machine data index of the parameters of an auxiliary function
Type MD22050 $MC_AUXFU_PREDEF_TYPE[<n>]
Address extension MD22060 $MC_AUXFU_PREDEF_EXTENSION[<n>]
Value MD22070 $MC_AUXFU_PREDEF_VALUE[<n>]
Group MD22040 $MC_AUXFU_PREDEF_GROUP[<n>]
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 377
H2: Auxiliary function outputs to PLC
7.2 Predefined auxiliary functions
Basic Functions
378 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
H2: Auxiliary function outputs to PLC
7.2 Predefined auxiliary functions
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 379
H2: Auxiliary function outputs to PLC
7.2 Predefined auxiliary functions
Basic Functions
380 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
H2: Auxiliary function outputs to PLC
7.2 Predefined auxiliary functions
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 381
H2: Auxiliary function outputs to PLC
7.2 Predefined auxiliary functions
Basic Functions
382 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
H2: Auxiliary function outputs to PLC
7.2 Predefined auxiliary functions
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 383
H2: Auxiliary function outputs to PLC
7.2 Predefined auxiliary functions
Basic Functions
384 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
H2: Auxiliary function outputs to PLC
7.2 Predefined auxiliary functions
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 385
H2: Auxiliary function outputs to PLC
7.2 Predefined auxiliary functions
Basic Functions
386 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
H2: Auxiliary function outputs to PLC
7.2 Predefined auxiliary functions
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 387
H2: Auxiliary function outputs to PLC
7.2 Predefined auxiliary functions
Basic Functions
388 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
H2: Auxiliary function outputs to PLC
7.2 Predefined auxiliary functions
Parameter Meaning
Index <n> Machine data index of the parameters of an auxiliary function
Output behavior MD22080 $MC_AUXFU_PREDEF_SPEC[<n>], Bits 0 ... 18
Bits 19 ... 31: Reserved
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 389
H2: Auxiliary function outputs to PLC
7.2 Predefined auxiliary functions
Bit Meaning
0 Acknowledgement "normal" after an OB1 cycle
An auxiliary function with normal acknowledgment is output to the NC/PLC interface at the beginning of the OB1
cycle. The auxiliary function-specific change signal indicates to the PLC user program that the auxiliary function is
valid.
The auxiliary function is acknowledged as soon as organization block OB1 has run once. This corresponds to a
complete PLC user cycle.
The auxiliary function with normal acknowledgment is output in synchronism with the part program block in which it
is programmed. If execution of the parts program block, e.g. path and/or positioning axis movements, is completed
before acknowledgment of the auxiliary function, the block change is delayed until after acknowledgment by the
PLC.
In continuous-path mode, a constant path velocity can be maintained in conjunction with an auxiliary function with
normal acknowledgment, if the auxiliary function is output by the PLC during the traversing motion and before
reaching the end of the block.
1 Acknowledgement "quick" with OB40
An auxiliary function with quick acknowledgment is output to the NC/PLC interface before the next OB1 cycle. The
auxiliary function-specific change signal indicates to the PLC user program that the auxiliary function is valid.
The auxiliary function is acknowledged immediately by the PLC basic program in the next OB40 cycle.
Acknowledgment of the auxiliary function is not confirmation that the corresponding PLC user function has been
executed. The auxiliary function is still executed in the OB1 cycle. Next output of the auxiliary functions to the PLC
is therefore not possible until after this OB1 cycle has run completely. This is noticeable in continuous-path mode
(drop in path velocity) especially if auxiliary functions with quick acknowledgment are output in several consecutive
part program blocks.
With auxiliary functions with quick acknowledgment, it cannot be guaranteed that the PLC user program will
respond in synchronism with the block.
Note
Parameterization of the output behavior of auxiliary functions as "quick auxiliary functions" is only possible in
conjunction with user-defined auxiliary functions.
Basic Functions
390 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
H2: Auxiliary function outputs to PLC
7.2 Predefined auxiliary functions
Bit Meaning
2 No predefined auxiliary function
A predefined auxiliary function is treated like a user-defined auxiliary function with this setting. The auxiliary function
then no longer triggers the corresponding system function but is only output to the PLC.
Example:
Reconfiguration of the "Position spindle" auxiliary function (index 9) to a user-defined auxiliary function with normal
acknowledgment and output prior to the traversing motion.
MD22080 $MC_AUXFU_PREDEF_SPEC [ 9 ] = 'H25' (100101B)
3 No output to the PLC
The auxiliary function is not output to the PLC.
4 Spindle response after acknowledgement by the PLC
The associated system function is only executed after acknowledgment by the PLC.
5 Output prior to motion
The auxiliary function is output to the PLC before the traversing motions programmed in the part program block
(path and/or block-related positioning axis movements).
6 Output during motion
The auxiliary function is output to the PLC during the traversing motions programmed in the part program block
(path and/or block-related positioning axis movements).
7 Output at block end
The auxiliary function is output to the PLC after the traversing motions programmed in the part program block have
been completed (path and/or block-related positioning axis movements).
8 Not output after block search, types 1, 2, 4
Block search, types 1, 2, 4: The auxiliary function collected during the block search is not output.
9 Collection during block search with program test (type 5, SERUPRO)
For a block search with program test, the auxiliary function is collected group-specific in the following system
variables:
• $AC_AUXFU_M_VALUE[<n>]
• $AC_AUXFU_M_EXT[<n>]
• $AC_AUXFU_M_STATE[<n>]
10 No output during block search with program test (type 5, SERUPRO)
For block search with program test, the auxiliary function is not output to the PLC.
11 Cross-channel auxiliary function (SERUPRO)
For block search with program test (SERUPRO), the help function is collected on a cross-channel basis in the
global list of the auxiliary functions.
Note
For each auxiliary function group, only the last auxiliary function of the group is always collected.
12 Output performed via synchronized action (read only)
The bit is set if the auxiliary function was output to the PLC via a synchronized action.
13 Implicit auxiliary function (read-only)
The bit is set if the auxiliary function was implicitly output to the PLC.
14 Active M01 (read only)
The bit is set if the auxiliary function, for active M01, was output to the PLC.
15 No output during positioning test run
During the run-in test, the auxiliary function is not output to the PLC.
16 Nibbling off
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 391
H2: Auxiliary function outputs to PLC
7.2 Predefined auxiliary functions
Bit Meaning
17 Nibbling on
18 Nibbling
Note
In the case of auxiliary functions for which no output behavior has been defined, the
following default output behavior is active:
• Bit 0 = 1: Output duration one OB1 cycle
• Bit 7 = 1: Output at block end
7.2.3 Parameterization
Note
1. Auxiliary function group and block search
Auxiliary functions of the 1st auxiliary function group are, for a block search, only collected,
but not output.
Basic Functions
392 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
H2: Auxiliary function outputs to PLC
7.2 Predefined auxiliary functions
Type
The identifier of an auxiliary function is defined via the "type," e.g.:
Note
The "type" cannot be changed for predefined auxiliary functions.
Address extension
The "address extension" of an auxiliary function is for addressing different components of the
same type. In the case of predefined auxiliary functions, the value of the "address extension"
is the spindle number to which the auxiliary function applies.
The setting is made via the following machine data:
MD22060 $MC_AUXFU_PREDEF_EXTENSION[<n>] (address extension for predefined
auxiliary functions)
Grouping together auxiliary functions
To assign an auxiliary function for all spindles of a channel to the same auxiliary function
group, the value "-1" is entered for the "address extension" parameter.
Example:
The auxiliary function M3 (machine data index = 6) is assigned to the second auxiliary
function group for all the channel's spindles.
MD22040 $MC_AUXFU_PREDEF_GROUP[ 6 ] =2
MD22050 $MC_AUXFU_PREDEF_TYPE[ 6 ] = "M"
MD22060 $MC_AUXFU_PREDEF_EXTENSION[ 6 ] = -1
MD22070 $MC_AUXFU_PREDEF_VALUE[ 6 ] =3
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 393
H2: Auxiliary function outputs to PLC
7.2 Predefined auxiliary functions
Value
The parameters "value" and "type" define the meaning of an auxiliary function, i.e. the
system function that is activated on the basis of this auxiliary function.
The "value" of an auxiliary function is defined in the machine data:
MD22070 $MC_AUXFU_PREDEF_VALUE[<n>] (value of predefined auxiliary functions)
Note
The "value" cannot be changed for a predefined auxiliary function. For some predefined
auxiliary functions, the "value" can be reconfigured via additional machine data (see Section
"Associated auxiliary functions (Page 402)").
Basic Functions
394 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
H2: Auxiliary function outputs to PLC
7.2 Predefined auxiliary functions
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 395
H2: Auxiliary function outputs to PLC
7.2 Predefined auxiliary functions
06;B2XWSXWRSWLRQ
6SLQGOH
(GLWLRQ 4XLW UHVSRQVH
0 $[LVPRWLRQ
W
%ORFN
Y FKDQJH
6SLQGOH 06;B2XWSXWRSWLRQ
UHVSRQVH
(GLWLRQ 4XLW
0 $[LVPRWLRQ
W
%ORFN
Y
FKDQJH
6SLQGOH 06;B2XWSXWRSWLRQ
UHVSRQVH
(GLWLRQ 4XLW
0 $[LVPRWLRQ
W
Y %ORFN
FKDQJH
6SLQGOH
UHVSRQVH
06;B2XWSXWRSWLRQ
(GLWLRQ 4XLW
0 $[LVPRWLRQ
W
%ORFN
FKDQJH
Basic Functions
396 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
H2: Auxiliary function outputs to PLC
7.2 Predefined auxiliary functions
6SLQGOH 0;
UHVSRQVH 2XWSXWRSWLRQ
2XWSXW 4XLW
$[LVPRWLRQ
0
%ORFNFKDQJH W
Y
6SLQGOH 0;
UHVSRQVH 2XWSXWRSWLRQ
2XWSXW 4XLW
0
$[LVPRWLRQ
%ORFNFKDQJH W
Y
6SLQGOH
UHVSRQVH
2XWSXW 4XLW 'HIDXOWVHWWLQJ
06;
0 2XWSXWRSWLRQ
$[LVPRWLRQ
%ORFNFKDQJH W
Y
6SLQGOH
UHVSRQVH 'HIDXOWVHWWLQJ
2XWSXW 4XLW 06;
0 2XWSXWRSWLRQ
$[LVPRWLRQ
%ORFNFKDQJH W
Y
6SLQGOH
'HIDXOWVHWWLQJ
UHVSRQVH
0;
2XWSXW 4XLW
2XWSXWRSWLRQ
0
$[LVPRWLRQ
%ORFNFKDQJH W
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 397
H2: Auxiliary function outputs to PLC
7.3 Userdefined auxiliary functions
'HIDXOWVHWWLQJ
6SLQGOHUHVSRQVH 0;
2XWSXW $FN
2XWSXWEHKDYLRU
0
$[LVPRYHPHQW
W
%ORFNFKDQJH
Y
6SLQGOHUHVSRQVH 'HIDXOWVHWWLQJ
0;
2XWSXW $FN 2XWSXWEHKDYLRU
0
$[LVPRYHPHQW
W
%ORFNFKDQJH
Y
6SLQGOHUHVSRQVH 'HIDXOWVHWWLQJ
2XWSXW $FN 06;
6 2XWSXWEHKDYLRU
$[LVPRYHPHQW
W
%ORFNFKDQJH
Basic Functions
398 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
H2: Auxiliary function outputs to PLC
7.3 Userdefined auxiliary functions
The relevant predefined auxiliary functions can be extended for the following system
functions:
Example:
Extension of the predefined auxiliary function for the system function "spindle right" for the
second and third spindle of the channel.
Auxiliary function "spindle right" for the second spindle of the channel:
MD22010 $MC_AUXFU_ASSIGN_TYPE[ n ] = "M"
MD22020 $MC_AUXFU_ASSIGN_EXTENSION[ n ] =2
MD22030 $MC_AUXFU_ ASSIGN_VALUE[ n ] =3
Auxiliary function "spindle right" for the third spindle of the channel:
MD22010 $MC_AUXFU_ ASSIGN_TYPE[ m ] = "M"
MD22020 $MC_AUXFU_ASSIGN_EXTENSION[ m ] =3
MD22030 $MC_AUXFU_ ASSIGN_VALUE[ m ] =3
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 399
H2: Auxiliary function outputs to PLC
7.3 Userdefined auxiliary functions
7.3.1 Parameterization
Note
1. Auxiliary function group and block search
Auxiliary functions of the 1st auxiliary function group are, for a block search, only collected,
but not output.
Basic Functions
400 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
H2: Auxiliary function outputs to PLC
7.3 Userdefined auxiliary functions
Type
The name of an auxiliary function is defined via the "type".
The identifiers for user-defined auxiliary functions are:
Address extension
MD22020 $MC_AUXFU_ASSIGN_EXTENSION[<n>] (address extension user-defined
auxiliary functions)
The functionality of the address extension is not defined in user-specific auxiliary functions. It
is generally used to distinguish between auxiliary functions with the same "value".
Grouping together auxiliary functions
If all the auxiliary functions of the same type and value are assigned to the same auxiliary
function group, a value of "-1" must be entered for the "address extension" parameter.
Example:
All user-specific auxiliary functions with the value "= 8" are assigned to the tenth auxiliary
function group.
MD22000 $MC_AUXFU_ASSIGN_GROUP [ 1 ] = 10
MD22010 $MC_AUXFU_ ASSIGN_TYPE [ 1 ] = "H"
MD22020 $MC_AUXFU_ ASSIGN_EXTENSION [ 1 ] = -1
MD22030 $MC_AUXFU_ ASSIGN_VALUE [ 1 ] =8
Value
MD22030 $MC_AUXFU_ASSIGN_VALUE[<n>] (value of user-defined auxiliary functions)
The functionality of the "value" parameter is not defined in user-specific auxiliary functions.
The value is generally used to activate the corresponding PLC user function.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 401
H2: Auxiliary function outputs to PLC
7.4 Associated auxiliary functions
MD22000 $MC_AUXFU_ASSIGN_GROUP [ 2 ] = 11
MD22010 $MC_AUXFU_ ASSIGN_TYPE [ 2 ] = "H"
MD22020 $MC_AUXFU_ ASSIGN_EXTENSION [ 2 ] =2
MD22030 $MC_AUXFU_ ASSIGN_VALUE [ 2 ] = -1
Function
Associated auxiliary functions are user-defined auxiliary functions that have the same effect
as the corresponding predefined auxiliary functions. User-defined auxiliary functions can be
associated for the following predefined auxiliary functions:
● M0 (stop)
● M1 (conditional stop)
Requirements
The precondition for association of a user-defined auxiliary function with one of the
predefined auxiliary functions mentioned is parameterization of a user-defined auxiliary
function. Only "M" is allowed as a "type" parameter of the user-defined auxiliary function.
Basic Functions
402 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
H2: Auxiliary function outputs to PLC
7.4 Associated auxiliary functions
Parameter assignment
Association of a user-defined auxiliary function with one of the predefined auxiliary functions
mentioned is set in the machine data:
MD22254 $MC_AUXFU_ASSOC_M0_VALUE (additional M function for program stop)
MD22256 $MC_AUXFU_ASSOC_M1_VALUE (additional M function for conditional stop)
Group assignment
The group assignment of an associated user-defined auxiliary function is always the group
assignment of the corresponding predefined auxiliary function.
Application
Associated auxiliary functions can be used in:
● Main program
● Subroutine
● Cycle
Note
Associated auxiliary functions may not be used in synchronized actions.
Note
A change in machine data MD22254 and/or MD22256 may require corresponding
adjustment of the PLC user program:
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 403
H2: Auxiliary function outputs to PLC
7.5 Type-specific output behavior
Boundary conditions
Please note the following boundary conditions:
● A user-defined auxiliary function may not be multiply associated.
● Predefined auxiliary functions (e.g. M3, M4, M5 etc.) may not be associated.
Example
Associating the user-defined auxiliary function M123 with M0:
MD22254 $MC_AUXFU_ASSOC_M0_VALUE = 123
The user-defined auxiliary function M123 thus has the same functionality as M0.
Function
The output behavior of auxiliary functions relative to a traversing motions programmed in the
parts program block can be defined type-specifically.
Parameter assignment
Parameters are assigned to type-specific output behavior via the machine data:
MD22200 $MC_AUXFU_M_SYNC_TYPE (output time for M functions)
MD22210 $MC_AUXFU_S_SYNC_TYPE (output time for S functions)
MD22220 $MC_AUXFU_T_SYNC_TYPE (output time for T functions)
MD22230 $MC_AUXFU_H_SYNC_TYPE (output time for H functions)
MD22240 $MC_AUXFU_F_SYNC_TYPE (output time for F functions)
MD22250 $MC_AUXFU_D_SYNC_TYPE (output time for D functions)
MD22252 $MC_AUXFU_DL_SYNC_TYPE (output time for DL functions)
The following output behaviors can be parameterized:
MD $MC_AUXFU_xx_SYNC_TYPE = <value>
Basic Functions
404 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
H2: Auxiliary function outputs to PLC
7.5 Type-specific output behavior
For a description of the various output behaviors, see the section titled "Output behavior
(Page 394)".
Note
For the output behavior that can be set for each type of auxiliary function, please refer to the
"Detailed Description of Machine Data" Parameter Manual.
Example
Output of auxiliary functions with different output behaviors in a part program block with
traverse movement.
Output behavior for which parameters have been assigned:
Program code
...
N10 G01 X100 M07 H5 T5
...
;
7
0
+
!6WDUW1
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 405
H2: Auxiliary function outputs to PLC
7.6 Priorities of the output behavior for which parameters have been assigned
7.6 Priorities of the output behavior for which parameters have been
assigned
The following priorities must be observed for the following areas in connection with the
parameterized output behavior of an auxiliary function:
● Output duration (normal / quick acknowledgement)
● Output relative to motion (prior to / during / after the motion)
As a general rule, the parameterized output behavior with lower priority becomes active if no
output behavior with higher priority has been parameterized.
Output duration
The following priorities apply to the output duration:
Note
Part program blocks without path motion
In a part program block without a path motion (even those with positioning axes and
spindles), the auxiliary functions are all output immediately in a block.
Basic Functions
406 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
H2: Auxiliary function outputs to PLC
7.7 Programming an auxiliary function
Syntax
An auxiliary function is programmed in a part program block with the following syntax:
<Type>[<Address extension>=]<Value>
Note
If no address extension is programmed, the address extension is implicitly set = 0.
Predefined auxiliary functions with the address extension = 0 always refer to the master
spindle of the channel.
Symbolic addressing
The values for the "address extension" and "value" parameters can also be specified
symbolically. The symbolic name for the address extension must then be stated in brackets.
Example:
Symbolic programming of the auxiliary function M3 (spindle right) for the first spindle:
Note
If you use symbolic names to program an auxiliary function, the symbolic name is not
transferred when the auxiliary function is output to the PLC. The corresponding numerical
value is transferred instead.
Examples
Example 1: Programming of predefined auxiliary functions
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 407
H2: Auxiliary function outputs to PLC
7.8 Programmable output duration
Example 2: Programming examples of auxiliary functions with the corresponding values for
output to the PLC
Function
User-specific auxiliary functions, for which the output behavior "Output duration of an OB1
cycle (slow acknowledgement)" was parameterized, can be defined for individual outputs via
the parts program guide QU (Quick) for auxiliary functions with quick acknowledgement.
Syntax
An auxiliary function with quick acknowledgment is defined in a part program block with the
following syntax:
<Type>[<Address extension>]=QU(<Value>)
Example
Different behavior for the output of the auxiliary functions M100 and M200 in a parts
program. The output behavior of the auxiliary functions is parameterized as follows:
● M100
– Output duration one OB1 cycle (slow acknowledgment)
– Output during motion
● M200
– Output duration one OB1 cycle (slow acknowledgment)
– Output prior to motion
Basic Functions
408 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
H2: Auxiliary function outputs to PLC
7.8 Programmable output duration
The following figure shows the time sequence of the part program. Please note the time
difference during the processing of parts program blocks N20 and N30.
;D[LV
<D[LV
0
0
%ORFNQXPEHU 1 1 1 1 1
6WUREHIURP1&.DQG 0
DFNQRZOHGJPHQWE\EDVLF
3/&SURJUDP 0
0FKDQJH,6
0FKDQJH,6
3/&F\FOHWLPH2%
2%
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 409
H2: Auxiliary function outputs to PLC
7.9 Auxiliary function output to the PLC
Function
On output of an auxiliary function to the PLC, the following signals and values are transferred
to the NC/PLC interface:
● Change signals
● "Address extension" parameter
● "Value" parameter
Basic Functions
410 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
H2: Auxiliary function outputs to PLC
7.10 Auxiliary functions without block change delay
Function
For auxiliary functions with parameterized and/or programmed output behavior, too:
● "Output duration one OB40 cycle (quick acknowledgment)"
● "Output before the motion" or "Output during the motion"
there may be drops in velocity in continuos-path mode (short traverse paths and high
velocities). This the system has to wait for acknowledgment of the auxiliary function by the
PLC toward the end of the block. To avoid these velocity drops, the block change can be
made irrespective of whether such auxiliary functions have been acknowledged:
Parameter assignment
Suppression of the block change delay with quick auxiliary functions is set via the machine
data:
MD22100 $MC_AUXFU_QUICK_BLOCKCHANGE (block change delay with quick auxiliary
functions)
Value Meaning
0 In the case of quick auxiliary function output to the PLC, the block change is delayed until
acknowledgment by the PLC (OB40).
1 In the case of quick auxiliary function output to the PLC, the block change is not delayed.
Boundary conditions
Synchronism of auxiliary functions that are output without a block change delay is no longer
ensured for the part program block in which they are programmed. In the worst case
scenario, acknowledgment comes one OB40 cycle and execution of the auxiliary function
comes one OB1 cycle after the change to the next part program block.
Function
Triggering a preprocessing stop in conjunction with an auxiliary function can be programmed
explicitly via the STOPRE part program command. Always triggering a preprocessing stop in M
function programming can be parameterized for each M function via the following machine
data:
MD10713 $MN_M_NO_FCT_STOPRE[<n>] (M function with preprocessing stop)
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 411
H2: Auxiliary function outputs to PLC
7.12 Response to overstore
Example
The user-defined M function M88 is intended to trigger a preprocessing stop.
Parameter assignment:
MD10713 $MN_M_NO_FCT_STOPRE [ 0 ] = 88
Application:
Parts program (extract)
Boundary conditions
If a subroutine called indirectly via an M function in a part program in one of the following
ways, no preprocessing stop is performed:
● MD10715 $MN_M_NO_FCT_CYCLE (M function to be replaced by subroutine)
● M98 (ISO dialect T / ISO dialect M)
Overstore
On the SINUMERIK operator interface, before starting the following functions:
● NC START of a part program
● NC START to resume an interrupted part program
the auxiliary functions that are output at the start can be changed by the "Overstore"
function.
Possible applications include:
● Addition of auxiliary functions after block search
● Restoring the initial state to position a part program
Basic Functions
412 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
H2: Auxiliary function outputs to PLC
7.13 Behavior during block search
Duration of validity
An overstored auxiliary function, e.g. M3 (spindle right), is valid until it is overwritten by
another auxiliary function from the same auxiliary function group, by additional overstoring or
by programming in a part program block.
Output behavior
In the case of type 1, 2, and 4 block searches, the auxiliary functions are collected on the
basis of specific groups. The last auxiliary function in each auxiliary function group is output
after NC-START in a separate part program block before the actual reentry block, and has
the following output behavior:
● Output duration of one OB1 cycle (normal acknowledgement)
● Output prior to motion
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 413
H2: Auxiliary function outputs to PLC
7.13 Behavior during block search
Output control
Whether or not the auxiliary function is output to the PLC after a block search can be
configured via bit 8 of the machine data:
● MD22080 $MC_AUXFU_PREDEF_SPEC[<n>]
(output behavior of predefined auxiliary functions)
where <n> = system function index (0 ... 32)
● MD22035 $MC_AUXFU_ASSIGN_SPEC[<n>]
(output behavior of user-defined auxiliary functions)
where <n> = auxiliary function index (0 ... 254)
● MD11110 $MN_AUXFU_GROUP_SPEC[<n>]
(output behavior of the auxiliary functions in a group)
where <n> = group index (0 ... 63)
This behavior does not affect the display and does not affect variables
$AC_AUXFU_STATE[<n>], $AC_AUXFU_VALUE[<n>], and $AC_AUXFU_EXT[<n>].
The auxiliary functions are always regarded as collected after a block search, even though
they are not output to the PLC.
During collection, an auxiliary function that is not output after a block search also overwrites
an auxiliary function whose bit 8 is not set.
The user can scan the collected auxiliary functions after a block search and, under certain
circumstances, output them again by means of the subprogram or synchronized actions.
Note
The following auxiliary functions are not collected:
• Auxiliary functions which are not assigned to any auxiliary function group.
• Auxiliary functions which are assigned to the first auxiliary function group.
Basic Functions
414 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
H2: Auxiliary function outputs to PLC
7.13 Behavior during block search
Function
User-defined auxiliary functions can also be assigned to multiple groups via the group
assignment (MD22000 $MC_AUXFU_ASSIGN_GROUP). During the block search these
auxiliary functions are collected for all the configured groups.
Note
Predefined auxiliary functions can only be assigned to one group.
Example
The DIN includes the following M-commands for coolant output:
● M7: Coolant 2 ON
● M8: Coolant 1 ON
● M9: Coolants 1 and 2 OFF
Consequently, both coolants can also be active together:
● If M7 and M8 are collected in two separate groups (e.g. groups 5 and 6)
● If M9 has to be assigned to these two groups, e.g.
– Group 5: M7, M9
– Group 6: M8, M9
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 415
H2: Auxiliary function outputs to PLC
7.13 Behavior during block search
Parameterization:
MD11100 $MN_AUXFU_MAXNUM_GROUP_ASSIGN = 4
MD22000 $MC_AUXFU_ASSIGN_GROUP [0] = 5
MD22000 $MC_AUXFU_ASSIGN_GROUP [1] = 5
MD22000 $MC_AUXFU_ASSIGN_GROUP [2] = 6
MD22000 $MC_AUXFU_ASSIGN_GROUP [3] = 6
MD22010 $MC_AUXFU_ASSIGN_TYPE [0] = M
MD22010 $MC_AUXFU_ASSIGN_TYPE [1] = M
MD22010 $MC_AUXFU_ASSIGN_TYPE [2] = M
MD22010 $MC_AUXFU_ASSIGN_TYPE [3] = M
MD22020 $MC_AUXFU_ASSIGN_EXTENSION [0] = 0
MD22020 $MC_AUXFU_ASSIGN_EXTENSION [1] = 0
MD22020 $MC_AUXFU_ASSIGN_EXTENSION [2] = 0
MD22020 $MC_AUXFU_ASSIGN_EXTENSION [3] = 0
MD22030 $MC_AUXFU_ASSIGN_VALUE [0] = 7
MD22030 $MC_AUXFU_ASSIGN_VALUE [1] = 9
MD22030 $MC_AUXFU_ASSIGN_VALUE [2] = 8
MD22030 $MC_AUXFU_ASSIGN_VALUE [3] = 9
MD22035 $MC_AUXFU_ASSIGN_SPEC [0] = 'H121'
MD22035 $MC_AUXFU_ASSIGN_SPEC [1] = 'H121'
MD22035 $MC_AUXFU_ASSIGN_SPEC [2] = 'H121'
MD22035 $MC_AUXFU_ASSIGN_SPEC [3] = 'H121'
Part program (section):
Program code
...
N10 ... M8
N20 ... M9
N30 ... M7
...
During the block search, the auxiliary function M9 is collected for groups 5 and 6.
Scan of the collected M auxiliary functions:
M function of the fifth group: $AC_AUXFU_M_VALUE [4] = 7
M function of the sixth group: $AC_AUXFU_M_VALUE [5] = 9
Basic Functions
416 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
H2: Auxiliary function outputs to PLC
7.13 Behavior during block search
Function
The following predefined procedure is provided to simplify the process of determining the
output sequence of M auxiliary functions for the programmer:
AUXFUMSEQ(VAR INT _NUM_IN, VAR INT _M_IN[], VAR INT _EXT_IN[], VAR
INT _NUM_OUT, VAR INT _M_OUT[], VAR INT _EXT_OUT[])
Input parameters:
VAR INT _NUM_IN: Number of relevant M commands
VAR INT _M_IN[]: Field of relevant M codes
VAR INT _EXT_IN[]: Field of relevant M address extensions
Output parameters:
VAR INT _NUM_OUT: Number of determined M codes
VAR INT _M_OUT[]: Field of determined M codes
VAR INT _EXT_OUT[]: Field of determined M address extensions
The function determines the sequence in which the M auxiliary functions, which have been
collected on a group-specific basis, are output for the predefined M codes. The sequence is
determined from the collection times $AC_AUXFU_M_TICK[<n>] (see Section "Time stamp
of the active M auxiliary function (Page 417)").
A particular M code is only taken into account once, even if it belongs to more than one
group. If the number of relevant M commands is less than or equal to 0, all the collected M
codes are output. The number of relevant M commands is limited to 64.
Example
M commands for coolant output:
● M7: Coolant 2 ON
● M8: Coolant 1 ON
● M9: Coolants 1 and 2 OFF
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 417
H2: Auxiliary function outputs to PLC
7.13 Behavior during block search
Group assignment:
● Group 5: M7, M9
● Group 6: M8, M9
Program code
...
N10 ... M8
N20 ... M9
N30 ... M7
...
During block searches, the auxiliary functions are collected on the basis of specific groups.
The last auxiliary function in an auxiliary function group is output to the PLC following a block
search:
● Group 5: M7
● Group 6: M9
If they are output in the sequence M7 → M9, no coolant is then active. However, coolant 2
would be active during the execution of the program. Therefore, the correct output sequence
for the M auxiliary functions is determined with an ASUP which contains the predefined
procedure AUXFUMSEQ(…):
Program code
DEF INT _I, _M_IN[3], _EXT_IN[3], _NUM_OUT, _M_OUT[2], _EXT_OUT[2]
_M_IN[0]=7 _EXT_IN[0]=0
_M_IN[1]=8 _EXT_IN[1]=0
_M_IN[2]=9 _EXT_IN[2]=0
AUXFUMSEQ(3,_M_IN,_EXT_IN,_NUM_OUT,_M_OUT,_EXT_OUT)
FOR _I = 0 TO _NUM_OUT-1
M[_EXT_OUT[_I]]=_M_OUT[_I]
ENDFOR
Function
In certain situations, such as a tool change, it may be necessary not to output the spindle-
specific auxiliary functions collected during the block search in action blocks, but to delay
output, for example, until after a tool change. The automatic output of the spindle-specific
auxiliary functions after a block search may be suppressed for this purpose. Output can then
be performed manually later by overstoring or by an ASUB.
Basic Functions
418 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
H2: Auxiliary function outputs to PLC
7.13 Behavior during block search
Parameterization
Suppression of the automatic output of the spindle-specific auxiliary functions after a block
search is set via machine data:
MD11450 $MN_SEARCH_RUN_MODE (behavior after a block search)
System variables
The spindle-specific auxiliary functions are always stored in the following system variables
during block searches, irrespective of the parameter assignment described above:
For later output of the spindle-specific auxiliary functions, the system variables can be read
in an ASUB, for example, and output after the action blocks are output:
DB21, ... DBX32.6 = 1 (last action block active)
Note
The contents of the system variables $P_S, $P_DIR and $P_SGEAR may be lost after block
search due to synchronization operations.
For more detailed information on ASUB, block search and action blocks, see Section "K1:
Mode group, channel, program operation, reset response (Page 451)".
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 419
H2: Auxiliary function outputs to PLC
7.13 Behavior during block search
Example
Block search for contour with suppression of output of the spindle-specific auxiliary functions
and start of an ASUB after output of action blocks.
Parameterization: MD11450 $MN_SEARCH_RUN_MODE, bit 2 = 1
After the block search on N55, the ASUB is started.
Part program:
ASUB:
Explanation of example
If the number of spindles is known, outputs of the same type can be written in one part
program block to reduce program runtime.
Output of $P_SEARCH_SDIR should be made in a separate part program block because
spindle positioning or switchover to axis mode in conjunction with the gear change can
cause an alarm.
If the ASUB which has been started is ended with REPOSA, spindle 1 remains at position 111
degrees, while spindle 2 is repositioned at position 77 degrees.
Basic Functions
420 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
H2: Auxiliary function outputs to PLC
7.13 Behavior during block search
If a different response is required, the program sequence for block search (for example) "N05
M3 S..." and "N30 SPOS[2] = IC(...)" requires special treatment.
Whether block search is active can be ascertained in the ASUB via the system variable
$P_SEARCH.
$P_SEARCH==1 ; Block search active
In the case of incremental positioning after speed control operation, the path to be traversed
is defined but, in some cases, the final position reached only becomes known during
positioning. This is the case, for example, during position calibration on crossing the zero
mark when switching on position control. For this reason, the distance programmed after the
zero position is accepted as the REPOS position (REPOSA in the ASUB).
Supplementary conditions
Collected S values
The meaning of an S value in the part program depends on the feed type that is currently
active:
G93, G94, G95, G97, G971: The S value is interpreted as the speed
G96, G961: The S value is interpreted as a constant cutting rate
If the feed operation is changed (e.g. for a tool change) before output of the system variable
$P_SEARCH_S, the original setting from the target block in the part program must be
restored to avoid use of the wrong type of feed.
Collected direction of rotation
For output of the direction of rotation, the system variable $P_SEARCH_SDIR is assigned
default value "-5" at the start of the block search. This value has no effect on output.
This ensures that the last spindle operating mode is retained for a block search across
program sections in which spindles are not programmed with a direction of rotation,
positioning or axis mode.
The programming of M19, SPOS, and SPOSA is collected as "M-19" (internal M19) in the
system variables $P_SEARCH_SDIR as an alternative to M3, M4, M5, and M70.
For the output of "M-19", the positioning data is read internally from the system variables
$P_SEARCH_SPOS and $P_SEARCH_SPOSMODE. Both system variables can also be
written to, in order, for example, to make corrections.
Note
Because of the assignments described above (e.g. M[<n>] = $P_SEARCH_SDIR[<n>]), the
values "–5" and "–19" generally remain hidden from the user and only have to be observed in
the case of special evaluation of the system variables in the ASUB.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 421
H2: Auxiliary function outputs to PLC
7.13 Behavior during block search
Output behavior
In the case of type 5 block searches (SERUPRO), an auxiliary function can be output to the
PLC during the block search and/or collected on a group-specific basis in the following
system variables:
● $AC_AUXFU_PREDEF_INDEX[<n>] (index of a predefined auxiliary function)
● $AC_AUXFU_TYPE[<n>] (type of auxiliary function)
● $AC_AUXFU_STATE[<n>] (output state of the auxiliary function)
● $AC_AUXFU_EXT[<n>] (address extension of the auxiliary function)
● $AC_AUXFU_VALUE[<n>] (value of the auxiliary function)
For a description of the system variables, see Section "Querying system variables
(Page 435)".
Output control
Whether an auxiliary function is output to the PLC during a type 5 block search (SERUPRO)
and/or collected on a group-specific basis in the following system variables can be
configured via bits 9 and 10 of the machine data:
● MD22080 $MC_AUXFU_PREDEF_SPEC[<n>]
(output behavior of predefined auxiliary functions)
where <n> = system function index (0 ... 32)
● MD22035 $MC_AUXFU_ASSIGN_SPEC[<n>]
(output behavior of user-defined auxiliary functions)
where <n> = auxiliary function index (0 ... 254)
● MD11110 $MN_AUXFU_GROUP_SPEC[<n>]
(output behavior of the auxiliary functions in a group)
where <n> = group index (0 ... 63)
Basic Functions
422 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
H2: Auxiliary function outputs to PLC
7.13 Behavior during block search
Output counter
The user can output the collected auxiliary functions to the PLC on a channel-by-channel
basis in the block search ASUB. For the purposes of serialized output via multiple channels,
the three output counters are changed across all the channels each time an auxiliary
function is output:
Explanation
● An auxiliary function package comprises a maximum of ten auxiliary functions.
● Two packages can be processed per IPO cycle in each channel during SERUPRO
because synchronized actions are processed in this cycle.
● An output sequence of up to a maximum of 20 packages (2 packages per channel * 10
channels) can be processed within an IPO cycle across all channels.
The encoding indicates how many auxiliary function packages and, within these, how many
auxiliary functions have been processed during the same IPO cycle:
● Auxiliary functions which have been collected in one IPO cycle have the same sequence
counter.
● Auxiliary functions which have been collected in one package (block or synchronized
action) all have the same package counter.
The total on the auxiliary function counter increases every time an auxiliary function is
collected.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 423
H2: Auxiliary function outputs to PLC
7.13 Behavior during block search
Q Q Q
$&B$8;)8B35('()B,1'(;>Q@ $&B$8;)8B35('()B,1'(;>Q@ $&B$8;)8B35('()B,1'(;>Q@
$&B$8;)8B7<3(>Q@ $&B$8;)8B7<3(>Q@ $&B$8;)8B7<3(>Q@
$&B$8;)8B(;7>Q@ $&B$8;)8B(;7>Q@ $&B$8;)8B(;7>Q@
$&B$8;)8B9$/8(>Q@ $&B$8;)8B9$/8(>Q@ $&B$8;)8B9$/8(>Q@
$&B$8;)8B67$7(>Q@ $&B$8;)8B67$7(>Q@ $&B$8;)8B67$7(>Q@
$&B$8;)8B63(&>Q@ $&B$8;)8B63(&>Q@ $&B$8;)8B63(&>Q@
$&B$8;)8B7,&.>Q@ $&B$8;)8B7,&.>Q@ $&B$8;)8B7,&.>Q@
*OREDOOLVWRIDX[LOLDU\IXQFWLRQV
The global list is structured on the basis of the sequence in which the search target was
found. It is intended to be used as a system proposal for auxiliary functions to be output in
the following ASUB at the end of SERUPRO. If an auxiliary function is not to be output, the
corresponding group index is to be set to "0".
Basic Functions
424 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
H2: Auxiliary function outputs to PLC
7.13 Behavior during block search
This affects the groups of auxiliary functions for any spindle configured in the system,
whereby the spindle number corresponds to an auxiliary function's address extension.
Note
Within the context of the "axis interchange" and "axis container rotation" functions, the
auxiliary functions for programming the spindle must always be specified in a way which
ensures compatibility with the actual (motor) state during interchange/rotation. A distinction is
made here between the axis interchange and axis container mechanisms.
Example of axis container rotation:
An axis container has four spindles, each assigned to a separate channel (1 - 4). M3 S1000
is always programmed in channel 1, and an axis container rotation is then executed. The
other channels do not perform any spindle programming. Following the third axis container
rotation and the fourth spindle programming, M3, all four spindles rotate clockwise at a
speed of 1,000 rpm. If the end of the SERUPRO now lies within this range, every ASUB for a
channel is expected to contain an M3 S1000 for the local spindle.
During interchange however, the collected auxiliary functions may only be assigned to the
channel where the spindle is currently located.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 425
H2: Auxiliary function outputs to PLC
7.13 Behavior during block search
The spindle auxiliary functions are filtered out beforehand at the end of the search
depending on the spindle state. The channel data is updated accordingly. The global
auxiliary function list can be processed sequentially in the ASUBs at the end of the
SERUPRO, and the sorted auxiliary functions can be output with channel synchronization.
Function
After completing the block search with the program test (SERUPRO), before starting the
subsequent processing, the auxiliary functions collected during the search must be output.
For this purpose, during the block search, the auxiliary functions are collected in a global list.
The SERUPRO end ASUBs generate the corresponding part program blocks channel-
specific from this list. This ensures that the collected auxiliary functions can be output both
channel-specific as well as cross-channel in the correct sequence. A fully functional
SERUPRO end ASUB is a component of the NCK software.
Basic Functions
426 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
H2: Auxiliary function outputs to PLC
7.13 Behavior during block search
Users/machinery construction OEMs can change the SERUPRO end ASUB. The
subsequently described functions support processing the global list of auxiliary functions and
generating the part program blocks required for synchronized auxiliary function output.
Function AUXFUSYNC(...)
Function:
The function AUXFUSYNC generates a complete part program block as string from the global list
of auxiliary functions at each call. The part program block either contains auxiliary functions
or commands to synchronize auxiliary function outputs (WAITM, G4, etc.).
The function triggers a preprocessing stop.
Syntax:
PROC AUXFUSYNC(VAR INT <NUM>, VAR INT <GROUPINDEX>[10], VAR
STRING[400] <ASSEMBLED>)
Parameters:
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 427
H2: Auxiliary function outputs to PLC
7.13 Behavior during block search
Function AUXFUDEL(...)
Function:
The function AUXFUDEL deletes the specified auxiliary function from the global list of
auxiliary functions channel-specific for the calling channel. Deletion is realized by setting the
corresponding group index ...GROUPINDEX[n] to 0.
The function must be called before calling AUXFUSYNC.
The function triggers a preprocessing stop.
Syntax:
PROC AUXFUDEL(CHAR <TYPE>, INT <EXTENSION>, REAL <VALUE>, INT <GROUP>)
Parameters:
Function AUXFUDELG(...)
Function:
The function AUXFUDELG deletes all auxiliary functions of the specified auxiliary function
group from the global list of auxiliary functions channel-specific for the calling channel.
Deletion is realized by setting the corresponding group index ...GROUPINDEX[n] to 0.
The function must be called before calling AUXFUSYNC.
The function triggers a preprocessing stop.
Syntax:
PROC AUXFUDELG(INT <GROUP>)
Parameters:
NOTICE
Multi-channel block search and AUXFUDEL / AUXFUDELG
If, for a multi-channel block search in the SERUPRO end ASUBs, auxiliary functions with
AUXFUDEL / AUXFUDELG are deleted from the global list of auxiliary functions, before
calling the AUXFUSYNC function, the channels involved must be synchronized. The
synchronization ensures that before calling the AUXFUSYNC, all delete requests are
processed and a consistent list is available.
Basic Functions
428 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
H2: Auxiliary function outputs to PLC
7.13 Behavior during block search
Examples
Two examples for configuring a user-specific SERUPRO end ASUB.
Example 1: Deleting auxiliary functions and generating the auxiliary function output with
AUXFUSYNC(...)
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 429
H2: Auxiliary function outputs to PLC
7.13 Behavior during block search
Example 2: Deleting auxiliary functions and generating the auxiliary function output without
AUXFUSYNC(...)
Basic Functions
430 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
H2: Auxiliary function outputs to PLC
7.13 Behavior during block search
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 431
H2: Auxiliary function outputs to PLC
7.13 Behavior during block search
Basic Functions
432 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
H2: Auxiliary function outputs to PLC
7.14 Implicitly output auxiliary functions
Function
Implicitly output auxiliary functions are auxiliary functions which have not been programmed
explicitly and which are also output by other system functions (e.g. transformation selection,
tool selection, etc.). These implicit auxiliary functions do not lead to any system function;
instead, the M codes are collected according to output behavior parameters assigned to
them and/or are output to the PLC.
Parameterization
The M codes for auxiliary functions to be output implicitly are defined with the machine data:
● MD22530 $MC_TOCARR_CHANGE_M_CODE (M code at toolholder change)
This machine data value indicates the number of the M code which is output when a
toolholder is activated at the NC/PLC interface.
If the value is positive, the unchanged M code is always output.
If the value is negative, the number of the toolholder is added to the machine data value,
and this number is output.
● MD22532 $MC_GEOAX_CHANGE_M_CODE (M code when switching the geometry
axes)
Number of the M code which is output when the geometry axes on the NC/PLC interface
are switched.
● MD22534 $MC_TRAFO_CHANGE_M_CODE (M code in the case of transformation
changes)
Number of the M code which is output during a transformation switch of the geometry
axes at the NC/PLC interface.
Note
No M code is output if the number of the M code being output or the
MD22530/MD22532/MD22534 value is between 0 and 6, or is either 17 or 30. Whether or
not an M code which is generated in this manner leads to conflicts with other functions is
not monitored.
Output behavior
In the case of implicitly output auxiliary functions, bit 13 is set in machine data MD22080 or
MD22035 (output behavior of predefined or user-defined auxiliary functions).
This bit can be queried via the system variable $AC_AUXFU_SPEC[<n>].
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 433
H2: Auxiliary function outputs to PLC
7.15 Information options
Function
The output status and acknowledgement status of M auxiliary functions can be displayed on
the user interface on a group-specific basis.
Requirements
To implement function-oriented acknowledgement and display of M auxiliary functions, the
auxiliary functions must be managed in the PLC and, thus, in the user program itself.
Therefore, it is up to the PLC programmer to program the acknowledgement of these
auxiliary functions. He has to know which auxiliary functions in which group have to be
acknowledged.
Standard
M auxiliary functions that are not managed by means of the PLC are identified by the NC as
"transferred" and output to the PLC. There is no functional acknowledgement for these
auxiliary functions. All M-auxiliary functions collected after a block search are also displayed
so that the operator knows which auxiliary functions will be output after a start following a
block search.
PLC activities
In the case of auxiliary function groups that are managed by the PLC itself, the PLC user
program must acknowledge all auxiliary functions of this groups when Apply and Function
End are activated. The PLC programmer must know all the auxiliary functions of these
groups.
Basic Functions
434 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
H2: Auxiliary function outputs to PLC
7.15 Information options
Miscellaneous
Only the group-specific M auxiliary functions are displayed. The block-by-block display is
also retained. Up to 15 groups can be displayed, whereby only the last M function of a group
that was either collected or output to the PLC is displayed for each group. The M functions
are presented in various display modes depending on their status:
Display update
The display is organized in such a way that the collected auxiliary functions are always
displayed first, before those that were managed by the PLC and before those that were
managed by the NC. A collected auxiliary function is marked as collected until it has been
output from the NCK to the PLC. PLC-managed auxiliary functions are retained until they are
displaced by another auxiliary function. In the case of a reset, only the collected auxiliary
functions and the NC-managed auxiliary functions are deleted.
Function
Auxiliary functions can be queried on a group-specific basis via system variables in the part
program and via synchronized actions:
$AC_AUXFU_... [<n>] = <value>
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 435
H2: Auxiliary function outputs to PLC
7.15 Information options
Basic Functions
436 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
H2: Auxiliary function outputs to PLC
7.16 Supplementary conditions
Example
All M-auxiliary functions of the 1st group will be stored in the order they are output
id=1 every $AC_AUXFU_M_STATE[0]==2 do
$AC_FIFO[0,0]=$AC_AUXFU_M_VALUE[0]
References
For more information on the system variables, refer to:
List Manual, system variables
Spindle replacement
Because the auxiliary functions are parameterized channel-specifically, if function: "spindle
replacement" is used, the spindle-specific auxiliary function must be parameterized
immediately in all channels that use the spindles.
Tool management
If tool management is active, the following constraints apply:
● T and M<k> functions are not output to the PLC.
Note
k is the parameterized value of the auxiliary function for the tool change (default: 6):
MD22560 $MC_TOOL_CHANGE_M_CODE (auxiliary function for tool change)
● If no address extension is programmed, the auxiliary function refers to the master spindle
or the master tool holder of the channel.
Definition of the master spindle:
– MD20090 $MC_SPIND_DEF_MASTER_SPIND
– Part program instruction: SETMS
Definition of the master tool holder
– MD20124 $MC_TOOL_MANAGEMENT_TOOLHOLDER
– Part program instruction: SETMTH
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 437
H2: Auxiliary function outputs to PLC
7.16 Supplementary conditions
Thread cutting
During active thread cutting G33, G34 and G35, the following output behavior is always active
for the spindle-specific auxiliary functions:
● M3 (spindle right)
● M4 (spindle left)
Synchronized actions
With output auxiliary functions from synchronized actions, the parameterized output behavior
is ignored except for the following parameters:
● Bit0: Output duration of one OB1 cycle (normal acknowledgement)
● Bit1: Output duration of one OB40 cycle (quick acknowledgement)
Basic Functions
438 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
H2: Auxiliary function outputs to PLC
7.16 Supplementary conditions
Spindle-specific auxiliary function output only as information for the PLC user program
In certain controller situations, e.g. at the end of a block search, the collected spindle-specific
auxiliary functions (e.g. M3, M4, M5, M19, M40...M45, M70) is output to the NC/PLC interface only
for information purposes for the PLC user program. The controller generates a part program
block (action block) in which the collected auxiliary functions are entered with a negative
address extension. The corresponding system functions are then not executed.
Example: M(-2) = 41 request gear stage change for the 2nd spindle
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 439
H2: Auxiliary function outputs to PLC
7.17 Examples
7.17 Examples
Task
Parameter assignment of auxiliary functions M3, M4, and M5 for the second spindle of the
channel
Parameter assignment: M3
Requirements:
● Machine data index: 0 (first user-defined auxiliary function)
● auxiliary function group: 5
● Type and value: M3 (spindle right)
● Address extension: 2 as appropriate for the 2nd spindle of the channel
● Output behavior:
– Output duration one OB1 cycle (normal acknowledgment)
– Output prior to motion
Parameter assignment:
MD22000 $MC_AUXFU_ASSIGN_GROUP[ 0 ] =5
MD22010 $MC_AUXFU_ASSIGN_TYPE [ 0 ] = "M"
MD22020 $MC_AUXFU_ASSIGN_EXTENSION [ 0 ] = 2
MD22030 $MC_AUXFU_ASSIGN_VALUE [ 0 ] =3
MD22035 $MC_AUXFU_ASSIGN_SPEC [ 0 ] = 'H21'
Parameter assignment: M4
Requirements:
● Machine data index: 1 (second user-defined auxiliary function)
● auxiliary function group: 5
● Type and value: M4 (spindle left)
● Address extension: 2 as appropriate for the 2nd spindle of the channel
● Output behavior:
– Output duration one OB1 cycle (normal acknowledgment)
– Spindle response following acknowledgment
– Output during motion
Basic Functions
440 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
H2: Auxiliary function outputs to PLC
7.17 Examples
Parameter assignment:
MD22000 $MC_AUXFU_ASSIGN_GROUP [ 1 ] =5
MD22010 $MC_AUXFU_ASSIGN_TYPE [ 1 ] = "M"
MD22020 $MC_AUXFU_ASSIGN_EXTENSION [ 1 ] = 2
MD22030 $MC_AUXFU_ASSIGN_VALUE [ 1 ] =4
MD22035 $MC_AUXFU_ASSIGN_SPEC [ 1 ] = 'H51'
Parameter assignment: M5
Requirements:
● Machine data index: 2 (third user-defined auxiliary function)
● auxiliary function group: 5
● Type and value: M5 (spindle stop)
● Address extension: 2 as appropriate for the 2nd spindle of the channel
● Output behavior:
– Output duration one OB1 cycle (normal acknowledgment)
– Spindle response following acknowledgment
– Output at block end
Parameter assignment:
MD22000 $MC_AUXFU_ASSIGN_GROUP [ 2 ] =5
MD22010 $MC_AUXFU_ASSIGN_TYPE [ 2 ] = "M"
MD22020 $MC_AUXFU_ASSIGN_EXTENSION [ 2 ] = 2
MD22030 $MC_AUXFU_ASSIGN_VALUE [ 2 ] =5
MD22035 $MC_AUXFU_ASSIGN_SPEC [ 2 ] = 'H91'
Task
Parameter assignment of the auxiliary function-specific machine data for a machine with the
following configuration:
Spindles
● Spindle 1: Master spindle
● Spindle 2: Second spindle
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 441
H2: Auxiliary function outputs to PLC
7.17 Examples
Gear stages
● Spindle 1: 5 gear stages
● Spindle 2: No gear stages
Switching functions for cooling water on/off
● Spindle 1
– "ON" = M50
– "OFF" = M51
● Spindle 2
– "ON" = M52
– "OFF" = M53
Requirements
Spindle 1 (master spindle)
Note
Default assignments
• The auxiliary functions M3, M4, M5, M70 and M1=3, M1=4, M1=5, M1=70 of spindle 1
(master spindle) are assigned as standard to the second auxiliary function group.
• All S and S1 values of spindle 1 (master spindle) are assigned to the third auxiliary
function group by default.
● The gear stage last programmed is to be output after block search. The following auxiliary
functions are assigned to the ninth auxiliary function group for this reason:
– M40, M41, M42, M43, M44, M45
– M1=40, M1=41, M1=42, M1=43, M1=44, M1=45
● The auxiliary functions M3, M4, M5, M70 and M1=3, M1=4, M1=5, M1=70
(second auxiliary function group) and S and S1 values (third auxiliary function group)
should possess the following output behavior:
– Output duration one OB40 cycle (quick acknowledgment)
– Output prior to motion
● The auxiliary functions for gear changeover M40 to M45 and M1=40 to M1=45
(ninth auxiliary function group) should have the following output behavior:
– Output duration one OB1 cycle (normal acknowledgment)
– Output prior to motion
Basic Functions
442 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
H2: Auxiliary function outputs to PLC
7.17 Examples
Spindle 2
● Only one M function for directional reversal may be programmed in one block. The
direction of rotation last programmed is to be output after block search. The following
auxiliary functions are assigned to the tenth auxiliary function group for this reason:
– M2=3, M2=4, M2=5, M2=70
● All S2 values are assigned to auxiliary function group 11.
● The auxiliary functions M2=3, M2=4, M2=5, M2=70 (tenth auxiliary function group) and
S2 values (auxiliary function group 11) should have the following output behavior:
– Output duration one OB40 cycle (quick acknowledgment)
– Output prior to motion
Cooling water
● It is not permissible to switch the cooling water on and off in one part program block. After
a block search, the cooling water will be switched on or off. For this purpose, the following
auxiliary functions are assigned, for example, to auxiliary function group 12 or 13:
– Auxiliary function group 12: M50, M51
– Auxiliary function group 13: M52, M53
● The auxiliary functions M50, M51 (auxiliary function group 12) and M52, M53 (auxiliary
function group 13) should have the following output behavior:
– Output duration one OB1 cycle (normal acknowledgment)
– Output prior to motion
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 443
H2: Auxiliary function outputs to PLC
7.17 Examples
Basic Functions
444 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
H2: Auxiliary function outputs to PLC
7.17 Examples
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 445
H2: Auxiliary function outputs to PLC
7.18 Data lists
Basic Functions
446 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
H2: Auxiliary function outputs to PLC
7.18 Data lists
7.18.2 Signals
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 447
H2: Auxiliary function outputs to PLC
7.18 Data lists
Basic Functions
448 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
H2: Auxiliary function outputs to PLC
7.18 Data lists
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 449
H2: Auxiliary function outputs to PLC
7.18 Data lists
Basic Functions
450 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K1: Mode group, channel, program operation, reset
response 8
8.1 Product brief
Channel
An NC channel represents the smallest unit for manual traversing of axes and automatic
processing of part programs. At any one time, a channel will always be in a particular mode,
e.g. AUTOMATIC, MDI, or JOG. A channel can be regarded as an independent NC.
Mode group
A channel always belongs to a mode group. A mode group can also consist of several
channels.
A mode group can be identified by the fact that all channels of the mode group are always in
the same mode at a particular time, e.g. AUTOMATIC, MDI, or JOG. This is ensured through
the NC internal mode logic.
A mode group can be regarded as an independent multi-channel NC.
Channel gaps
When channels are configured, placeholder channels can be provided in order to create as
uniform a configuration as possible over machines in a series. Only the channels that are
actually used are then activated.
Program test
The following options are available for testing or moving in position a new part program.
● Program execution without setpoint outputs
● Program execution in singleblock mode
● Program execution with dry run feedrate
● Skip part program blocks
● Block search with or without calculation.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 451
K1: Mode group, channel, program operation, reset response
8.1 Product brief
Block search
The block search function enables the following program simulations for locating specific
program points:
● Type 1 without calculation at contour
● Type 2 with calculation at contour
● Type 4 with calculation at block end point
● Type 5 automatic start of the selected program point with calculation of all required data
from history
● Automatic start of an ASUB after a block search
● Cascaded block search
● Cross-channel block search in "Program test" mode
Program operation
The execution of part programs or part program blocks in AUTOMATIC or MDI modes is
referred to as program operation. During execution, the program sequence can be controlled
by PLC interface signals and commands.
For each channel, basic settings or channel-specific machine data can be specified. These
initial settings affect, for example, G groups and auxiliary function output.
A part program can be selected only if the relevant channel is in the Reset state.
Furthermore, all further program runs are handled by PLC interface signals and the
corresponding commands.
● Start of part program or part program block
● Part program calculation and program control
● RESET command, program status, and channel status
● Responses to operator and program actions
● Eventdriven program calls
Single block
With the single-block function, the user can execute a part program block-by-block.
There are 3 types of setting for the single-block function:
● SLB1: = IPO single block
● SLB2: = Decode single block
● SLB3: = Stop in cycle
Basic Functions
452 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K1: Mode group, channel, program operation, reset response
8.1 Product brief
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 453
K1: Mode group, channel, program operation, reset response
8.2 Mode group
Mode group
A mode group combines NC channels with axes and spindles to form a machining unit.
A mode group contains the channels that are required to run simultaneously in the same
mode from the point of view of the machining sequence.
The configuration of a mode group defines which channels are to be included in the group.
Note
This description assumes one mode group and one channel.
Functions that need several channels, e.g. "Axis replacement" function, are described in:
References:
Function Manual Extension functions; Mode Groups, Channels, Axis replacement (K5)
Note
The control system does not recognize mode group-specific data. However, it is possible to
make some channel-specific settings that pertain to the mode group.
Channel-specific assignments
Axes can be assigned to multiple channels that, in turn, are allocated to different mode
groups. The axes can then be interchanged between these channels (axis replacement).
Axis replacement functions independently of the mode group.
Machine axes and spindles are assigned to a channel. They differ as follows:
● Geometry axes can be operated in the path grouping.
Using the master spindle, they can perform functions such as G96, G961, G331, G332, etc.
● Channel axes that are not defined as geometry axes can be moved as path axes,
synchronous axes, positioning axes, PLC axes, and command axes.
● Special axes have no geometric relationship with one another.
Basic Functions
454 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K1: Mode group, channel, program operation, reset response
8.2 Mode group
● Master spindle geometry axes can perform functions using the master spindle.
● Auxiliary spindles are all other spindles/axes in the channel apart from the master
spindle.
The GEOAX replacement command can be programmed to declare a channel axis as a
geometry axis and define its geometry axis number. It is defined with SETMS, which spindle in
the channel should be the master spindle.
Any axis in the channel can be configured as a spindle. The number of axes per channel
depends on the controller version. In order to optimize the performance utilization, the
available channel and axis configurations are limited depending on the hardware.
With SINUMERIK 840D sl, the following configurations are permissible depending on the
HW/SW version:
● Up to 12 axes/spindles per channel
● Maximum of 31 axes or 20 spindles per NCU
For information about other axis configurations such as axis containers, link axes,
reciprocating axes, main run, rotary, linear, master and slave axes and the various
implementations, see SectionsK2: Axis Types, Coordinate Systems, Frames (Page 647) and
S1: Spindles (Page 1225).
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 455
K1: Mode group, channel, program operation, reset response
8.2 Mode group
Machine data
There is no mode group-specific machine data.
Channel gaps
The channels to which a mode group is assigned with MD10010 are regarded as activated.
Instead of a mode group number, the number "0" can be assigned to channels. The result is
as follows:
● The non-activated channel does not take up memory space in the controller.
● Series machines with similar designs can be kept uniform during configuration. Only the
channels that can actually be used by the machine tool are activated (channels with
mode group number greater than 0).
Special case:
Channel 1 must always be available!
⇒ If:
MD10010 $MN_ASSIGN_CHAN_TO_MODE_GROUP [0] = 0
is specified, the controller automatically sets
MD10010 $MN_ASSIGN_CHAN_TO_MODE_GROUP [0] = 1 (mode group 1).
Example configurations:
MD10010 $MN_ASSIGN_CHAN_TO_MODE_GROUP[0] = 1
MD10010 $MN_ASSIGN_CHAN_TO_MODE_GROUP[1] = 2
...
MD10010 $MN_ASSIGN_CHAN_TO_MODE_GROUP[3] = 0 ; gap
...
MD10010 $MN_ASSIGN_CHAN_TO_MODE_GROUP[8] = 1
MD10010 $MN_ASSIGN_CHAN_TO_MODE_GROUP[9] = 2
Basic Functions
456 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K1: Mode group, channel, program operation, reset response
8.2 Mode group
Function
The following NC/PLC interface signals are used to stop the traversing motions of the axes
or of the axes and spindles in all mode group channels and to interrupt part program
execution:
DB11 DBX0.5 (mode group stop)
DB11 DBX0.6 (mode group stop, axes plus spindles)
Function
A mode group Reset is requested via a mode group-specific NC/PLC interface signal:
DB11 DBX0.7 = 1 (mode group reset)
Effect
Effect on the channels of mode group:
● Part program preparation (preprocessing) is stopped.
● All axes and spindles are decelerated to zero speed according to their acceleration
curves without contour violation.
● Any auxiliary functions not yet output to the PLC are no longer output.
● The preprocessing pointers are set to the interruption point, and the block pointers are set
to the beginning of the appropriate part programs.
● All initial settings (e.g. the G functions) are set to the parameterized values.
● All alarms with "Channel reset" criterion are canceled.
If all the channels of the mode group are in reset state, then:
● All alarms with "Mode group reset" cancel criterion are canceled.
● The NC/PLC interface indicates completion of the mode group Reset and the mode
group's readiness to operate:
DB11 DBX6.7 (all channels in the reset state)
DB11 DBX6.3 = 1 (mode group ready)
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 457
K1: Mode group, channel, program operation, reset response
8.3 Mode types and mode type change
Unique mode
All channels of a mode group are always in the same mode:
● AUTOMATIC
● JOG
● MDI
If individual channels are assigned to different mode groups, a channel switchover activates
the corresponding mode group. This allows mode changes to be initiated via a channel
switchover.
Modes
The following modes are available:
● AUTOMATIC
Automatic execution of part programs:
– Part program test.
– All channels of the mode group can be active at the same time.
● JOG in Automatic
JOG in AUTOMATIC is an extension of AUTOMATIC mode intended to simplify use. JOG
can be executed without leaving AUTOMATIC mode if boundary conditions so permit.
● JOG
Manual traversing of axes via traversing keys of the machine control panel or via a
handwheel connected to the machine control panel:
– Channel-specific signals and interlocks are taken into account for motions executed by
means of an ASUB or via static synchronized actions.
– Couplings are taken into account.
– Every channel in the mode group can be active.
● MDI
Manual Data Automatic (the blocks are entered via the user interface)
– Restricted execution of part programs and part program sections.
– Part program test.
– A maximum of one channel per mode group can be active (applies only to TEACH IN).
– Axes can only be traversed manually in subordinate machine functions such as JOG,
REPOS or TEACH IN.
Basic Functions
458 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K1: Mode group, channel, program operation, reset response
8.3 Mode types and mode type change
Selection
The user can select the desired mode by means of softkeys on the user interface.
This selection (AUTOMATIC, MDI, or JOG) is forwarded to the PLC on the NC/PLC
interface, but is not activated:
DB11 DBX4.0, 0.1, 0.2 (strobe mode)
Display
The current mode of the mode group is displayed via the NC/PLC interface:
DB11 DBX6.0, 0.1, 0.2 (active mode)
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 459
K1: Mode group, channel, program operation, reset response
8.3 Mode types and mode type change
Machine functions
Machine functions can be selected within a mode that also apply within the mode group:
● Machine functions within the JOG mode
– REF (reference point approach)
– REPOS (repositioning)
– JOG retract (retraction motion in the tool direction)
● Machine functions within the MDI mode
– REF (reference point approach)
– REPOS (repositioning)
– TEACHIN (teach-in of axis positions)
Channel states
● Channel reset
The machine is in its initial state. This is defined by the machine manufacturer's PLC
program, e.g. after POWER ON or at the end of the program.
● Channel active
A program has been started, and the program is being executed or a reference point
approach is in progress.
● Channel interrupted
The running program or reference point approach has been interrupted.
Basic Functions
460 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K1: Mode group, channel, program operation, reset response
8.3 Mode types and mode type change
JOG in Automatic
JOG in AUTOMATIC mode is permitted if the mode group is in "RESET" state and the axis is
jog-capable. "RESET" state for the mode group means:
● All channels are in the "RESET" state
● All programs are canceled
● DRF is not active in any channel
An axis is JOG-capable if it is not in any of the following states:
● PLC axis as concurrent positioning axis (request of the axis from the PLC)
● Command axis (the axis has been programmed by a synchronized action and the motion
has not been completed yet)
● Rotating spindle (spindle rotating despite RESET)
● An asynchronous reciprocating axis
Note: The “jog-capable” property is independent of the “JOG in AUTOMATIC” function.
Activation
The function "JOG in AUTOMATIC" can be activated with the machine data:
MD10735 $MN_JOG_MODE_MASK
● Before POWER ON, the following machine data must be set:
MD10735 $MN_JOG_MODE_MASK, bit 0 = 1
● The user switches to AUTO (PLC user interface DB11 DBX0.0 = 0→1 edge). “JOG in
AUTOMATIC” is then active if the NCK previously had channel state “RESET” and
program state “Aborted” in all mode group channels. The axis in question must also be
“jog-capable”. DRF must be deactivated (if not already deactivated).
● RESET is initiated or the running program is finished with M30/M2 in all mode group
channels that do not have channel state “Reset” and program state “Aborted”.
● The relevant axis is automatically made "JOG-capable" (e.g. axis interchanget: PLC →
NC).
Note: In most applications, the axes to be traversed are "JOG-capable" and with the
switchover to AUTOMATIC, "JOG in AUTOMATIC" is also active.
Characteristics
● The +/– keys cause a JOG movement, and the mode group is switched internally to JOG.
(i.e. “Internal JOG”).
● Moving the handwheels causes a JOG movement, and the mode group is switched
internally to JOG, unless DRF is active.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 461
K1: Mode group, channel, program operation, reset response
8.3 Mode types and mode type change
● An ongoing JOG movement is not complete until the end position of the increment has
been reached (if this has been set) or the movement has been aborted with “Delete
distance-to-go”.
In this way an increment can be stopped using Stop and then moved to the end using
Start. The NCK remains in “Internal JOG” during this time. A partial increment is possible,
but it must not be interrupted using Stop. There is a mode in which releasing the travel
key causes interruption within an increment.
● Without any JOG movement, “JOG in AUTOMATIC” responds in the same way as
“Automatic”. In particular, the Start key starts the selected part program and the
appropriate HMI softkey initiates a block search.
● If JOG movement is active, the NCK is internally in JOG mode, and, thus, a block search
request is refused and a Start cannot start the part program. Start starts any remaining
increment or has no effect.
● While a mode group axis is being traversed in JOG mode, the mode group remains
internally in JOG mode.
Comment: This phase can begin with the JOG movement of an axis and end with the end
of the JOG movement of another axis.
● Axis interchange is not possible for an axis with active JOG movement (the axis might
change mode group). The NCK blocks any axis interchange attempt.
● The PLC user interface indicates "Automatic" mode:
– DB11 DBX6.0, 6.1, 6.2 = 1
– DB11 DBX7.0, 7.1, 7.2 = 0
● In “JOG in AUTOMATIC”, the NC/PLC interface displays whether the mode group is in
“Mode group RESET”.
– DB11 DBX6.4 (mode group has been reset, mode group 1)
– DB11 DBX26.4 (mode group has been reset, mode group 2)
– DB11 DBX46.4 (mode group has been reset, mode group 3)
● In “JOG in AUTOMATIC”, the NC/PLC interface displays whether the NC has
automatically switched to “Internal JOG”.
– DB11 DBX6.5 (NCK internal JOG active, mode group 1)
– DB11 DBX26.5 (NCK internal JOG active, mode group 2)
– DB11 DBX46.5 (NCK internal JOG active, mode group 3)
Supplementary conditions
“JOG in AUTOMATIC” can only switch internally to JOG if the mode group is in “Mode group
RESET” state, i.e. it is not possible to jog immediately in the middle of a stopped program.
The user can jog in this situation by pressing the JOG key or the Reset key in all channels of
the mode group.
Selecting AUTOMATIC disables the INC keys and the user can/must press the INC keys
again to select the desired increment. If the NCK switches to “Internal JOG”, the selected
increment is retained.
Basic Functions
462 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K1: Mode group, channel, program operation, reset response
8.3 Mode types and mode type change
If the user attempts to jog the geometry or orientation axes, the NCK switches to “Internal
JOG” and the movement executed. Several axes can be physically moved in this way; they
must all be “JOG-capable”.
Following the JOG movement, the NCK deactivates “Internal JOG” again and selects AUTO
mode again. The internal mode change is delayed until the movement is complete. This
avoids unnecessary multiple switching operations, e.g. when using the handwheel. The PLC
can only rely on the “Internal JOG active” PLC signal.
The NCK will then switch to “Internal JOG” if the axis is not enabled.
See also
R1: Referencing (Page 1173)
Introduction
A mode change is requested and activated via the mode group interface (DB11, ...). A mode
group will either be in AUTOMATIC, JOG, or MDA mode, i.e. it is not possible for several
channels of a mode group to take on different modes at the same time.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 463
K1: Mode group, channel, program operation, reset response
8.3 Mode types and mode type change
What mode transitions are possible and how these are executed can be configured in the
PLC program on a machine-specific basis.
Note
The mode is not changed internally until the signal "Channel status active" is no longer
pending. For error-free mode change however, all channels must assume a permissible
operating mode.
Special cases
● Errors during mode change
If a mode change request is rejected by the system, the error message "Operating mode
cannot be changed until after NC Stop" is output. This error message can be cleared
without changing the channel status.
● Mode change disable
A mode change can be prevented by means of interface signal:
DB11, DBX0.4 (Mode change disable).
If a channel of the mode group is no longer in Reset state after a mode change, the part
program command START is rejected and Alarm 16952 is issued.
Basic Functions
464 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K1: Mode group, channel, program operation, reset response
8.4 Channel
8.4 Channel
Channel properties
A channel constitutes an "NC" in which one part program can be executed at a time.
Machine axes, geometry axes and positioning axes are assigned to the channels according
to the machine configuration and the current program status (AXIS CHANGE, GEO AXIS
CHANGE, SETMS).
The system assigns each channel its own path interpolator with associated programming.
Each channel can run its own machining program which is controlled from the PLC.
The following channel-specific functions make it possible for the channels to process part
programs independently:
● Each channel has its own NC Start, NC Stop, RESET.
● One feedrate override and one rapid traverse override per channel.
● Dedicated Interpreter for each channel.
● Dedicated path interpolator for each channel which calculates the path points such that
all the machining axes of the channel are controlled simultaneously from path axes.
● Selection and deselection of tool cutting edges and their length and radius
compensations for a tool in a specific channel.
For further information on the tool offset, see Section "W1: Tool offset (Page 1389)".
● Channel-specific frames and frames active in the channel for transforming closed
calculation rules into Cartesian coordinate systems. Offsets, rotations, scalings, and
mirrorings for geometry axes and special axes are programmed in a frame.
For further information on frames, see Section "Zero offset external via system frames
(Page 753)".
● Display of channel-specific alarm responses.
● Display of current machining sequence (axis position, current G functions, current
auxiliary functions, current program block) for each channel.
● Separate program control functions for each channel.
These functions (with the exception of the display functions) are controlled and checked by
the PLC with interface signals.
Channels in the same mode group always have to be operated in the same mode
(AUTOMATIC, JOG, MDA).
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 465
K1: Mode group, channel, program operation, reset response
8.4 Channel
Channel configuration
Channels can be filled with their own channel name via the following machine data:
MD20000 $MC_CHAN_NAME (channel name)
The various axes are then assigned to the available channels via machine data. There can
be only one setpoint-issuing channel at a time for an axis/spindle. The axis/spindle actual
value can be read by several channels at the same time. The axis/spindle must be registered
with the relevant channel.
The following channel-specific settings can also be made using machine data:
● Position of deletions or the basic program settings of G groups via the machine data:
MD20150 $MC_GCODE_RESET_VALUES (initial setting of the G groups)
● Auxiliary function groups regarding the combination and the output time.
● Transformation conditions between machine axes and geometry axes.
● Other settings for the execution of a part program.
Basic Functions
466 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K1: Mode group, channel, program operation, reset response
8.4 Channel
Interface signals
The signals of the 1st channel are located in the NC/PLC interface in DB21, the signals from
channel 2 are located in DB22. The channel or channels can be monitored and controlled
from the PLC or NCK.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 467
K1: Mode group, channel, program operation, reset response
8.4 Channel
For further information on the channel-specific signal exchange (PLC → NCK), see Section
"P3: Basic PLC program for SINUMERIK 840D sl (Page 809)".
The exact functionality of independent single-axis operations is described in:
References:
Function Manual, Extended Functions; Positioning Axes (P2)
User/PLC
A global Start disable can be set for the selected channel via the HMI or from the PLC.
Function
When Start disable is set, no new program starts are accepted for the selected channel.
Start attempts are counted internally.
If a start is executed by the PLC before a global block disable is sent from the HMI to the
NCK, the program is not stopped by the Start disable and its status is transmitted to the HMI.
NC Start disable and global Start disable have the same effect on the internal counter for
starts that have been sent but not executed. (OPI variable startRejectCount).
Messages
If desired, a message can be issued when a Start attempt occurs while a global block
disable is active.
The control is exercised using machine data:
MD11411 $MN_ENABLE_ALARM_MASK Bit 6
Basic Functions
468 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K1: Mode group, channel, program operation, reset response
8.5 Program test
Test options
The following test options are described below:
● Program execution without setpoint outputs
● Program execution in singleblock mode
● Program execution with dry run feedrate
● Skip part program blocks
● Block search with or without calculation.
Function
In the "Program test" status, a part program is executed without the output of axis or spindle
setpoints.
The user can use this to check the programmed axis positions and auxiliary function outputs
of a part program. This program simulation can also be used as an extended syntax check.
Selection
This function is selected via the operator interface in the "Program control" menu.
The selection sets the following interface signal:
DB21, ... DBX25.7 (program test selected)
This does not activate the function.
Activation
The function is activated via interface signal:
DB21, ... DBX1.7 (activate program test)
Display
The corresponding field on the operator interface is reversed and the interface signal in the
PLC as a checkback of the active program test:
DB21, ... DBX33.7 (program test active)
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 469
K1: Mode group, channel, program operation, reset response
8.5 Program test
CAUTION
Note
Dry run feedrate
"Program execution without axis motion" can also be activated with the function "Dry run
feedrate". With this function, part program sections with a small programmed feedrate can be
processed in a shorter time.
Note
Tool management
Because of the axis disable, the assignment of a tool magazine is not changed during
program testing. A PLC application must be used to ensure that the integrity of the data in
the tool management system and the magazine is not corrupted. The toolbox diskettes
contain an example of the basic PLC program.
Basic Functions
470 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K1: Mode group, channel, program operation, reset response
8.5 Program test
Function
In case of "Program execution in single-block mode" the part program execution stops after
every program block. If tool cutter radius compensation or a tool nose radius correction is
selected, processing stops after every intermediate block inserted by the controller.
The program status switches to "Program status stopped".
The channel status remains active.
The next part program block is processed on NC Start.
Application
The user can execute a part program block-by-block to check the individual machining steps.
Once the user decides that an executed part program block is functioning correctly, the next
block can be called.
Single-block types
The following single block types are differentiated:
● Decoding single block
With this type of single block, all blocks of the part program (even the pure computation
blocks without traversing motions) are processed sequentially by "NC Start".
● Action single block (initial setting)
With this type of single block, the blocks that initiate actions (traversing motions, auxiliary
function outputs, etc.) are processed individually.
Blocks that were generated additionally during decoding (e.g. for cutter radius
compensation at acute angles) are also processed individually in single-block mode.
Processing is however not stopped at calculation blocks as these do not trigger actions.
The single-block types are determined via the user interface in the menu "Program controls".
CAUTION
Function feature for single-block type series
In a series of G33/G34/G35 blocks, a single block is only operative if "dry run feed" is selected.
Calculation blocks are not processed in single-step mode (only if single decoding block is
active).
SBL2 is also ineffective with G33/G34/G35.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 471
K1: Mode group, channel, program operation, reset response
8.5 Program test
Selection
It is possible to select the single-block mode:
● Via the machine control panel (key "Single Block")
● Via the user interface
For an exact procedure, see:
References:
Operating Manual of the installed HMI application
Activation
The function is activated through the PLC basic program via the interface signal:
DB21, ... DBX0.4 (activate single block)
Display
Active single-block mode is indicated by a reversal in the relevant field in the status line on
the user interface.
Because of the single-block mode, as soon as the part program processing has processed a
part program block, the following interface signal is set:
DB21, ... DBX35.3 (program status interrupted)
Basic Functions
472 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K1: Mode group, channel, program operation, reset response
8.5 Program test
Function
During "Program execution with dry run feedrate" the traversing speeds which have been
programmed together with G01, G02, G03, G33, G34 and G35, are replaced by a
parameterized feedrate value:
SD42100 $SC_DRY_RUN_FEED (dry run feedrate)
The dry run feedrate also replaces the programmed revolutional feedrate in program blocks
with G95.
The exact way of working of the parameterized dry run feedrate (SD42100) depends on the
setting of another setting data:
SD42101 $SC_DRY_RUN_FEED_MODE (mode for test run speed)
Value Meaning
0 Dry run feedrate is the maximum of the programmed feedrate and setting data SD42100.
(Default setting!)
⇒ SD42100 becomes effective only when the stored value is greater than the programmed
feedrate.
1 Dry run feedrate is the minimum of the programmed feedrate and SD42100.
⇒ SD42100 becomes effective only when the stored value is less than the programmed
feedrate.
2 The value in SD42100 acts as the dry run feedrate, regardless of the programmed feedrate.
10 As in the case of "0", except thread cutting (G33, G34, G35) and thread boring (G331,
G332, G63). These functions are executed as programmed.
11 As in the case of "1", except thread cutting (G33, G34, G35) and thread boring (G331,
G332, G63). These functions are executed as programmed.
12 As in the case of "2", except thread cutting (G33, G34, G35) and thread boring (G331,
G332, G63). These functions are executed as programmed.
A dry run feedrate can be selected in the automatic modes and activated on interruption of
an automatic mode or end of a block.
For further information on influencing the feedrate, see Section "V1: Feedrates (Page 1335)".
Application
DANGER
High cutting speeds
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.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 473
K1: Mode group, channel, program operation, reset response
8.5 Program test
Selection
This function is selected via the user interface in the "Program control" menu.
The selection sets the following interface signal:
DB21, ... DBX24.6 (dry run feedrate selected)
This does not activate the function.
Activation
The function is activated via interface signal:
DB21, ... DBX0.6 (activate dry run feed)
Display
Active dry run feedrate mode is indicated by a reversal in the relevant field in the status line
on the user interface.
Function
When testing or breaking in new programs, it is useful to be able to disable or skip certain
part program blocks during program execution. For this, the respective records must be
marked with a slash.
Main program/subroutine
%100
N10 ...
N20 ...
Block being N30 ...
processed
Skip blocks
/N40 ... N40 and N50 during
processing
/N50 ...
N60 ...
N70 ...
N80 ...
N90 ...
N100 ...
N110 ...
N120 M30
Basic Functions
474 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K1: Mode group, channel, program operation, reset response
8.6 Workpiece simulation
Selection
This function is selected via the operator interface in the "Program control" menu.
The selection sets the following interface signal:
DB21, ... DBX26.0 (skip block selected)
This does not activate the function.
Activation
The function is activated via the interface signal:
DB21, ... DBX2.0 (activate skip block)
Note
The "Skip part programs" function remains active during block searches.
Display
Activated "Skip block" function is indicated by a reversal of the relevant field on the operator
interface.
Function
The actual part program is completely calculated in the tool simulation and the result is
graphically displayed in the user interface. The result of programming is verified without
traversing the machine axes. Incorrectly programmed machining steps are detected at an
early stage and incorrect machining on the workpiece prevented.
Simulation NCK
The simulation uses its own NCK instance (simulation NCK). Therefore, before a simulation
is started, the real NCK must be aligned to the simulation NCK. With this alignment, all active
machine data are read out of the NCK and read into the simulation NCK. The NCK and cycle
machine data are included in the active machine data.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 475
K1: Mode group, channel, program operation, reset response
8.7 Block search
Note
In part programs, CC-specific language commands and machine data of unsupported CCs
cannot be used (see also paragraph "CC-commands in the part program").
Special motion of supported CCs (OEM transformations) are - under certain circumstances -
incorrectly displayed.
Function
Block search offers the possibility of starting part program execution from almost any part
program block.
This involves the NC rapidly performing an internal run through the part program (without
traversing motions) to the selected target block during block search. Here, every effort is
made to achieve the exact same control status as would result at the target block during
normal part program execution (e.g. with respect to axis positions, spindle speeds, loaded
tools, NC/PLC interface signals, variable values) in order to be able to resume automatic part
program execution from the target block with minimum manual intervention.
Basic Functions
476 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K1: Mode group, channel, program operation, reset response
8.7 Block search
Note
For further explanations regarding the block search, see Section "Behavior during block
search (Page 413)".
Subsequent actions
After completion of a block search, the following subsequent actions may occur:
● Type 1 - Type 5: Automatic Start of an ASUB
When the last action block is activated, a user program can be started as an ASUB.
● Type 1 - Type 4: Cascaded block search
A further block search with a different target specification can be started from "Search
target found".
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 477
K1: Mode group, channel, program operation, reset response
8.7 Block search
Time sequence
The block search (Types 1, 2, and 4) proceeds as follows:
1. Activation via the user interface
2. Search target found, or alarm if target cannot be found
3. NC Start for output of action blocks
4. NC Start for program continuation.
Block search Search target 1 Block search Search target 2 NC Start Last
starting found starting found action blocks action block
being output
Block search
active (DB21, ...
DBX33.4)
Action block
active (DB21, ...
DBX32.3)
Channel status
Reset (DB21, ...
DBX35.7)
Channel status
interrupted
(DB21, ... DBX35.6)
Interface signals
In the PLC, the following interface signals are set according to the time sequence shown in
the figure:
DB21, ... DBX33.4 (block search active)
DB21, ... DBX32.3 (action block active)
DB21, ... DBX32.4 (approach block active)
DB21, ... DBX32.6 (last action block active)
DB21, ... DBX1.6 (PLC action complete)
Basic Functions
478 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K1: Mode group, channel, program operation, reset response
8.7 Block search
If an axis is first programmed after "Block search with calculation at block end point", the
incremental value can be added to the value accumulated up to the search target using
setting data
SD42444 $SC_TARGET_BLOCK_INCR_PROG.
Action blocks
Action blocks contain the actions accumulated during "Block search with calculation", such
as auxiliary function outputs and tool (T, D), spindle (S), and feedrate programming
commands. During "block search with calculation" (contour or block end point), actions such
as M function outputs are accumulated in so-called action blocks. These blocks are output
on an NC Start after "Search target found".
Note
With the action blocks, the accumulated spindle programming (S value, M3/M4/M5/M19, SPOS)
also becomes active.
The PLC user program must ensure that the tool can be operated and that, if necessary, the
spindle programming is reset via PLC signal:
DB31, ... DBX2.2 (spindle reset)
or the spindle programming is not output.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 479
K1: Mode group, channel, program operation, reset response
8.7 Block search
● Start: NC/PLC interface signals: DB21,... DBB32, Bit6 (last action block active) == 1
● End: Continuing the part program processing per NC START,.
The start point of the approach movement is represented by the current axis positions of the
channel axes at the time of the NC start command. The end point results from the other
transversing movements programmed in the part program.
Basic Functions
480 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K1: Mode group, channel, program operation, reset response
8.7 Block search
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 481
K1: Mode group, channel, program operation, reset response
8.7 Block search
System variables
The spindle-specific auxiliary functions are always stored in the following system variables
on block search, irrespective of the programming described above:
Basic Functions
482 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K1: Mode group, channel, program operation, reset response
8.7 Block search
For later output of the spindle-specific auxiliary functions, the system variables can be read,
for example, in an ASUB, and then output after output of the action blocks:
DB21, ... DBX32.6 == 1 (last action block active)
Note
The contents of the system variables $P_S, $P_DIR and $P_SGEAR may be lost after block
search due to synchronization operations.
For more detailed information on ASUB, block search and action blocks, see Sections
"Output suppression of spindle-specific auxiliary functions (Page 418)" and "Program test
(Page 469)".
$P_... System variables that start with $P supply the pre-processing state (i.e. the
programmed values).
$A_... System variables that start with $A supply the main run state.
$V_... System variables that start with $V provide data that are received from the servo/drive.
During a type 2 and 4 block search, no blocks access the main run. Therefore, it should be
ensured that system variables, which reflect the main run or servo/drive states, are not
changed by the search. Where necessary, for this variable, the block search must be
executed in a special fashion by querying the machining type with $P_SEARCH in the NC
program.
System variables that start with $P can be simply used in all search types.
Parameter assignment
Making the function effective
The automatic ASUB start after a block search is activated by the following MD setting:
MD11450 $MN_SEARCH_RUN_MODE, bit 1 = 1
Program to be activated
In the default setting, the program _N_PROG_EVENT_SPF is activated from the directory
_N_CMA_DIR as ASUB after the block search by changing the last action block. If another
program is to be activated, then the name of this user program must be entered in the
following machine data:
MD11620 $MN_PROG_EVENT_NAME
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 483
K1: Mode group, channel, program operation, reset response
8.7 Block search
Note
For further information on the parameterization of MD11620, MD20108 and MD20107, see
Section "Parameterization (Page 547)".
Programming
The event that has started this ASUB can be determined by scanning the system variable
$P_PROG_EVENT. In case of an automatic activation after a block search
$P_PROG_EVENT returns the value "5".
Sequence
Sequence of automatic start of an ASUB after a block search
1. Start block search (with/without calculation, at contour, at end-of-block point).
2. Stop after "Search target found".
3. NC Start for output of action blocks.
4. Last action block is activated.
Basic Functions
484 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K1: Mode group, channel, program operation, reset response
8.7 Block search
Note
If bit 0 is set to "1" in MD11450 $MN_SEARCH_RUN_MODE, then the alarm 10208 is
generated only when the PLC requests this by setting the following NC/PLC interface
signal:
DB21, ... DBX1.6 (PLC action complete)
Functionality
The "Cascaded block search" function can be used to start another block search from the
status "Search target found". The cascading can be continued after each located search
target as often as you want and is applicable to the following block search functions:
● Type 1 block search without calculation
● Type 2 block search with calculation at contour
● Type 3 block search with calculation at block end point
Note
Another "cascaded block search" can be started from the stopped program execution
only if the search target has been found.
Activation
The "cascaded block search" is configured in the existing machine data:
MD11450 $MN_SEARCH_RUN_MODE
● Cascaded block search is enabled (i.e., several search targets can be specified)
with Bit 3 = 0 (FALSE).
● For compatibility reasons, the cascaded block search can be disabled with Bit 3 = 1
(TRUE). By default, the cascaded block search is set with Bit 3 = 0.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 485
K1: Mode group, channel, program operation, reset response
8.7 Block search
Execution behavior
Block search Search target 1 Block search Search target 2 NC Start Last
starting found starting found action blocks action block
being output
Block search
active (DB21, ...
DBX33.4)
Action block
active (DB21, ...
DBX32.3)
Channel status
Reset (DB21, ...
DBX35.7)
Channel status
interrupted
(DB21, ... DBX35.6)
Basic Functions
486 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K1: Mode group, channel, program operation, reset response
8.7 Block search
Selection
From the following examples, select the type of block search that corresponds to your task.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 487
K1: Mode group, channel, program operation, reset response
8.7 Block search
200
Approach movement
Target block N220
100
Approach point
(170,30)
0 X
100 200 300 400
Figure 8-4 Approach motion for search to block end point (target block N220)
Note
"Search to contour" with target block N220 would generate an approach motion to the tool
change point (start point of the target block).
Basic Functions
488 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K1: Mode group, channel, program operation, reset response
8.7 Block search
Y
Tool
change point
300 (450,300)
N260
Approach point
100
0 X
100 200 300 400
Figure 8-5 Approach motion for search to contour (target block N260)
Note
"Search to block end point" with target block N260 would result in Alarm 14040 (circle end
point error).
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 489
K1: Mode group, channel, program operation, reset response
8.7 Block search
Basic Functions
490 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K1: Mode group, channel, program operation, reset response
8.8 Block search Type 5 SERUPRO
Channels
In combination with the HMI, SERUPRO is provided for the following channels:
● For the current SERUPRO channel only (1)
● For all channels with the same workpiece name as the SERUPRO channel (2)
● For all channels with the same mode group as the SERUPRO channel (3)
● For all channels of the NCU (4)
The scope of channels for SERUPRO is selected by means of configuration file
maschine.ini, in Section [BlockSearch]:
Section [BlockSearch] Enable search function for HMI and select search configuration
SeruproEnabled=1 ;SERUPRO softkey available for HMI. Default value is (1)
SeruproConfig=1 ;Number (1) to (4) of above indicated channel grouping. Default value is (1)
All other channels started with SERUPRO are operated in "Self-Acting SERUPRO" mode.
Only the channel in which a target block has been selected can be started with a block
search in SERUPRO mode.
Activation
SERUPRO is activated via the HMI. SERUPRO is operated using the "Prog.Test Contour"
softkey.
SERUPRO uses REPOS to approach the target block.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 491
K1: Mode group, channel, program operation, reset response
8.8 Block search Type 5 SERUPRO
Note
After program testing has been deactivated, a REPOS operation is initiated that is subject to
the same restrictions as a SERUPRO approach operation. Any adverse effects can be
inhibited using an ASUB.
Basic Functions
492 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K1: Mode group, channel, program operation, reset response
8.8 Block search Type 5 SERUPRO
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 493
K1: Mode group, channel, program operation, reset response
8.8 Block search Type 5 SERUPRO
Note
The automatic ASUB start with MD11450 requires Starts to continue the program.
The procedure is in this respect similar to other search types.
Basic Functions
494 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K1: Mode group, channel, program operation, reset response
8.8 Block search Type 5 SERUPRO
8.8.2 REPOS
8.8.2.1 Continue machining at the contour after SERUPRO search target found
The "Reposition to the contour" (REPOS) function can be used to continue an interrupted
machining at the interrupted location. Unlike REPOS, SERUPRO permits the "refetching" or
"repetition" of a program section. For this purpose, once SERUPRO has found the target
block, the contour is positioned at the location selected as REPOS mode and the machining
continued.
CAUTION
Risk of collision
MD11470 $MN_REPOS_MODE_MASK, Bit 3 or Bit 4 = 1
The user alone is responsible for ensuring that the concurrent traversal of the axes in the
repositioning block does not cause any collision on the machine.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 495
K1: Mode group, channel, program operation, reset response
8.8 Block search Type 5 SERUPRO
Path axes cannot be influenced individually. For all other axes that are not geometry axes,
REPOS of individual axes can be prevented temporarily and also delayed. NC/PLC interface
signals can be used to subsequently re-enable or to continue blocking individual channel
axes that REPOS would like to traverse.
DANGER
Risk of collision
Signal:
DB31, ... DBX2.2 (delete distance-to-go, axis-specific)
produces the following dangerous behavior with ”Prevent repositioning of individual axes"
via:
MD11470 $MN_REPOS_MODE_MASK (Bit 2==1).
As long as an axis is programmed incrementally after the interruption, the NC approaches
different positions than those approached with no interruption (see example below).
Basic Functions
496 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K1: Mode group, channel, program operation, reset response
8.8 Block search Type 5 SERUPRO
The NC commences SERUPRO approach with a block that moves all positioning axes to the
programmed end and the path axis to the target block.
The user starts the individual axes by selecting the appropriate feedrate enables. The target
block motion is then executed.
MD11470 $MN_REPOS_MODE_MASK
Bit 3=1 for block search via program test (SERUPRO)
Bit 4=1 for each REPOS
Note
If neither bit 3 nor bit 4 is set, "non-path axes" are repositioned in the residual block in this
phase.
Bit 5 = 1 Modified feedrates and spindle speeds are valid immediately in the residual
block and are given priority. This behavior relates to every REPOS operation.
Bit 6 = 1 Neutral axes and positioning spindles are repositioned after SERUPRO.
Neutral axes that are not allowed to be further repositioned must receive
interface signal:
DB31, ... DBX10.0 (REPOSDELAY)
This cancels the REPOS motion.
Bit 7 = 1 The level of interface signal:
DB31, ... DBX10.0 (REPOSDELAY)
is read if REPOSA is interpreted.
Axes, which are neither geometry nor orientation axes, are then excluded by
REPOS and are not moved.
Remark: REPOSDELAY is changed from edge to level evaluation.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 497
K1: Mode group, channel, program operation, reset response
8.8 Block search Type 5 SERUPRO
CAUTION
Risk of collision
Interface signal:
DB31, ... DBX10.0 (REPOSDELAY)
has no effect on machine axes that form a path.
Whether an axis is a path axis can be determined with:
DB31, ... DBX76.4 (path axis).
Basic Functions
498 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K1: Mode group, channel, program operation, reset response
8.8 Block search Type 5 SERUPRO
Note
In the current ASUB, DB21, ... DBX31.4 (REPOSMODEEDGE) does not affect the final
REPOS unless this signal applies to the REPOS blocks.
In case 1, the signal is allowed only in the stopped state.
Response to RESET:
• NCK has acknowledged the PLC signal
DB21, ... DBX31.4 (REPOSMODEEDGE) == 1 AND
DB21, ... DBX319.0 (REPOSMODEEDGEACKN) == 1
If a RESET occurs in this situation, DB21, ... DBX319.1 - .3 (Repos Path Mode Ackn) is
deleted.
• NCK has not yet acknowledged the PLC signal:
DB21, ... DBX31. (REPOSMODEEDGE 4) == 1 AND
DB21, ... DBX319.0 (REPOSMODEEDGEACKN) == 0
If a RESET occurs in this situation, then:
DB21, ... DBX319.0 (REPOSMODEEDGEACKN) = 0
DB21, ... DBX319.1–319.3 (Repos Path Mode Ackn) = 0
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 499
K1: Mode group, channel, program operation, reset response
8.8 Block search Type 5 SERUPRO
Note
If the NCK has not yet acknowledged interface signal:
DB21, ... DBX31.4 (REPOSMODEEDGE)
with interface signal:
DB21, ... DBX319.0 (REPOSMODEEDGEACKN)
a RESET in this situation causes the program to abort, and the REPOS that is to be used to
control the REPOSPATHMODE can no longer take place.
A REPOSMODE specified by the PLC is acknowledged by the NC with the interface signals:
DB21, ... DBX319.1-319.3 (Repos Path Mode Ackn)
and
DB31, ... DBX10.0 (Repos Delay)
with:
DB31, ... DBX70.2 (Repos Delay Ackn)
Basic Functions
500 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K1: Mode group, channel, program operation, reset response
8.8 Block search Type 5 SERUPRO
&RPPDQGZLWK$68%LVVWDUWHG
5HSRVLWLRQLQJPRWLRQIURP
5(326KDVEHHQFRPSOHWHG
7KHUHPDLQLQJEORFNVWDUWV
1
3UHVHOHFW501%/
6WRSRIWKHSDUWSURJUDP
6WDUWRIWKHSDUWSURJUDP 7KHUHPDLQLQJEORFNLVFRPSOHWHG
5(3263$7+02'(
5(32602'(('*(
5(32602'(('*($&.1
5HSRV3DWK0RGH$FNQ
W
Figure 8-6 REPOS sequence in part program with timed acknowledgement signals from NCK
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 501
K1: Mode group, channel, program operation, reset response
8.8 Block search Type 5 SERUPRO
Range of validity
Interface signal:
DB31, ... DBX70.0 (REPOS offset)
is supplied at the end of the SERUPRO operation.
The REPOS offset is invalidated at the start of a SERUPRO ASUB or the automatic ASUB
start.
Basic Functions
502 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K1: Mode group, channel, program operation, reset response
8.8 Block search Type 5 SERUPRO
Value 0: All axes currently controlled by this channel have either no REPOS offset or
their REPOS offsets are invalid.
Value 1: Miscellaneous.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 503
K1: Mode group, channel, program operation, reset response
8.8 Block search Type 5 SERUPRO
Example
The program is interrupted at any point in the block N110. The axes were then traversed to
position (A), e.g. manually. Once SERUPRO has found target block N110, the REPOS
operation with REPOS mode RMNBL is performed. With regard to the REPOS start position
(A), point (B) is the next nearest point of the contour. The REPOS operation is completed
when point (B) is reached. The programmed contour of the interrupted program is traversed
again starting at point (B).
,QWHUUXSWLRQSRLQW 1
1 1
Note
RMNBL is a general REPOS extension and it is not restricted to SERUPRO.
RMIBL and RMBBL behavior identically for SERUPRO.
DB21, ... DBX31.0 - .2 (REPOS mode) affects only the traversing motion of the path axes.
The behavior of the other axis can be changed individually using interface signal DB31, ...
DBX10.0 (REPOSDELAY). The REPOS offset is not applied immediately, but only when it is
next programmed.
For further information on the programming of the repositioning point, see:
References:
Programming Manual, Job Planning; Path Behavior, Section: Repositioning on contour
Basic Functions
504 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K1: Mode group, channel, program operation, reset response
8.8 Block search Type 5 SERUPRO
NOTICE
No synchronized action
The NC as a discrete system generates a sequence of interpolation points.
It is possible that a synchronized action that was triggered in normal operation will no
longer be triggered in SERUPRO.
● Tapping and thread cutting are performed at the usual velocity for DryRun.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 505
K1: Mode group, channel, program operation, reset response
8.8 Block search Type 5 SERUPRO
DryRun and SERUPRO affect the spindle/axis with the following G codes:
● G331/G332 causes the spindle to be interpolated as an axis in a path grouping. In the
case of tapping, the drilling depth (e.g. axis X) and the pitch and speed (e.g. spindle S)
are specified.
In the case of DryRun, the velocity of X is specified, the speed remains constant, and the
pitch is adjusted.
Following the SERUPRO simulation, the position for spindle S deviates from the normal
position because the spindle S has rotated less during simulation.
Tool management
If tool management is active, the following setting is recommended:
MD20310 $MC_TOOL_MANAGEMENT_MASK Bit 20 = 0
The tool management command generated during the SERUPRO operation is thus not
output to the PLC!
The tool management command has the following effect:
● The NC acknowledges the commands automatically.
● No magazine data is changed.
● Tool data is not changed.
Exception:
The tool enabled during the test mode can assume 'active' state. In this way, the wrong
tool may be on the spindle after the SERUPRO operation.
Remedy:
The user starts a SERUPRO ASUB that is actually traversed. Prior to the start, the user
can start an ASUB that loads the correct tool.
Basic Functions
506 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K1: Mode group, channel, program operation, reset response
8.8 Block search Type 5 SERUPRO
Example
Tool change subprogram
N580 GETSELT(TNR_VORWAHL) ; Read T number of the preselected tool of the master spindle
; Execute tool change only if tool is not yet current
N590 IF TNR_AKTUELL <> TNR_VORWAHL ; Approach tool change point
N600 G0 G40 G60 G90 SUPA X450 Y300
Z300 D0
N610 M206 ; Execute tool change
N620 ENDIF
N630 M17
ASUB for calling the tool change routine after type 5 block search
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 507
K1: Mode group, channel, program operation, reset response
8.8 Block search Type 5 SERUPRO
N1085 ASUP_ENDE1:
N1090 IF TNR_VORWAHL == TNR_SUCHLAUF GOTOF
ASUP_ENDE
N1100 T = $TC_TP2[TNR_VORWAHL] ; Restore T preselection by tool name
N1110 ASUP_ENDE:
N1110 M90 ; Feedback to PLC
N1120 REPOSA ;ASUB end
In both of the programs PROC L6 and PROC ASUPWZV2, the tool change is programmed
with M206 instead of M6.
ASUB "ASUPWZV2" uses different system variables to detect the progress of the program
($P_TOOLNO) and represent the current status of the machine ($TC_MPP6[9998,1] ).
Spindle ramp-up
When the SERUPRO ASUB is started, the spindle is not accelerated to the speed specified
in the program because the SERUPRO ASUB is intended to move the new tool into the
correct position at the workpiece after the tool change.
A spindle ramp-up is performed with SERUPRO ASUB as follows:
● SERUPRO operation has finished completely.
● The user starts the SERUPRO ASUB via function block FC 9
in order to ramp up the spindle.
● The start after M0 in the ASUB does not change the spindle status.
● SERUPRO ASUB automatically stops before the REPOS part program block.
● The user presses START.
● The spindle accelerates to the target block state if the spindle was not programmed
differently in the ASUB.
Note
Modifications for REPOS of spindles:
The transitions of speed control mode and positioning mode must be taken into
consideration in the event of modifications in SERUPRO approach and spindle
functionality.
For further information on the operating mode switchover of spindles, see Section "Modes
(Page 1226)".
Basic Functions
508 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K1: Mode group, channel, program operation, reset response
8.8 Block search Type 5 SERUPRO
Selfacting SERUPRO
The channel-specific function "Self-acting SERUPRO" allows a SERUPRO sequence without
having to previously define a search target in a program of the associated SERUPRO
channels.
In addition, a special channel, the "serurpoMasterChan", can be defined for each "Self-acting
SERUPRO". A search target can be defined in this channel.
The "Selfacting SERUPRO" function supports the SERUPRO cross-channel block search.
Function
The "SelfActing SERUPRO" operation cannot be used to find a search target. If the search
target is not reached, no channel is stopped. In certain situations, however, the channel is
nevertheless stopped temporarily. In this case, the channel will wait for another channel.
Examples are: Wait marks, couplings, or axis replacement.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 509
K1: Mode group, channel, program operation, reset response
8.8 Block search Type 5 SERUPRO
Activation
"Self-acting SERUPRO" is activated via the HMI as a block search start for the Type 5 block
search for target channel "seruproMasterChan".
No search target is specified for dependent channels started from the target channel.
Programming
Syntax
IPTRLOCK()
Functionality
Marks the beginning of the program section as of which "Continue machining at the contour"
is locked. The next executable block (main run block) in which IPTRLOCK becomes active is
now used as target block for a block search with "Continue machining at the interruption
point", until the release with IPTRUNLOCK. This block is referred to as the hold block in the
following.
Effectiveness: Modal
Syntax
IPTRUNLOCK()
Marks the end of the program section locked for "Continue machining at the contour". As of
the next executable block (main run block) in which IPTRLOCK becomes active, the current
block is used again as target block for a block search with "Continue machining at the
interruption point". This block is referred to as the release block in the following.
Effectiveness: Modal
Basic Functions
510 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K1: Mode group, channel, program operation, reset response
8.8 Block search Type 5 SERUPRO
Example
Boundary conditions
● IPTRLOCK acts within a program (*.MPF, *.SPF) at the most up to the end of the program
(M30, M17, RET). IPTRUNLOCK implicitly becomes active at the end of the program.
● Multiple programming of IPTRLOCK within a program does not have a cumulative effect.
With the first programming of IPTRUNLOCK within the program or when the end of the
program is reached, all previous IPTRLOCK calls are terminated.
● If there is a subprogram call within a locked area, "Continue machining at the contour" is
also locked for this and all following subprogram levels. The lock also cannot be
cancelled within the called subprogram through explicit programming of IPTRUNLOCK.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 511
K1: Mode group, channel, program operation, reset response
8.8 Block search Type 5 SERUPRO
System variable
The status of the current block can be determined via the system variable $P_IPTRLOCK:
$P_IPTRLOCK Meaning
FALSE The current block is not within a program section locked for "Continue machining
at the contour"
TRUE The current block is within a program section locked for "Continue machining at
the contour"
Basic Functions
512 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K1: Mode group, channel, program operation, reset response
8.8 Block search Type 5 SERUPRO
This program section begins with the last executable block before the activation and ends
with the deactivation.
The automatic interrupt pointer is not active for couplings that were activated or deactivated
via synchronized actions.
Example: Automatically declaring axial master value coupling as search-suppressed:
A program abort within search-suppressed program section (N200 - N500) always provides the
interrupt pointer with N100.
NOTICE
Unwanted state caused by function overlappings
If there is an overlap of the "Programmable interrupt pointer" and "Automatic interrupt
pointer" functions via machine data, the NC selects the largest possible search-suppressed
area.
A program may need a coupling for almost all of the runtime. In this case, the automatic
interrupt pointer would always point to the start of the program and the SERUPRO function
would in fact be useless.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 513
K1: Mode group, channel, program operation, reset response
8.8 Block search Type 5 SERUPRO
STOPRE block
The STOPRE block receives all modal settings from the preceding block and can, therefore,
apply conditions in advance in relation to the following actions:
● Synchronize program line currently processing with the main run.
● Derive modal settings for SERUPRO in order, for example, to influence this REPOS
motion on approach of SERUPRO.
Example 1:
Position a Z axis by specifying an X axis setpoint.
When block "G1 F100 Z=$AA_IM[X]" is interpreted, the preceding STOPRE block ensures
synchronization with the main run. The correct setpoint of the X axis is thus read via $AA_IM
to move the Z axis to the same position.
Example 2:
Read and correctly calculate external zero offset.
Via an implicit STOPRE before N50, the NCK can read and correctly calculate the current
zero offset.
For a SERUPRO operation on the N50 search target, repositioning is on the implicit
STOPRE in the SERUPRO approach and the velocity is determined from N40 with F5000.
Basic Functions
514 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K1: Mode group, channel, program operation, reset response
8.8 Block search Type 5 SERUPRO
SPOS
If a spindle is programmed with M3/M4 and the target block contains an SPOS command,
the spindle is switched over to SPOS on completion of the SERUPRO process (search
target located). This is indicated on the VDI interface.
System variable
The system variables for "Travel to fixed stop" have the following meaning with SERUPRO:
● $AA_FXS: Progress of the program simulation
● $VA_FXS: Real machine state
The system variables always have the same values outside of the SERUPRO function.
ASUB
A user-specific ASUB can be activated for SERUPRO.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 515
K1: Mode group, channel, program operation, reset response
8.8 Block search Type 5 SERUPRO
References
For detailed information on the SERUPRO block search, see Section "Detailed description
(Page 281)".
System variable
The system variables for "Travel with limited torque/force" have the following meaning with
SERUPRO:
● $AA_FOC: Progress of the program simulation
● $VA_FOC: Real machine state
Supplementary condition
A changing torque characteristic cannot be implemented during repositioning.
Example
A program traverses axis X from 0 to 100 and switches "Travel with limited torque/force"
(FOC) on every 20 increments for 10 increments. This torque characteristic is usually
generated with non-modal FOC and cannot be performed during repositioning (REPOS).
Instead, axis X is traversed from 0 to 100 with or without limited torque/force in accordance
with the last programming.
References
For detailed information on the SERUPRO block search, see Section "Detailed description
(Page 281)".
Basic Functions
516 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K1: Mode group, channel, program operation, reset response
8.8 Block search Type 5 SERUPRO
CAUTION
Incorrect simulation
In order to be able to simulate couplings correctly, they must have been switched off
previously.
This can be performed with machine data MD10708 $MA_SERUPRO_MASK.
LEADON
The following specifications apply for the simulation of axial master value couplings:
1. Simulation always takes place with setpoint coupling.
2. SERUPRO approach takes place with active coupling and an overlaid motion of the
following axis in order to reach the simulated target point.
The following axis that is moved solely by the coupling cannot always reach the target point.
In SERUPRO approach, an overlaid linear motion is calculated for the following axis to
approach the simulated point!
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 517
K1: Mode group, channel, program operation, reset response
8.8 Block search Type 5 SERUPRO
Note
For further information on the repositioning of axis couplings, see Section "Continue
machining at the contour after SERUPRO search target found (Page 495)".
Master-slave
A system ASUB can be started automatically after the block search is finished. In this
subprogram, the user can control the coupling state and the associated axis positions
subsequently. The required information is provided via the following system variables:
Note
The coupled axes must be in the same channel when the block search is executed.
Programming
N10 IF(($S_SEARCH_MASLC[Y]< >0) AND ($AA_MASL_STAT[Y]< >0))
N20 MASLOF(Y)
N30 SUPA Y=$AA_IM[X]-$P_SEARCH_MASLD[Y]
N40 MASLON(Y)
N50 ENDIF
N60 REPOSA
Basic Functions
518 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K1: Mode group, channel, program operation, reset response
8.8 Block search Type 5 SERUPRO
To ensure that the ASUB can be automatically started, the following machine data must be
set:
● NC-specifically:
– MD11602 $MN_ASUP_START_MASK = 'H01'
– MD11604 $MN_ASUP_START_PRIO_LEVEL = 100
– MD11450 $MN_SEARCH_RUN_MODE = 'H02'
● Channel-specifically for the channel in which the ASUB is started or generally for all
channels:
– MD20105 $MC_PROG_EVENT_IGN_REFP_LOCK = ’H3F’
– MD20115 $MC_IGNORE_REFP_LOCK_ASUP = ’HFFFFFFFF’
Axis couplings
Note
For a leading axis whose following axes are in another channel, the setting for acceleration
of the processing speed has no effect:
MD22601 $MC_SERUPRO_SPEED_FACTOR > 0
Coupled motion
The coupled motion function (TRAILON) is supported by SERUPRO.
For further information on coupled motion with TRAILON and TRAILOF, see:
References:
● Function Manual, Special Functions; Axis Couplings (M3)
● Programming Manual, Job Planning; Axis Couplings
Gantry axes
The gantry axis function is supported by SERUPRO.
For further information on the functionality of gantry axes, see:
References:
Function Manual, Special Functions; Gantry Axes (G1)
Tangential control
The tangential follow-up of individual axes function is supported by SERUPRO.
For further information on tangential control, see:
References:
Function Manual, Special Functions; Tangential Control (T3)
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 519
K1: Mode group, channel, program operation, reset response
8.8 Block search Type 5 SERUPRO
SERUPRO conditions
The special conditions for SERUPRO must be observed with axis enable, autonomous axis
operations, and axis replacement.
Axis enable
The axial interface DB31, ... DBX3.7 ("Program test axis/spindle enable") controls the axis
enables if no closed-loop controller enable is to (or can) be issued at the machine and is
active only during the program test or when SERUPRO is active.
It is possible to issue this enable via interface signal PLC→NCK
DB31, ... DBX3.7 (program test axis/spindle enable). If the real servo enable is missing
during program test or SERUPRO, the effect on the axes/spindles is as follows:
● As soon as the simulated program run intends to move an axis/spindle, the message
"Waiting for axis enable" or "Waiting for spindle enable" is displayed and the simulation is
stopped.
● If during a simulated motion, NC/PLC interface signal DB31, ... DBX3.7 (program test
axis/spindle enable) is then canceled, alarm 21612: "Channel %1 axis %2 NC/PLC
interface signal ’controller enable’ reset during motion” is activated.
Axis replacement
Problem: A program moves an axis and gives up control before the target block with
WAITP(X). X is thus not subject to REPOS and the axis is not taken into account in
SERUPRO approach.
Via the machine data MD11470 $MN_REPOS_MODE_MASK, the following behavior can be
achieved for SERUPRO-REPOS:
The neutral axes are moved as "command axes" in the SERUPRO-REPOS. The axis
interpolates without a path context even if it was last programmed as a path axis. In this
scenario, the velocity results from MD32060 $MA_POS_AX_VELO. After SERUPRO
approach, this axis is again neutral.
Basic Functions
520 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K1: Mode group, channel, program operation, reset response
8.8 Block search Type 5 SERUPRO
Neutral axes that are however not allowed to be repositioned must receive the axial NC/PLC
interface signal “REPOSDELAY”. This deletes the REPOS movement.
Example:
After SERUPRO, one axis is deliberately moved in the synchronized action via technology
cycles. The command axes are always moved in the approach block, never in the target
block. The target block can only be changed if all command axes have been moved to the
end.
CAUTION
The PLC-controlled axis is not repositioned
Axes enabled by RELEASE(X) before the target block are not repositioned.
Operational sequences
The gear stage change (GSC) requires physical motions from the NCK in order to be able to
engage a new gear.
In the SERUPRO operation, no gear stage change is required and is carried out as follows:
Some gears can only be changed when controlled by the NC, since either the axis must
oscillate or a certain position must be approached beforehand.
The gear stage change can be suppressed selectively for DryRun, program test, and
SERUPRO using bits 0 to 2 in MD35035 $MA_SPIND_FUNCTION_MASK.
The gear stage change must then be performed in REPOS; this will work even if the axis
involved is to be in "speed control mode" at the target block. In other cases, the automatic
gear stage change is denied with an alarm if, for example, the axis was involved in a
transformation or coupling between the gear stage change and the target block.
Note
For further information on gear stage changes in DryRun, Program test and SERUPRO, see
Section "S1: Spindles (Page 1225)".
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 521
K1: Mode group, channel, program operation, reset response
8.8 Block search Type 5 SERUPRO
Only SERUPRO
If "overlaid movements" are used, only the block search via program test (SERUPRO) can
be used, since the overlaid movements are interpolated accordingly in the main run. This
applies in particular to $AA_OFF.
Basic Functions
522 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K1: Mode group, channel, program operation, reset response
8.8 Block search Type 5 SERUPRO
Example:
The synchronous spindle coupling at the beginning of the SERUPRO operation is retained
for the part program start.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 523
K1: Mode group, channel, program operation, reset response
8.9 Program operation
Definition
The execution of part programs or part program blocks in AUTOMATIC or MDA modes is
referred to as program operation.
Channel control
Every channel can be manipulated by means of interface signals from the PLC. The control
is exercised via mode groupspecific or channelspecific interface signals. An overview of
these signals is given under data lists in this Description of Functions.
Status messages
Each channel reports its current program operation status to the PLC with interface signals.
These signals are, in turn, divided up into mode groupspecific and channelspecific signals.
Machine data
Defined conditions can be set via machine data for the program operation or certain
implementations of the NC language scope.
Initial settings
Initial settings can be programmed in channel-specific machine data for each channel. These
initial settings affect, for example, G groups and auxiliary function output.
Basic Functions
524 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K1: Mode group, channel, program operation, reset response
8.9 Program operation
G groups
An initial programming setting can be specified for each of the available G groups using
MD20150 $MC_GCODE_RESET_VALUES (reset state of G groups). This initial setting is
automatically active during program start or in Reset until it is deselected by a G command
from the same G group.
Via the MD22510 $MC_GCODE_GROUPS_TO_PLC (G codes, which are output to interface
NCK-PLC after block change / RESET), the output of the G codes to the PLC interface can
be activated.
A list of G groups with the associated G functions is available in:
References:
Programming Manual, Fundamentals
NC language scope
The way that non-active options and functions should be moved with NC language
commands can be set via the machine data MD10711
$MN_NC_LANGUAGE_CONFIGURATION:
0: All available language commands can be programmed. Whether or not the needed
function is activated can only be recognized upon execution.
If only certain options are enabled and not all operations are available:
1: All the language commands are known. Language commands for non-enabled options are
already recognized at the beginning of the program interpretation and lead to the alarm
12553 "option/function is not active."
2: Only those language commands are known which correspond to the current scope of
enabled options of the NCK software. All commands for non-enabled options are not
recognized and trigger the alarm 12550 "Name not defined or option/function not available".
Note
Option-free functions also have the status "enable option"
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 525
K1: Mode group, channel, program operation, reset response
8.9 Program operation
4: Only those NC language commands are known which correspond to the current scope of
active functions of the NCK software. All commands for non-active functions are not
recognized and trigger the alarm 12550 "Name not defined or option/function not available".
Whether the command in question is generally unavailable in the Siemens NC language or
whether this is true only on the corresponding system cannot be distinguished in this
scenario.
Whether the current NC language scope of enabled options and active functions is also truly
programmable can be checked using the STRINGIS program command, see example.
Check sample application for NC language scope on cylinder surface transformation TRACYL
The cylinder surface transformation is optional and must be enabled beforehand. In order to
check this, the following initial conditions are assumed:
The cylinder surface transformation option is not enabled and the machine data
$MN_NC_LANGUAGE_CONFIGURATION = 2; NC language command TRACYL is unknown
Basic Functions
526 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K1: Mode group, channel, program operation, reset response
8.9 Program operation
MD10711 = 0 1 2 3 4
Option Function Return value as the basic information (1st digit from the left)
0 0 2 1 0 1 0
1 0 2 2 2 1 0
1 1 2 2 2 2 2
0 1 2 1 0 1 0
Reset status
Channel status
A part program can be selected only if the relevant channel is in the Reset state.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 527
K1: Mode group, channel, program operation, reset response
8.9 Program operation
Signals, Alarms
Execution of command
The part program or the part program block is automatically executed and the the following
interface signals are set:
DB21, ... DBX35.5 (channel status reset)
DB21, ... DBX35.0 (program status running)
The program is processed until the end of the program has been reached or the channel is
interrupted or aborted by a STOP or RESET command.
Alarms
Under certain conditions the START command will have no effect and one of the following
alarms will be triggered:
● 10200 "No NC Start permitted with active alarm"
● 10202 "No NC Start permitted with active command"
● 10203 "No NC Start permitted for non-referenced axes"
References:
Diagnostics Manual, Alarms
Basic Functions
528 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K1: Mode group, channel, program operation, reset response
8.9 Program operation
Channel status
A part program interruption is only executed when the channel and program are active:
● DB21, ... D35.5 == 1 ("Channel active")
● DB21, ... D35.0 == 1 ("Program running")
STOP commands
The part program processing can be interrupted via the following STOP commands:
● DB21, ... DBX7.2 ("NC stop at the block limit)
● DB21, ... DBX7.3 ("NC stop")
● DB21, ... DBX7.4 ("NC stop, axes plus spindles")
● DB21, ... DBX2.0 ("Single block")
● Program command M00 or M01
The channel and program are then in the state "interrupted":
● DB21, ... D35.6 == 1 ("Channel interrupted")
● DB21, ... D35.3 == 1 ("Program interrupted")
References
A detailed description of the interface signals can be found in:
Function Manual Basic Functions; NC/PLC Interface Signals (Z1)
Sequence
The following actions are performed after a STOP command:
● Interruption of the part program execution at the next block limit (with "NC stop at the
block limit", M00, M01 or single block), or immediately for all other STOP commands.
● The traversing axes of the channel are stopped via braking ramp. The braking of the axes
down to standstill can be extended over several blocks.
● The block indicator shows the current block at the point of interruption.
● The auxiliary functions that have not been output before the point of interruption are no
longer output.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 529
K1: Mode group, channel, program operation, reset response
8.9 Program operation
Basic Functions
530 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K1: Mode group, channel, program operation, reset response
8.9 Program operation
Command priority
Channel status
The RESET command can be executed in every channel state. This command is aborted by
another command.
Commands
RESET-Command
The following Reset commands are available:
● DB11, ... DBX0.7 ("mode group reset")
● DB21, ... DBX7.7 ("Reset")
For a further explanation of the individual interface signals, please see
References: /FB1/ Function Manual Basic Functions; NC/PLC interface signals (Z1)
A RESET command can be used to interrupt an active part program or a part program block
(in MDA).
After execution of the Reset command, the interface signal DB21, ... DBX35.7 ("Channel
status Reset") is set.
The part program cannot be continued at the point of interruption. All the axes of the channel
go into exact stop unless they are in followup mode. The same applies to the spindles
configured in the channel.
The following actions are executed when the RESET command is triggered:
● Part program preparation is stopped immediately.
● Axes and, if they exist, spindles in the channel are decelerated along a braking ramp.
● Any auxiliary functions of the current block not yet output, are no longer output.
● The block indicator is reset to the beginning of the part program.
● All Reset alarms (channelspecific, axisspecific, spindlespecific) are cleared from the
display.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 531
K1: Mode group, channel, program operation, reset response
8.9 Program operation
Program states
The following program states are displayed at the NC/PLC interface (DB21, ... ):
● DB21, ... DBX35.4 ("aborted")
● DB21, ... DBX35.3 ("interrupted")
● DB21, ... DBX35.2 ("stopped")
● DB21, ... DBX35.1 ("waiting")
● DB21, ... DBX35.0 ("running")
A detailed description of the interface signals can be found in Section "Signals from channel
(DB21, ...) (Page 1649)".
Basic Functions
532 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K1: Mode group, channel, program operation, reset response
8.9 Program operation
Channel states
The following channel states are displayed at the NC/PLC interface (DB21, ... ):
● DB21, ... DBX35.7 ("reset")
● DB21, ... DBX35.6 ("interrupted")
● DB21, ... DBX35.5 ("active")
A detailed description of the interface signals can be found in Section "Signals from channel
(DB21, ...) (Page 1649)".
The "Channel state active" signal is obtained when a part program or part program block is
being executed or when axes are traversed in JOG mode.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 533
K1: Mode group, channel, program operation, reset response
8.9 Program operation
Status transitions
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 righthand 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 Program status Active mode Operator or program action (situation after the
status action)
R U A N U S W A A M J
1 x x x RESET (4)
2 x x x RESET (5)
3 x x x RESET (6)
4 x x x NC Start (13); Mode change (5 or 6)
5 x x x NC Start (14); Mode change (4 or 6)
6 x x x Direction key (15); Mode change (4 or 5)
7 x x x NC Start (14)
8 x x x NC Start (15)
9 x x x NC Start (13); Mode change (10 or 11)
10 x x x NC Start (16); Mode change (9 or 11)
11 x x x Direction key (17); Mode change (9 or 10)
12 x x x NC Start (13); Mode change (10 or 11)
13 x x x NC Stop (12)
14 x x x NC Stop (7); at block end (5)
15 x x x NC Stop (8); at JOG end (6)
16 x x x NC Stop (10); at block end (10)
17 x x x NC Stop (11); at JOG end (11)
18 x x x Reset (4); wait for other channel (18)
Basic Functions
534 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K1: Mode group, channel, program operation, reset response
8.9 Program operation
Start handling
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 535
K1: Mode group, channel, program operation, reset response
8.9 Program operation
1
IS "Program state running" (DB21, ... DBX35.0)
Program:
Logic operation through PLC user program N10 G01 G90 X100
AuxF M170 from PLC user program completed, M3 S1000 F1000
i.e. block N10 complete (AuxF output during travel) Spindle Axis running M170 If N20 M0 If
run-up .....
Program stopped with read-in disable
Program aborted with RESET
Function
With the function "Jump back to start of the program" the control jumps back from a part
program to the beginning of the program. The program is then processed again.
As compared to the function "Program jumps to jump marks", with which a repeated
processing of the program can also be implemented, the function "Jump back to the start of
the program" offers the following advantages:
● The programming of a jump mark at the start of the program is not necessary.
● The program restart can be controlled through the NC/PLC interface signal:
DB21, ... DBX384.0 (control program branching)
Basic Functions
536 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K1: Mode group, channel, program operation, reset response
8.9 Program operation
● The timer for the program runtime can be reset to "0" at the restart of the program.
● The timer for workpiece counting can be incremented by "1" at program restart.
Application
The function is used, if the processing of subsequent workpieces is to be done through an
automatic program restart e.g. in case of turning machine with bar loader/-changer.
Activation
The jump back takes place only when the following NC/PLC interface signal is set:
DB21, ... DBX384.0 (control program branching) = 1
If the signal is at "0", then no jump back is exected and the program processing is continued
with the next part program block after the function call.
Parameter assignment
Program runtime
The runtime of the selected NC program is stored in the system variable $AC_CYCLE_TIME.
When starting a new program, the system variable is automatically reset to "0"(see Chapter
" Program runtime (Page 627) ")
Via the following machine data it can be set that the system variable $AC_CYCLE_TIME is
reset to "0" even in case of a program restart through the function "jump back to start of
program":
MD27860 $MC_PROCESSTIMER_MODE (Activation of the program runtime measurement)
Note
In order that the setting of bit 8 can become effective, the measurement of the current
program runtime must be active (MD27860 bit 1 = 1).
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 537
K1: Mode group, channel, program operation, reset response
8.9 Program operation
Workpiece count
After the part program end (M02 / M30) has been attained, the activated workpiece counters
($AC_TOTAL_PARTS / $AC_ACTUAL_PARTS / $AC_SPECIAL_PARTS) are incremented
by "1" (see Chapter " Workpiece Counter (Page 634) ").
Via the following machine data it can be set that the activated workpiece counter is
incremented even in case of a program restart through the function "jump back to start of
program":
MD27880 $MC_PART_COUNTER (activation of workpiece counters)
Programming
The function is called in the main or the part program via the command GOTOS.
Syntax: GOTOS
Parameters: none
Note
GOTOS internally initiates a STOPRE (pre-processing stop).
Example
Programming Comment
N10 ... ; Beginning of the program
...
N90 GOTOS ; Jump to beginning of the program
...
Basic Functions
538 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K1: Mode group, channel, program operation, reset response
8.9 Program operation
8.9.11.1 Overview
Function
The program section repetition allows the repetition of any labeled section of a part program.
For more information on labels, please see:
References:
Programming Manual Fundamentals; Program Jumps and Program Repetitions
Functionality
Via REPEATB (B=Block) in part program block N150, the part program processing branches to
the part program block N120 that is labeled START_1. This is repeated x number of times. If P
is not specified, the program section is repeated exactly once. After the last repetition, the
part program is continued with the part program block N160 following the REPEATBinstruction.
:
N100 ...
N120 START_1: ... ; Label: START_1
N130 ...
N140 ...
N150 REPEATB START_1 P=n ; Repetition after: START_1
N160 ...
:
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 539
K1: Mode group, channel, program operation, reset response
8.9 Program operation
Note
Label search direction
The part program block identified by the label can appear before or after the REPEATB
statement. The search initially commences toward the start of the program. If the label is not
found, a search is made in the direction of the program end.
Programming
Functionality
Via REPEAT in part program block N150, the part program processing branches to the part
program block N120 that is labeled START_1. This part program block and all of the following
part program blocks (N130 and N140) are repeated x number of times up to the part
program block that contains the REPEATinstruction (N150). If P is not specified, the part
program section (N120 - N140) is repeated exactly once. After the last repetition, the part
program is continued with the part program block N160 following the REPEATinstruction.
:
N100 ...
N120 START_1: ... ; Start label: START_1
N130 ...
N140 ...
N150 REPEAT START_1 P=n ; Repetition after: START_1
N160 ...
:
Note
Label search direction
The part program block marked with the Start label must come before the REPEATinstruction.
Basic Functions
540 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K1: Mode group, channel, program operation, reset response
8.9 Program operation
Programming
8.9.11.4 A part program section between a start label and end label
Functionality
Via REPEAT in part program block N160, the part program processing branches to the part
program block N120 that is labeled START_1 with a start label. This part program block and all
the part program blocks up to and including the part program block marked with the end
label END_1 (N140) are repeated x number of times. If P is not specified, the part program
section (N120 - N140) is repeated exactly once. After the last repetition, the part program is
continued with the part program block N170 following the REPEATinstruction.
:
N100 ...
N120 START_1: ... ; Start label: START__1
N130 ...
N140 END_1 ... ; End label: END_1
N150 ...
N160 REPEAT START_1 END_1 P=n ; Repetition: START_1 until END_1
N170 ...
:
Note
Label search direction
The program section marked with the Start and End labels can come before or after the
REPEATinstruction. The search initially commences toward the start of the program. If the Start
label is not found, a search is made in the direction of the program end.
If the REPEAT instruction is between the Start and End label, only the part program section
from the Start label to the REPEAT instruction is repeated.
REPEAT instruction repeated.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 541
K1: Mode group, channel, program operation, reset response
8.9 Program operation
Programming
8.9.11.5 A part program section between a Start label and the key word: ENDLABEL
Functionality
Via REPEAT in part program block N150, the part program processing branches to the part
program block N120 that is labeled START_1 with a start label. This part program block and all
the part program blocks up to and including the part program block marked with the key word
ENDLABEL (N140) are repeated x number of times. If P is not specified, the part program
section (N120 - N140) is repeated exactly once. After the last repetition, the part program is
continued with the part program block N170 following the REPEATinstruction.
:
N100 ...
N120 START_1: ... ; Start label: START__1
N130 ...
N140 ENDLABEL: ... ; End label: Keyword ENDLABEL
N150 ...
N160 REPEAT START_1 END_1 P=n ; Repetition: START_1 until END_1
N170 ...
:
Note
Label search direction
The program section marked with the Start and End labels can come before or after the
REPEATinstruction. The search initially commences toward the start of the program. If the Start
label is not found, a search is made in the direction of the program end.
If no keyword ENDLABEL is located between the Start label and the REPEAT instruction, the part
program section from the Start label to the REPEAT instruction is repeated.
Basic Functions
542 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K1: Mode group, channel, program operation, reset response
8.9 Program operation
Programming
8.9.12.1 Function
Events
Triggering events can be:
● Part program start
● Part program end
● Operator panel reset
● Power-up of the NC control
The triggering events are selected with the machine data MD20108
$MC_PROG_EVENT_MASK (see Section "Parameterization (Page 547)").
User program
In the default setting the program _N_PROG_EVENT_SPF is activated after the triggering
event occurs. If a different application program is to be activated, then it must be entered in
the machine date MD11620 $MN_PROG_EVENT_NAME (see Section "Parameterization
(Page 547)").
The application program activated by the event is basically processed in the channel, in
which the respective event occurred.
The application program is executed with the lowest priority and so can be interrupted by the
user ASUB.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 543
K1: Mode group, channel, program operation, reset response
8.9 Program operation
Processing sequence
Sequence during activation through part program start
Initial state:
Basic Functions
544 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K1: Mode group, channel, program operation, reset response
8.9 Program operation
Channel: Any
Mode: Any
1. Control activates reset-sequence with evaluation of machine data:
MD $MC_RESET_MODE_MASK
$MC_GCODE_RESET_VALUES
$MC_GCODE_RESET_MODE
2. Implicit call of _N_PROG_EVENT_SPF as ASUB
3. Control activates reset-sequence with evaluation of machine data:
$MC_RESET_MODE_MASK
$MC_GCODE_RESET_VALUES
$MC_GCODE_RESET_MODE
⇒ The G code reset position continues to be set via machine data!
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 545
K1: Mode group, channel, program operation, reset response
8.9 Program operation
Signal chart
The following diagrams show the signal chart of the NC/PLC interface signals DB21, ...
DBB35 ("Program status" and "Channel status") in case of event-driven program call:
'%'%;
3URJUDPVWDWXVUXQQLQJ
'%'%;
3URJUDPVWDWXVVWRSSHG
'%'%;
3URJUDPVWDWXVDERUWHG
'%'%;
FKDQQHOVWDWXVDFWLYH
'%'%;
FKDQQHOVWDWXVLQWHUUXSWHG
'%'%;
&KDQQHOVWDWXVUHVHW
Figure 8-8 Signal chart in case of activation through part program start and part program end
'%'%;
3URJUDPVWDWXVUXQQLQJ
'%'%;
3URJUDPVWDWXVVWRSSHG
'%'%;
3URJUDPVWDWXVDERUWHG
'%'%;
FKDQQHOVWDWXVDFWLYH
'%'%;
FKDQQHOVWDWXVLQWHUUXSWHG
'%'%;
&KDQQHOVWDWXVUHVHW
Figure 8-9 Signal chart during activation through operator panel reset
Basic Functions
546 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K1: Mode group, channel, program operation, reset response
8.9 Program operation
Note
DB21, ... DBX35.4 ("Program status aborted") and DB21, ... DBX35.7 ("Channel status
reset") are only received if event-driven user program is complete. Between program end
and the start of the event-driven application program these states are not imported. This is
also the case between an operator panel reset and the start of the application program.
Display
The information about the triggering event is provided to the PLC via the NC/PLC interface
byte DB21, ... DBB376.
The global query of DB21, ... DBB376 on 0 enables the determination, whether an event-
driven application program is active at all.
If the event-driven application program has expired or has been interrupted with RESET,
then the related display bit is deleted in the interface. For a very brief program, the
corresponding bit remains for at least the duration of a complete PLC cycle.
8.9.12.2 Parameterization
Triggering event
Which events the application program should activate, is set channel-specific in the machine
data:
MD20108 $MC_PROG_EVENT_MASK (event-controlled program call)
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 547
K1: Mode group, channel, program operation, reset response
8.9 Program operation
Note
MD20108 $MC_PROG_EVENT_MASK is ignored during the simulation.
User program
In the default setting after an event set with MD20108 occurs, the program
_N_PROG_EVENT_SPF is activated from the directory _N_CMA_DIR.
If another program is to be activated, then the name of this user program must be entered in
the following machine data:
MD11620 $MN_PROG_EVENT_NAME
The specified program must be present in one of the cycle directories.
The following search path is run when an event set with MD20108 occurs.
1. /_N_CUS_DIR/ for user cycles
2. /_N_CMA_DIR/ for manufacturer cycles
3. /_N_CUS_DIR/ for standard cycles
The first found program with the given name is called.
Note
The specified name is checked syntactically as in case of a subprogram name, i.e. the first
two characters must be letters or underscores (no numbers). Prefix (_N_) and suffix (_SPF)
of the program names are added automatically, if not specified.
Note
The same protection mechanisms that can be activated for cycles (protection levels for
writing, reading, etc.) are activated.
Basic Functions
548 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K1: Mode group, channel, program operation, reset response
8.9 Program operation
Note
MD20106 $MC_PROG_EVENT_IGN_SINGLEBLOCK affects all single-block processing
types.
Note
The single-block processing in the event-driven user program can be switched-off through
the following configuration:
MD10702 $MN_IGNORE_SINGLEBLOCK_MASK (prevent single-block stop) bit 0 = 1
The differentiated settings in MD20106 $MC_PROG_EVENT_IGN_SINGLEBLOCK are then
ineffective.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 549
K1: Mode group, channel, program operation, reset response
8.9 Program operation
Note
For bit 0 = 1 (user program is activated after part program start) the following constraint is
applicable:
If the user program is ended with the part program command RET, then RET always leads to
an executable block (similar to M17).
In case of bit 0 = 0, RET interpretation is done in the Interpreter and leads to an executable
block.
Basic Functions
550 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K1: Mode group, channel, program operation, reset response
8.9 Program operation
Note
The system variables $AC_STAT and $AC_PROG are not affected by this function, i.e. in
the running event-driven user program, $AC_STAT is set to "active" and $AC_PROG to
"running".
NC/PLC interface signals DB21, ... DBX35.0-7 ("Program state ..." and "Channel state ...")
also remain unaffected.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 551
K1: Mode group, channel, program operation, reset response
8.9 Program operation
In this way, an edge change of the interface signal DB21, ... DBX7.3 (NC Stop) initiated by
the user by activating the NC Stop key in case of reset or power-up is ignored during the
execution of the event-driven user program and an undesired stop behavior at the machine
is prevented.
Note
A programming of DELAYFSTON/ DELAYFSTOF in the event-driven user program cannot be
provided with the behavior set with MD20193, because the NC Stop can cause an
interruption before the execution of the first command DELAYFSTON.
8.9.12.3 Programming
User program
End of program
The following must be kept in mind, if the user program is to be activated through the part
program start.
● The user program must be ended with M17 or RET.
● A jump back by means of REPOS command is not permitted and leads to an alarm.
Block display
The display can be suppressed in the current block display using the DISPLOF attribute in the
PROCstatement.
Basic Functions
552 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K1: Mode group, channel, program operation, reset response
8.9 Program operation
Processing status
Via the user M function the PLC can be informed about the processing status of the event-
driven user program.
Value Description
1 Activation through part program start
2 Activation through part program end
3 Activation through Operator panel reset
4 Activation through Power up
5 Activation after output of the last action block after Block search (see "Automatic Start of an
ASUB after block search (Page 483)")
Note
Power up is an event that takes place in all channels.
Note
The power up event occurs in all channels at the same time.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 553
K1: Mode group, channel, program operation, reset response
8.9 Program operation
8.9.12.5 Examples
Programming:
RET
Basic Functions
554 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K1: Mode group, channel, program operation, reset response
8.9 Program operation
Programming:
Meaning:
The part program _N_PROG_EVENT_SPF from the directory _N_CMA_DIR should be
started automatically with the RESET key and processed till the end, regardless of whether
the read-in disable is activated or deactivated.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 555
K1: Mode group, channel, program operation, reset response
8.9 Program operation
DELAYFSTON
Start of a stop delay area
DELAYFSTOF
End of a stop delay area
References:
Programming Manual, Job Planning
Stop events
Overview of the NCK events that cause a stop:
Basic Functions
556 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K1: Mode group, channel, program operation, reset response
8.9 Program operation
Reaction
The reaction to a stop event can be:
● Immediate
Stops immediately even in the stop delay area. Is known as a "hard stop event".
● Delayed
Does not stop (even short-term) until after the stop delay area. Is known as a "soft stop
event".
● Alarm 16954
Program is aborted because illegal program commands have been used in the stop delay
area.
● Alarm 16955
Program is continued, an illegal action has taken place in the stop delay area.
● Alarm 16957
The program area (stop delay area) enclosed by DELAYFSTON and DELAYFSTOF could not be
activated. As a result, every stop will take effect immediately and is not subject to a delay!
This will always occur when the deceleration begins before the stop delay area but ends
within the stop delay area. Likewise, if the stop delay area is entered with an override of
0, the stop delay area also cannot be activated. (Example: A G4 before the stop delay
area allows the user to reduce the override to 0. The next block in the stop delay area
then begins with override 0 and the described alarm situation occurs.)
Note
MD11411 $MN_ENABLE_ALARM_MASK (activation of warnings) Bit 7 activates this
alarm.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 557
K1: Mode group, channel, program operation, reset response
8.9 Program operation
Stop criteria
A stop event can be triggered by the following
Note
Some NCK events are stopped for a short time, in order to perform a switching operation,
and restart immediately. These include, e.g. the ASUB that stops the contour briefly in order
to then start the ASUB immediately. These events are also allowed in the stop delay area,
however they are pushed back to its end and are thus considered "soft stop events".
Conditions
The following conditions apply while a stop delay area is being processed:
● A change in the feed is ignored while in the stop delay area. A feed disable is thus not
effective until the program area has been exited, and is stopped.
● None of the main run axes, such as command axes and positioning axes, which are
traversed with POSA, are stopped.
● Part program command G4 is permitted in the stop delay area.
Other part program commands that cause a stop in the meantime (e.g. WAITM) are not
permitted and trigger the alarm 16954.
● A stop delay area entered with an override of 0% will not be accepted!
Basic Functions
558 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K1: Mode group, channel, program operation, reset response
8.10 Asynchronous subprograms (ASUBs), interrupt routines
8.10.1 Function
Note
The terms "asynchronous subprogram (ASUB)" and "interrupt routine" are used
interchangeably in the description below to refer to the same functionality.
interrupt routines
Interrupt routines are normal part programs, which are started by interrupt events (interrupt
inputs, process or machine status) related to the machining process or the relevant machine
status.
Any part program block currently being executed will be interrupted by the routine if it is not
specifically declared to be locked against interruption. It is possible to continue the part
program at the point of interruption at a later stage.
0DLQSURJUDPVXESURJUDP ,QWHUUXSWURXWLQH
16(7,17 DURXWLQHWRDQHYHQW
DQGVZLWFKLWUHDG\$VVLJQ
1
1
0
1
1
1 5HWXUQSRVVLEOH
10
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 559
K1: Mode group, channel, program operation, reset response
8.10 Asynchronous subprograms (ASUBs), interrupt routines
Interrupt signals
● A total of 8 interrupt signals (inputs) are available.
● All inputs can be controlled via the PLC.
● The first four interrupt signals are also controlled via the 4 rapid NC inputs of the NCU
module.
● The signal status of the rapid NC inputs can be read out via the PLC interface (DB10).
● The transmission of the rapid NC input signals to the interrupt signals can be disabled via
the PLC interface (DB10).
4 rapid NC inputs
PLC interface
For further information about PLC control of the rapid NC inputs (interrupt signals) see
Section "P3: Basic PLC program for SINUMERIK 840D sl (Page 809)".
References:
Function Manual, Extended Function; Digital and Analog NCK I/O (A4)
Basic Functions
560 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K1: Mode group, channel, program operation, reset response
8.10 Asynchronous subprograms (ASUBs), interrupt routines
Activation
The activation of an interrupt routine can be initiated:
● By a 0/1 transition of the interrupt signal, triggered by a 0/1 transition at the rapid NC
input
● By calling the "Function call ASUB" (see Section "P3: Basic PLC program for
SINUMERIK 840D sl (Page 809)")
● By setting an output via synchronized action which indirectly sets an interrupt input via
short-circuit (see "Examples (Page 570)").
References:
Function Manual, Synchronized Actions
Display
The activation of an interrupt routine is shown with the following NC/PLC interface signal:
DB21, … DBX378.0 (ASUB active)
Reorganization
In addition to decelerating the axes, the previously decoded calculation blocks are calculated
back to the interruption block, i.e. all the variables, frames and G codes are assigned the
value that they would have at the point of interruption if the part program had not been
previously decoded. These values are transferred to the buffer so that they can be called up
again when the interrupt routine is completed.
Exceptions where no reorganization is possible:
● In thread cutting blocks
● With complex geometries (e.g. spline or radius compensation)
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 561
K1: Mode group, channel, program operation, reset response
8.10 Asynchronous subprograms (ASUBs), interrupt routines
N20
N30
Interruption point N40
Note
The NC/PLC-interface signal DB21, ... DBX318.0 (ASUB is stopped) is available only for
the following case: Interrupt "interrupted" in program operation in the channel status.
Note
In case of interrupt routines that close without REPOS, the signals "Asub-Done" and
DB21, ... DBX318.0 (ASUB is stopped) occur at the same time.
Basic Functions
562 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K1: Mode group, channel, program operation, reset response
8.10 Asynchronous subprograms (ASUBs), interrupt routines
8.10.1.4 NC response
The different reactions of the control to an activated interrupt routine in the various operating
states are given in the following table:
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 563
K1: Mode group, channel, program operation, reset response
8.10 Asynchronous subprograms (ASUBs), interrupt routines
8.10.2 Parameterization
MD11600 also controls whether the internal program execution mode is imported only for the
channel in which the interrupt routine has been activated, or to all channels in the mode
group.
If, because of the machine data setting, the channel in which the interrupt is being processed
has left the mode group, the mode group signals "Mode group reset", "Mode group stop",
etc. have no effect on this channel. In this way, the interrupt routine is run without being
disturbed by the mode group signals.
Basic Functions
564 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K1: Mode group, channel, program operation, reset response
8.10 Asynchronous subprograms (ASUBs), interrupt routines
Note
The ASUB for "fast retraction from the contour" (LIFTFAST) is started in every case.
Note
Multi-channel systems
In multi-channel systems, the following machine data must also be set:
MD11600 $MN_BAG_MASK, bit 1 = 1
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 565
K1: Mode group, channel, program operation, reset response
8.10 Asynchronous subprograms (ASUBs), interrupt routines
Application example
In case of a single-slide turning machine a stock removal cycle is started as ASUB in the
JOG mode and with this a shaft several meters long is machined. During machining it is
necessary to change the cutting edge of the tool. The machine operator stops the ASUB and
retracts the axes manually using the traversing keys in order to change the cutting edge of
the tool. After changing the cutting edge, the operator activates NC Start. Repositioning at
the interruption point is performed with the REPOS operation. Thereafter, the ASUB is
continued.
Supplementary condition
Manual traversing of axes during the interruption of an ASUB in JOG mode is only possible if
the ASUB has been activated from the program state "Aborted", channel state "Reset".
Boundary conditions
The settings in MD20116 $MC_IGNORE_INHIBIT_ASUP have no effect if the read-in disable
in the ASUB is always to be ignored:
MD11602 $MN_ASUP_START_MASK, bit 2 = 1
Basic Functions
566 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K1: Mode group, channel, program operation, reset response
8.10 Asynchronous subprograms (ASUBs), interrupt routines
Boundary conditions
● MD20117 $MC_IGNORE_SINGLEBLOCK_ASUP only applies for IPO single block
(SBL1).
● The settings in MD20117 $MC_IGNORE_SINGLEBLOCK_ASUP have no effect if the
single-block processing in the ASUB is always to be ignored:
MD10702 $MN_IGNORE_SINGLEBLOCK_MASK, bit 1 = 1
References
A detailed description of the machine data can be found in:
Lists Manual "Detailed Description of the Machines"
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 567
K1: Mode group, channel, program operation, reset response
8.10 Asynchronous subprograms (ASUBs), interrupt routines
8.10.3 Programming
When the interrupt signal arrives, a "Fast retraction of the tool from the contour" is
executed before the interrupt routine starts. The motion direction for the fast retraction is
specified by the program instruction ALF.
● BLSYNC
Upon receiving the interrupt signal, the current program block is processed and only then
is the interrupt routine started.
Note
The assignment interrupt signal ↔ part program is cleared when the following happens:
• Channel in Reset state
• CLRINT instruction in part program
Priorities
If several SETINT instructions are in the part program and therefore several signals can be
simultaneously received, the assigned interrupt routines must be allocated priorities that
define the sequence in which the interrupt routines are executed:
PRIO=<value>
There are priorities from 1 to 128. Priority 1 corresponds to the highest priority.
Example:
The interrupt routines are executed in the sequence of the priority values if the inputs
become available simultaneously (are energized simultaneously): First "ABHEBEN_Z", then
"ABHEBEN_X".
Basic Functions
568 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K1: Mode group, channel, program operation, reset response
8.10 Asynchronous subprograms (ASUBs), interrupt routines
REPOS-query
With interrupt routines, sequences may be generated for which there is no unambiguous
return to an interruption point in the block processing sequence (REPOS).
The system variable $P_REPINF can be used to scan the ASUB to determine whether a
REPOS is possible.
Value Meaning
0 Repositioning with REPOS not possible because:
• Not called in the ASUB
• ASUB ran from reset status
• ASUB ran from JOG
1 Repositioning with REPOS possible in ASUB
Flexible programming
The following commands help in the flexible programming of interrupt routines:
Command Meaning
SAVE If the SAVE command has been used to define the interrupt routine, the G
codes, frames and transformations previously active in the interrupted
part program become operative again as soon as the interrupt routine is
ended.
DISABLE The DISABLE command can be set to protect part program sections from
being interrupted by an interrupt routine.
The assignment interrupt signal ↔ part program is maintained but the
interrupt routine no longer responds to the 0/1 signal transition.
ENABLE The DISABLE command can be reset with the ENABLE command. Interrupt
routines are not activated until the next 0/1 transition of the interrupt
signal.
CLRINT Clear assignment interrupt signal ↔ part program
References
Programming Manual, Job Planning; Section: "Flexible NC Programming" > "Interrupt routine
(ASUB)"
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 569
K1: Mode group, channel, program operation, reset response
8.10 Asynchronous subprograms (ASUBs), interrupt routines
8.10.4 Restrictions
Requirement
MD11602 $MN_ASUP_START_MASK, at least bit 0 = 1
The following data must also be taken into account:
● MD11600 $MN_BAG_MASK
● MD11604 $MN_ASUP_START_PRIO_LEVEL
● Interrupt assignment priority
Recommended settings
NC-specific machine data:
● MD11600 $MN_BAG_MASK = 'H11'
● MD11602 $MN_ASUP_START_MASK = 'H101'
● MD11604 $MN_ASUP_START_PRIO_LEVEL = 7
Channel-specific machine data for the channel in which the ASUB is started or generally for
all channels:
● MD20105 $MC_PROG_EVENT_IGN_REFP_LOCK = ’H3F’
● MD20115 $MC_IGNORE_REFP_LOCK_ASUP = ’HFFFFFFFF’
8.10.5 Examples
Basic Functions
570 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K1: Mode group, channel, program operation, reset response
8.11 User-specific ASUB for RET and REPOS
8.11.1 Function
Function
The NCK software supplied contains preprogrammed processes (internal ASUBs) for
implementation of the RET and REPOS functions. They can be replaced by user-specific
ASUBs written by the machine tool manufacturer.
DANGER
Programming fault
The machine manufacturer is responsible for the contents of ASUB routines used to
replace ASUP.SYF supplied by Siemens.
Installation
In the manufacturer directory _N_CMA_DIR or in the user directory _N_CUS_DIR a routine
with the name "_N_ASUP_SPF" can be loaded. It must implement the actions desired by the
user for the functions RET and REPOS.
Activation
The parameters for the activation of the user-specific routine "_N_ASUP_SPF" are set with
the machine data:
MD11610 $MN_ASUP_EDITABLE (activation of a user-specific ASUB).
Bit 0 and bit 1 specify which of the internal system routines are to be replaced by the user-
specific ASUB:
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 571
K1: Mode group, channel, program operation, reset response
8.11 User-specific ASUB for RET and REPOS
Bit 2 defines in which directory the user-specific routine is to be searched first in case of
activation.
8.11.3 Programming
Basic Functions
572 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K1: Mode group, channel, program operation, reset response
8.12 Single block
Continuation
When using the system ASUB, the behavior for the continuation after execution of the
actions is permanently specified within the ASUB:
● System ASUB 1 → continuation with RET (subprogram return)
● System ASUB 2 → continuation with REPOS (repositioning)
The description of the system variables specifies the behavior with regard to the system
ASUB for each cause at "Continued for".
Note
Continued for user-specific ASUB
It is recommended for user-specific ASUBs that the appropriate continuation of the system
ASUB be retained.
Cause: Change of operating mode ($AC_ASUP, bit 9 == 1)
At a change of operating mode, the continuation depends on the machine data:
MD20114 $MC_MODESWITCH_MASK (interruption of MDA through mode change)
• Bit 0 == 0: System ASUB 1 → continuation with RET
• Bit 0 == 1: System ASUB 2 → continuation with REPOS
References
A detailed description of the system variables can be found in:
List Manual, System Variables
Block-by-block processing
With the single-block function, the user can execute a part program block-by-block.
Single-block types
There are 3 types of setting for the single-block function:
● SBL1 := IPO single block
When the SLB1 function is active, machining stops or pauses after each machine action
block (Ipo block).
● SBL2 := Decode single block
When the SLB2 function is active, machining always stops or pauses after each part
program block. If a part program block is processed in several IPO blocks, machining
stops after every Ipo block. Thread cutting is an exception.
● SBL3 := Decode single block
As for SLB2, but machining also stops in the part program blocks of the cycles.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 573
K1: Mode group, channel, program operation, reset response
8.12 Single block
1. Stopping after every block is undesirable in many situations and/or with certain blocks.
– 1. Example:
Change after jog operation, if reorganization and/or repositioning
is not possible, MD10702, bits 6 and 7.
If a stop occurs in a block at the end of block, which cannot be
reorganized and/or repositioned, in this situation
Jog mode cannot be selected.
– 2. Example:
Change after JOG operation to a STOPRE block,
MD10702, bits 6 and 7
If AUTO mode is changed to Jog mode while a
STOPRE block is active, in addition to system ASUB2, a continuation start will be
followed by
one residual block and one or possibly (with
decoder single block) two more STOPRE blocks. A logic operation,
which always triggers a part program start in single block
and then always changes to Jog mode, remains
at the STOPRE block indefinitely.
– 3. Example:
DISPOF: Deactivate block display, MD10702, bits 6 and 7
If DISPOF is programmed in a subroutine, the block display
is suppressed. The operator must continuously
press Start blindly in the single block up to the end of the subroutine.
2. When single block is deactivated there is no stop at end of block.
3. When STOPRE blocks are displayed, the main run and preprocessing are synchronized
in the decoding single block.
The following sections describe how to control the behavior of single blocks and prevent
stops in particular situations.
Asynchronicity
As a result of preprocessing of part program blocks, the reference between the current block
display relative to the main run status of the NCK and the variable values displayed on the
HMI can be lost. The operator display then shows implausible variable values.
Basic Functions
574 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K1: Mode group, channel, program operation, reset response
8.12 Single block
Note
This variant of SBL2 does not maintain an accurate contour. In other words, as a result of
the preprocessing stop, a different contour may be generated from the one created without
single-block mode or with SBL1.
Application: Debug mode for testing part programs.
SBLOF
Example for subprogram without stop in single block:
At the return command, the decision is made whether to stop at the end of the subprogram:
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 575
K1: Mode group, channel, program operation, reset response
8.12 Single block
Asynchronous subprograms
The asynchronous ASUP1.SYF and ASUP2.SYF subprograms started system-internally in
REORG/REPOS can process the system ASUB in one step through the programming of
SBLOF.
Example: ASUP.SPF:
N10 SBLOF
N20 IF $AC_ASUP==’H200’
N30 RET ; No REPOS on mode change
N40 ELSE
N50 REPOSA ; REPOS in all other cases
N60 ENDIF
N70 RET
Boundary conditions
● The current block display can be suppressed in cycles with DISPLOF.
● If DISPLOF is programmed together with SBLOF, then the cycle call continues to be
displayed on single-block stops within the cycle.
● The preset behavior of asynchronous subprograms in single-block mode specified in
MD20117 MC_IGNORE_SINGLEBLOCK_ASUP (process interrupt program fully despite
single block) can be overwritten on a program-specific basis using SBLOF.
Cycle
Example 1: A cycle is to act like a command for a user.
Main program:
Basic Functions
576 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K1: Mode group, channel, program operation, reset response
8.12 Single block
Program cycle:1
CYCLE1 is processed for an active single block, i.e. the Start key must be pressed once to
process CYCLE1.
Example 2: An ASUB, which is started by the PLC in order to activate a modified zero offset
and tool offsets, is to be executed invisibly.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 577
K1: Mode group, channel, program operation, reset response
8.12 Single block
4. Intermediate blocks
5. Block search group blocks
6. Init blocks
7. Blocks that cannot be reorganized
8. Blocks that cannot be repositioned
9. At a repositioning block which contains no traversing information
10.At a preprocessing / main run / synchronization block due to REORG
11.At a tool selection block
12.At a GET block
13.During a single block type 2
Sequence
If an ASUB is activated during the single block, for example, execution of the ASUB is
completed. The deceleration does not take place until after the end of the ASUB or the first
IPO block in which single-block suppression is not activated. If the velocity is too large for the
deceleration to be performed in this block (with active G64 continuous-path mode), further
block changes are allowed.
For decoding the single block, MD10702 is only effective with "internal ASUB", "user ASUB"
and "subprograms with the attribute DISPLOF". In these cases, it is already clear at the time
of interpretation that the block belongs to one of the above categories. In these cases,
further blocks can be generated.
SBLON in ASUB
The single-block stop of an internal ASUB or user ASUB that is suppressed with MD10702
$MN_IGNORE_SINGLEBLOCK_MASK can be reactivated in the ASUB by programming
SBLON.
Boundary conditions
The following restrictions apply to decoding single block SBL2:
● Block search approach blocks
● Block not in ASUB; DISPLOF, SBLOF
● Non-reorganizable or non-repositionable blocks
● Blocks that are not generated in the Interpreter, e.g. intermediate blocks
Basic Functions
578 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K1: Mode group, channel, program operation, reset response
8.12 Single block
Classifying channels
One mode group channel must be classified as a single-block control channel (KS), while the
other mode group channels must be classified as dependent channels (KA) via interface
signal. Type A or type B single-block behavior can be selected for KA channels.
Type A determines Stop (analogous to Stop key).
Type B determines Stop (analogous to stop at block limit).
Channel classification
In one channel (KS) in a mode group, the user should select single block (NST DB21 ...
DBX0.4 (activate single block)). Single-block type A or B refers to other channels (KA) of a
mode group.
0RGHJURXS
&KDQQHO.6 &KDQQHO.$ &KDQQHO.$
&KDQQHOQ.$
%HKDYLRUFDQEHVHOHFWHGYLDW\SH$RUW\SH%
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 579
K1: Mode group, channel, program operation, reset response
8.13 Program control
Options
1. Function selection (via operator interface or PLC)
2. Activation of skip levels
3. Adapting the size of the interpolation buffer
4. Program display modes via an additional basic block display
5. Execution from external source (buffer size and number)
6. Execution from external subroutines
Basic Functions
580 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K1: Mode group, channel, program operation, reset response
8.13 Program control
References:
Operating Manual HMI Advanced "Operating Area, Machine"
Function
It is possible to skip blocks which are not to be executed every time the program runs.
Blocks to be skipped are indicated in the part program by the character "/" before the block
number.
The skip levels in the part program are specified by "/0" to "/9".
Only one skip level can be specified for each part program block.
Parameter assignment
The number of skip levels is defined using machine data:
MD51029 $MM_MAX_SKP_LEVEL (max. number of skip levels in the NC program)
Programming
Blocks which are not to be executed in every program pass (e.g. program test blocks) can be
skipped according to the following schematic.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 581
K1: Mode group, channel, program operation, reset response
8.13 Program control
Activation
The 10 skip levels "/0" to "/9" are activated by the PLC setting the PLC → NCK interface
signals.
The function is activated from the HMI via the "Program control" menu in the "Machine"
operating area:
● For skip levels "/0" to "/7":
Via the interface HMI → PLC DB21, ... DBB26 (skip block selected).
● For skip levels "/8" to "/9":
Via the interface HMI → PLC DB21, ... DBX27.0 to DBX27.1.
References:
Operating Manual
Note
The levels to be skipped can only be changed when the control is in the STOP/RESET state.
MD28060
The channelspecific interpolator executes prepared blocks from the interpolation buffer
during the part program run. The maximum number of blocks requiring space in the
interpolation buffer at any given point in time is defined by the memory configuring MD28060
$MM_IPO_BUFFER_SIZE (number of NC blocks in the IPO buffer (DRAM)). For some
applications it may be meaningful not to use the full buffer capacity in order to minimize the
"interval" between preparation and interpolation.
SD42990
The number of blocks in the interpolation buffer can be restricted dynamically to a smaller
value than in MD28060 $MC_MM_IPO_BUFFER_SIZE (number of NC blocks in the IPO
buffer (DRAM)), minimum 2 blocks, with the setting data SD42990
$SC_MAX_BLOCKS_IN_IPOBUFFER (max. number of blocks in the IPO buffer).
Values of setting data SD42990 $SC_MAX_BLOCKS_IN_IPOBUFFER:
Value Effect
<0 No interpolation buffer limit active.
The max. possible interpolation buffer as set in MD 28060:
MM_IPO_BUFFER_SIZE is activated.
or 1 The minimum permissible interpolation buffer with 2 blocks is activated.
Basic Functions
582 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K1: Mode group, channel, program operation, reset response
8.13 Program control
< < MM_IPO_BUFFER_SIZE The interpolation buffer is activated with no more than the maximum specified
number of blocks.
>= MM_IPO_BUFFER_SIZE The interpolation buffer is activated with the number of blocks specified in MD
28060: MM_IPO_BUFFER_SIZE.
Note
If SD42990 $SC_MAX_BLOCKS_IN_IPOBUFFER is set in the part program, the
interpolation buffer limitation takes effect immediately if the block with the SD is being
preprocessed by the interpreter.
This means that the limitation of the IPO buffer may take effect a few blocks before the
intended limitation (see also MD 28070 $MC_MM_NUM_BLOCKS_IN_PREP).
To avoid premature activation and to make the limitation of the IPO buffer take effect in
synchronism with the block, a STOPRE (preprocessing stop) must be programmed before
the SD is set in the part program.
Validity
SD42990 $SC_MAX_BLOCK_IN_IPOBUFFER has global, channel-specific validity and can
also be modified in a part program. This modified value is maintained at program end. If this
setting data is to be reset again on defined events, a so-called event-driven program must be
created to do this. For example, this setting data could always be set to a predefined value
on RESET.
Application
The IPO buffer limitation can be used whenever the number of blocks between block
preparation and interpolation must be minimized, e.g., when actual positions in the part
program must be read and processed for other purposes.
Example
N10 ...
N20 ...
..........
N100 $SC_MAX_BLOCKS_IN_IPOBUFFER = 5 ; Limitation of IPO buffer to 5 NC
blocks
N110 ...
N120 ...
............
N200 $SC_MAX_BLOCKS_IN_IPOBUFFER = -1 ; Cancellation of the IPO buffer
limitation
N210 ...
............
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 583
K1: Mode group, channel, program operation, reset response
8.13 Program control
Processed values
Values processed in the basic block display coincide with the:
● Selected tools
● Feedrate and spindle speed
● Actually approached position values
Exceptions:
With active tool radius compensation, deviations can occur.
For modulo axes, the programmed value is displayed in the basic block display. This
value can also lie outside the modulo range.
Note
Generally the positions are represented in the WCS or the SZS.
The basic block display can be activated or deactivated with setting data
SD42750 $SC_ABSBLOCK_ENABLE.
Basic Functions
584 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K1: Mode group, channel, program operation, reset response
8.13 Program control
Activating
The basic block display is activated by MD 28400 $MC_MM_ABSBLOCK by means of
Power On. If MD28400 $MC_MM_ABSBLOCK is set to 1, a channelspecific display buffer
(FIFO) is created during power-up.
Size of display buffer (FIFO) = (MD28060 $MC_MM_IPO_BUFFER_SIZE + MD28070
$MC_MM_NUM_BLOCKS_IN_PREP) multiplied by 128 bytes. This corresponds to a size of
6KB in the machine data default setting.
Optimize size of display buffer:
The memory requirement can be optimized by entering a value between 128 and 512. The
display blocks preprocessed in the display buffer are transferred to the HMI via a
configurable upload buffer.
Maximum size of upload buffer is obtained by multiplying (MD28402
$MC_MM_ABSBLOCK_BUFFER_CONF[0] +
MD28402 $MC_MM_ABSBLOCK_BUFFER_CONF[1] + 1) by the block length configured in
MD28400 $MC_MM_ABSBLOCK.
The number of blocks before the current block is configured in
MD28402 $MC_MM_ABSBLOCK_BUFFER_CONF[0] and the number of blocks after the
current block is configured in MD28402 $MC_MM_ABSBLOCK_BUFFER_CONF[1].
Constraints
If the length of a display block configured in MD28400 $MC_MM_ABSBLOCK is exceeded,
this display block is truncated accordingly. This is represented by string "..." at the end of the
block.
For preprocessed cycles (MD10700 $MN_PREPROCESSING_LEVEL > 1), the display block
contains only axis positions.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 585
K1: Mode group, channel, program operation, reset response
8.13 Program control
Bit0 = 1 Transverse axis setpoints are always shown as diameter values in the
basic block display.
Example:
G0 X10 Y10 Z10 ; Block to be preprocessed for the basic block display
COMPCAD ; Compressor for optimized surface quality (CAD prog.) A
... ; string as character for missing display blocks
To avoid bottlenecks in the NCK performance, the basic block display is deactivated
automatically. As a sign that the display blocks are missing, a display block with the string
"..." is generated.
All display blocks are always generated in the single block.
Basic Functions
586 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K1: Mode group, channel, program operation, reset response
8.13 Program control
Note
The modulo correction is omitted for modulo axes, which means that positions outside the
modulo range can be displayed. It also means that the basic block display differs from the
position display in which values are always moduloconverted.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 587
K1: Mode group, channel, program operation, reset response
8.13 Program control
Examples
Comparisons between display block (original block) and basic block display:
● Programmed positions are displayed as absolute.
The addresses AP/RP are displayed with their programmed values.
The following applies for H functions: Each programmed value is display irrespective of the
output type to the PLC.
(MD22110 $MC_AUXFU_H_TYPE_INT (type of H auxiliary function is integer)).
● For Tool selection by tool command
Display information is generated in the form T<value> or T=<string>. If an address
extension has been programmed, this is displayed as well.
If several spindles have been configured or the "Tool change via master toolholder"
function (MD20124 $MC_TOOL_MANAGEMENT_TOOLHOLDER (toolholder number)) is
active, the T number is always output with address extension.
If no address extension has been programmed, the number of the master spindle or the
master toolholder is used instead (T<spindle_number/tool_holder>= ).
Basic Functions
588 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K1: Mode group, channel, program operation, reset response
8.13 Program control
● For the Spindle programming via S, M3, M4, M5, M19, M40 - M45 and M70 (or MD
20094 $MC_SPIND_RIGID_TAPPING_M_NR (M function for switching over in the
controlled axis operation)) the following regulation applies regarding the address
extension:
If an address extension has been programmed, then this is also resolved.
If several spindles have been configured, then the address extension is also output.
If no address extension has been programmed, the number of the master spindle is used
(S<spindle_number>=).
● Indirect G code programming in form G[ <group> ] = <printout> is substituted by the
corresponding G code.
● Modal G codes that do not generate an executable block are collected and output with
the display block of the next executable block if permitted by the syntax (DIN block). If
this is not the case (e.g. predefined subprogram call TRANSMIT), a separate display
block containing the modified G codes is placed in front of the next executable block.
● A display block is always generated for part program lines in which the addresses F and
FA appear (including for MD22240 $MC_AUXFU_F_SYNC_TYPE = 3 (output time of the
F functions)).
● The display blocks generated for the block display are derived directly from the
programmed part program blocks. If intermediate blocks (e.g. tool radius compensation
G41/G42, radius/chamfer RNDM, RND, CHF, CHR) are generated in the course of
contour preprocessing, these are assigned the display information from the part program
block on which the motion is based.
● With the EXECTAB command (processing a table of contour elements), the block
generated by EXECTAB is shown in the display block.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 589
K1: Mode group, channel, program operation, reset response
8.13 Program control
● With the EXECSTRING command, the block generated via EXECSTRING is displayed in
the display block.
Original block:
N910 DEF STRING[40] PROGSTRING = "N905 M3 S1000 G94 Z100 F1000 G55"
N920 EXECSTRING(PROGSTRING)
Original block:
N905 Z100 G55 G94 M3 S1000 F1000
Function
The "Execution from external" function can be used to execute programs that cannot be
saved directly in the NC memory due to memory shortage of an external program memory.
Note
Protected cycles (_CPF files) cannot be processed with this function.
Note
Execution from external source via USB interface
If external programs are to be transferred from an external USB drive via a USB interface,
only the interface via X203 (named "TCU_1") can be used.
A USB FlashDrive cannot be recommended as a persistent storage medium.
Basic Functions
590 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K1: Mode group, channel, program operation, reset response
8.13 Program control
Applications
● Direct execution from external programs
In principle, any program that is accessible via the directory structure of the interface in
the "Execution from external" HMI mode can be selected and executed.
● Execution of external subprograms from the part program
The external subprogram is called through the part program command EXTCALL with
specification of a call path (optional) and the subprogram name (→ see "Execution from
external subroutines (Page 592)").
Parameterization
A reloading memory (FIFO buffer) must be reserved in the dynamic NC memory for
executing a program in the "Executing from external" mode (main program or subprogram).
Size of FIFO buffer
The size of the FIFO buffer is set in the machine data:
MD18360 $MN_MM_EXT_PROG_BUFFER_SIZE (FIFO buffer size for processing from
external)
Default: 30 KB
Note
Programs with jump commands
For external programs that contain jump commands (GOTOF, GOTOB, CASE, FOR, LOOP, WHILE,
REPEAT, IF, ELSE, ENDIF etc.) the jump destinations must lie within the post loading memory.
Note
ShopMill/ShopTurn programs
The contour descriptions added at the file end mean the ShopMill and ShopTurn programs
must be stored completely in the read-only memory.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 591
K1: Mode group, channel, program operation, reset response
8.13 Program control
Function
Individual machining steps for producing complex workpieces may involve program
sequences that require so much memory that they cannot be stored in the NC memory.
In such cases, the user has the option of executing the program sequences as subprograms
from an external program memory in the "Execution from external source" mode with the
help of the EXTCALL part program command.
Preconditions
The following preconditions are applicable to the execution from external subprograms:
● The subprograms must be accessible via the directory structure of the operator interface.
● A reloading memory (FIFO buffer) must be reserved for each subprogram in the dynamic
NC memory.
Note
Subprograms with jump commands
For external subprograms that contain jump commands (GOTOF, GOTOB, CASE, FOR, LOOP, WHILE,
REPEAT, IF, ELSE, ENDIF etc.) the jump destinations must lie within the post loading memory.
Parameterization
The path for the external subprogram directory can be preset using setting data:
SD42700 $SC_EXT_PROG_PATH (program path for the EXTCALL external subprogram
call)
The entire path of the program to be called along with the subprogram path or name
specified during programming is derived therefrom.
Basic Functions
592 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K1: Mode group, channel, program operation, reset response
8.13 Program control
Programming
An external subprogram is called by means of parts program command EXTCALL.
Parameter:
Note
Path specification: Short designations
The following short designations can be used to specify the path:
• LOCAL_DRIVE: for local drive
• CF_CARD: for CompactFlash Card
• USB: for USB front connection
CF_CARD: and LOCAL_DRIVE: can be alternatively used.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 593
K1: Mode group, channel, program operation, reset response
8.13 Program control
Example
Execute from local drive
Main program:
Program code
N010 PROC MAIN
N020 ...
N030 EXTCALL ("ROUGHING")
N040 ...
N050 M30
External subprogram:
Program code
N010 PROC ROUGHING
N020 G1 F1000
N030 X= ... Y= ... Z= ...
N040 ...
...
...
N999999 M17
The "MAIN.MPF" main program is stored in NC memory and is selected for execution.
The "SCHRUPPEN.SPF" or "SCHRUPPEN.MPF" subprogram to be subsequently loaded is
on the local drive in the directory "/user/sinumerik/data/prog/WKS.DIR/WST1.WPD".
The subprogram path is preset in SD42700:
SD42700 $SC_EXT_PROG_PATH = "LOCAL_DRIVE:WKS.DIR/WST1.WPD"
Note
Without the path being specified in the SD42700, the EXTCALL operation for this example
would have to be programmed as follows:
EXTCALL("LOCAL_DRIVE:WKS.DIR/WST1.WPD/SCHRUPPEN")
Basic Functions
594 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K1: Mode group, channel, program operation, reset response
8.14 System settings for power-up, RESET / part program end and part program start
8.14 System settings for power-up, RESET / part program end and part
program start
Concept
The behavior of the control can be set via the machine data for the following events:
● Run-up (Power On)
● Reset / part program end
● Part program start
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 595
K1: Mode group, channel, program operation, reset response
8.14 System settings for power-up, RESET / part program end and part program start
3RZHUXS
32:(521
%LW
%LW
%LW
0' 7KHWRROOHQJWKFRPSHQV
%LWDQGELW DWLRQVHOHFWHGEHIRUH
32:(521UHPDLQVDFWLYH
%LW
7RROOHQJWKFRPSHQVDWLRQDFWLYH
DFFWR0'0'0'
7UDQVIRUPDWLRQRII
7RROOHQJWKFRPSHQVDWLRQRII
*FRGHVDFFRUGLQJWR0'0&B*&2'(B5(6(7B9$/8(6
&RXSOHGD[LVJURXSLQJVDUHGHDFWLYDWHG
7DQJHQWLDOWUDFNLQJLVQRWDFWLYDWHG
6\QFKURQRXVVSLQGOHFRXSOLQJLVQRWDFWLYDWHG
$[LDOIHHGUDWHSHUUHYROXWLRQRII3DWKDQGV\QFKURQL]HGD[HVRQPDVWHUVSLQGOHEDFN
*HRPHWU\D[LVDVVLJQPHQWDFFRUGLQJWR0'0&B$;&21)B*(2$;B$66,*1B7$%
0DVWHUYDOXHFRXSOLQJLVQRWDFWLYDWHG
%DVLFIUDPHLVGHVHOHFWHG
(OHFWURQLFJHDULVQRWDFWLYDWHG
,QLWLDOVWDWHIRUPDVWHUVSLQGOHDFFRUGLQJWR0'0&B63,1'B'()B0$67(5B63,1'
0DVWHUWRROKROGHULQLWLDOVWDWHDFFRUGLQJWR0'0&B722/B0$1*(0(17B722/+2/'(5
5HIHUHQFHD[LVDFFRUGLQJWR0'0&B',$0(7(5B$;B'()
5(6(7SDUWVSURJUDPHQG
Basic Functions
596 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K1: Mode group, channel, program operation, reset response
8.14 System settings for power-up, RESET / part program end and part program start
System settings after reset / part program end and part program start
MD20110 $MC_RESET_MODE_MASK, bit 0 = 0 or 1
5(6(7SDUWVSURJUDPHQG
%LW *FRGHVDFFRUGLQJWR0'DQG0'
0' 0'ELWVDUHHYDOXDWHGLH
5(6(7B02'(B0$6. WKHIXQFWLRQDVVLJQHGWRWKHUHVSHFWLYHELWV
%LW HLWKHUDGRSWVLWVUHVHWSRVLWLRQRUUHWDLQV
'HIDXOW LWVFXUUHQWSRVLWLRQUHIHUWRWDEOHVEHORZ
%LW
7KHFXUUHQWVHWWLQJVDUHUHWDLQHG
3DUWVSURJUDPVWDUW
*FRGHVDFFRUGLQJWR0'
7RROOHQJWKFRPSHQVDWLRQRII
7UDQVIRUPDWLRQRII
&RXSOHGPRWLRQRII
7DQJHQWLDOWUDFNLQJRII 7KHVHWWLQJVDFWLYDWHGE\5(6(7
6\QFKURQRXVVSLQGOHRII EHFRPHYDOLG
*HRPHWU\D[LVDVVLJQPHQWDFFRUGLQJWR0'
0DVWHUYDOXHFRXSOLQJRII
$[LDOUHYROXWLRQDOIHHGUDWHRII
5HVHUYHGEDVLFIUDPHRII
0DVWHUVSLQGOHDFFRUGLQJWR0'
0DVWHUWRROKROGHURII
5HIHUHQFHD[LVDFFRUGLQJWR0'
%LW
%LWV
0' )XQFWLRQDGRSWV5(6(7SRVLWLRQ
5(6(7B02'(B0$6.
%LW
%LW
5HIHUHQFHD[LVLVUHWDLQHG
%LW GHIDXOW
%LWV7KHFXUUHQWVHWWLQJVDUHUHWDLQHG
%LW)XQFWLRQDGRSWV5(6(7SRVLWLRQ
,QWHUSUHWDWLRQRIWKHILUVWSDUWSURJUDPEORFN
Figure 8-14 System settings after reset / part program end and part program start
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 597
K1: Mode group, channel, program operation, reset response
8.14 System settings for power-up, RESET / part program end and part program start
Control basic setting after run-up, reset / part program end and part program start
The definition of control initial setting after run-up, reset / part program end and part program
start is performed via the following machine data:
● MD20110 $MC_RESET_MODE_MASK (definition of the control initial setting after run-up
and reset / part program end)
● MD20112 $MC_START_MODE_MASK (definition of the control initial setting after part
program start)
References
Detailed Machine Data Description
Basic Functions
598 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K1: Mode group, channel, program operation, reset response
8.14 System settings for power-up, RESET / part program end and part program start
Example
Active level (bit 4) and settable frame (bit 5) remain active after reset and are reset on part
program start:
● MD20110, bit 4 = 1
● MD20110, bit 5 = 1
● MD20112, bit 4 = 1
● MD20112, bit 5 = 1
Note
MD20110/MD20112, bit 5 and bit 6
If MD20110/MD20112 are parameterized so that tool length compensation or a frame is
active on a part program start in the automatic or MDI mode, the first programming of the
axes must use absolute measurements (because of the traversing of the offset).
Exception: With MD42442/MD42440 the offsetting process for G91 is suppressed.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 599
K1: Mode group, channel, program operation, reset response
8.14 System settings for power-up, RESET / part program end and part program start
Function
If a part program with a machining operation with tool orientation is aborted due to a power
failure or reset, it is possible to select the previously active transformation and generate a
frame in the direction of the tool axis after the control has run up (power on). The tool can
then be retracted in JOG mode by means of a retraction movement towards the tool axis.
Requirement
The active measuring systems must have a machine reference for all the machine axes
involved in the transformation. See Section "Automatic restoration of the machine reference
(Page 1216)".
Parameterization
The following machine data must be set so that the last active transformation is retained
after POWER ON:
● MD20144 $MC_TRAFO_MODE_MASK, bit 1 = 1
● MD20110 $MC_RESET_MODE_MASK, bit 0 = 1
● MD20110 $MC_RESET_MODE_MASK, bit 7 = 1
See also Section "System settings for power-up, RESET / part program end and part
program start (Page 595)".
Programming
Application
In the user program (…/_N_CMA_DIR/_N_PROG_EVENT_SPF) to be called event-
controlled when running up (requirement: MD20108 bit 3 = 1), the system must wait using
the command WAITENC until the valid axis positions are available.
A frame that positions the tool axis in the direction of the X, Y or Z axis can then be
generated using the NC language command TOROTX/TOROTY/TOROTZ.
Basic Functions
600 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K1: Mode group, channel, program operation, reset response
8.14 System settings for power-up, RESET / part program end and part program start
Example
Orientation transformation and orientation axes with incremental encoders.
Configuration: Meaning:
MD10720 $MN_OPERATING_MODE_DEFAULT [ 0 ] = 6 Run-up in JOG mode.
MD30240 $MA_ENC_TYPE [ 0, <axis>] = 1 Incremental measuring system.
MD34210 $MA_ENC_REFP_STATE [ 0, <axis>] = 3 Enable the restoration of axis positions for
incremental encoders.
MD20108 $MC_PROG_EVENT_MASK = ’H9’ Activate event-controlled using program
PROG_EVENT during run-up and at the start of
the part program.
MD20152 $MC_GCODE_RESET_MODE [ 52 ] = 1 Obtain TOFRAME via reset.
MD20110 $MC_RESET_MODE_MASK = ’HC1’ Obtain transformation and tool offset via reset.
MD20144 $MC_TRAFO_MODE_MASK = ’H02’ Obtain transformation via POWER OFF.
The WAITENC command essentially corresponds to the following program sequence (example
for 5-axis machine with AB kinematics):
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 601
K1: Mode group, channel, program operation, reset response
8.15 Replacing functions by subprograms
Continuing machining
AUTOMATIC mode
For automatic execution of programs in the AUTOMATIC mode, all the machine axes, whose
actual position of the active measuring system has been restored, must be referenced.
Supplementary condition
8.15.1 Overview
Function
User-specific auxiliary functions (e.g. M101) do not trigger any system functions. They are
only output to the NC/PLC interface. The functionality of the auxiliary function must be
implemented by the user / machine manufacturer in the PLC user program. A description will
be provided as to how a user-specific subprogram call can be configured (replacement
subprogram) instead of the output to NC/PLC interface, which is the default setting.
Function M101 is then still programmed in the part program. However, when executing the
part program, the substitute subprogram is called. Therefore, the NC replaces the function
by a subprogram call. This results in the following advantages:
● When adapting to the production process, an existing, tested and proven part program
can still be used, unchanged. The changes required are then shifted into the user-specific
subprograms.
● The functionality can be implemented within the substitute subprogram with the full
functional scope of the NC language.
● The communication overhead between NC and PLC is not required.
Basic Functions
602 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K1: Mode group, channel, program operation, reset response
8.15 Replacing functions by subprograms
Auxiliary functions
M Switching functions
T Tool selection
TCA Tool selection independent of the tool status
D Tool offset
DL Additive tool offset
General Information
The following conditions are applicable for replacing the M functions:
● Per block only one M function is replaced.
● A block in which an M function is to be replaced, must not contain the following elements:
– M98
– Modal subprogram call
– Subprogram return
– Part program end
● M functions that trigger system functions must not be replaced by a subprogram (see
Section "Non-replaceable M functions").
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 603
K1: Mode group, channel, program operation, reset response
8.15 Replacing functions by subprograms
Parameterization
Note
For an M function replacement with transfer of information via system variable, the address
extension and function value of the M function must be programmed as constant values.
Permissible programming:
• M<function value>
• M=<function value>
• M[<address extension>]=<function value>
Illegal programming:
• M=<variable1>
• M[<variable2>]=<variable1>
Basic Functions
604 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K1: Mode group, channel, program operation, reset response
8.15 Replacing functions by subprograms
Programming
Rules for replacing M functions:
● The replacement subprogram is called at the block end
● Within the replacement subprogram, no M functions are replaced
● In an ASUB, the M function is also replaced if the ASUB was started within the
replacement subprogram.
Note
Exception
The M function parameterized with MD22560 $MC_TOOL_CHANGE_M_CODE (tool change
with M function) must not be replaced with a subprogram.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 605
K1: Mode group, channel, program operation, reset response
8.15 Replacing functions by subprograms
Boundary conditions
For replacing functions T, TCA, D and DL, the following supplementary conditions apply:
● A maximum of one function replacement is active per block.
● A block with the function replacement must not contain the following elements:
– M98
– Modal subprogram call
– Subprogram return
– Part program end
● If the multitool slot number is programmed with address MTL for the multitool select with
T = slot number, the T replacement also replaces the MTL address. The programmed
values can be queried in the replacement subprogram using the $C_MTL_PROG and
$C_MTL system variables.
Note
It is recommended that the same subprogram is used to replace T, TCA and D/DL functions.
Basic Functions
606 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K1: Mode group, channel, program operation, reset response
8.15 Replacing functions by subprograms
Value Meaning
0 Replacement not active
1 Replacement active, subprogram call is made at the block start
2 Replacement active, subprogram call is made at the block end
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 607
K1: Mode group, channel, program operation, reset response
8.15 Replacing functions by subprograms
Parameterization Meaning
MD22550 $MC_TOOL_CHANGE_MODE = 0 Tool change with T function
MD10717 $MN_T_NO_FCT_CYCLE_NAME = "MY_T_CYCLE" Name of the subprogram to
replace the T function
MD10719 $MN_T_NO_FCT_CYCLE_MODE = 0 Call time: End of block
Programming Comment
N110 D1 ; D1
N120 G90 G0 X100 Y100 Z50 ; D1 is active.
N130 D2 X110 Z0 T5 ; D1 remains active. The T function is replaced
at the block end with the MY_T_CYCLE
subprogram call. D2 provides MY_T_CYCLE in a
system variable.
A detailed example for replacement of the T function can be found in Section: "Examples of
M/T function replacement at a tool change (Page 610)".
General Information
The replacement subprogram is provided with all of the information relevant to the functions
programmed in the block (T or TCA, D or DL, M) via system variables.
Exception
D or DL number is not transferred if:
● MD10719 $MN_T_NO_FCT_CYCLE_MODE, bit 0 = 1
● MD22550 $MC_TOOL_CHANGE_MODE = 1
AND
● D or DL are programmed together with the T or M function in a block.
CAUTION
Values do not act
The values provided for the replacement subprogram in the system variables are not yet
effective. It is the sole responsibility of the user / machine manufacturer to resolve this
by using the appropriate programming in the replacement subprogram.
Basic Functions
608 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K1: Mode group, channel, program operation, reset response
8.15 Replacing functions by subprograms
System variable
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 609
K1: Mode group, channel, program operation, reset response
8.15 Replacing functions by subprograms
Example 1
The function M6 is replaced by calling the subprogram "SUB_M6".
The information relevant for a tool change should be transferred using system variables.
Parameterization
Main program
Programming Comment
PROC MAIN
... ;
N10 T1 D1 M6 ; M6 is replaced by subroutine "SUB_M6"
;
... ;
N90 M30
Subprogram "SUB_M6"
Programming Comment
PROC SUB_M6
N110 IF $C_T_PROG==TRUE ; IF address T is programmed
N120 T[$C_TE]=$C_T ; Execute T selection
N130 ENDIF ; ENDIF
N140 M[$C_ME]=6 ; Execute tool change.
N150 IF $C_D_PROG==TRUE ; IF address D is programmed
N160 D=$C_D ; Execute D selection
N170 ENDIF ; ENDIF
N190 M17
Basic Functions
610 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K1: Mode group, channel, program operation, reset response
8.15 Replacing functions by subprograms
Example 2
The new tool is prepared for changing with the T function. The tool change is only realized
with function M6. The T function is replaced by calling the subprogram "MY_T_CYCLE". The
D / DL number is transferred to the subprogram.
Parameterization
Parameterization Meaning
MD22550 $MC_TOOL_CHANGE_MODE = 1 Tool change prepared with T
function
MD10717 $MN_T_NO_FCT_CYCLE_NAME = "MY_T_CYCLE" Replacement subprogram
MD10719 $MN_T_NO_FCT_CYCLE_MODE = 0 Transfer of the D/DL number
Main program
Example 3
The new tool is prepared for changing with the T function. The tool change is only realized
with function M6. The T function is replaced by calling the subprogram "MY_T_CYCLE". The
D / DL number is not transferred to the subprogram.
Parameterization
Parameterization Meaning
MD22550 $MC_TOOL_CHANGE_MODE = 1 Tool change prepared with T
function
MD10717 $MN_T_NO_FCT_CYCLE_NAME = "MY_T_CYCLE" Replacement subprogram
MD10719 $MN_T_NO_FCT_CYCLE_MODE = 1 No transfer of the D/DL number
Main program
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 611
K1: Mode group, channel, program operation, reset response
8.15 Replacing functions by subprograms
Example 4
The functions T and M6 are replaced by the subprogram "MY_T_CYCLE".
The parameters are transferred to the subprogram when replacing M6.
If M6 is programmed together with D or DL in the block, the D or the DL number is also
transferred as parameter to the subprogram if no transfer of the D/DL number has been
parameterized:
MD10719 $MN_T_NO_FCT_CYCLE_MODE = 1
Parameterization
Configuration Meaning
MD22550 $MC_TOOL_CHANGE_MODE = 1 Tool change with M function
MD22560 $MC_TOOL_CHANGE_M_CODE = 6 M code for tool change
MD10715 $MC_M_NO_FCT_CYCLE[3] = 6 M function to be replaced
MD10716 $MC_M_NO_FCT_CYCLE_NAME[3] = "MY_T_CYCLE" Replacement subprogram for
the M function
MD10717 $MN_T_NO_FCT_CYCLE_NAME = "MY_T_CYCLE" Replacement subprogram for
the T function
MD10718 $MN_M_NO_FCT_CYCLE_PAR = 3 Parameter transfer to the
replacement subprogram for
M6
MD10719 $MN_T_NO_FCT_CYCLE_MODE = 1 No transfer of the D/DL number
Main program
Basic Functions
612 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K1: Mode group, channel, program operation, reset response
8.15 Replacing functions by subprograms
Parameterization
Main program
Programming Comment
PROC MAIN
... ;
N10 G01 F1000 X10 T1=5 D1 ; T and D function replaced by calling
; "D_T_SUB_PROG" at start of block
... ;
N90 M30
Subprogram "D_T_SUB_PROG"
Programming Comment
N1000 PROC D_T_SUB_PROG DISPLOF SBLOF
N9999 RET
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 613
K1: Mode group, channel, program operation, reset response
8.15 Replacing functions by subprograms
Conflict case
A conflict is present if several functions are programmed in one block and the functions
should be replaced with different subprograms:
● Addresses D and DL replaced with subprogram:
MD11717 $MN_FCT_CYCLE_NAME = "D_SUB_PROG"
● Address T replaced with subprogram:
MD10717 $MN_FCT_CYCLE_NAME = "T_SUB_PROG"
● M function M6 replaced with subprogram:
MD10715 $MN_M_NO_FCT_CYCLE[0] = 6
MD10716 $MN_M_NO_FCT_CYCLE_NAME[0] = "M6_SUB_PROG"
MD10718 $MN_M_NO_FCT_CYCLE_PAR = 0
MD22550 $MC_TOOL_CHANGE_MODE = 1
MD22560 $MC_TOOL_CHANGE_M_CODE = 6
Resolution
A conflict is resolved corresponding to the following table:
Basic Functions
614 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K1: Mode group, channel, program operation, reset response
8.15 Replacing functions by subprograms
8.15.3.1 General
Function
When a coupling is active the following spindle functions can be replaced for leading
spindles:
● M40: Automatic gear stage change
● M41 ... M45 Programmed gear stage change
● SPOS, SPOSA and M19: Spindle positioning
Boundary conditions
● To replace a spindle function, the following conditions must be met:
– The programmed spindle must be the leading spindle of an active coupling.
– Leading and following spindle are located in the same channel. This is only detected if
the leading spindle is located in the channel in which the coupling was closed. If the
leading spindle is changed to another channel, a gear stage change or positioning of
this spindle does not call the replacement subprogram.
– A programmed gear stage change must result in a real gear stage change. For this
purpose, the programmed and active gear stage must differ.
● In a block, only one spindle function can be replaced. Multiple replacements lead to the
termination of the program processing. The spindle functions, which are to be replaced,
must then be distributed over several blocks.
Parameterization
Spindle function
The spindle functions to be replaced by the subprogram are selected in the machine data:
MD30465 $MA_AXIS_LANG_SUB_MASK
Bit Meaning
0 Gear-stage change automatic (M40) and directly (M41-M45)
Value Meaning
0 No replacement
1 Replacement through the subprogram set in MD15700 and MD15702
1 Spindle positioning with SPOS / SPOSA / M19
Value Meaning
0 No replacement
1 Replacement through the subprogram set in MD15700 and MD15702
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 615
K1: Mode group, channel, program operation, reset response
8.15 Replacing functions by subprograms
Subprogram: Name
The name of the replacement subprogram is entered in the machine data:
MD15700 $MN_LANG_SUB_NAME = "<subprogram name>"
Subprogram: Path
The path of the replacement subprogram is set in the machine data:
MD15702 $MN_LANG_SUB_PATH = <value>
Value Meaning
0 Manufacturer cycle folder: /_N_CMA_DIR
1 User cycle folder: /_N_CUS_DIR
2 Siemens cycle folder: /_N_CST_DIR
Value Meaning
0 Replacement not active
1 Replacement active, subprogram call is made at the block start
2 Replacement active, subprogram call is made at the block end
Block processing
If the replacement subprogram is called at the block start, after processing the replacement
subprogram, the block that initiated the call is processed. The replaced commands are no
longer processed.
If the replacement subprogram is called at the block end, the block that initiated calling the
replacement subprogram is first processed without the commands to be replaced. The
replacement subprogram is then subsequently called.
Function
When a coupling is active, the commands for gear stage change (M40, M41 ... M45) of the
leading spindle are replaced by calling a user-specific subprogram.
Parameterization
Activation
● MD30465 $MA_AXIS_LANG_SUB_MASK, bit 0 = 1
Basic Functions
616 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K1: Mode group, channel, program operation, reset response
8.15 Replacing functions by subprograms
The time of the call cannot be set. The replacement subprogram is always called at the
block start.
● M41 ... M45
The call time depends on the configured output behavior of the auxiliary function to the
PLC (see below MD22080):
– Output before or during motion: Subprogram call at the start of the block.
– Output after motion: Subprogram call at the end of the block
MD22080 $MC_AUXFU_PREDEF_SPEC[12 ... 16] (output behavior for M41 ... M45)
Function
When a coupling is active, the positioning commands (SPOS, SPOSA or M19) of a leading
spindle are replaced by calling a user-specific subprogram (replacement subprogram).
Application example
When machining workpieces in parallel on a double-spindle machine, the spindles are
coupled through a coupling factor not equal to 1. When changing the tool, they must be
brought to the same position. The replacement subprogram opens the coupling, separately
positions the spindles at the tool change position and then recloses the coupling.
Parameterization
Activation
● MD30465 $MA_AXIS_LANG_SUB_MASK, bit 1 = 1
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 617
K1: Mode group, channel, program operation, reset response
8.15 Replacing functions by subprograms
The time of the call cannot be set. The replacement subprogram is always called at the
block start.
● M19
The call time depends on the configured output behavior of the auxiliary function to the
PLC (see below MD22080):
– Output before or during motion: Subprogram call at the start of the block.
– Output after motion: Subprogram call at the end of the block
MD22080 $MC_AUXFU_PREDEF_SPEC[9]
Bit Value Meaning
5 1 Output of the auxiliary function before the motion
6 1 Output of the auxiliary function during the motion
7 1 Output of the auxiliary function after the motion
Basic Functions
618 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K1: Mode group, channel, program operation, reset response
8.15 Replacing functions by subprograms
Parameterization
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 619
K1: Mode group, channel, program operation, reset response
8.15 Replacing functions by subprograms
Main program
Programming Comment
PROC MAIN
N110 COUPON(S2,S1) ; Close the synchronous spindle coupling
N120 G01 F100 X100 S5000 M3 M43 ; Subprogram call due to M43
N130 M40 ; Switch-on automatic gear stage change
N140 M3 S1000 ; Subprogram call due to S1000
; and as a result initiated automatic
; Gear stage change
N9999 M30
Programming Comment
N1000 PROC LANG_SUB DISPLOF SBLOF
N1100 IF($P_SUB_AXFCT ==1) ; Replacement due to gear stage change
N1140 DELAYFSTON ; Start of stop delay area
N1150 COUPOF(S2,S1) ; Open synchronous spindle coupling
N1160 ;gear stage change separately for leading and following spindles
N1170 M1=$P_SUB_GEAR M2=$P_SUB_GEAR
N1180 DELAYFSTON ; End of stop delay area
N1190 COUPON(S2,S1) ; Close the synchronous spindle coupling
N1200 ENDIF
...
N9999 RET
Programming Comment
N1000 PROC LANG_SUB DISPLOF SBLOF
N1010 DEF AXIS _LA ; Bit memory for leading axis / leading spindle
N1020 DEF AXIS _CA ; Bit memory for following axis / following
spindle
N1030 DEF INT _GEAR ; Bit memory for gear stage
Basic Functions
620 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K1: Mode group, channel, program operation, reset response
8.15 Replacing functions by subprograms
Programming Comment
N1130 _CA=$P_SUB_CA ; Axis name of the following spindle
N1140 DELAYFSTON ; Start of stop delay area
N1150 COUPOF(_CA,_LA) ; Open synchronous spindle coupling
N1160 ;gear stage change for leading and following spindles
N1170 M[AXTOSPI(_LA)]=_GEAR M[AXTOSPI(_CA)]=_GEAR
N1180 DELAYFSTOF ; End of stop delay area
N1190 COUPON(_CA,_LA) ; Close the synchronous spindle coupling
N1200 ENDIF
...
N9999 RET
Parameterization
Main program
Programming Comment
PROC MAIN
...
N210 COUPON(S2,S1) ; Activate synchronous spindle coupling
N220 SPOS[1]=100 ; Position leading spindle with SPOS
...
N310 G01 F1000 X100 M19 ; Position leading spindle with M19
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 621
K1: Mode group, channel, program operation, reset response
8.15 Replacing functions by subprograms
Programming Comment
N1000 PROC LANG_SUB DISPLOF SBLOF
N2100 IF($P_SUB_AXFCT==2)
N2110 ;Replacement of SPOS/SPOSA/M19 for active synchronous spindle coupling
N2185 DELAYFSTON ; Start of stop delay area
N2190 COUPOF(S2,S1) ; Open synchronous spindle coupling
N2200 ; Position leading and following spindles
N2210 IF($P_SUB_SPOS==TRUE) OR ($P_SUB_SPOSA==TRUE)
N2220 ;SPOS and SPOSA are mapped to SPOS
N2230 CASE $P_SUB_SPOSMODE OF \
0 GOTOF LABEL1_DC \
1 GOTOF LABEL1_IC \
2 GOTOF LABEL1_AC \
3 GOTOF LABEL1_DC \
4 GOTOF LABEL1_ACP \
5 GOTOF LABEL1_ACN \
DEFAULT GOTOF LABEL_ERR
LABEL1_DC: SPOS[1]=DC($P_SUB_SPOSIT) SPOS[2]=DC($P_SUB_SPOSIT)
GOTOF LABEL1_CONT
LABEL1_IC: DELAYFSTOF
SPOS[1]=IC($P_SUB_SPOSIT) SPOS[2]=IC($P_SUB_SPOSIT)
DELAYFSTON
GOTOF LABEL1_CONT
LABEL1_AC: SPOS[1]=AC($P_SUB_SPOSIT) SPOS[2]=AC($P_SUB_SPOSIT)
GOTOF LABEL1_CONT
LABEL1_ACP: SPOS[1]=ACP($P_SUB_SPOSIT) SPOS[2]=ACP($P_SUB_SPOSIT)
GOTOF LABEL1_CONT
LABEL1_ACN: SPOS[1]=ACN($P_SUB_SPOSIT) SPOS[2]=ACN($P_SUB_SPOSIT)
LABEL1_CONT:
N2250 ELSE ; Positioning the spindle using M19
N2270 M1=19 M2=19 ; Leading and following spindles
N2280 ENDIF ; End replacement SPOS, SPOSA
N2285 DELAYFSTOF ; End of stop delay area
N2290 COUPON(S2,S1) ; Activate synchronous spindle coupling
N2410 ELSE
N2420 ;from here processing further replacements
...
N3300 ENDIF ; End replacements
...
N9999 RET ; Normal end of program
LABEL_ERR: SETAL(61000) ; Error has occurred
Basic Functions
622 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K1: Mode group, channel, program operation, reset response
8.15 Replacing functions by subprograms
Programming Comment
N1000 PROC LANG_SUB DISPLOF SBLOF
N1010 DEF AXIS _LA ; Leading axis/spindle
N1020 DEF AXIS _CA ; Following axis/spindle
N1030 DEF INT _LSPI ; Leading spindle number (programmed
; spindle)
N1040 DEF INT _CSPI ; Following spindle number
...
N2100 IF($P_SUB_AXFCT==2)
N2110 ;Replacement of SPOS/SPOSA/M19 for active synchronous spindle coupling
N2120 _LA=$P_SUB_LA ; Axis name of the leading spindle
N2130 _CA=$P_SUB_CA ; Axis name of the following spindle
N2140 _LSPI=AXTOSPI(_LA) ; Number of the leading spindle
N2180 _CSPI=AXTOSPI(_LA) ; Number of the following spindle
N2185 DELAYFSTON ; Start of stop delay area
N2190 COUPOF(_CA,_LA) ; Deactivate synchronous spindle coupling
N2200 ; Position leading and following spindle:
N2210 IF($P_SUB_SPOS==TRUE) OR ($P_SUB_SPOSA==TRUE)
N2220 ;SPOS and SPOSA are mapped to SPOS
N2230 CASE $P_SUB_SPOSMODE OF
0 GOTOF LABEL1_DC \
1 GOTOF LABEL1_IC \
2 GOTOF LABEL1_AC \
3 GOTOF LABEL1_DC \
4 GOTOF LABEL1_ACP \
5 GOTOF LABEL1_ACN \
DEFAULT GOTOF LABEL_ERR
LABEL1_DC: SPOS[_LSPI]=DC($P_SUB_SPOSIT) SPOS[_CSPI]=DC($P_SUB_SPOSIT)
GOTOF LABEL1_CONT
LABEL1_IC: DELAYFSTOF
SPOS[_LSPI]=IC($P_SUB_SPOSIT) SPOS[_CSPI]=IC($P_SUB_SPOSIT)
DELAYFSTON
GOTOF LABEL1_CONT
LABEL1_AC: SPOS[_LSPI]=AC($P_SUB_SPOSIT) SPOS[_CSPI]=AC($P_SUB_SPOSIT)
GOTOF LABEL1_CONT
LABEL1_ACP: SPOS[_LSPI]=ACP($P_SUB_SPOSIT) POS[_CSPI]=ACP($P_SUB_SPOSIT)
GOTOF LABEL1_CONT
LABEL1_ACN: SPOS[_LSPI]=ACN($P_SUB_SPOSIT) POS[_CSPI]=ACN($P_SUB_SPOSIT)
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 623
K1: Mode group, channel, program operation, reset response
8.15 Replacing functions by subprograms
Programming Comment
LABEL1_CONT:
N2250 ELSE ; Position the spindle using M19
N2270 M[_LSPI]=19 M[_CSPI]=19
N2280 ENDIF
N2285 DELAYFSTOF ; End of stop delay area
N2290 COUPON(_CA,_LA) ; Activate synchronous spindle coupling
N2410 ELSE
N2420 ;from here processing further replacements
...
N3300 ENDIF
...
N9999 RET ; Normal end of program
LABEL_ERR: SETAL(61000) ; Error has occurred
General rules
● The subprogram called when making the replacement can contain the command PROC
and the attribute SBLOF and DISPLOF.
● The replacement is also made in the ISO language mode. However, the replacement
subprograms are exclusively processed in the standard language mode (Siemens). There
is an implicit switchover into the standard language mode. The original language mode is
reselected with the return jump from the replacement subprogram.
● System variables are exclusively used to transfer information to the replacement
subprogram. Transfer parameters are not possible.
● The behavior for a single block and attribute SBLOF depends on the setting in:
MD10702 IGNORE_SINGLEBLOCK_MASK, bit 14 (prevent single-block stop)
Value Meaning
0 The replacement subprogram behaves like a "normal" subprogram:
• Return jump with M17: Stop at the end of the subprogram
Note
- Bit 0 = 0: No output
Basic Functions
624 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K1: Mode group, channel, program operation, reset response
8.15 Replacing functions by subprograms
Value Meaning
1 In the block, in which the replacement subprogram is called, only one stop is made.
Regardless of whether:
• The subprogram was called at the block start and/or at the block end
• Other subprograms are called in the subprogram
• The subprogram is exited with M17 or RET
The single-block stop takes place for the replacement of M functions at the end of the
replacement subprogram.
For the replacement of T and D/DL functions, the time of the single-block stop depends on
when the subprogram is called:
• Call at block start: Single-block stop at the end of the block
• Call at the block end: Single-block stop at the end of the replacement subprogram
● For replacement subprograms with the attribute DISPLOF in the block display, the program
line is displayed as actual block, which resulted in the subprogram being called.
● In the replacement subprogram, areas or the complete replacement subprogram can be
protected against interruptions, such as NC stop, read-in inhibit etc., using the DELAYFSTON
and DELAYFSTOF commands.
● Replacements do not occur recursively, i.e. the function that has led to the replacement
subprogram call is no longer replaced if it is programmed again in the replacement
subprogram.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 625
K1: Mode group, channel, program operation, reset response
8.15 Replacing functions by subprograms
8.15.5 Restrictions
● Function replacements are not permitted in:
– Synchronized actions
– Technology cycles
● There must be no blockwise synchronized actions in front of a block that contains
functions at the beginning to be replaced. See the paragraph below "Example for: Non-
modal synchronized actions".
● Only the actions required for the respective replacements can be performed in the
replacement subprogram.
● In a block, in which the replacement subprogram is called at the block end, the following
should be observed:
– No modal subprogram call should be active
– No subprogram return jump should be programmed
– No program end should be programmed
Note
The controller does not monitor whether the function to be replaced has been realized
in the replacement subprogram.
Program code
...
N1000 WHENEVER $AA_IM[X2] <= $AA_IM[X1] + 0.5 DO $AA_OVR[X1]=0
N1010 G1 X100 M43
...
If, in block N1010, the function M43 initiates that a replacement subprogram is called,
machining is interrupted and an alarm is output.
Basic Functions
626 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K1: Mode group, channel, program operation, reset response
8.16 Program runtime / part counter
Function
The "program runtime" function provides internal NC timers to monitor technological
processes, which can be read into the part program and into synchronized actions via the
NC and channel-specific system variables.
Time since the last control power-up
The timers for measuring the time since the last control power-up are always active and can
be read via NC-specific system variables:
Program runtimes
The timers for measuring the program runtimes are:
● Available only in the mode type AUTOMATIC
● Can be read via channel-specific system variables
Some of the timers are always active, others can be activated/deactivated through MD
parameterization.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 627
K1: Mode group, channel, program operation, reset response
8.16 Program runtime / part counter
The following system variables are available for the timers that are always active:
Basic Functions
628 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K1: Mode group, channel, program operation, reset response
8.16 Program runtime / part counter
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 629
K1: Mode group, channel, program operation, reset response
8.16 Program runtime / part counter
Note
Residual time for a workpiece
If the same workpieces are produced one after the other, then from the timer values:
• Processing time for the last workpiece produced (see $AC_OLD_PROG_NET_TIME)
and
• Current processing time (see $AC_ACT_PROG_NET_TIME)
the remaining residual time for a workpiece can be determined.
The residual time is displayed on the user interface in addition to the current processing
time.
Note
Using STOPRE
The system variables $AC_OLD_PROG_NET_TIME and
$AC_OLD_PROG_NET_TIME_COUNT do not generate any implicit preprocessing stop. This
is uncritical when used in the part program if the value of the system variables comes from
the previous program run. However, if the trigger for the runtime measurement
($AC_PROG_NET_TIME_TRIGGER) is written very frequently and as a result
$AC_OLD_PROG_NET_TIME changes very frequently, then an explicit STOPRE should be
used in the part program.
The following system variables are available for the timers that are activated/deactivated
through MD parameterization:
Basic Functions
630 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K1: Mode group, channel, program operation, reset response
8.16 Program runtime / part counter
Activation/deactivation
The timer that can be activated is switched-in/switched-out using machine data:
MD27860 $MC_PROCESSTIMER_MODE, Bit 0-2
Parameterization
Behavior of the timer that is always active
The behavior of the timer that is always active for GOTOS and override = 0% is set using
machine data:
MD27850 $MC_PROG_NET_TIMER_MODE
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 631
K1: Mode group, channel, program operation, reset response
8.16 Program runtime / part counter
Supplementary conditions
● Block search
No program runtimes are determined through block searches.
● REPOS
The duration of a REPOS process is added to the current processing time
($AC_ACT_PROG_NET_TIME).
Examples
Example 1: Parameterization of the runtime measurement via MD27860
● Activating the runtime measurement for the active NC program and hence no
measurement in case of active dry run feedrate and program test:
MD27860 $MC_PROCESSTIMER_MODE = 'H2'
● Activating the measurement for the tool action time and measurement also with active dry
run feedrate and program test.
MD27860 $MC_PROCESSTIMER_MODE = 'H34'
Basic Functions
632 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K1: Mode group, channel, program operation, reset response
8.16 Program runtime / part counter
● Activating the measurement for the total runtime and the processing time with an active
tool, including measurement with a program test:
MD27860 $MC_PROCESSTIMER_MODE = 'H25'
● Activating the measurement for the total runtime and the machining time (independent of
the tool), including measurement with a program test:
MD27860 $MC_PROCESSTIMER_MODE = 'Ha5'
● Activating the measurement for the processing time with an active tool, including
measurements at an override = 0%, but not with a trial run feed active:
MD27860 $MC_PROCESSTIMER_MODE = 'H22'
Program code
...
N50 DO $AC_PROG_NET_TIME_TRIGGER=2
N60 FOR ii= 0 TO 300
N70 mySubProgrammA
N80 DO $AC_PROG_NET_TIME_TRIGGER=1
N95 ENDFOR
N97 mySubProgrammB
N98 M30
After the program has processed line N80, the net runtime of "mySubProgrammA" is located
in $AC_OLD_PROG_NET_TIME.
The value from $AC_OLD_PROG_NET_TIME:
● Is kept beyond M30.
● Is updated each time the loop is run through.
Program code
N10 DO $AC_PROG_NET_TIME_TRIGGER=2
N20 mySubProgrammA
N30 DO $AC_PROG_NET_TIME_TRIGGER=3
N40 mySubProgrammB
N50 DO $AC_PROG_NET_TIME_TRIGGER=4
N60 mySubProgrammC
N70 DO $AC_PROG_NET_TIME_TRIGGER=1
N80 mySubProgrammD
N90 M30
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 633
K1: Mode group, channel, program operation, reset response
8.16 Program runtime / part counter
Function
Various counters with a range of values from 0 to 999,999,999 are available with the
"Workpiece counter" function in the form of channel-specific system variables. Read and
write access to the system variables is possible.
The following channel-specific machine data can be used to control counter activation,
counter reset timing and the counting algorithm.
Note
All workpiece counters are set to "0" when the control runs up with default values and can be
read and written independent of their activation.
Basic Functions
634 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K1: Mode group, channel, program operation, reset response
8.16 Program runtime / part counter
Activation
The workpiece counter is activated with the machine data:
MD27880 $MC_PART_COUNTER (activation of workpiece counters)
<n> Meaning
0 MD27882[0] defines the M command in which $AC_TOTAL_PARTS is incremented.
1 MD27882[1] defines the M command in which $AC_ACTUAL_PARTS is incremented.
2 MD27882[2] defines the M command in which $AC_SPECIAL_PARTS is incremented.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 635
K1: Mode group, channel, program operation, reset response
8.16 Program runtime / part counter
Supplementary conditions
● Mode change / NC RESET
The counters are not affected by a mode change or NC RESET.
● $AC_REQUIRED_PARTS ≤ 0
Where $AC_REQUIRED_PARTS ≤ 0 and MD27880 $MC_PART_COUNTER, bit 0 = 1,
the counting procedure and the identity comparison set with MD27880 are not conducted
for all the active counters.
Examples
● Activation of the workpiece counter $AC_REQUIRED_PARTS:
MD27880 $MC_PART_COUNTER = 'H3'
– $AC_REQUIRED_PARTS is active
– Display alarm at: $AC_REQUIRED_PARTS == $AC_SPECIAL_PARTS
● Activation of the workpiece counter $AC_TOTAL_PARTS:
MD27880 $MC_PART_COUNTER = 'H10'
MD27882 $MC_PART_COUNTER_MCODE[0] = 80
– $AC_TOTAL_PARTS is active; the counter is incremented by the value 1 with each
M02.
Basic Functions
636 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K1: Mode group, channel, program operation, reset response
8.16 Program runtime / part counter
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 637
K1: Mode group, channel, program operation, reset response
8.17 Data lists
Basic Functions
638 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K1: Mode group, channel, program operation, reset response
8.17 Data lists
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 639
K1: Mode group, channel, program operation, reset response
8.17 Data lists
Block search
Basic Functions
640 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K1: Mode group, channel, program operation, reset response
8.17 Data lists
Reset response
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 641
K1: Mode group, channel, program operation, reset response
8.17 Data lists
Memory settings
Basic Functions
642 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K1: Mode group, channel, program operation, reset response
8.17 Data lists
8.17.3 Signals
8.17.3.1 Signals to NC
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 643
K1: Mode group, channel, program operation, reset response
8.17 Data lists
8.17.3.3 Signals to NC
Basic Functions
644 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K1: Mode group, channel, program operation, reset response
8.17 Data lists
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 645
K1: Mode group, channel, program operation, reset response
8.17 Data lists
8.17.3.6 Signals to NC
Basic Functions
646 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K2: Axis Types, Coordinate Systems, Frames 9
9.1 Brief description
9.1.1 Axes
Machine axes
Machine axes are the axes that actually exist on a machine tool.
Channel axes
Every geometry axis and every special axis is assigned to a channel and, therefore, a
channel axis. Geometry axes and additional axes are always traversed in "their" channel.
Geometry axes
The three geometry axes always make up a fictitious rectangular coordinate system, the
basic coordinate system (BCS).
By using FRAMES (offset, rotation, scaling, mirroring), it is possible to image geometry axes
of the workpiece coordinate system (WCS) on the BCS.
Special axes
In contrast to geometry axes, no geometrical relationship is defined between the special
axes.
Path axes
Path axes are interpolated together (all the path axes of a channel have a common path
interpolator).
All the path axes of one channel have the same acceleration phase, constant travel phase
and delay phase.
Positioning axes
Positioning axes are interpolated separately (each positioning axis has its own axis
interpolator). Each positioning axis has its own feedrate and acceleration characteristic.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 647
K2: Axis Types, Coordinate Systems, Frames
9.1 Brief description
Synchronized axes
Synchronous axes are interpolated together with path axes (all path axes and synchronous
axes of one channel have a common path interpolator).
All path axes and all synchronous axes of a channel have the same acceleration phase,
constant travel phase and deceleration phase.
Axis configuration
The machine data below are used to assign the geometry axes, special axes, channel axes
and machine axes as well as the names of the individual axis types:
MD20050 $MC_AXCONF_GEOAX_ASIGN_TAB (assignment of geometry axis to channel
axis)
MD20060 $MC_AXCONF_GEOAX_NAME_TAB (name of the geometry axis in the channel)
MD20070 $MC_AXCONF_MACHAX_USED (machine axis number valid in channel)
MD20080 $MC_AXCONF_CHANAX_NAME_TAB (name of the channel axis in the channel)
MD10000 $MN_AXCONF_MACHAX_NAME_TAB (machine axis name)
MD35000 $MA_SPIND_ASSIGN_TO_MACHAX (assignment of spindle to machine axis)
Link axis
Link axes are axes, which are physically connected to another NCU and whose position is
controlled from this NCU. Link axes can be assigned dynamically to channels of another
NCU. Link axes are not local axes from the perspective of a particular NCU.
The axis container concept is used for the dynamic modification of the assignment to an
NCU. Axis replacement with GET and RELEASE from the part program is not available for link
axes across NCU boundaries.
The link axes are described in
References:
Function Manual, Extended Functions; Several Operator Panels on Multiple NCUs,
Distributed Systems (B3)
Basic Functions
648 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K2: Axis Types, Coordinate Systems, Frames
9.1 Brief description
Axis container
An axis container is a circular buffer data structure, in which local axes and/or link axes are
assigned to channels. The entries in the circular buffer can be shifted cyclically.
In addition to the direct reference to local axes or link axes, the link axis configuration in the
logical machine axis image also allows references to axis containers.
This type of reference consists of:
● Axis container number
● A slot (circular buffer location within the corresponding container)
The entry in a circular buffer location contains:
● A local axis
or
● A link axis
The axis container function is described in
References:
Function Manual, Extended Functions; Several Operator Panels on Multiple NCUs,
Distributed Systems (B3)
MCS
The machine coordinate system (MCS) has the following properties:
● It is defined by the machine axes.
● The machine axes can be perpendicular to each other to form Cartesian system or
arranged in any other way.
● The names of the machine axes can be defined.
● The machine axes can be linear or rotary axes.
BCS
The basic coordinates system (BKS) has the following properties:
● The geometry axes form a perpendicular Cartesian coordinate system.
● The BCS is derived from a kinematic transformation of the MCS.
BZS
The basic zero system (BZS) is the basic coordinate system with a basic offset.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 649
K2: Axis Types, Coordinate Systems, Frames
9.1 Brief description
SZS
The settable zero system (SZS) is the workpiece coordinate system with a programmable
frame from the viewpoint of the WCS. The workpiece zero is defined by the settable frames
G54 to G599.
WCS
The workpiece coordinate system (WCS) has the following properties:
● In the workpiece coordinate system all the axes coordinates are programmed (parts
program).
● It is made up of geometry axes and special axes.
● Geometry axes always form a perpendicular Cartesian coordinate system
● Special axes form a coordinate system without any geometrical relation between the
special axes.
● The names of the geometry axes and special axes can be defined.
● The workpiece coordinate system can be translated, rotated, scaled or mirrored with
FRAMES (TRANS, ROT, SCALE, MIRROR).
Multiple translations, rotational movements, etc., are also possible.
Basic Functions
650 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K2: Axis Types, Coordinate Systems, Frames
9.1 Brief description
9.1.3 Frames
Frame
A frame is a closed calculation rule (algorithm) that translates one Cartesian coordinate
system into another.
Frame components
6FDOLQJ
0LUURULQJ
5RWDWLRQ
)LQHRIIVHW
5RXJKRIIVHW
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 651
K2: Axis Types, Coordinate Systems, Frames
9.1 Brief description
Frame rotations
Orientations in space are defined via frame rotations as follows:
● Rotation with ROT defines the individual rotations for all geometry axes.
● Solid angles with ROTS, AROTS, CROTS define the orientation of a plane in space.
● Frame rotation with TOFRAME defines a frame with a Z axis pointing in the tool direction.
Scaling
SCALE is used to program the programmable scale factors for all geometry axes and special
axes.
If a new scaling is to be based on a previous scaling, rotation, translation or mirroring, then
ASCALE must be programmed.
Basic Functions
652 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K2: Axis Types, Coordinate Systems, Frames
9.1 Brief description
Mirroring
The axis to be mirrored can be set via the following machine data:
MD10610 MIRROR_REF_AX (reference axis for the mirroring)
Value Meaning
0 Mirroring is performed around the programmed axis.
1, 2 or 3 Depending on the input value, mirroring is mapped onto the mirroring of a specific
reference axis and rotation of two other geometry axes.
Frame chaining
Frame components or complete frames can be combined using the concatenation operator
":" to create a complete frame. For instance, the actual frame $P_ACTFRAME comprises
chaining the complete basic frame, adjustable frame, the systems frames and the
programmable frame:
Value Meaning
1 Zero offset is applied on FRAME and incremental programming of an axis (= default setting).
0 Only the programmed path is traversed.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 653
K2: Axis Types, Coordinate Systems, Frames
9.1 Brief description
Suppression of frames
The actual frames can be suppressed with the following operations:
Comman Meaning
d
G53 Suppression of the actual zero offset (non-modal)
G153 Suppression of the actual frame including basic frame
SUPA Suppression of actual zero offset, including programmed offsets, system frames,
handwheel offsets (DRF), external zero offset and overlaid motion
Settable frames
Adjustable frames can be defined as either global NCU or channel-specific frames.
Consistency
When writing, reading and activating frames, e.g. using channel coordination, the user is
solely responsible for achieving consistent behavior within the channels. Cross-channel
activation of frames is not supported.
Basic Functions
654 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K2: Axis Types, Coordinate Systems, Frames
9.2 Axes
9.2 Axes
9.2.1 Overview
*HRPHWU\D[HV 6SHFLDOD[HV
&KDQQHOD[HV
.LQHPDWLF
WUDQVIRUPDWLRQ
/LQHDUD[HV
5RWDU\D[HV
2ULHQWDWLRQD[HV
0DFKLQHD[HV
Figure 9-2 Relationship between geometry axes, special axes and machine axes
0DFKLQHD[HV
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 655
K2: Axis Types, Coordinate Systems, Frames
9.2 Axes
Meaning
Machine axes are the axes that actually exist on a machine tool.
%
=
&
;
<
Application
The following can be machine axes:
● Geometry axes X, Y, Z
● Orientation axes A, B, C
● Loader axes
● Tool turrets
Basic Functions
656 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K2: Axis Types, Coordinate Systems, Frames
9.2 Axes
Meaning
Each geometry axis and each special axis is assigned to a channel. Geometry axes and
additional axes are always traversed in "their" channel.
Meaning
The three geometry axes always make up a fictitious rectangular coordinate system.
By using FRAMES (offset, rotation, scaling, mirroring), it is possible to image geometry axes
of the workpiece coordinate system (WCS) on the BCS.
Application
Geometry axes are used to program the workpiece geometry (the contour).
Plane selection G17, G18 and G19 (DIN 66217) always refers to the three geometry axes. That
is why it is advantageous to name the three geometry axes X, Y and Z.
Meaning
The "Replaceable geometry axes" function allows the geometry axes in a grouping to be
replaced by other channel axes.
Axes that are initially configured as synchronous special axes in a channel can replace any
selected geometry axis in response to a program command.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 657
K2: Axis Types, Coordinate Systems, Frames
9.2 Axes
Example
On a machine with two Z axes, Z1 and Z2, either of the Z axes can be programmed as the
geometry axis in response to an instruction in the part program.
Activation
Axis replacement is activated by the program command:
GEOAX([n, channel axis name]...)
A channel axis, which has been designated a geometry axis, can only be addressed under
its geometry axis name. The geometry axes names themselves remain unchanged.
Geometry axes can be replaced either individually or as a group in one command.
Supplementary conditions
As a basic rule, any channel axis designated as a geometry axis can be replaced by another
channel axis.
In this case, the following restrictions apply:
● Rotary axes may not be programmed as geometry axes.
● A geometry axis, which has the same name as a channel axis, cannot be replaced by
another channel axis (alarm message). Nor can an axis of this type be removed from the
geometry axis grouping. It cannot change its position within the geometry axis grouping.
● Both axes in each of the axis pairs involved in the replacement operation must be block-
synchronized.
● The following functions may not be active when geometry axes are replaced:
– Transformation
– Spline interpolation
– Tool radius compensation
– Tool fine compensation
● Any active DRF offset or zero offset external will remain operative. They both act on
channel axes. The channel axis assignment is not affected by the replacement of
geometry axes.
Basic Functions
658 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K2: Axis Types, Coordinate Systems, Frames
9.2 Axes
RESET
The reset behavior of the changed geometry axis assignment is defined with the following
machine data:
MD20110 $MC_RESET_MODE_MASK (definition of initial control settings after RESET / TP
End)
MD20118 $MC_GEOAX_CHANGE_RESET (allow automatic geometry axis change)
MD20110 $MC_RESET_MODE_MASK
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 659
K2: Axis Types, Coordinate Systems, Frames
9.2 Axes
MD20118 $MC_GEOAX_CHANGE_RESET
Value Meaning
0 The current configuration of the geometry axes remains unchanged on reset and program
start. With this setting, the response is identical to older software versions without geometry
axis replacement.
1 The configuration of the geometry axis remains unchanged during reset or part program end
as a function of machine data MD20110 $MC_RESET_MODE_MASK and during part
program start as a function of machine data MD20112 $MC_START_MODE_MASK
(definition of initial control system settings with NC START) or brought to the initial status
defined in the machine data MD20050 $MC_AXCONF_GEOAX_ASSIGN_TAB (assignment
of geometry axis to channel axis).
Program start
Analogously to the Reset response, the behavior during program start is based on the
setting in the machine data:
MD20112 $MC_START_MODE_MASK (definition of initial control system settings at NC-
START)
M code
A changeover of the geometry axis with GEOAX( ) can be communicated to the PLC through
the output of an M code:
MD22532 $MC_GEOAX_CHANGE_M_CODE (M code at toolholder change)
Note
If this machine data is set to one of the values 0 to 6, 17, 30, then no M code is output.
Basic Functions
660 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K2: Axis Types, Coordinate Systems, Frames
9.2 Axes
Transformation changeover
The following interrelationships must be noted with respect to kinematic transformation and
geometry axis replacement:
● Geometry axis assignments cannot be modified when the transformation is active.
● Activation of a transformation deletes the programmed geometry axis configuration and
replaces it by the geometry axis assignment stored in the machine data of the activated
transformation.
● The initial setting defined through MD for the geometry axis configuration becomes
effective after deactivating the transformation.
Should it be necessary to modify the geometry axis assignment in connection with
transformations, then another new transformation must be configured. The total number of
the transformations simultaneously available in the channel is equal to 8.
A maximum of two transformations per channel can be available simultaneously from the
transformation groups below:
● Orientation transformations
(3-axis, 4-axis, 5-axis and nutation transformation)
● TRAANG (oblique axis)
● TRANSMIT
● TRACYL
References:
Function Manual, Special Functions; 3- to 5-Axis Transformation (F2)
Function Manual, Extended Functions; Kinematic Transformation (M1)
Example
In the example below, it is assumed that there are 6 channel axes with channel axis names
XX, YY, ZZ, U, V, W and three geometry axes with names X, Y, Z. The basic setting is
defined in machine data so that the geometry axes are mapped on the first three channel
axes, i.e. on XX, YY and ZZ.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 661
K2: Axis Types, Coordinate Systems, Frames
9.2 Axes
Significance
In contrast to geometry axes, no geometrical relationship is defined between the special
axes.
Note
Geometry axes have an exactly defined relationship in the form of a rightangled coordinate
system.
Special axes are part of the basic coordinate system (BCS). With FRAMES (translation,
scaling, mirroring), special axes of the workpiece coordinate system can be mapped on the
basic coordinate system.
Application
Typical special axes are:
● Rotary axes
● Machine tool axes
● Tool revolver axes
● Loader axes
Basic Functions
662 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K2: Axis Types, Coordinate Systems, Frames
9.2 Axes
Meaning
Path axes are interpolated together (all the path axes of a channel have a common path
interpolator).
All the path axes of one channel have the same acceleration phase, constant travel phase
and delay phase.
The feedrate programmed under address F (path feedrate) applies to all the path axes
programmed in a block, with the following exceptions:
● An axis has been programmed that has been defined as having no control over the path
velocity with instruction FGROUP.
● Axes programmed with instructions POS or POSA have an individual feedrate setting (axis
interpolator).
Application
Path axes are used to machine the workpiece with the programmed contour.
Meaning
Positioning axes are interpolated separately (each positioning axis has its own axis
interpolator). Each positioning axis has its own feedrate and acceleration characteristic.
Positioning axes can be programmed in addition to path axes (even in the same block). Path
axis interpolation (path interpolator) is not affected by the positioning axes. Path axes and
the individual positioning axes do not necessarily reach their block end points at the same
time.
Instructions POS and POSA are used to program positioning axes and define block change
criteria:
● POS
Block change takes place when the path axes and positioning axes have reached their
block end points.
● POSA
Block change takes place when the path axes have reached their end of block position.
Positioning axes continue to traverse beyond block limits to their block end point.
Concurrent positioning axes differ from positioning axes in that they:
● Only receive their block end points from the PLC
● Can be started at any time (not at block limits)
● Do not affect the execution of current part programs.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 663
K2: Axis Types, Coordinate Systems, Frames
9.2 Axes
Application
Typical positioning axes are:
● Loaders for moving workpieces away from machine
● Tool magazine/turret
Reference
For further information, see Section "P3: Basic PLC program for SINUMERIK 840D sl
(Page 809)" and "S1: Spindles (Page 1225)".
References:
● Function Manual, Extended Functions; Positioning Axes (P2)
● Function Manual, Special Functions; Gantry Axes (G1)
● Function Manual, Special Functions; Axis Couplings and ESR (M3)
● Function Manual, Extended Functions; Oscillation (P5)
● Function Manual, Synchronized Actions
Meaning
A main axis is an axis that is interpolated by the main run.
This interpolation can be started as follows:
● From synchronized actions
(as command axes due to an event via block-related, modal or static synchronized
actions)
● From the PLC via special function blocks in the basic PLC program
(named as a concurrent positioning axis or a PLC axis)
● Via the setting data or from the part program
(as an asynchronous or block-synchronous oscillating axis)
Basic Functions
664 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K2: Axis Types, Coordinate Systems, Frames
9.2 Axes
Channel control
An axis interpolated by the main axis reacts in terms of:
● NC stop
● Alarm handling
● Program control
● End of program
● RESET
Note
The response at the end of the program varies. The axis movement need not always be
completed and, therefore, may carry on beyond the end of the program.
Application
Certain axes in the main run can be decoupled at the channel response triggered by the NC
program sequence and controlled from the PLC. These axes are also interpolated in the
main run and respond independently for the channel and program sequence.
A PLC-controlled axis can then be controlled independently by the NC. This concerns the
following actions:
● The sequence for canceling the axis (equivalent to delete distancetogo)
● Stopping or interrupting the axis
● Continuing the axis (continue sequence of motion)
● Resetting the axis to its basic status
Meaning
Synchronous axes are components of the path axes, which are not referenced in order to
calculate the tool path velocity. They are interpolated together with path axes (all path axes
and synchronous axes of one channel have a common path interpolator).
All path axes and all synchronous axes of a channel have the same acceleration phase,
constant travel phase and deceleration phase.
The feedrate (path feedrate) programmed under address F applies to all the path axes
programmed in a block but not to the synchronous axes.
Synchronous axes take the same time to cover the programmed path as the path axes.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 665
K2: Axis Types, Coordinate Systems, Frames
9.2 Axes
FGROUP command
The command FGROUP specifies whether the axis is a feed-defining path axis (used to
calculate the path velocity) or a synchronous axis (not used to calculate the path velocity).
Example
Note
The channel axis name must be used for the FGROUP command.
This is defined by the machine data:
MD20080 $MC_AXCONF_CHANAX_NAME_TAB (name of the channel axis in the channel)
Application
In the case of helical interpolation FGROUP can be programmed to determine whether:
● The programmed feedrate should be valid on the path
(all three programmed axes are path axes)
● The programmed feedrate should be valid on the circle
(two axes are path axes and the infeed axis is a synchronous axis)
Basic Functions
666 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K2: Axis Types, Coordinate Systems, Frames
9.2 Axes
&KDQQHO &KDQQHO
VWJHRPHWU\D[LV >@ ಯ;ರ VWJHRPHWU\D[LV >@
QGJHRPHWU\D[LV >@ ಯ<ರ QGJHRPHWU\D[LV >@
UGJHRPHWU\D[LV >@ ಯ=ರ UGJHRPHWU\D[LV >@
&KDQQHOD[LVQDPH 8VHGPDFKLQHD[HV
0'0&B$;&21)B&+$1$;B1$0(B7$%>N@>Q@ 0'0&B$;&21)B0$&+$;B86('>N@>Q@
&KDQQHON &KDQQHON
&KDQQHO &KDQQHO
VWFKDQQHOD[LV >@ ಯ;ರ .DQDODFKVH >@
QGFKDQQHOD[LV >@ ಯ<ರ .DQDODFKVH >@
UGFKDQQHOD[LV >@ ಯ=ರ .DQDODFKVH >@
WKFKDQQHOD[LV >@ ಯ$ರ .DQDODFKVH >@
WKFKDQQHOD[LV >@ ಯ%ರ .DQDODFKVH >@
WKFKDQQHOD[LV >@ ಯ8ರ .DQDODFKVH >@
WKFKDQQHOD[LV >@ ಯ9ರ .DQDODFKVH >@
WKFKDQQHOD[LV >@ ಯರ .DQDODFKVH >@
/RJLFDOPDFKLQHD[LVLPDJH
0'01B$;&21)B/2*,&B0$&+$;B7$%>Q@
>@ >@ >@ >@ >@ >@ >@ >@
ಯ1&B$;Qರ
ಯ&7B6/ರ
$[LVFRQWDLQHUQDPHV
0'
01B$;&7B1$0(B7$%>Q@
/RFDOPDFKLQHD[HV
0' $[LVFRQWDLQHUಯ&7ರ >@ ಯ&7ರ
01B$;&21)B0$&+$;B1$0(B7$%>Q@ 0'01B$;&7B$;&21)B$66,*1B7$% >@ ಯ&7ರ
6ORW 6ORW
VWPDFKLQHD[LV >@ ಯ$;ರ >@ ಯ&7ರ
QGPDFKLQHD[LV >@ ಯ$;ರ >@ ಯ&7ರ
UGPDFKLQHD[LV >@ ಯ$;ರ
;
;
$
B
&
&RQWDLQHUOLQND[LV
1
ZLWKQ!ಯRZQ1&8ರ
&
B
B
$
;
6ORW 6ORW
/LQND[LV0DFKLQHD[LV$;QRQ1&8
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 667
K2: Axis Types, Coordinate Systems, Frames
9.2 Axes
Special features
● Leading zeros for user-defined axis names are ignored:
MD10000 `$MN_AXCONF_MACHAX_NAME_TAB[0] = X01 corresponds to X1
● The geometry axes must be assigned to the channel axes in ascending order without any
gaps.
● All channel axes that are not geometry axes are special axes.
Note
Channel axes without assigned machine axes (channel axis gaps) are, regarding the number
and indexing of the channel axes, treated just like normal channel axes with associated
machine axes.
If a channel axis without assigned machine axis (channel axis gap) is defined as geometry
axis, then this is rejected without an alarm.
Basic Functions
668 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K2: Axis Types, Coordinate Systems, Frames
9.2 Axes
1&8
&KDQQHOD[LVQDPH 0DFKLQHD[HVXVHG
0'0&B$;&21)B&+$1$;B1$0(B7$%>Q@>P@ 0'0&B$;&21)B0$&+$;B86('>Q@>P@
&KDQQHOQ &KDQQHOQ
&KDQQHO &KDQQHO
VWFKDQQHOD[LV >@ ಯ;ರ VWFKDQQHOD[LV >@
QGFKDQQHOD[LV >@ ಯ<ರ QGFKDQQHOD[LV >@
UGFKDQQHOD[LV >@ ಯ=ರ UGFKDQQHOD[LV >@
WKFKDQQHOD[LV >@ ಯ$ರ WKFKDQQHOD[LV >@
WKFKDQQHOD[LV >@ ಯ%ರ &KDQQHOD[LVJDS WKFKDQQHOD[LV >@
WKFKDQQHOD[LV >@ ಯ8ರ WKFKDQQHOD[LV >@
WKFKDQQHOD[LV >@ ಯ9ರ WKFKDQQHOD[LV >@
WKFKDQQHOD[LV >@ ಯರ WKFKDQQHOD[LV >@
Meaning
A link axis is a machine axis that is not on the NCU from which it is traversed. The name of a
local machine axis is not entered in the machine data for the logical machine axis image of
the traversing NCU, but the NCU and machine axis name of the NCU to which it is physically
connected.
As an example, machine axis AX1 of NCU2 should be traversed from NCU1:
● NCU1: MD10002 $MN_AXCONF_LOGIC_MACHAX_TAB[n] = NC2_AX1
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 669
K2: Axis Types, Coordinate Systems, Frames
9.3 Zeros and reference points
Requirement
The NCUs involved must be connected using link communication as a requirement for using
link axes. The link axes and link communication functions are described in detail in:
References:
Function Manual, Extended Functions; Several Operator Panels on Multiple NCUs,
Distributed Systems (B3)
Machine zero M
The machine zero M defines the machine coordinate system MCS. All other reference points
refer to the machine zero.
Workpiece zero W
The workpiece zero W defines the workpiece coordinate system in relation to the machine
zero M. The programmed part-program blocks are executed in the workpiece coordinate
system WCS.
Basic Functions
670 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K2: Axis Types, Coordinate Systems, Frames
9.3 Zeros and reference points
Reference point R
The position of the reference point R is defined by cam switches. Reference point R
calibrates the position measuring system.
With incremental encoders, the reference point must be approached every time the control
power is switched on. The control can only then work with the measuring system and
transfer all position values to the coordinate systems.
0 :
7
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 671
K2: Axis Types, Coordinate Systems, Frames
9.3 Zeros and reference points
Control POWER ON
For incremental measuring probes, the reference point must be approached each time the
control is activated so that the control can transfer all position values to the coordinate
system.
0DFKLQH :RUNSLHFH
FRRUGLQDWH :RUNSLHFH FRRUGLQDWH
V\VWHP0&6 6SLQGOH OHQJWK V\VWHP:&6
0 0
0DFKLQH :RUNSLHFH
]HUR ]HUR
Figure 9-7 Position of coordinate systems by machine zero M and workpiece zero W
;
=
5
5HIHU
HQFH
7 7RROKROGHU SRLQW
0DFKLQH
]HUR / ;
7RROKROGHUUHIHUHQFHSRLQW
/
Basic Functions
672 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K2: Axis Types, Coordinate Systems, Frames
9.4 Coordinate systems
9.4.1 Overview
] [
<
;<=
$[HVSHUSHQGLFXODUWR
%
RQHDQRWKHU
$%&
5RWDU\D[HVURWDWLQJ
DERXW;<=
r
&
;
$
=
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 673
K2: Axis Types, Coordinate Systems, Frames
9.4 Coordinate systems
Basic Functions
674 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K2: Axis Types, Coordinate Systems, Frames
9.4 Coordinate systems
)UDPHFKDLQ
:&6
)UDPHIRUF\FOHVSURJUDPPDEOH
IUDPHWUDQVIRUPDWLRQV
6=6
6\VWHPIUDPHIRU72527
72)5$0(ZRUNSLHFHV
*WR*VHWWDEOHIUDPH
FKDQQHOVSHFRU1&8JOREDO
%=6
&KDLQHGILHOGRIEDVLFIUDPHV
FKDQQHOVSHFDQGRU1&8JOREDO
&KDLQHGV\VWHPIUDPHVIRU3$52735(6(7
VFUDWFKLQJ]HURRIIVHWH[WHUQDO
.LQHPDWLFWUDQVIRUPDWLRQ
0&6
+RPHSRVLWLRQRIIVHW
0&6 0DFKLQH&RRUGLQDWH6\VWHP
%&6 %DVLF&RRUGLQDWH6\VWHP
:&6 :RUNSLHFH&RRUGLQDWH6\VWHP
%=6 %DVLF=HUR6\VWHP
6=6 6HWWDEOH=HUR6\VWHP
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 675
K2: Axis Types, Coordinate Systems, Frames
9.4 Coordinate systems
%
=
&
;
<
;
0
=
Basic Functions
676 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K2: Axis Types, Coordinate Systems, Frames
9.4 Coordinate systems
CAUTION
Loss of the encoder adjustment
After a preset offset, the appropriate machine axis is in the "Not referenced" state! This
means that when using absolute encoders, the encoder adjustment is lost and must be
performed again (e.g. by calibration with a laser interferometer ). The use of PRESETON in
combination with absolute encoders is therefore not recommended.
Note
We recommend that the function is only used for machine axes that do not require a
reference point.
In order to restore the original machine coordinate system, the machine axis must be re-
referenced, e.g. with G74 (reference point approach).
The machine axes are not moved with the preset offset.
References
● Programming Manual, Fundamentals
Section: "Supplementary commands" > "Reference point approach (G74)"
● Programming Manual, Job Planning
Section: "Coordinate transformations (FRAMES)" > "Preset offset (PRESETON)
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 677
K2: Axis Types, Coordinate Systems, Frames
9.4 Coordinate systems
<
;
0&6 %&6
= 0DFKLQH]HUR
Basic Functions
678 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K2: Axis Types, Coordinate Systems, Frames
9.4 Coordinate systems
<%&6
.LQHPDWLF
WUDQVIRUPDWLRQ
<0&6
; %&6
%DVLFFRRUGLQDWHV\VWHP%&6
= %&6
; 0&6
0DFKLQHFRRUGLQDWHV\VWHP0&6
= 0&6
Machine kinematics
The workpiece is always programmed in a two- or three-dimensional, right-angled coordinate
system (WCS). However, such workpieces are being programmed ever more frequently on
machine tools with rotary axes or linear axes not perpendicular to one another. Kinematic
transformation is used to represent coordinates programmed in the workpiece coordinate
system (rectangular) in real machine movements.
References:
Function Manual, Special Functions; 3- to 5-Axis Transformation (F2)
Function Manual, Extended Functions; Kinematic Transformation (M1)
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 679
K2: Axis Types, Coordinate Systems, Frames
9.4 Coordinate systems
<
([WHUQDO
]HURRIIVHW
<
;
%DVLF]HURV\VWHP%=6
=
;
%DVLFFRRUGLQDWHV\VWHP%&6
=
Basic Functions
680 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K2: Axis Types, Coordinate Systems, Frames
9.4 Coordinate systems
Effect of activation
The offset for an axis becomes active when the first motion block for this axis is executed
after the offset is activated.
Example of possible chronological sequence:
Programming
Setting a new offset via the axis-specific system variables:
$AA_ETRANS[axis]=Ri
The instruction below reads the axis-specific active offset value:
Ri=$AA_ETRANS[axis]
Note
The read value can then differ from the previously set value, if the set value has not yet been
activated.
The read value corresponds to a value set previously, if the most recently set value has not
yet been activated. The system frame for the "Zero offset external" exists only if it has been
configured.
DRF offset
The DRF offset enables the adjustment of an additional incremental zero offset for geometry
and additional axes in the basic coordinate system through handwheel.
The DRF offset can be read via the axis-specific system variable:
$AC_DRF[<Axis>]
References:
Function Manual, Extended Functions; Manual and Handwheel Travel (H1),
Section: DRF offset
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 681
K2: Axis Types, Coordinate Systems, Frames
9.4 Coordinate systems
Overlaid movements
The "Superimposed motion" for the programmed axis can only be accessed from
synchronized actions via the system variable $AA_OFF[axis].
Power-up
After run-up (POWER ON) the last used offset values for the "Zero offset external" are
stored and do not become effective again until there is a renewed activation signal.
System frames are retained during Power ON, depending on the following machine data:
MD24008 $MC_CHSFRAME_POWERON_MASK (reset system frames after Power On)
RESET/end of program
The activated values remain active after RESET and program end.
Reset response of channel-specific system fames as follows:
The system frame for the "external zero offset" is active after RESET with the following
machine data setting:
MD24006 $MC_CHSFRAME_RESET_MASK, bit 1 = 1
The "external zero offset" in the active system frame is deleted in the data management
through the following machine data setting:
MD24006 $MC_CHSFRAME_RESET_MASK, bit 1 = 0
The following frames are active after RESET:
● System frame for:
MD24006 $MC_CHSFRAME_RESET_MASK, Bit 4 = 1 (workpiece reference point)
MD24006 $MC_CHSFRAME_RESET_MASK, Bit 5 = 1 (cycles)
Suppression
The NC program instruction SUPA suppresses the "Zero offset external" while the block is
being processed.
The command G74 (reference point approach) and the equivalent operator actions in
"Reference point approach" mode suppress the "Zero offset external" for the duration of the
reference point approach.
With G74, i.e. "Automatic" or "MDA" mode, the previously active "External zero offset"
automatically becomes active again with the next traversing motion in the block.
After a mode change from "Reference point approach" mode, the NC/PLC interface signal
for the referenced axes must be set for reactivation.
Basic Functions
682 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K2: Axis Types, Coordinate Systems, Frames
9.4 Coordinate systems
<
%DVLFRIIVHW
<
;
%DVLF]HURV\VWHP%=6
=
;
%DVLFFRRUGLQDWHV\VWHP%&6
=
Basic offset
The basic offset describes the coordinate transformation between BCS and BZS. It can be
used, for example, to define the palette window zero.
The basic offset comprises:
● Zero offset external
● DRF offset
● Superimposed motion
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 683
K2: Axis Types, Coordinate Systems, Frames
9.4 Coordinate systems
]
] 3URJUDPPDEOH
IUDPH
]
]
\ \
:RUNSLHFH
3URJUDPPDEOH
IUDPH
Note
Recommendation to the machine manufacturer
Use the 3rd basic offset onwards for your own applications.
The 1st and 2nd basic offset are reserved for PRESET and the "Zero offset external".
Basic Functions
684 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K2: Axis Types, Coordinate Systems, Frames
9.4 Coordinate systems
<
**
<
;
6HWWDEOH]HURV\VWHP6=6
=
;
%DVLF]HURV\VWHP%=6
=
Figure 9-19 Settable FRAME G54 ... G599 between BNS and ENS
Programmable offsets act on the "settable zero system". All programmable offsets refer to
the "settable zero system".
Value Significance
0 Actual-value display in relation to the WCS
1 Actual-value display in relation to the SZS
Note
Display of the current coordinate system
When "Actual-value display in relation to the SZS" is active, the WCS is still displayed on the
HMI operator interface as the coordinate system to which the actual-value display relates.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 685
K2: Axis Types, Coordinate Systems, Frames
9.5 Frames
Example
Actual-value display in relation to the WCS or SZS
<
3URJUDPPDEOH)5$0(
ZLWK3B3)5$0(
<
;
:RUNSLHFHFRRUGLQDWHV\VWHP:&6
=
;
6HWWDEOH]HURV\VWHP6=6
=
9.5 Frames
Basic Functions
686 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K2: Axis Types, Coordinate Systems, Frames
9.5 Frames
Axial frame
An axial frame contains the frame values of an axis.
Example of the data structure of an axial frame for axis X:
Channel-specific frame
A channel-specific frame contains frame values for all channel axes (geometry, special and
machine axes).
Rotations (ROT) are only included in the calculation for geometry axes.
A channel-specific frame is only active in the channel in which the frame is defined.
Example of the data structure of a channel-specific frame:
● Geometry axes: X, Y, Z
● Special axes: A
● Machine axes: AX1
Global frame
A global frame contains the frame values for all machine axes.
A global frame is active in all channels of the NC.
Example of the data structure of a channel-specific frame:
● Machine axes: AX1, ... AX5
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 687
K2: Axis Types, Coordinate Systems, Frames
9.5 Frames
9.5.2.1 Translation
Programming
The programming of the translation or coarse offset can be performed via the following
commands:
● Example of data management frames $P_UIFR
– Complete frame: $P_UIFR[<n>] = CTRANS(<K1>,<V1>[,<K2>,<V2>][,<K3>,<V3>])
with Km = coordinate x, y or z and Vm = offset m
– Frame component: $P_UIFR[<n>,<k>,TR] = <V>
with K = coordinate x, y or z and V = offset
● Example of programmable frame
– TRANS <K1> <V1> [<K2> <V2>][<K3> <V3>]
with Km = coordinate x, y or z and Vm = offset m
Programs examples:
7UDQVODWLRQ
)LQHRIIVHW
Basic Functions
688 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K2: Axis Types, Coordinate Systems, Frames
9.5 Frames
Parameterization
The fine offset is enabled via the machine data:
MD18600 $MN_MM_FRAME_FINE_TRANS = <value>
Value Meaning
0 The fine offset cannot be entered or programmed.
1 Fine offset is possible for settable frames, basic frames and the programmable frame via
command or program.
Programming
The programming of the translation or coarse offset can be performed via the following
commands:
● Example of data management frames $P_UIFR
– Complete frame: $P_UIFR[<n>] = CFINE(<K1>,<V1>[,<K2>,<V2>][,<K3>,<V3>])
with Km = coordinate x, y or z and Vm = offset m
– Frame component: $P_UIFR[<n>,<K>,FI] = <V>
with K = coordinate x, y or z and V = offset
● Example of programmable frame
– TRANS <K1> <V1> [<K2> <V2>][<K3> <V3>]
with Km = coordinate x, y or z and Vm = offset m
Programming examples:
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 689
K2: Axis Types, Coordinate Systems, Frames
9.5 Frames
Function
The direction of rotation around the coordinate axes is determined by means of a right-hand,
rectangular coordinate system with axes x, y and z. If the rotary motion is in a clockwise
direction when looking in the positive direction of the coordinate axis, the direction of rotation
is positive. A, B and C designate rotations whose axes are parallel to the coordinate axes.
$ [
&
]
The following figure shows the new position of the coordinate system x', y' and z' after the
rotation around z with γ = -45°
]
]
[
Basic Functions
690 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K2: Axis Types, Coordinate Systems, Frames
9.5 Frames
Value Meaning
1 Euler angles in zy'x'' convention (RPY angles)
2 Euler angles in zx'z" convention
Note
For historical reasons, Euler angles in zx'z" convention can be used. However, it is strongly
recommended that only Euler angles in zy'x" convention (RPY angles) be used (see Section
Rotation with a Euler angles: ZY'X" convention (RPY angles) (Page 691)).
VWURWDWLRQDURXQG] QGURWDWLRQDURXQG\
UGURWDWLRQDURXQG[
] ]
[
\
\
[
[
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 691
K2: Axis Types, Coordinate Systems, Frames
9.5 Frames
Range of values
With RPY angles, programmed values can only be unambiguously calculated back within the
following value ranges:
Syntax
<Frame> = CROT([<1st GAx>,<angle>,][<2nd GAx>,<angle>,][<3rd
GAx>,<angle>])
ROT [<1st GAx><angle>] [<2nd GAx><angle>] [<3rd GAx><angle>]
AROT [<1st GAx><angle>] [<2nd GAx><angle>] [<3rd GAx><angle>]
Meaning
Basic Functions
692 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K2: Axis Types, Coordinate Systems, Frames
9.5 Frames
Syntax
<frame>[<index>,<GAx>,RT] = <angle>
Meaning
Note
It is recommended that when writing the rotation components of the frame, the specified
value ranges are observed so that the same values are obtained when reading back the
rotation components.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 693
K2: Axis Types, Coordinate Systems, Frames
9.5 Frames
Gimbal lock
Gimbal lock designates a geometric problem in which the rotation components can no longer
be unambiguously calculated back from the position vector. Gimbal lock occurs in RPY
angles with an angular position of the rotation component y = 90°. In this case, the rotation
components are converted by the controller after being written so that the following applies:
● Rotation component z = rotation component z - rotation component x
● Rotation component x = 0°
● Rotation component y = 90°
CAUTION
Different values for reading back the rotation component z
Because of the different conversion times after writing the complete frame or the writing of
individual rotation components of a data management frame and the writing of individual
rotation components of an active frame, different values can be read back for rotation
component z.
Basic Functions
694 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K2: Axis Types, Coordinate Systems, Frames
9.5 Frames
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 695
K2: Axis Types, Coordinate Systems, Frames
9.5 Frames
Note
Recommended use
For historical reasons, Euler angles in zx'z" convention can be used. However, it is strongly
recommended that only Euler angles in zy'x" convention (RPY angles) be used (see Section
Rotation with a Euler angles: ZY'X" convention (RPY angles) (Page 691)).
5RWDWLRQDURXQG] 5RWDWLRQDURXQG[
5RWDWLRQDURXQG]
] ]
\
]
\
\
\
[
[
[
Range of values
Data from Euler angles can only be unambiguously calculated back within the following
value ranges:
Note
It is recommended that when writing the rotation components of the frame, the specified
value ranges are observed so that the same values are obtained when reading back the
rotation components.
Basic Functions
696 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K2: Axis Types, Coordinate Systems, Frames
9.5 Frames
Syntax
CRPL(<rotary axis>,<angle of rotation>)
Meaning
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 697
K2: Axis Types, Coordinate Systems, Frames
9.5 Frames
9.5.2.7 Scaling
J
LQ
DO
6F
[
Programming
The program commands below are used to program the scaling:
$P_UIFR[1] = CSCALE(x,1,y,1)
SCALE x = 1y = 1
$P_UIFR[1,x,sc] = 1
9.5.2.8 Mirroring
0LUURULQJ
Programming
The program commands below are used to program a mirroring:
$P_UIFR[1] = CMIRROR(x,1,y,1)
MIRROR x = 1y = 1
$P_UIFR[1,x,mi] = 1
Basic Functions
698 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K2: Axis Types, Coordinate Systems, Frames
9.5 Frames
SPI
When programming frame commands, the SPI(<spindle number>) axis function can be used
in place of an axis name.
SPI(<spindle number>) forms the reference of the spindle to the channel axis.
→ refer to MD35000 $MA_SPIND_ASSIGN_TO_MACHAX[ ] (assignment of spindle to
machine axis)
The following frame commands can be programmed with SPI(spino):
CTRANS()
CFINE()
CMIRROR()
CSCALE()
A spindle can only be assigned to one rotary axis at a time. The CROT(..) function can
therefore not be programmed withSPI(), as only geometry axes are permitted forCROT().
The channel axis name or machine axis name of the axis belonging to the spindle is always
output when decompiling frames, even when axis names have been programmed in the part
program with SPI(..).
If the spindle is assigned e.g., to the Channel Axis A then the programming:
N10 $P_UIFR[1] = CTRANS(SPI(1),33.33,X,1):CSCALE(SPI(1),33.33):CMIRROR(SPI(1))
during recompilation:
$P_UIFR[1]=CTRANS(X,1,A,33.33):CSCALE(A,33.33):CMIRROR(A)
If a spindle and an assigned axis are programmed in a frame command, then Alarm 16420
"Axis % multiply programmed" is output.
Example:
$P_UIFR[1] = CTRANS(SPI(1),33.33,X,1,A,44)
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 699
K2: Axis Types, Coordinate Systems, Frames
9.5 Frames
Programming examples
$P_PFRAME[SPI(1),TR]=22.22
$P_PFRAME=CSCALE(X,Scale,Y,scale,SPI(2),scale)
$P_PFRAME=CMIRROR(S1,Y,Z)
$P_UBFR=CTRANS(A,10):CFINE(SPI(1),0.1)
6FDOLQJ
0LUURULQJ
5RWDWLRQ
)LQHRIIVHW
5RXJKRIIVHW
The formulae below are used to discover the coordinate transformation for geometry axes:
%&6ൺ:&6 Y
LQY0
LQY6
LQY5YW
Basic Functions
700 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K2: Axis Types, Coordinate Systems, Frames
9.5 Frames
9.5.3.1 Overview
The following frame types are available:
● System frames (see diagram)
● Basic frames ($P_NCBFR[n], $P_CHBFR[n])
● Adjustable frames ($P_UIFR[n])
● Programmable frame ($P_PFRAME[n])
Apart from the programmable frame, all types have a frame in the data management (data
management frame) and an active frame. For a programmable frame, there is only one
active frame.
'DWDPDQDJHPHQWIUDPHV
VWDWLFPHPRU\RIWKH1&
6\VWHPIUDPHV
&+$1
3B5(/)5 3B&<&)5
$FWLYDWLRQRIGDWDPDQDJHPHQWIUDPHVE\ ***3,B6(78'7UHVHW
7UDQVIRUPDWLRQFKDQJH*(2$;
&KDQQHO $FWLYHIUDPHV
3B$&7)5$0( 3B3$57)5$0(3B6(7)5$0(3B(;7)5$0(
DFWLYHWRWDOIUDPHWKURXJKFKDLQLQJ 3B,62)5$0(3B,62)5$0(3B,62)5$0(
RIDOODFWLYHIUDPHVLQWKHVSHFLILHG 3B$&7%)5$0(3B,)5$0(3B722/)5$0(
RUGHU 3B:3)5$0(3B75$)5$0(3B3)5$0(
3B,62)5$0(3B&<&)5$0(
3DUWSURJUDP
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 701
K2: Axis Types, Coordinate Systems, Frames
9.5 Frames
Writing frames
Data management frames and active frames can be written from the part program. Only data
management frames can be written via the user interface.
Archiving frames
Only data management frames can be archived.
Note
Modifying system frames of the data management
Although in principle, system frames of the data management can be modified by the
cycle programmer and activated using a G500, G54...G599 operation. However, this option
should only be used with reservation.
Basic Functions
702 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K2: Axis Types, Coordinate Systems, Frames
9.5 Frames
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 703
K2: Axis Types, Coordinate Systems, Frames
9.5 Frames
Basic Functions
704 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K2: Axis Types, Coordinate Systems, Frames
9.5 Frames
9.5.4.1 Overview
The figure below shows the frame chain for the current complete frame. The frame chain is
located between the basic coordinate system (BCS) and the workpiece coordinate system
(WCS).
The settable zero system (SZS) corresponds to the WCS transformed by the programmable
frame. The basic zero system (BZS) still includes the current settable frame. The system
frame for the external zero offset is only available if it has been configured, otherwise the
external zero offset is traversed as an overlaid motion of the axis.
Q
KDL :&6
H F 3B75$)5$0(3B3)5$0(
DP
3B,62)5$0(3B&<&)5$0(
)U 6=6
3B722/)5$0(3B:3)5$0(
3B,)5$0(
%=6
3B$&7%)5$0(
3B3$57)5$0(3B6(7)5$0(3B(;7)5$0(
3B,62)5$0(3B,62)5$0(3B,62)5$0(
%&6
+DQGZKHHO'5)RIIVHWVXSHULPSRVHGPRWLRQH[WHUQDO]HUR
RIIVHWNLQHPDWLFWUDQVIRUPDWLRQ
0&6
5HIHUHQFHSRLQWRIIVHW
The current complete frame $P_ACTFRAME results from the chaining of all active frames of the
frame chain:
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 705
K2: Axis Types, Coordinate Systems, Frames
9.5 Frames
6 5(/
:.
6 5(/
(1 (
$0
)5
(
(/
$0
B5
)5
3
(/
B5
:.6
3
(16
The data maintenance frame $P_RELFR can be written in the part program and via BTSS.
All the frame components can be modified.
The active system frame $P_RELFRAME can be written in the part program and via BTSS.
The configuring of the system frame $P_RELFR is done via the following machine data:
Basic Functions
706 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K2: Axis Types, Coordinate Systems, Frames
9.5 Frames
The axis position in the relative coordinate system WCSRel can be read via the variable
$AA_PCS_REL[ax]. The variable can be read in part program, BTSS and via synchronized
actions.
The axis position in the relative coordinate system ENSRel can be read via the variable
$AA_ACS_REL[ax]. The variable can be read in part program, BTSS and via synchronized
actions.
The setting of a relative reference point via the operator panel is done via the general
command interface for the workpiece and tool measuring. The system frame $P_RELFR for
relative coordinate systems is calculated and activated as follows:
● $AC_MEAS_TYPE = 14
● PI-services _N_SETUDT(6, 7)
An example of setting the relative axis positions can be found in:
References:
Function Manual, Extended functions; Measurement (M5),
Section "Measurement of geometry and special axes (meas. type 14, 15)"
0'0&B)5$0(B$&6B6(7
:&6
3B&<&)5$0(
3B75$)5$0(3B3)5$0(
3B,62)5$0(
6=6
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 707
K2: Axis Types, Coordinate Systems, Frames
9.5 Frames
0'0&B)5$0(B$&6B6(7
:&6
3B&<&)5$0(
6=6
3B75$)5$0(3B3)5$0(
3B,62)5$0(
The following machine data can be used to set whether the ENS is with or without the
programmable frame, the transformation frame and $P_ISO4FRAME:
MD24030 $MC_FRAME_ACS_SET (setting of the ENS coordinate system)
As default, the value 1 is set.
Reconfiguring the SZS affects all SZS actual-value displays and the $AA_IEN[axis] system
variables. Traversing geometry axes in JOG mode in the SZS also depends on the
configuration.
Basic Functions
708 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K2: Axis Types, Coordinate Systems, Frames
9.5 Frames
(
5 $0
< &)
B&
3
6=6
3B75$)5$0(3B3)5$0(
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 709
K2: Axis Types, Coordinate Systems, Frames
9.5 Frames
Programming
Comman Meaning
d
G53 Nonmodal suppression of the following frames:
• System frame for cycles
• Programmable frame
• System frame for transformations, workpieces, TOROT and TOFRAME
• Active settable frame
G153 Nonmodal suppression of the following frames:
• System frame for cycles
• Programmable frame
• System frame for TOROT and TOFRAME, workpieces
• Active settable frame
• All channel-specific and NCU global basic frames
• System frames for PAROT, PRESET, scratching, ext. ZO
SUPA Implicit preprocessing stop and non-modal suppression of frames analog G153 and
additional
• Handwheel offsets (DRF)
• [Ext. zero offset]
• Overlaid motion
G500 Modal activation of the G500 frame. The G500 frame should be a zero frame.
DRFOF Deactivate (clear) the handwheel offsets (DRF)
Basic Functions
710 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K2: Axis Types, Coordinate Systems, Frames
9.5 Frames
3$
68
:&6
*
3B75$)5$0(3B3)5$0(
3B,62)5$0(3B&<&)5$0(
*
6=6
3B722/)5$0(3B:3)5$0(
3B,)5$0(
%=6
3B$&7%)5$0(
3B3$57)5$0(3B6(7)5$0(3B(;7)5$0(
3B,62)5$0(3B,62)5$0(3B,62)5$0(
%&6
+DQGZKHHO'5)RIIVHWVXSHULPSRVHGPRWLRQH[WHUQDO=2
.LQHPDWLFWUDQVIRUPDWLRQ
0&6
5HIHUHQFHSRLQWRIIVHW
Parameterization
Frame suppressions SUPA, G153 and G53 lead to the WCS, SZS and possibly the BZS
jumping when frame suppression is active. This characteristic for position display and pre-
defined position variables can be changed through the following machine data:
MD24020 $MC_FRAME_SUPPRESS_MODE (Positions during frame suppression)
Bit Meaning
0 Positions for display (OPI) are without frame suppression.
1 Position variables are without frame suppression.
When the bit is set, the position for the display or the variables is calculated without frame
suppression so that no further jumps in the position occur.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 711
K2: Axis Types, Coordinate Systems, Frames
9.5 Frames
9.5.5.1 Overview
There are up to four frame variants:
● Settable frames (G500,G54 to G599)
● Basic frames
● Programmable frame
● System frames
Basic Functions
712 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K2: Axis Types, Coordinate Systems, Frames
9.5 Frames
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 713
K2: Axis Types, Coordinate Systems, Frames
9.5 Frames
Basic Functions
714 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K2: Axis Types, Coordinate Systems, Frames
9.5 Frames
Example:
Rotations cannot be used on global frames. The programming of a rotation is denied with
alarm: "18310 Channel %1 Block %2 Frame: Rotation not allowed" is displayed.
It is not possible to program chaining of global frames and channel-specific frames, and any
attempt at this is rejected with the alarm 18314 "Frame: Type conflict". All global frames and
channel-specific frames are internally chained to the complete frame. This takes place in the
channel and only with all channel axes known in the channel. The assignment of a frame
with rotation components to a global frame is denied with alarm "Frame: Rotation not
allowed".
Example:
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 715
K2: Axis Types, Coordinate Systems, Frames
9.5 Frames
3B$&7%)5$0(
3B&+%)5$0(>Q@
3B1&%)5$0(>Q@
$P_ACTBFRAME=
$P_NCBFRAME[0] : ... : $P_NCBFRAME[n] : $P_CHBFRAME[0] : ... : $P_CHBFRAME[n]
Basic Functions
716 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K2: Axis Types, Coordinate Systems, Frames
9.5 Frames
MIRROR
Mirrorings of a geometry axis were thus far (up to SW-P4) related to a defined reference axis
only using the machine data:
MD10610 $MN_MIRROR_REF_AX
(reference axis for the mirroring).
From the user's point of view, this definition is hard to follow. When mirroring the z axis, the
display showed that the x axis was mirrored and the y axis had been rotated about 180
degrees. When mirroring two axes this became even more complex and it was no longer
easy to understand, which axes had been mirrored and, which had not.
With SW P5 and higher, there is the option to clearly display the mirroring of an axis.
Mirroring is then not mapped to mirroring of a reference axis and rotations of other axes.
This setting can be configured using:
MD10610 $MN_MIRROR_REF_AX = 0
MIRROR and AMIRROR are used to expand the programming of the programmable frame.
Previously, the specified value of the coordinate axis, e.g. the value 0 for MIRROR X0 is not
evaluated, but the AMIRROR has a toggle function, i.e. MIRROR X0 activates mirroring and an
additional AMIRROR X0 deactivates it. MIRROR always has an absolute effect and AMIRROR an
additive effect.
The
MD10612 $MN_MIRROR_TOGGLE = 0 ("Mirror Toggle")
machine data setting can be used to define that the programmed values are evaluated.
A value of 0, as inAMIRROR X0, deactivates the mirroring of the axis, and values not equal to 0
cause the axis to be mirrored if it is not already mirrored.
Reading or writing mirroring component-by-component is independent of the machine data:
MD10612 $MN_MIRROR_TOGGLE
A value = 0 means that the axis is not mirrored and a value = 1 means that the axis will
always be mirrored, irrespective of whether it has already been mirrored or not.
G59 is used to axially overwrite the additively programmed translations for the specified axes
that were programmed with ATRANS.
G59 X... Y... Z... A... ...
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 717
K2: Axis Types, Coordinate Systems, Frames
9.5 Frames
Example:
7UDQVODWLRQ
5RXJKRUDEVROXWH )LQHRUDGGLWLYH
7UDQVODWLRQ 7UDQVODWLRQ
The fine component is transferred on saving the programmable frame in a local frame
variable (LUD or GUD) and on rewriting.
The table below shows the effect of various program commands on the absolute and
additive translation.
Basic Functions
718 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K2: Axis Types, Coordinate Systems, Frames
9.5 Frames
Example:
$MC_MM_SYSTEM_FRAME_MASK = 'B001101' means that
there are three system frames; one for PRESET, one for PAROT and one for TOROT and
TOFRAME.
The system frame mask is used to define if the corresponding function has a system frame.
With non-configured frames, in certain circumstances the function will be rejected with an
alarm.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 719
K2: Axis Types, Coordinate Systems, Frames
9.5 Frames
All write operations to these frames must be executed using system functions. For cycle
programmers, it has been made possible to write the frames using the above variables.
Attempts to write to a non-configured system frame are rejected with the alarm "Channel %1
block %2 name %3 not defined or option not available".
System frames in the data management are either activated directly with the system function
(TOROT, PAROT, etc.), or with a G500, G54 to G599 instruction.
Basic Functions
720 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K2: Axis Types, Coordinate Systems, Frames
9.5 Frames
● $P_PARTFRAME
In the part program, the variable $P_PARTFRAME can be used to read and write the
current system frame for TCARR and PAROT for toolholders with orientation capability. The
variable returns a zero frame if the system frame is not configured through MD28082.
● $P_TOOLFRAME
In the part program, the variable $P_TOOLFRAME can be used to read and write the
current system frame for TOROT and TOFRAME. The variable returns a zero frame if the
system frame is not configured through MD28082.
● $P_WPFRAME
In the part program, the variable $P_WPFRAME can be used to read and write the
current system frame for setting workpiece reference points. The variable returns a zero
frame if the system frame is not configured through MD28082.
● $P_CYCFRAME
In the part program, the variable $P_CYCFRAME can be used to read and write the
current system frame for cycles. The variable returns a zero frame if the system frame is
not configured through MD28082.
● $P_TRAFRAME
In the part program, the variable $P_TRAFRAME can be used to read and write the
current system frame for transformations. The variable returns a zero frame if the system
frame is not configured through MD28082.
● $P_ISO1FRAME, $P_ISO2FRAME, $P_ISO3FRAME, $P_ISO4FRAME
One can read and write the current system frames for special ISO language commands
in the parts program through the variables. The variable returns a zero frame if the
system frame is not configured through MD28082.
● $P_RELFRAME
In the part program, the variable $P_RELFRAME can be used to read and write the
current system frame for relative coordinate systems. The variable returns a zero frame if
the system frame is not configured through MD28082.
● $P_ACSFRAME
The currently resulting frame that is defined by the ENS-(ACS) coordinate system, can be
read and written through the $P_ACSFRAME variable.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 721
K2: Axis Types, Coordinate Systems, Frames
9.5 Frames
Basic Functions
722 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K2: Axis Types, Coordinate Systems, Frames
9.5 Frames
● MD10602 $MN_FRAME_GEOAX_CHANGE_MODE = 2
The current complete frame is calculated again when the geometry axes are switched
over, and the translations, scalings and mirrorings of the new geometry axes are
effective. If rotations are active in the current basic frames, the current settable frame or
the programmable frame before the switchover, it is aborted with the alarm "Frame:
Geometry axis switchover not allowed".
For TRANSMIT, TRACYL and TRAANG, see Section "Frame for selection and deselection of
transformations (Page 725)".
● MD10602 $MN_FRAME_GEOAX_CHANGE_MODE = 3
The current frame is deleted when selecting and deselecting transformations.
With GEOAX(), the current complete frame is calculated again and the translations,
scalings and mirrorings of the new geometry axes come into effect.
The rotations of the geometry axes which were programmed before the switchover
remain effective for the new geometry axes.
The workpiece geometry is described by a coordinate system that is formed by the geometry
axes. A channel axis is assigned to each geometry axis and a machine axis is assigned to
each channel axis. An axial frame exists for each machine axis and for each frame (system
frame, basic frame, settable frame, programmable frame). When a new machine axis is
assigned to a geometry axis, the axial frame components of the machine axis, such as
translations (coarse and fine), scaling and mirroring of the appropriate frame, are also
applied. The new geometry in the channel is then generated by the new contour frames
resulting from the new geometry axes (up to three in number).
The current valid frames are calculated again on the geometry axis switchover and a
resulting complete frame is generated. The data management frames are not included
unless they are activated.
Example:
The channel axis is to become a geometry axis x through geo axis substitution. The
substitution is to give the programmable frame a translation component of 10 in the x axis.
The current settable frame is to be retained.
MD10602 $MN_FRAME_GEOAX_CHANGE_MODE = 1
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 723
K2: Axis Types, Coordinate Systems, Frames
9.5 Frames
$MN_FRAME_GEOAX_CHANGE_MODE = 1
$MC_AXCONF_CHANAX_NAME_TAB[0] = "CAX"
$MC_AXCONF_CHANAX_NAME_TAB[1] = "CAY"
$MC_AXCONF_CHANAX_NAME_TAB[2] = "CAZ"
$MC_AXCONF_CHANAX_NAME_TAB[3] = "A"
$MC_AXCONF_CHANAX_NAME_TAB[4] = "B"
$MC_AXCONF_CHANAX_NAME_TAB[5] = "C"
$MC_AXCONF_GEOAX_ASSIGN_TAB[0] = 1
$MC_AXCONF_GEOAX_ASSIGN_TAB[1] = 2
$MC_AXCONF_GEOAX_ASSIGN_TAB[2] = 3
$MC_AXCONF_GEOAX_NAME_TAB[0] = "X"
$MC_AXCONF_GEOAX_NAME_TAB[1]="Y"
$MC_AXCONF_GEOAX_NAME_TAB[2] = "Z"
$MC_TRAFO_GEOAX_ASSIGN_TAB_1[0]=4
$MC_TRAFO_GEOAX_ASSIGN_TAB_1[1]=5
$MC_TRAFO_GEOAX_ASSIGN_TAB_1[2]=6
$MC_TRAFO_AXES_IN_1[0] = 4
$MC_TRAFO_AXES_IN_1[1] = 5
$MC_TRAFO_AXES_IN_1[2] = 6
$MC_TRAFO_AXES_IN_1[3] = 1
$MC_TRAFO_AXES_IN_1[4] = 2
Basic Functions
724 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K2: Axis Types, Coordinate Systems, Frames
9.5 Frames
Program:
Program code
$P_NCBFRAME[0] = ctrans(x,1,y,2,z,3,a,4,b,5,c,6)
$P_CHBFRAME[0] = ctrans(x,1,y,2,z,3,a,4,b,5,c,6)
$P_IFRAME = ctrans(x,1,y,2,z,3,a,4,b,5,c,6):crot(z,45)
$P_PFRAME = ctrans(x,1,y,2,z,3,a,4,b,5,c,6):crot(x,10,y,20,z,30)
Note
Transformations with virtual axes
When selecting TRANSMIT or TRACYL, offsets, scaling and mirroring of the real Y axis are
not transferred and accepted in the virtual Y axis. Offsets, scaling and mirroring of the virtual
Y axis are deleted for TRAFOOF.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 725
K2: Axis Types, Coordinate Systems, Frames
9.5 Frames
TRANSMIT
&
Transmit expansions:
The machine data below can be used to take the axial complete frame of the TRANSMIT
rotary axis, i.e., the translation, fine offset, mirroring and scaling, into account in the
transformation:
MD24905 $MC_TRANSMIT_ROT_AX_FRAME_1 = 1
MD24955 $MC_TRANSMIT_ROT_AX_FRAME_2 = 1
A rotary axis offset can, for example, be entered by compensating the oblique position of a
workpiece in a frame within a frame chain. As a rule, this offset can also be included in the
transformation as an offset in the rotary axis. A c axis offset, as in the figure above, then
leads to corresponding x and y values.
MD24905 $MC_TRANSMIT_ROT_AX_FRAME_1 = 2
MD24955 $MC_TRANSMIT_ROT_AX_FRAME_2 = 2
With this setting, the axial offset of the rotary axis is taken account of in the transformation
up to the SZS. The axial offsets of the rotary axis included in the SZS frames are entered
into the transformation frame as rotation. This setting is only effective if the transformation
frame has been configured.
Frame expansions:
The expansions described below are only valid for the following machine data settings:
MD10602 $MN_FRAME_GEOAX_CHANGE_MODE = 1
MD10602 $MN_FRAME_GEOAX_CHANGE_MODE = 2
The selection of transformation TRANSMIT produces a virtual geometry axis, coupled by
way of the rotary axis, which is merely included in the contour frame but does not have a
reference to an axial frame. The geometric value results from the rotation of a rotary axis. All
other geometry axes accept their axial components when the transformation is selected.
Basic Functions
726 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K2: Axis Types, Coordinate Systems, Frames
9.5 Frames
Translations:
When selecting TRANSMIT, translations of the virtual axis are deleted. Translations of the
rotary axis can be taken into account in the transformation.
Rotations:
Rotation before the transformation is taken over.
Mirroring:
Mirroring of the virtual axis is deleted. Mirroring of the rotary axis can be taken into account
in the transformation.
Scaling:
Scaling of the virtual axis is deleted. Scaling of the rotary axis can be taken into account in
the transformation.
Example:
Machine data for TRANSMIT
; FRAME configurations
$MN_MM_NUM_GLOBAL_USER_FRAMES=0
$MN_MM_NUM_GLOBAL_BASE_FRAMES=3
$MN_NCBFRAME_RESET_MASK='HFF'
$MC_CHBFRAME_RESET_MASK='HFF'
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 727
K2: Axis Types, Coordinate Systems, Frames
9.5 Frames
$MC_TRAFO_TYPE_1=256
$MC_TRAFO_AXES_IN_1[0]=1
$MC_TRAFO_AXES_IN_1[1]=6
$MC_TRAFO_AXES_IN_1[2]=3
$MC_TRAFO_AXES_IN_1[3]=0
$MC_TRAFO_AXES_IN_1[4]=0
$MA_ROT_IS_MODULO[AX6]=TRUE;
$MC_TRAFO_GEOAX_ASSIGN_TAB_1[0]=1
$MC_TRAFO_GEOAX_ASSIGN_TAB_1[1]=6
$MC_TRAFO_GEOAX_ASSIGN_TAB_1[2]=3
$MC_TRANSMIT_BASE_TOOL_1[0]=0.0
$MC_TRANSMIT_BASE_TOOL_1[1]=0.0
$MC_TRANSMIT_BASE_TOOL_1[2]=0.0
$MC_TRANSMIT_ROT_AX_OFFSET_1=0.0
$MC_TRANSMIT_ROT_SIGN_IS_PLUS_1=TRUE
$MC_TRANSMIT_ROT_AX_FRAME_1=1
$MC_TRAFO_TYPE_2=256
$MC_TRAFO_AXES_IN_2[0]=1
$MC_TRAFO_AXES_IN_2[1]=6
$MC_TRAFO_AXES_IN_2[2]=2
$MC_TRAFO_AXES_IN_2[3]=0
$MC_TRAFO_AXES_IN_2[4]=0
$MC_TRAFO_GEOAX_ASSIGN_TAB_2[0]=1
$MC_TRAFO_GEOAX_ASSIGN_TAB_2[1]=6
$MC_TRAFO_GEOAX_ASSIGN_TAB_2[2]=2
$MC_TRANSMIT_BASE_TOOL_2[0]=4.0
$MC_TRANSMIT_BASE_TOOL_2[1]=0.0
$MC_TRANSMIT_BASE_TOOL_2[2]=0.0
$MC_TRANSMIT_ROT_AX_OFFSET_2=19.0
Basic Functions
728 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K2: Axis Types, Coordinate Systems, Frames
9.5 Frames
$MC_TRANSMIT_ROT_SIGN_IS_PLUS_2=TRUE
$MC_TRANSMIT_ROT_AX_FRAME_2=1
Part program:
; Frame settings
N820 $P_UIFR[1] = ctrans(x,1,y,2,z,3,c,4)
N830 $P_UIFR[1] = $P_UIFR[1] : crot(x,10,y,20,z,30)
N840 $P_UIFR[1] = $P_UIFR[1] : cmirror(x,c)
N850
N860 $P_CHBFR[0] = ctrans(x,10,y,20,z,30,c,15)
N870
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 729
K2: Axis Types, Coordinate Systems, Frames
9.5 Frames
N1140 endif
N1180 if $P_IFRAME <>
CTRANS(X,1,Y,0,Z,2,CAZ,3,C,4):CROT(X,10,Y,20,Z,30):CMIRROR(X,C)
N1190 setal(61000)
N1200 endif
N1240 if $P_ACTFRAME <>
CTRANS(X,11,Y,0,Z,22,CAZ,33,C,19):CROT(X,10,Y,20,Z,30):CMIRROR(X,C)
N1250 setal(61001)
N1260 endif
N1270
N1280
N1290 $P_UIFR[1,x,tr] = 11
N1300 $P_UIFR[1,y,tr] = 14
N1310
N1320 g54
N1330
; Set frame
N1350 ROT RPL=-45
N1360 ATRANS X-2 Y10
N1370
; Four-edge roughing
N1390 G1 X10 Y-10 G41 OFFN=1; allowance 1 mm
N1400 X-10
N1410 Y10
N1420 X10
N1430 Y-10
N1440
; Tool change
N1460 G0 Z20 G40 OFFN=0
N1470 T3 D1 X15 Y-15
N1480 Z10 G41
N1490
; Four-edge finishing
N1510 G1 X10 Y-10
N1520 X-10
N1530 Y10
N1540 X10
N1550 Y-10
Basic Functions
730 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K2: Axis Types, Coordinate Systems, Frames
9.5 Frames
N1560
; Deselect frame
N2950 m30 N1580 Z20 G40
N1590 TRANS
N1600
N1610 if $P_BFRAME <> CTRANS(X,10,Y,0,Z,20,CAZ,30,C,15)
N1620 setal(61000)
N1630 endif
N1640 if $P_BFRAME <> $P_CHBFR[0]
N1650 setal(61000)
N1660 endif
N1670 if $P_IFRAME <>
TRANS(X,11,Y,0,Z,2,CAZ,3,C,4):CROT(X,10,Y,20,Z,30):CMIRROR(X,C)
N1680 setal(61000)
N1690 endif
N1730 if $P_ACTFRAME <>
TRANS(X,21,Y,0,Z,22,CAZ,33,C,19):CROT(X,10,Y,20,Z,30):CMIRROR(X,C)
N1740 setal(61001)
N1750 endif
N1760
N1770 TRAFOOF
N1780
N1790 if $P_BFRAME <> CTRANS(X,10,Y,20,Z,30,C,15)
N1800 setal(61000)
N1810 endif
N1820 if $P_BFRAME <> $P_CHBFR[0]
N1830 setal(61000)
N1840 endif
N1850 if $P_IFRAME <>
TRANS(X,11,Y,2,Z,3,C,4):CROT(X,10,Y,20,Z,30):CMIRROR(X,C)
N1860 setal(61000)
N1870 endif
N1880 if $P_IFRAME <> $P_UIFR[1]
N1890 setal(61000)
N1900 endif
N1910 if $P_ACTFRAME <>
TRANS(X,21,Y,22,Z,33,C,19):CROT(X,10,Y,20,Z,30):CMIRROR(X,C)
N1920 setal(61002)
N1930 endif
N1940
N2010 $P_UIFR[1] = ctrans()
N2011 $P_CHBFR[0] = ctrans()
N2020 $P_UIFR[1] = ctrans(x,1,y,2,z,3,c,0)
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 731
K2: Axis Types, Coordinate Systems, Frames
9.5 Frames
N2021 G54
N2021 G0 X20 Y0 Z10 C0
N2030 TRANSMIT(1)
N2040 TRANS x10 y20 z30
N2041 ATRANS y200
N2050 G0 X20 Y0 Z10
N2051 if $P_IFRAME <> CTRANS(X,1,Y,0,Z,3,CAY,2)
N2052 setal(61000)
N2053 endif
N2054 if $P_ACTFRAME <> CTRANS(X,11,Y,20,Z,33,CAY,2):CFINE(Y,200)
N2055 setal(61002)
N2056 endif
N2060 TRAFOOF
N2061 if $P_IFRAME <> $P_UIFR[1]
N2062 setal(61000)
N2063 endif
N2064 if $P_ACTFRAME <> CTRANS(X,11,Y,2,Z,33):CFINE(Y,0)
N2065 setal(61002)
N2066 endif
TRACYL
&
[
'LDPHWHUG
TRACYL expansions:
The machine data below can be used to take the axial complete frame of the TRACYL rotary
axis, i.e., the translation, fine offset, mirroring and scaling, into account in the transformation:
MD24805 $MC_TRACYL_ROT_AX_FRAME_1 = 1
MD24855 $MC_TRACYL_ROT_AX_FRAME_2 = 1
Basic Functions
732 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K2: Axis Types, Coordinate Systems, Frames
9.5 Frames
A rotary axis offset can, for example, be entered by compensating the oblique position of a
workpiece in a frame within a frame chain. As a rule, this offset can also be included in the
transformation as an offset in the rotary axis or as a y offset. A c axis offset, as in the figure
above, then leads to corresponding x and y values.
MD24805 $MC_TRACYL_ROT_AX_FRAME_1 = 2
MD24855 $MC_TRACYL_ROT_AX_FRAME_2 = 2
With this setting, the axial offset of the rotary axis is taken account of in the transformation
up to the SZS. The axial offsets of the rotary axis included in the SZS frames are entered
into the transformation frame as offsets on the peripheral surface. This setting is only
effective if the transformation frame has been configured.
Frame expansions:
The expansions described below are only valid for the following machine data settings:
MD10602 $MN_FRAME_GEOAX_CHANGE_MODE = 1
MD10602 $MN_FRAME_GEOAX_CHANGE_MODE = 2
The selection of transformation TRACYL produces a virtual geometry axis on the peripheral
surface, coupled via the rotary axis, which is only taken into account in the contour frame but
does not have a reference to an axial frame. All components of the virtual geometry axis are
deleted. All other geometry axes accept their axial components when the transformation is
selected.
Translations:
When selecting TRACYL, translations of the virtual axis are deleted. Translations of the
rotary axis can be taken into account in the transformation.
Rotations:
Rotation before the transformation is taken over.
Mirroring:
Mirroring of the virtual axis is deleted. Mirroring of the rotary axis can be taken into account
in the transformation.
Scaling:
Scaling of the virtual axis is deleted. Scaling of the rotary axis can be taken into account in
the transformation.
Example:
Machine data for TRACYL:
; FRAME configurations
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 733
K2: Axis Types, Coordinate Systems, Frames
9.5 Frames
$MN_MM_NUM_GLOBAL_USER_FRAMES = 0
$MN_MM_NUM_GLOBAL_BASE_FRAMES = 3
$MN_NCBFRAME_RESET_MASK = 'HFF'
$MC_CHBFRAME_RESET_MASK = 'HFF'
$MC_TRAFO_AXES_IN_3[0] = 1
$MC_TRAFO_AXES_IN_3[1] = 5
$MC_TRAFO_AXES_IN_3[2] = 3
$MC_TRAFO_AXES_IN_3[3] = 2
$MC_TRAFO_GEOAX_ASSIGN_TAB_3[0] = 1
$MC_TRAFO_GEOAX_ASSIGN_TAB_3[1] = 5
$MC_TRAFO_GEOAX_ASSIGN_TAB_3[2] = 3
$MC_TRACYL_BASE_TOOL_1[0] = 0.0
$MC_TRACYL_BASE_TOOL_1[1] = 0.0
$MC_TRACYL_BASE_TOOL_1[2] = 0.0
$MC_TRACYL_ROT_AX_OFFSET_1 = 0.0
$MC_TRACYL_ROT_SIGN_IS_PLUS_1 = TRUE
$MC_TRACYL_ROT_AX_FRAME_1 = 1
Basic Functions
734 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K2: Axis Types, Coordinate Systems, Frames
9.5 Frames
Part program:
; Frame settings
N500 $P_UIFR[1] = ctrans(x,1,y,2,z,3,b,4)
N510 $P_UIFR[1] = $P_UIFR[1] : crot(x,10,y,20,z,30)
N520 $P_UIFR[1] = $P_UIFR[1] : cmirror(x,b)
N530
N540 $P_CHBFR[0] = ctrans(x,10,y,20,z,30,b,15)
N550
N560 G54
N570
; Transformation ON
N780 TRACYL(40.)
N790
N800 if $P_BFRAME <> CTRANS(X,10,Y,0,Z,30,CAY,20,B,15)
N810 setal(61000)
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 735
K2: Axis Types, Coordinate Systems, Frames
9.5 Frames
N820 endif
N830 if $P_CHBFR[0] <> CTRANS(X,10,Y,0,Z,30,CAY,20,B,15)
N840 setal(61000)
N850 endif
N860 if $P_IFRAME <>
TRANS(X,1,Y,0,Z,3,CAY,2,B,4):CROT(X,10,Y,20,Z,30):CMIRROR(X,B)
N870 setal(61000)
N880 endif
N890 if $P_UIFR[1] <>
TRANS(X,1,Y,0,Z,3,CAY,2,B,4):CROT(X,10,Y,20,Z,30):CMIRROR(X,B)
N900 setal(61000)
N910 endif
N920 if $P_ACTFRAME <>
TRANS(X,11,Y,0,Z,33,CAY,22,B,19):CROT(X,10,Y,20,Z,30):CMIRROR(X,B)
N930 setal(61001)
N940 endif
N950
N960 $P_UIFR[1,x,tr] = 11
N970 $P_UIFR[1,y,tr] = 14
N980
N990 g54
N1000
N1010 if $P_BFRAME <> CTRANS(X,10,Y,0,Z,30,CAY,20,B,15)
N1020 setal(61000)
N1030 endif
N1040 if $P_BFRAME <> $P_CHBFR[0]
N1050 setal(61000)
N1060 endif
N1070 if $P_IFRAME <>
TRANS(X,11,Y,0,Z,3,CAY,2,B,4):CROT(X,10,Y,20,Z,30):CMIRROR(X,B)
N1080 setal(61000)
N1090 endif
N1100 if $P_IFRAME <> $P_UIFR[1]
N1110 setal(61000)
N1120 endif
N1130 if $P_ACTFRAME <>
TRANS(X,21,Y,0,Z,33,CAY,22,B,19):CROT(X,10,Y,20,Z,30):CMIRROR(X,B)
N1140 setal(61001)
N1150 endif
N1160
; Transformation off
N1180 TRAFOOF
N1190
Basic Functions
736 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K2: Axis Types, Coordinate Systems, Frames
9.5 Frames
TRAANG
Frame expansions:
The expansions described below are only valid for the following machine data settings:
MD10602 $MN_FRAME_GEOAX_CHANGE_MODE = 1
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 737
K2: Axis Types, Coordinate Systems, Frames
9.5 Frames
MD10602 $MN_FRAME_GEOAX_CHANGE_MODE = 2
Translations:
When selecting TRAANG, translations of the virtual axis are deleted.
Rotations:
Rotation before the transformation is taken over.
Mirroring:
Mirrorings of the virtual axis are taken over.
Scaling:
Scalings of the virtual axis are taken over.
Example:
Machine data for TRAANG:
; FRAME configurations
$MN_MM_NUM_GLOBAL_USER_FRAMES = 0
$MN_MM_NUM_GLOBAL_BASE_FRAMES = 3
$MN_NCBFRAME_RESET_MASK = 'HFF'
$MC_CHBFRAME_RESET_MASK = 'HFF'
Basic Functions
738 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K2: Axis Types, Coordinate Systems, Frames
9.5 Frames
$MC_TRAFO_TYPE_1 = 1024
$MC_TRAFO_GEOAX_ASSIGN_TAB_1[0]=4
$MC_TRAFO_GEOAX_ASSIGN_TAB_1[1]=2
$MC_TRAFO_GEOAX_ASSIGN_TAB_1[2] = 3
$MC_TRAANG_ANGLE_1 = 85.
$MC_TRAANG_PARALLEL_VELO_RES_1 = 0.
$MC_TRAANG_PARALLEL_ACCEL_RES_1 = 0.
$MC_TRAANG_BASE_TOOL_1[0] = 0.0
$MC_TRAANG_BASE_TOOL_1[1] = 0.0
$MC_TRAANG_BASE_TOOL_1[2] = 0.0
$MC_TRAFO_TYPE_2 = 1024
$MC_TRAFO_AXES_IN_2[0] = 4
$MC_TRAFO_AXES_IN_2[1] = 3
$MC_TRAFO_AXES_IN_2[2] = 0
$MC_TRAFO_AXES_IN_2[3] = 0
$MC_TRAFO_AXES_IN_2[4] = 0
$MC_TRAFO_GEOAX_ASSIGN_TAB_2[0] = 4
$MC_TRAFO_GEOAX_ASSIGN_TAB_2[1] = 0
$MC_TRAFO_GEOAX_ASSIGN_TAB_2[2] = 3
$MC_TRAANG_ANGLE_2 = -85.
$MC_TRAANG_PARALLEL_VELO_RES_2 = 0.2
$MC_TRAANG_PARALLEL_ACCEL_RES_2 = 0.2
$MC_TRAANG_BASE_TOOL_2[0] = 0.0
$MC_TRAANG_BASE_TOOL_2[1] = 0.0
$MC_TRAANG_BASE_TOOL_2[2] = 0.0
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 739
K2: Axis Types, Coordinate Systems, Frames
9.5 Frames
Part program:
; Frame settings
N820 $P_UIFR[1] = ctrans(x,1,y,2,z,3,b,4,c,5)
N830 $P_UIFR[1] = $P_UIFR[1] : crot(x,10,y,20,z,30)
N840 $P_UIFR[1] = $P_UIFR[1] : cmirror(x,c)
N850
N860 $P_CHBFR[0] = ctrans(x,10,y,20,z,30,b,40,c,15)
N870
Basic Functions
740 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K2: Axis Types, Coordinate Systems, Frames
9.5 Frames
; Set frame
N1350 ROT RPL=-45
N1360 ATRANS X-2 Y10
N1370
; Four-edge roughing
N1390 G1 X10 Y-10 G41 OFFN=1; allowance 1 mm
N1400 X-10
N1410 Y10
N1420 X10
N1430 Y-10
N1440
; Tool change
N1460 G0 Z20 G40 OFFN=0
N1470 T3 D1 X15 Y-15
N1480 Z10 G41
N1490
; Four-edge finishing
N1510 G1 X10 Y-10
N1520 X-10
N1530 Y10
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 741
K2: Axis Types, Coordinate Systems, Frames
9.5 Frames
N1540 X10
N1550 Y-10
N1560
; Deselect frame
N1580 Z20 G40
N1590 TRANS
N1600
N1610 if $P_BFRAME <> CTRANS(X,10,Y,20,Z,30,CAX,10,B,40,C,15)
N1620 setal(61000)
N1630 endif
N1640 if $P_BFRAME <> $P_CHBFR[0]
N1650 setal(61000)
N1660 endif
N1670 if $P_IFRAME <>
TRANS(X,11,Y,14,Z,3,CAX,1,B,4,C,5):CROT(X,10,Y,20,Z,30):CMIRROR(X,CAX,C)
N1680 setal(61000)
N1690 endif
N1700 if $P_IFRAME <> $P_UIFR[1]
N1710 setal(61000)
N1720 endif
N1730 if $P_ACTFRAME <>
TRANS(X,21,Y,34,Z,33,CAX,11,B,44,C,20):CROT(X,10,Y,20,Z,30):CMIRROR(X,CAX,C)
N1740 setal(61001)
N1750 endif
N1760
N1770 TRAFOOF
N1780
N1790 if $P_BFRAME <> CTRANS(X,10,Y,20,Z,30,B,40,C,15)
N1800 setal(61000)
N1810 endif
N1820 if $P_BFRAME <> $P_CHBFR[0]
N1830 setal(61000)
N1840 endif
N1850 if $P_IFRAME <>
TRANS(X,1,Y,14,Z,3,B,4,C,5):CROT(X,10,Y,20,Z,30):CMIRROR(X,C)
N1860 setal(61000)
N1870 endif
N1880 if $P_IFRAME <> $P_UIFR[1]
N1890 setal(61000)
N1900 endif
N1910 if $P_ACTFRAME <>
TRANS(X,11,Y,34,Z,33,B,44,C,20):CROT(X,10,Y,20,Z,30):CMIRROR(X,C)
N1920 setal(61002)
Basic Functions
742 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K2: Axis Types, Coordinate Systems, Frames
9.5 Frames
N1930 endif
N1940
N1950 m30
Bit 0: Rotations in active frames, which rotate coordinate axes with no geometry axes,
are deleted from the active frames.
Bit 1: Shear angles in the active frames are orthogonalized.
Bit 2: Scalings of all geometry axes in the active frames are set to value 1.
With machine data setting
MD24040 $MC_FRAME_ADAPT_MODE = 1
, all rotations in the active frames, which could produce coordinate axis movements for non-
existent geometry axes, are deleted.
The data management frames are not changed. Only the possible rotations are applied
when the data management frames are activated.
Example:
No y axis exists:
MD20050 $MC_AXCONF_GEOAX_ASSIGN_TAB[0] = 1
MD20050 $MC_AXCONF_GEOAX_ASSIGN_TAB[1] = 0
MD20050 $MC_AXCONF_GEOAX_ASSIGN_TAB[2] = 3
$P_UIFR[1] = crot(x,45,y,45,z,45)
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 743
K2: Axis Types, Coordinate Systems, Frames
9.5 Frames
Overview
The "mapped frames" function supports the cross-channel consistent change of axial frames
inside channel-specific or global data management frames. Using axial machine data, it is
defined between which axes mapping is realized.
If frame mapping is, e.g. active for machine axes AX1 and AX4, and the axial frame of axis
AX1 is changed in a channel-specific data management frame (e.g. basic frame
$P_CHBFR[x]) (translation, fine translation, scaling, mirroring), then this frame data for AX1
and AX4 is transferred to all channel-specific data management frames (e.g. basic frame
$P_CHBFR[x]) in all channels in which they are parameterized as channel axes.
Frame mapping is not realized when changing the axial frame data for the rotation.
Preconditions
The following requirements must be fulfilled for frame mapping:
● The data management frames used for mapping must be configured:
MD28083 $MC_MM_SYSTEM_DATAFRAME_MASK (system frames)
● Channel-specific data management frames must be explicitly enabled for mapping:
MD10616 $MN_MAPPED_FRAME_MASK (enable frame mapping)
Note
For global data management frames, mapping is always carried out. An enable is not
required.
Parameterization
The parameterization of the mapping relationships is realized in the axis-specific machine
data:
MD32075 $MA_MAPPED_FRAME[<AXn>] = "AXm"
AXn, AXm: Machine axis name with n, m = 1, 2, ... max. number of machine axes
Basic Functions
744 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K2: Axis Types, Coordinate Systems, Frames
9.5 Frames
Mapping rules
The following rules apply for frame mapping:
● The mapping is bidirectional.
An axial frame can be written for AXn or AXm. The frame data is always accepted and
taken for the other axis.
● All parameterized mapping relationships are always evaluated.
When writing an axial frame of axes AXn, all mapping relationships are evaluated and the
frame data accepted for all directly and indirectly involved axes.
● The mapping is global across all channels.
When writing an axial frame of axis AXn or AXm for a channel-specific frame, the frame
data is accepted for all channels in which AXn or AXm are parameterized as channel
axes.
● When writing an axial frame using geometry or special axis name, the mapping
relationships are evaluated via the machine axes currently assigned to the geometry or
special axis.
● Mapping is frame-specific.
When writing an axial frame, the frame data is only mapped within the same channel-
specific or global data management frame.
Note
Data consistency
The user / machine manufacturer is solely responsible for ensuring that after a frame is
written, consistent frame data is available in all channels, e.g. by using channel
synchronization.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 745
K2: Axis Types, Coordinate Systems, Frames
9.5 Frames
; $; ; $;
([SOLFLWPDSSLQJ
< $; < $;
,PSOLFLWPDSSLQJ
Basic Functions
746 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K2: Axis Types, Coordinate Systems, Frames
9.5 Frames
Example
The following channels and channel axes are parameterized at a control:
● Channel 1
– Z: Geometry axis
– AX1: Machine axis of geometry axis Z
● Channel 2
– Z: Geometry axis
– AX4: Machine axis of geometry axis Z
The zero point of the Z axis should always be the same in both channels:
● Mapping relationship: $MA_MAPPED_FRAME[AX1] = "AX4"
Programming in the part program
Channel 1 Channel 2
... ...
N100 WAIT (10,1,2) N200 WAIT (10,1,2)
N110 $P_UIFR[1] = CTRANS(Z, 10)
N120 WAIT (20,1,2) N220 WAIT (20,1,2)
N130 G54 N230 G54
N140 IF ($P_IFRAME[0, Z, TR] <> 10) N230 IF ($P_IFRAME[0, Z, TR] <> 10)
N150 SETAL(61000) N250 SETAL(61000)
N160 ENDIF N260 ENDIF
... ...
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 747
K2: Axis Types, Coordinate Systems, Frames
9.5 Frames
Description:
N100 / N200 Channel synchronization for consistent writing and mapping of frame data
N110 Writing of the settable data management frame $P_UIFR[1]:
Moving the zero point of the Z axis to 10 mm
Mapping the axial frame data:
Channel 1: Z ≙ AX1 ⇔ channel 2: Z ≙ AX4
N120 / N220 Channel synchronization for consistent activation of new frame data
N130 / N230 Activating the new frame data
N140 / N240 Checking the zero point of the Z axis for: 10 mm
Basic Functions
748 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K2: Axis Types, Coordinate Systems, Frames
9.5 Frames
$TC_DP1[1,1]=120 ; Type
$TC_DP2[1,1]=20.;0
$TC_DP3[1,1]= 10. ; (z) length compensation vector
$TC_DP4[1,1]= 0. ; (y)
$TC_DP5[1,1]= 0. ; (x)
$TC_DP6[1,1]= 2. ; Radius
T1 D1
g0 x0 y0 z0 f10000
G54
$P_CHBFRAME[0] = crot(z,45)
$P_IFRAME[x,tr] = -sin(45)
$P_IFRAME[y,tr] = -sin(45)
$P_PFRAME[z,rt] = -45
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 749
K2: Axis Types, Coordinate Systems, Frames
9.5 Frames
;Select tool
$AC_MEAS_T_NUMBER = 1
$AC_MEAS_D_NUMBER = 1
Basic Functions
750 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K2: Axis Types, Coordinate Systems, Frames
9.5 Frames
if RETVAL <> 0
setal(61000 + RETVAL)
endif
if $AC_MEAS_WP_ANGLE <> 30
setal(61000 + $AC_MEAS_WP_ANGLE)
endif
if $AC_MEAS_CORNER_ANGLE <> 90
setal(61000 + $AC_MEAS_CORNER_ANGLE)
endif
; Transform measured frame and write in accordance with $P_SETFRAME in such a way
; that a complete frame is produced, as a result of the old complete frame
; being chained with the measuring frame.
m30
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 751
K2: Axis Types, Coordinate Systems, Frames
9.5 Frames
Programming
Basic Functions
752 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K2: Axis Types, Coordinate Systems, Frames
9.5 Frames
9.5.8 Functions
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 753
K2: Axis Types, Coordinate Systems, Frames
9.5 Frames
Activation
The activation of the external zero offset takes place through the interface signal:
DB31, ... DBX3.0 (accept external zero offset)
Behavior
Upon activation of the external zero offset the traversing movements of all axes, except
command and PLC axes, are stopped immediately and the advance is reorganized. The
rough offset of the current system frame and of the system frame in data management is set
to the value of the axial system variable $AA_ETRANS[<axis>]. Thereafter, the offset is
traversed first and then the interrupted movement is continued.
Behavior for incremental dimension
In case of active incremental dimension G91 and machine data:
MD42440 $MC_FRAME_OFFSET_INCR_PROG (zero offset in frames) = 0
traversing the offset is done in the scope of the external zero offset via system frame,
despite opposite configuring of the machine data, with the approach block, although it is
specified by a frame.
Note
The external zero offset always acts absolutely.
9.5.8.3 Toolholder
Translations
With kinematics of type "P" and "M", the selection of a toolholder activates an additive frame
(table offset of the orientable toolholder) which takes into account the zero offset as a result
of the rotation of the table. The zero offset is entered in the system frame $P_PARTFR. In this
case the translatory component of this frame is overwritten. The other frame components are
retained.
The system frame $P_PARTFR must be enabled via the following machine data:
MD28082 $MC_MM_SYSTEM_FRAME_MASK, bit 2 = 1 (system frame for TCARR and
PAROT)
Note
Alternatively, the offset can also parameterized via machine data to record the the table
offset:
MD20184 $MC_TOCARR_BASE_FRAME_NUMBER = <number of the basic frame>
This option is only for compatibility reasons to older software versions. You are strongly
recommended not to use this procedure any longer.
Basic Functions
754 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K2: Axis Types, Coordinate Systems, Frames
9.5 Frames
A frame rotation does not take place on activation, and a rotation which is already active is
not changed. As in case T (only the tool can be rotated), the position of the rotary axes used
for the calculation is dependent on the command TCOFR / TCOABS and determined from the
rotation component of an active frame or from the entries $TC_CARRn. Activation of a frame
changes the position in the workpiece coordinate system accordingly, without compensating
motion by the machine itself.
The ratios are shown in the figure below:
2ULJLQDOSRVLWLRQRIWKH
FRRUGLQDWHV\VWHP
2ULJLQDOSRVLWLRQRIWDEOH
3RVLWLRQRIFRRUGLQDWHV\VWHP
DIWHU3$527
3RVLWLRQRIFRRUGLQDWHV\VWHP
DIWHU7&$55
3RVLWLRQRIWDEOH
DIWHUURWDWLRQ
With kinematics of type M (tool and table are each rotary around one axis), the activation of
a toolholder with TCARR simultaneously produces a corresponding change in the effective tool
length (if a tool is active) and the zero offset.
Rotations
Depending on the machining task, it is necessary to take into account not only a zero offset
(whether as frame or as tool length) when using a rotary toolholder or table, but also a
rotation. However, the activation of a toolholder with orientation capability never leads
directly to a rotation of the coordinate system.
If only the tool can be rotated, a frame can be defined for it using TOFRAME or TOROT.
With rotary tables (kinematics types P and M), activation with TCARR similarly does not lead to
an immediate rotation of the coordinate system, i.e. even though the zero point of the
coordinate system is offset relative to the machine, while remaining fixed relative to the zero
point of the workpiece, the orientation remains unchanged in space.
If the coordinate system needs to be fixed relative to the workpiece, i.e. not only offset
relative to the original position but also rotated according to the rotation of the table, then
PAROT can be used to activate such a rotation in a similar manner to the situation with a rotary
tool.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 755
K2: Axis Types, Coordinate Systems, Frames
9.5 Frames
With PAROT, the translations, scalings and mirroring in the active frame are retained, but the
rotation component is rotated by the rotation component of an orientational toolholder
corresponding to the table. The entire programmable frame including its rotation component
remains unchanged.
The rotation component that describes the rotation of the table is then either entered in the
system frame $PARTFR or in the basic frame parameterized with MD20184
$MC_TOCARR_BASE_FRAME_NUMBER:
$MC_MM_SYSTEM_FRAME_MASK, bit 2 = <value>
Value Meaning
1 Rotation component → $PARTFR
0 Rotation component → MD20184 $MC_TOCARR_BASE_FRAME_NUMBER
As with the note made in the description of the table offset, the second alternative here is not
recommended for use with new systems.
The rotation component of the part frame can be deleted with PAROTOF, irrespective of
whether this frame is in a basic or a system frame.
The translation component is deleted when a toolholder which does not produce an offset is
activated or a possibly active orientable toolholder is deselected with TCARR=0.
PAROT or TOROT take into account the overall orientation change in cases where the table or
the tool are oriented with two rotary axes. With mixed kinematics only the corresponding
component caused by a rotary axis is considered. It is thus possible, for example, when
using TOROT, to rotate a workpiece such that an inclined plane lies parallel to the XY plane
fixed in space, whereby rotation of the tool must be taken into account in machining where
any holes to be drilled, for example, are not perpendicular to this plane.
Example
On a machine, the rotary axis of the table points in the positive Y direction. The table is
rotated by +45 degrees. PAROT defines a frame which similarly describes a rotation of 45
degrees around the Y axis. The coordinate system is not rotated relative to the actual
environment (marked in the figure with "Position of the coordinate system after TCARR"), but
is rotated by -45 degrees relative to the defined coordinate system (position after PAROT). If
this coordinate system is defined with ROT Y-45, for example, and if the toolholder is then
selected with active TCOFR, an angle of +45 degrees will be determined for the rotary axis of
the toolholder.
Language command PAROT is not rejected if no toolholder with orientation capability is active.
However, such a call then produces no frame changes.
Basic Functions
756 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K2: Axis Types, Coordinate Systems, Frames
9.5 Frames
Instead of MOVT= ... it is also possible to write MOVT=IC( ...) if it is to be plainly visible that
MOVT is to function incrementally. There is no functional difference between the two forms.
If the motion is programmed in the form MOVT=AC( ...), MOVT functions absolutely.
In this case a plane is defined which runs through the current zero point, and whose surface
normal vector is parallel to the tool orientation. MOVT then gives the position relative to this
plane (see figure). The reference plane is only used to calculate the end position. Active
frames are not affected by this internal calculation.
$X[LOLDU\SODQH
Programming with MOVT is independent of the existence of a toolholder that can be oriented.
The direction of the motion is dependent on the active plane.
It runs in the directions of the vertical axes, i.e. with G17 in Z direction, with G18 in Y direction
and with G19 in X direction. This applies when no orientable toolholder is active and for the
case of an orientable toolholder without rotary tool or with a rotary tool in its basic setting.
MOVT acts similarly for active orientation transformation (3-, 4-, 5-axis transformation).
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 757
K2: Axis Types, Coordinate Systems, Frames
9.5 Frames
If in a block with MOVT the tool orientation is changed simultaneously (e.g. active 5-axis
transformation by means of simultaneous interpolation of the rotary axes), the orientation at
the start of the block is decisive for the direction of motion of MOVT.
With an active 5-axis transformation, the path of the tool center point (TCP) is not affected by
the change of orientation, i.e. the path remains a straight line and its direction is determined
by the tool orientation at the start of the block.
If MOVT is programmed, linear or spline interpolation must be active (G0,G1, ASPLINE, BSPLINE,
CSPLINE). Otherwise, an alarm is produced.
If a spline interpolation is active, the resultant path is generally not a straight line, since the
end point calculated by MOVT is treated as if it had been programmed explicitly with X, Y, Z.
A block with MOVT must not contain any programming of geometry axes (alarm 14157).
In workpiece drawings, inclined surfaces are frequently described by way of solid angles, i.e.
the angles which the intersection lines of the inclined plane form with the main planes (X-Y,
Y-Z, Z-X planes) (see figure). The machine operator is not expected to convert these solid
angles into the angles of rotation of a chaining of individual rotations.
$ % &
] ] ]
\ \
\
]
\
]
\
[
[ [ [
\
① Inclined plane
Basic Functions
758 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K2: Axis Types, Coordinate Systems, Frames
9.5 Frames
For this reason, the language commands ROTS, AROTS and CROTS are used, with which the
rotations can be immediately described as solid angles.
The orientation of a plane in space is defined unambiguously by specifying two solid angles.
The third solid angle is derived from the first two. Therefore, a maximum of two solid angles
may be programmed, e.g. in the form ROTS X10 Y15. If a third solid angle is specified, an
alarm will be triggered.
It is permissible to specify a single solid angle. The rotations which are performed with ROTS
or AROTS in this case are identical to those for ROT and AROT.
An expansion of the existing functionality arises only in cases where exactly two solid angles
are programmed.
The two programmed axes define a plane, the non-programmed axis defines the related
third axis of a right-hand coordinate system. Which axis is first and which second is then
unambiguously defined for both programmed axes (the definition corresponds to those found
in the plane definition of G17/G18/G19). The angle programmed with the axis letter of an axis
of the plane then specifies the axis, around which the other axis of the plane must be rotated
in order to move this into the line of intersection, which the rotated plane forms with the plane
surrounded by the other and the third axis. This definition ensures that, in the case that one
of the two programmed angles is towards zero, the defined plane enters the plane, which is
created if only one axis is programmed (e.g. with ROT or AROT).
The diagram shows an example where X and Y are programmed. Y specifies the angle here,
through which the X axis must rotate around the Y axis to bring the X axis to the line of
intersection formed by the inclined plane and the X-Z plane. The same principle applies for
the programmed value of X.
Note
In the shown position of the inclined plane the value of Y is positive, that of X on the other
hand negative.
The specification of the solid angle does not define the orientation of the two-dimensional
coordinate system within the plane (i.e. the angle of rotation around the surface normal
vector). The position of the coordinate system is thus determined so that the rotated first axis
lies in the plane which is formed by the first and third axes of the non-rotated coordinate
system.
This means that
● When programming X and Y the new X axis lies in the old Z-X plane.
● When programming Z and X the new Z axis lies in the old Y-Z plane.
● When programming Y and Z the new Y axis lies in the old X-Y plane.
If the required coordinate system does not correspond to this basic setting, then an
additional rotation must be performed with AROT....
The programmed solid angles are converted to the equivalent Euler angles according to the
zy'x" convention (RPY angle) or zx'z" convention when entering depending on the machine
data:
MD10600 $MN_FRAME_ANGLE_INPUT_MODE.
These then appear in the display.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 759
K2: Axis Types, Coordinate Systems, Frames
9.5 Frames
The appropriate frames can be defined with these commands. The functions of TOFRAME and
TOFRAMEZ or of TOROT and TOROTZ are identical to one another.
The frames resulting from TOROT or TOFRAME can be written in a separate system frame
($P_TOOLFR). The programmable frame is then retained unchanged.
● Requirement: MD28082 $MC_MM_SYSTEM_FRAME_MASK, bit 3 = 1
When programming TOROT or TOFRAME, etc. response is identical, with or without a system
frame. Differences occur when the programmable frame is processed further elsewhere.
Note
In new systems, it is recommended that only the intended system frame is used for frames
produced by the commands of G group 53.
Example
TRANS is programmed after TOROT. TRANS without specified parameters deletes the
programmable frame. In the variant without a system frame, this also deletes the frame
component of the programmable frame produced by TOROT, but if the TOROT component is in
the system frame, it is retained.
TOROT or TOFRAME, etc. are disabled with language command TOROTOF. TOROTOF deletes the
entire system frame $P_TOOLFR. If the programmable frame (old variant) and not the
system frame is described by commands TOFRAME, etc. TOROT only deletes the rotation
component and leaves the remaining frame components unchanged.
Basic Functions
760 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K2: Axis Types, Coordinate Systems, Frames
9.5 Frames
If a rotating frame is already active before language command TOFRAME or TOROT is activated,
a request is often made that the newly defined frame should deviate as little as possible from
the old frame. This is the case, for example, if a frame definition needs to be modified slightly
because the tool orientation cannot be set freely on account of Hirth-toothed rotary axes.
The language commands uniquely define the Z direction of the new frame.
Value Meaning
1 The new X direction is chosen to lie in the X-Z plane of the old coordinate system. In this
setting, the angle difference between the old and new Y axis will be minimal.
2 The new Y direction is chosen to lie in the Y-Z plane of the old coordinate system. In this
setting the angle difference between the old and new X axis will be minimal.
3 The value chosen is the mean value of the two settings, which would have been chosen with
1 and 2.
A detailed description of all parameterization options can be found in:
References
Detailed Machine Data Description
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 761
K2: Axis Types, Coordinate Systems, Frames
9.5 Frames
Example
N90 $SC_TOFRAME_MODE=1
N100 ROT Z45
N110 TCARR=1 TCOABS T1 D1
N120 TOROT
N100 describes a rotation by 45 degrees in the X-Y plane. It is assumed that the toolholder
activated in N110 rotates the tool by 30 degrees around the X axis, i.e. the tool lies in the Y-Z
plane and is rotated by 30 degrees relative to the Z axis. As a result the Z axis of the frame
newly defined in N120 also points in this direction (independently of the value in setting data
SD42980 $SC_TOFRAME_MODE in N90).
SD42980 $SC_TOFRAME_MODE == 1:
[[
The old and new X axes X and X' coincide in the projection in the direction of the old Z axis.
The old and new Y axes Y and Y' form an angle of 8.13 degrees (right angles are generally
not retained in the projection).
SD42980 $SC_TOFRAME_MODE == 2:
Y and Y' coincide and X and X' form an angle of 8.13 degrees.
Basic Functions
762 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K2: Axis Types, Coordinate Systems, Frames
9.5 Frames
SD42980 $SC_TOFRAME_MODE == 3:
X and X' and well as Y and Y' each form an angle of 4.11 degrees.
Note
The named angles (8.13 and 4.11 degrees) are the angles, which the projections of the axes
form in the X-Y plane. They are not the spatial angles of these axes.
TCARR (request toolholder) and PAROT (align workpiece coordinate system on the workpiece)
uses the basic frame identified by following machine data:
TCARR
MD20184 $MC_TOCARR_BASE_FRAME_NUMBER.
A system frame can be created for TCARR and PAROT alone, in order to avoid conflicts with
systems, which already use all the basic frames.
PAROT, TOROT and TOFRAME have previously changed the rotation component of the
programmable frames. In this case, it is not possible to shut down PAROT or TOROT separately.
On RESET, the programmable frame is deleted, which means that after changing the
operating mode to JOG, the rotation component of PAROT and TOROT is no longer available.
The user must also have unrestricted access to the programmable frame. Frames produced
by PAROT and TOROT must be able to be archived and reloaded via data backup.
The system frame for TCARR and PAROT is configured with:
MD28082 $MC_MM_SYSTEM_FRAME_MASK, bit 2 = 1
The following machine data is then no longer evaluated:
MD20184 $MC_TOCARR_BASE_FRAME_NUMBER
If the system frame for TCARR is configured, TCARR and PAROT describe that corresponding
system frame; otherwise the basic frame identified by machine data MD20184 is described.
With kinematics systems of the types P and M, TCARR will enter the table offset of the
orientational toolholder (zero offset resulting from the rotation of the table) as a translation
into the system frame. PAROT converts the system frame so that a workpiece-related WCS
results.
The system frames are stored retentively and therefore retained after a reset. The system
frames also remain active in the case of a mode change.
For the display, the commands PAROT and TOROT, TOFRAME are each assigned to a separate G
code group.
PAROTOF
PAROTOF is the switch off command for PAROT. This command deletes the rotations in the
system frame for PAROT. In so doing, the rotations in the current $P_PARTFRAME and in the
data management frame $P_PARTFR are deleted. The position of the coordinate system is
then recreated according to TCARR. PAROTOF is in the same G group as PAROT and appears
therefore in the G code display.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 763
K2: Axis Types, Coordinate Systems, Frames
9.5 Frames
TOROT (align Z axis of the WCS by rotating the frame parallel to the tool orientation) and TOFRAME
(ditto.)
The system frame for TOROT and TOFRAME is activated via the following machine data:
MD28082 $MC_MM_SYSTEM_FRAME_MASK, bit 3 = 1
This system frame is located before the programmable frame in the frame chain.
The SZS coordinate system is located before the programmable frame.
TOROTOF
TOROTOF is the switch off command for TOROT and TOFRAME. This command deletes the
corresponding system frame. The current $P_TOOLFRAME and the data management
frame $P_TOOLFR are also deleted. TOROTOF is in the same G group as TOROT and TOFRAME
and appears therefore in the G code display.
Example
Example of using an orientational toolholder with deactivated kinematics:
Basic Functions
764 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K2: Axis Types, Coordinate Systems, Frames
9.5 Frames
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 765
K2: Axis Types, Coordinate Systems, Frames
9.5 Frames
Programmable frame
With the end of the subprogram the programmable frame active before the subroutine call is
reactivated.
System frames
If the system frames are changed by the subprogram, the change remains effective even
after the end of the subprogram.
Basic Functions
766 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K2: Axis Types, Coordinate Systems, Frames
9.5 Frames
In certain circumstances, alarms could be triggered when reintroducing saved data, if the
frame affiliates, be they NCU global or channel-specific, have been changed using machine
data.
Data backup always takes place in accordance with the axis configuration set in the machine
data, not in accordance with the currently valid geometry axis assignment.
9.5.12.1 POWER ON
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 767
K2: Axis Types, Coordinate Systems, Frames
9.5 Frames
System frames
System frames are retained and remain active when the operating mode is changed.
JOG mode
In JOG mode, the frame components of the current frame are only taken into account for the
geometry axes if a rotation is active. No other axial frames are taken into account.
Basic Functions
768 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K2: Axis Types, Coordinate Systems, Frames
9.5 Frames
Bit Significance
0 System frame for actual value setting and scratching is active after RESET.
1 System frame for zero offset external is active after RESET.
2 Is not evaluated.
3 Is not evaluated.
4 System frame for workpiece reference point is active after RESET.
5 System frame for cycles is active after RESET.
6 Reserved, RESET response depends on MD20110 $MC_RESET_MODE_MASK.
7 System frame $P_ISO1FR is active after RESET.
8 System frame $P_ISO2FR is active after RESET.
9 System frame $P_ISO3FR is active after RESET.
10 System frame $P_ISO4FR is active after RESET.
11 System frame $P_RELFR is active after RESET.
RESET response of the system frames of TCARR, PAROT, TOROT and TOFRAME
The RESET response of the system frames of TCARR, PAROT, TOROT and TOFRAME depends on
the G-Code RESET setting.
The setting is made with machine data:
MD20110 $MC_RESET_MODE_MASK (definition of initial control settings after RESET/TP-
End)
MD20152 $MC_GCODE_RESET_MODE[ ] (RESET response of G groups)
MD20150 $MC_GCODE_RESET_VALUES (RESET position of G groups)
MD20110 Significance
Bit 0 = 0 TCARR and PAROT system frames are retained as before the RESET.
MD20152 $MC_GCODE_RESET_MODE[52] = 0
MD20150 $MC_GCODE_RESET_VALUES[52] = 1 TOROTOF
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 769
K2: Axis Types, Coordinate Systems, Frames
9.5 Frames
MD20110 Significance
MD20150 $MC_GCODE_RESET_VALUES[52] = 2 TOROT
MD20150 $MC_GCODE_RESET_VALUES[52] = 3 TOFRAME
TCARR and PAROT are two independent functions, which describe the same frame. With
PAROTOF, the component of TCARR is not activated on RESET.
MD20110 Significance
Bit 0 = 1 and bit 14 = 0 Chained complete basic frame is deleted.
Bit 0 = 1 and bit 14 = 1 The complete basic frame is derived on the basis of:
MD24002 $MC_CHBFRAME_RESET_MASK
(active channel-specific basic frame after RESET)
and
MD10613 $MN_NCBFRAME_RESET_MASK
(active NCU global basic frame after RESET)
MD24002 $MC_CHBFRAME_RESET_MASK
Bit 0 = 1 1. Channel basic frame is calculated into the chained
complete basic frame.
Bit 7 = 1 8. Channel basic frame is calculated into the chained
complete basic frame.
MD10613 $MN_NCBFRAME_RESET_MASK
Bit 0 = 1 1. NCU global basic frame is calculated into the chained
complete basic frame.
Bit 7 = 1 8. NCU global basic frame is calculated into the chained
complete basic frame.
Basic Functions
770 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K2: Axis Types, Coordinate Systems, Frames
9.5 Frames
Bit Significance
0 System frame for actual value setting and scratching is deleted during RESET.
1 System frame for zero offset external is deleted during RESET.
2 Reserved, for TCARR and PAROT see MD20150 $MC_GCODE_RESET_VALUES[ ].
3 Reserved, for TOROT and TOFRAME see MD20150 $MC_GCODE_RESET_VALUES[ ].
4 System frame for workpiece reference points is deleted during RESET.
5 System frame for cycles is deleted during RESET.
6 Reserved, RESET response depends on MD20110 $MC_RESET_MODE_MASK.
7 System frame for $P_ISO1FR is deleted during RESET.
8 System frame for $P_ISO2FR is deleted during RESET.
9 System frame for $P_ISO3FR is deleted during RESET.
10 System frame for $P_ISO4FR is deleted during RESET.
11 System frame $P_RELFR is deleted during RESET.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 771
K2: Axis Types, Coordinate Systems, Frames
9.5 Frames
Block search
Data management frames are also modified when carrying out a block search with
calculation.
Bit Significance
0 All frames in the data management are restored.
In case of cascaded block searches, the frames are set to the status of the previous block
search.
SERUPRO
The "SERUPRO" function is not supported.
9.5.12.6 REPOS
There is no special treatment for frames. If a frame is modified in an ASUB, it is retained in
the program. On repositioning with REPOS, a modified frame is included, provided the
modification was activated in the ASUB.
Basic Functions
772 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K2: Axis Types, Coordinate Systems, Frames
9.6 Workpiece-related actual value system
9.6.1 Overview
Definition
The term "workpiece-related actual-value system" designates a series of functions that
permit the user:
● To use a workpiece coordinate system defined in machine data after powerup.
Features:
– No additional operations are necessary.
– Effective in JOG and AUTOMATIC modes
● To retain the valid settings for the following after end of program for the next part
program:
– Active plane
– Settable frame (G54-G57)
– Kinematic transformation
– Active tool offset
● To change between work coordinate system and machine coordinate system via the user
interface.
● To change the work coordinate system by operator action (e.g., changing the settable
frame or the tool offset).
Switchover to WCS
The change to the WCS via the user interface causes the axis positions relative to the origin
of the WCS to be displayed.
Switchover to MCS
The change to the MCS via the user interface causes the axis positions relative to the origin
of the MCS to be displayed.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 773
K2: Axis Types, Coordinate Systems, Frames
9.6 Workpiece-related actual value system
)UDPHFKDLQ
:&6
)UDPHIRUF\FOHVSURJUDPPDEOH
IUDPHWUDQVIRUPDWLRQV
6=6
6\VWHPIUDPHIRU72527
72)5$0(ZRUNSLHFHV
*WR*VHWWDEOHIUDPH
FKDQQHOVSHFRU1&8JOREDO
%=6
&KDLQHGILHOGRIEDVLFIUDPHV
FKDQQHOVSHFDQGRU1&8JOREDO
&KDLQHGV\VWHPIUDPHVIRU3$52735(6(7
VFUDWFKLQJ]HURRIIVHWH[WHUQDO
.LQHPDWLFWUDQVIRUPDWLRQ
0&6
+RPHSRVLWLRQRIIVHW
0&6 0DFKLQH&RRUGLQDWH6\VWHP
%&6 %DVLF&RRUGLQDWH6\VWHP
:&6 :RUNSLHFH&RRUGLQDWH6\VWHP
%=6 %DVLF=HUR6\VWHP
6=6 6HWWDEOH=HUR6\VWHP
For further information, see "H2: Auxiliary function outputs to PLC (Page 369)" and "W1:
Tool offset (Page 1389)".
Basic Functions
774 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K2: Axis Types, Coordinate Systems, Frames
9.6 Workpiece-related actual value system
References:
● Programming Guide Fundamentals
● Function Manual, Extended Functions; Kinematic Transformation (M1)
● Function Manual, Special Functions; Axis Couplings and ESR (M3);
Section: Coupled motion, Section: Master value coupling
● Function Manual, Special Functions; Tangential Control (T3)
Overstore
Overstoring in RESET state of:
● Frames (zero offsets)
● Active plane
● Activated transformation
● Tool offset
immediately affects the actual-value display of all axes in the channel.
MD9440
If the HMI machine data
MD9440 ACTIVATE_SEL_USER_DATA
for the operator panel front is set, the entered values become active immediately in RESET
state.
When values are entered in the part-program execution stop state, they become effective
when program execution continues.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 775
K2: Axis Types, Coordinate Systems, Frames
9.7 Restrictions
Actual-value reading
If the actual value of $AA_IW is read in the WCS after activation of a frame (zero offset) or a
tool offset, the activated changes are already contained in the result read even if the axes
have not yet been traversed with the activated changes.
The actual values in the settable zero system (SZS) can be read from the part program for
each axis using the variable $AA_IEN[axis].
The actual values in the basic zero system (BZS) can be read from the part program for
each axis using the variable $AA_IBN[axis].
Actual-value display
The programmed contour is always displayed in the WCS.
The following offsets are added to the MCS:
● Kinematic transformation
● DRF offset/zero offset external
● Active frame
● Active tool offset of the current tool
Switchover by PLC
The actual values can be displayed in the WCS, SZS, BZS or MCS via the PLC. The PLC
can define, which coordinate system corresponds to the workpiece coordinate system on a
machine.
On MMC power-up the MCS is preset.
With the signal DB19 DBB0.7 "MCS/WCS switchover", it is also possible to switch from the
PLC to the WCS.
Transfer to PLC
Depending on machine data
MD20110 / MD20112, bit 1
, the auxiliary functions (D, T, M) are output to the PLC (or not) on selection of the tool length
compensation.
Note
If the WCS is selected from the PLC, an operator action can still be used to switch between
the WCS and MCS for the relevant mode.
However, when the mode and or area is changed, the WCS selected by the PLC is
evaluated and activated (see Section "K1: Mode group, channel, program operation, reset
response (Page 451)").
9.7 Restrictions
There are no supplementary conditions to note.
Basic Functions
776 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K2: Axis Types, Coordinate Systems, Frames
9.8 Examples
9.8 Examples
9.8.1 Axes
<
:=0
%
;
=
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 777
K2: Axis Types, Coordinate Systems, Frames
9.8 Examples
MD20050 AXCONF_GEOAX_ASSIGN_TAB[0] =1
MD20050 AXCONF_GEOAX_ASSIGN_TAB[1] =2
MD20050 AXCONF_GEOAX_ASSIGN_TAB[2] =3
MD20060 AXCONF_GEOAX_NAME_TAB[0] =X
MD20060 AXCONF_GEOAX_NAME_TAB[1] =Y
MD20060 AXCONF_GEOAX_NAME_TAB[2] =Z
MD20070 AXCONF_MACHAX_USED[0] =1
MD20070 AXCONF_MACHAX_USED[1] =2
MD20070 AXCONF_MACHAX_USED[2] =3
MD20070 AXCONF_MACHAX_USED[3] =4
MD20070 AXCONF_MACHAX_USED[4] =5
MD20070 AXCONF_MACHAX_USED[5] =6
MD20080 AXCONF_CHANAX_NAME_TAB[0] =X
MD20080 AXCONF_CHANAX_NAME_TAB[1] =Y
MD20080 AXCONF_CHANAX_NAME_TAB[2] =Z
MD20080 AXCONF_CHANAX_NAME_TAB[3] =B
MD20080 AXCONF_CHANAX_NAME_TAB[4] = WZM
MD20080 AXCONF_CHANAX_NAME_TAB[5] = S1
MD30300 IS_ROT_AX[3] =1
MD30300 IS_ROT_AX[4] =1
MD30300 IS_ROT_AX[5] =1
MD30310 ROT_IS_MODULO[3] =1
MD30310 ROT_IS_MODULO[4] =1
MD30310 ROT_IS_MODULO[5] =1
MD30320 DISPLAY_IS_MODULO[3] =1
MD30320 DISPLAY_IS_MODULO[4] =1
Basic Functions
778 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K2: Axis Types, Coordinate Systems, Frames
9.8 Examples
MD35000 SPIND_ASSIGN_TO_MACHAX[AX1] =0
MD35000 SPIND_ASSIGN_TO_MACHAX[AX2] =0
MD35000 SPIND_ASSIGN_TO_MACHAX[AX3] =0
MD35000 SPIND_ASSIGN_TO_MACHAX[AX4] =0
MD35000 SPIND_ASSIGN_TO_MACHAX[AX5] =0
MD35000 SPIND_ASSIGN_TO_MACHAX[AX6] =1
Machine data
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 779
K2: Axis Types, Coordinate Systems, Frames
9.8 Examples
Machine data for channel 1 Value Machine data for channel 1 Value
$MC_AXCONF_CHANAX_NAME_TAB[0] =X $MC_AXCONF_CHANAX_NAME_TAB[0] =X
$MC_AXCONF_CHANAX_NAME_TAB[1] =Y $MC_AXCONF_CHANAX_NAME_TAB[1] =Y
$MC_AXCONF_CHANAX_NAME_TAB[2] =Z $MC_AXCONF_CHANAX_NAME_TAB[2] =Z
$MC_AXCONF_MACHAX_USED[0] =1 $MC_AXCONF_MACHAX_USED[0] =4
$MC_AXCONF_MACHAX_USED[1] =2 $MC_AXCONF_MACHAX_USED[1] =5
$MC_AXCONF_MACHAX_USED[2] =3 $MC_AXCONF_MACHAX_USED[2] =6
$MC_AXCONF_GEOAX_NAME_TAB[0] =X $MC_AXCONF_GEOAX_NAME_TAB[0] =X
$MC_AXCONF_GEOAX_NAME_TAB[1] =Y $MC_AXCONF_GEOAX_NAME_TAB[1] =Y
$MC_AXCONF_GEOAX_NAME_TAB[2] =Z $MC_AXCONF_GEOAX_NAME_TAB[2] =Z
$MC_AXCONF_GEOAX_ASSIGN_TAB[0] =1 $MC_AXCONF_GEOAX_ASSIGN_TAB[0] =4
$MC_AXCONF_GEOAX_ASSIGN_TAB[1] =2 $MC_AXCONF_GEOAX_ASSIGN_TAB[1] =5
$MC_AXCONF_GEOAX_ASSIGN_TAB[2] =3 $MC_AXCONF_GEOAX_ASSIGN_TAB[2] =6
Basic Functions
780 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K2: Axis Types, Coordinate Systems, Frames
9.8 Examples
9.8.3 Frames
Example 1
The channel axis is to become a geometry axis through geometry axis substitution.
The substitution is to give the programmable frame a translation component of 10 in the X
axis.
The current settable frame is to be retained:
FRAME_GEOX_CHANGE_MODE = 1
Example 2
Channel axes 4, 5 and 6 become the geometry axes of a 5axis orientation transformation.
The geometry axes are thus all substituted before the transformation.
The current frames are changed when the transformation is activated.
The axial frame components of the channel axes, which become geometry axes, are taken
into account when calculating the new WCS. Rotations programmed before the
transformation are retained. The old WCS is restored when the transformation is
deactivated.
The most common application will be that the geometry axes do not change before and after
the transformation and that the frames are to stay as they were before the transformation.
Machine data:
$MN_FRAME_GEOAX_CHANGE_MODE = 1
$MC_AXCONF_CHANAX_NAME_TAB[0] = "CAX"
$MC_AXCONF_CHANAX_NAME_TAB[1] = "CAY"
$MC_AXCONF_CHANAX_NAME_TAB[2] = "CAZ"
$MC_AXCONF_CHANAX_NAME_TAB[3] = "A"
$MC_AXCONF_CHANAX_NAME_TAB[4] = "B"
$MC_AXCONF_CHANAX_NAME_TAB[5] = "C"
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 781
K2: Axis Types, Coordinate Systems, Frames
9.8 Examples
$MC_AXCONF_GEOAX_ASSIGN_TAB[0] = 1
$MC_AXCONF_GEOAX_ASSIGN_TAB[1] = 2
$MC_AXCONF_GEOAX_ASSIGN_TAB[2] = 3
$MC_AXCONF_GEOAX_NAME_TAB[0] = "X"
$MC_AXCONF_GEOAX_NAME_TAB[1]="Y"
$MC_AXCONF_GEOAX_NAME_TAB[2] = "Z"
$MC_TRAFO_GEOAX_ASSIGN_TAB_1[0]=4
$MC_TRAFO_GEOAX_ASSIGN_TAB_1[1]=5
$MC_TRAFO_GEOAX_ASSIGN_TAB_1[2]=6
$MC_TRAFO_AXES_IN_1[0] = 4
$MC_TRAFO_AXES_IN_1[1] = 5
$MC_TRAFO_AXES_IN_1[2] = 6
$MC_TRAFO_AXES_IN_1[3] = 1
$MC_TRAFO_AXES_IN_1[4] = 2
Program:
$P_NCBFRAME[0] = ctrans(x,1,y,2,z,3,a,4,b,5,c,6)
$P_CHBFRAME[0] = ctrans(x,1,y,2,z,3,a,4,b,5,c,6)
$P_IFRAME = ctrans(x,1,y,2,z,3,a,4,b,5,c,6):crot(z,45)
$P_PFRAME = ctrans(x,1,y,2,z,3,a,4,b,5,c,6):crot(x,10,y,20,z,30)
Basic Functions
782 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K2: Axis Types, Coordinate Systems, Frames
9.9 Data lists
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 783
K2: Axis Types, Coordinate Systems, Frames
9.9 Data lists
Basic Functions
784 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K2: Axis Types, Coordinate Systems, Frames
9.9 Data lists
Identifier Description
$AA_ETRANS[axis] External zero offset
$AA_IBN[axis] Actual value in basic zero coordinate system (BZS)
$AA_IEN[axis] Actual value in settable zero point coordinate system (SZS)
$AA_OFF[axis] Overlaid motion for programmed axis
$AC_DRF[axis] Handwheel override of an axis
$AC_JOG_COORD Coordinate system for manual traversing
$P_ACSFRAME Active frame between BCS and SZS
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 785
K2: Axis Types, Coordinate Systems, Frames
9.9 Data lists
Identifier Description
$P_ACTBFRAME Active complete basic frame
$P_ACTFRAME Active complete frame
$P_BFRAME 1st active basic frame in the channel. Corresponds to $P_CHBFRAME
$P_CHBFR[n] Active basic frame in the channel, can be activated via G500, G54...G599
$P_CHBFRAME[n] Active basic frame in the channel
0 to 15 NCU basic frames can be set through:
MD28081 MM_NUM_BASE_FRAMES
$P_CHBFRMASK Basic frame mask in the channel
$P_CHSFRMASK System frame mask
$P_CYCFR Active system frame for cycles
$P_CYCFRAME Active system frame for cycles
$P_EXTFR System frame for external zero offset in data management
$P_EXTFRAME Active system frame for external zero offset
$P_IFRAME Active settable frame
$P_ISO1FR Data management frame for ISO G51.1 Mirroring
$P_ISO2FR Data management frame for ISO G68 2DROT
$P_ISO3FR Data management frame for ISO G68 3DROT
$P_ISO4FR System frame for ISO G51 Scale
$P_ISO1FRAME Active system frame for ISO G51.1 Mirroring
$P_ISO2FRAME Active system frame for ISO G68 2DROT
$P_ISO3FRAME Active system frame for ISO G68 3DROT
$P_ISO4FRAME Active system frame for ISO G51 Scale
$P_NCBFR[n] Global basic frame of the data management, can be activated via G500,
G54...G599
$P_NCBFRAME[n] Current NCU basic frame
0 to 15 NCU basic frames can be set through:
MD18602 MM_NUM_GLOBAL_BASE_FRAMES
$P_NCBFRMASK Global basic frame mask
$P_PARTFR Data management frame for TCARR and PAROT
$P_PARTFRAME Active system frame for TCARR and PAROT with orientational toolholder
$P_PFRAME Programmable frame
$P_SETFR Data management frame for actual value setting
$P_SETFRAME Active system frame for actual value setting
$P_TOOLFR Data management frame for TOROT and TOFRAME
$P_TOOLFRAME Active system frame for TOROT and TOFRAME
$P_TRAFRAME Data management frame for transformations
$P_TRAFRAME Active system frame for transformations
$P_UBFR 1st basic frame in the channel in the data management that is activated
after G500, G54...G599. Corresponds to $P_CHBFR[0].
$P_UIFR[n] Settable data management frames, can be activated via G500, G54...G599
Basic Functions
786 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
K2: Axis Types, Coordinate Systems, Frames
9.9 Data lists
Identifier Description
$P_UIFRNUM Number of active settable frame $P_UIFR
$P_WPFR Data management frame for the workpiece
$P_WPFRAME Active system frame for the workpiece
$AA_ETRANS[X]
$AA_ETRANS[X] is an axis-specific system variable of the DOUBLE type. The default
setting in the system for this variable is zero.
Values set by the user are activated through the NC/PLC interface signal:
DB31, ... DBX3.0 (external zero offset)
9.9.4 Signals
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 787
K2: Axis Types, Coordinate Systems, Frames
9.9 Data lists
Basic Functions
788 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
N2: Emergency stop 10
10.1 Brief Description
Function
The control system supports the machine manufacturer in implementing an emergency stop
function on the basis of the following functions:
● An emergency stop button is installed in a location easily accessible to the machine
operator on all SINUMERIK machine control panels. The functionality of the emergency
stop button includes the positive opening of electrical switching contacts and a
mechanical self-activating latching/locking.
● The emergency stop request to the NC is transmitted via the NC/PLC interface on the
PLC.
● The Emergency Stop function must bring the machine to a standstill according to stop
category 0 or 1 (EN 60204).
● In the case of an emergency stop, all machine functions controlled by the PLC can be
brought to a safe state that can be set by the machine manufacturer.
● Unlatching the emergency stop button does not cancel the emergency stop state nor
does it initiate a restart.
● After the emergency stop state has been canceled, it is not necessary to reference the
machine axes or synchronize the spindles. The actual positions of the machine axes are
continuously tracked during the emergency stop sequence.
Relevant standards
Compliance with the following standards is essential for the emergency stop function:
● EN ISO 12000-1
● EN ISO 12000-2
● EN 418
● EN 60204
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 789
N2: Emergency stop
10.2 Relevant standards
Emergency stop
In accordance with EN 418, an emergency stop is a function that:
● Is intended to prevent or diminish developing or existing risks to operating personnel, and
damage to the machine or machined materials.
● Is triggered by a single action of a person, if the normal stop function is not suitable for it.
Hazards
In the terms of EN 418, risks may arise from:
● Functional irregularities (machine malfunctions, unacceptable properties of the material to
be machined, human error, etc.).
● Normal operation.
Note
The machine manufacturer is expressly directed to comply with the national and
international standards. The SINUMERIK controllers support the machine manufacturer
in the implementation of the emergency stop function according to the specifications in
the following function description. But the responsibility for the emergency stop function
(its triggering, sequence and acknowledgement) rests exclusively with the machine
manufacturer.
Basic Functions
790 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
N2: Emergency stop
10.3 Emergency stop control elements
Connection conditions
For connecting the emergency stop button see:
References:
Operator Components Manual
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 791
N2: Emergency stop
10.4 Emergency stop sequence
Basic Functions
792 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
N2: Emergency stop
10.4 Emergency stop sequence
Note
The responsibility for interrupting the power supply rests with the machine manufacturer.
● The digital and analog outputs of the PLC I/O are not influenced by the emergency stop
sequence in the NC.
If individual outputs are required to attain a particular state or voltage level in the event of
an emergency stop, the machine manufacturer must implement this in the PLC user
program.
● The fast digital outputs of the NCK I/O system are not influenced by the emergency stop
sequence in the NC.
If individual outputs must assume a specific state in case of emergency stop, the machine
manufacturer must transmit the desired state to the NC in the PLC user program via
interface signals:
DB10 DBB4-7
Note
If the sequence in the NC is not to be executed as described above, then the interface
signal DB10 DBX56.1 (emergency stop) must not be set until an emergency stop state
defined by the machine manufacturer in the PLC user program is reached.
As long as the interface signal is not set and no other alarm is pending, all interface
signals are operative in the NC. Any emergency stop state defined by the manufacturer
(including axis-, spindle- and channel-specific emergency stop states) can therefore be
assumed.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 793
N2: Emergency stop
10.5 Emergency stop acknowledgement
Note
The emergency stop state cannot be reset with the interface signal DB21, ... DBX7.7 (Reset)
alone.
'%'%;(PHUJHQF\VWRS
1
'%'%;
$FNQRZOHGJHHPHUJHQF\VWRS
'%'%;(PHUJHQF\VWRSDFWLYH
'%'%;5(6(7
3
Basic Functions
794 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
N2: Emergency stop
10.5 Emergency stop acknowledgement
Effects
Resetting the emergency stop state has the following effects:
● Within the controller for all machine axes:
– The servo enables are set.
– The follow-up mode is canceled.
– The position control is activated.
● The following interface signals are set:
DB31, ... DBX60.5 (position control active)
DB11 DBX6.3 (mode group ready)
● The following interface signal is reset:
DB10 DBX106.1 (emergency stop active)
● Alarm 3000 "Emergency stop" is deleted.
● Part program processing is interrupted in all channels of the NC.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 795
N2: Emergency stop
10.6 Data lists
10.6.2 Signals
10.6.2.1 Signals to NC
Basic Functions
796 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P1: Transverse axes 11
11.1 Brief description
Transverse axis
Within the framework of "turning" technology, the transverse axis refers to the machine axis
that travels perpendicular to the axis of symmetry of the spindle, in other words, to
longitudinal axis Z.
;
7UDQVYHUVHD[LV
0
:
/RQJLWXGLQDOD[LV
Figure 11-1 Position of the transverse axis in the machine coordinate system
Properties
● Every geometry axis of a channel can be defined as a transverse axis.
● A transverse axis is a linear axis for the following functions, which can be permitted and
activated at the same time or separately:
– Programming and display in the diameter
– Reference axis for constant cutting speed G96/G961/G962
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 797
P1: Transverse axes
11.1 Brief description
Note
Rotary axes are not permitted to serve as transverse axes.
Basic Functions
798 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P1: Transverse axes
11.2 Defining a geometry axis as transverse axis
Note
The setting MD30460 bit 2 = 1 is only possible for linear axes.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 799
P1: Transverse axes
11.2 Defining a geometry axis as transverse axis
An axis can be simultaneously defined in MD20100 and in MD30460 (bit 2). For this, the
channel-specific MD20100 has a higher priority than the axis-specific MD30460.
With:
● MD20100, the function G96/G961/G962 is assigned to the transverse axis during power
up.
● MD20100, the channel-specific diameter programming DIAMON, DIAMOF, DIAM90,
DIAMCYCOF is assigned to the transverse axis during power up.
After power up, this axis has the axis-specific basic position DIAMCHANA[AX].
● MD30460 bit2 the additional enabling of the axis-specific operations DIAMONA[AX],
DIAMOFA[AX], DIAM90A[AX], DIACYCOFA[AX], DIMCHANA[AX].
Basic Functions
800 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P1: Transverse axes
11.3 Dimensional information for transverse axes
;
7UDQVYHUVHD[LV
0
:
' '
=
/RQJLWXGLQDOD[LV
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 801
P1: Transverse axes
11.3 Dimensional information for transverse axes
Note
The additionally specified axis must be activated via MD30460
$MA_BASE_FUNCTION_MASK with bit2=1.
The axis specified must be a known axis in the channel. Geometry, channel or machine axes
are permitted.
Programming is not permitted in synchronized actions.
The following axis-specific modal statements can be programmed several times in a parts
program block:
● DIAMONA[Axis]: Diameter programming for G90, G91 AC and IC ON
● DIAMOFA[Axis]: Diameter programming OFF, in other words, radius programming ON
● DIAM90A[axis]: Diameter or radius programming depending on the reference mode:
– Diameter programming ON in connection with absolute dimensioning G90 and AC
– Radius programming ON in connection with incremental dimensioning G91 and IC
● DIACYCOFA[axis]: Radius programming for G90 and G91 ON , for the HMI, the last active G
code of this group remains active
● DIAMCHANA[axis]: Acceptance of diameter programming channel status
● DIAMCHAN: all axes with MD30460, bit2=1 accept the diameter programming channel
status
Axis-specific modal statements have priority over the channel setting.
Basic Functions
802 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P1: Transverse axes
11.3 Dimensional information for transverse axes
Initial setting
The following machine data is used to parameterize the initial setting:
MD20150 $MC_GCODE_RESET_VALUES [28] (initial setting of the G groups)
and independently of MD20110 $MC_RESET_MODE_MASK for bit0 the
MD20152 $MC_GCODE_RESET_MODE
Diameter-related data
After activation of the diameter programming, the following data refer to diameter
dimensions:
DIAMON/DIAMONA[AX]
● Display data of transverse axis in the workpiece coordinate system:
– Setpoint and actual position
– Distance-to-go
– REPOS Offset
● "JOG" mode:
– Increments for incremental dimension (INC) and handwheel travel (dependent upon
active MD)
● Part program programming:
– End positions, independent of reference mode (G90 / G91)
– Interpolation parameters of circular-path programming (G2 / G3) if these are
programmed with part program instruction: AC absolute.
● Actual values read with reference to the workpiece coordinate system (WCS):
– $AA_MW[Transverse axis]
System variable of the measuring functions MEAS (measuring with delete distance-to-
go) and MEAW (measuring without delete distance-to-go)
– $P_EP[Transverse axis]
– $AA_IW[Transverse axis]
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 803
P1: Transverse axes
11.3 Dimensional information for transverse axes
DIAM90/DIAM90A[AX]
After activation of the reference-mode-dependent diameter programming, the following data
are always displayed in relation to diameter regardless of the operating mode (G90 / G91):
● Actual value
● Actual values read with reference to the workpiece coordinate system (WCS):
– $AA_MW[Transverse axis]
System variable of the measuring functions MEAS (measuring with delete distance-to-
go) and MEAW (measuring without delete distance-to-go)
– $P_EP[Transverse axis]
– $AA_IW[Transverse axis]
DIAMCYCOF/DIACYCOFA[AX]
Just as for DIAMCYCOF, a changeover to radius programing takes place within the controller for
DIACYCOFA[AX]. The diameter programming status that was active before DIAMCYCOF or
DIACYCOFA[AX] continues to be displayed to the HMI.
Basic Functions
804 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P1: Transverse axes
11.3 Dimensional information for transverse axes
MD20360 $MC_TOOL_PARAMETER_DEF_MASK
Bit Value Meaning
3 0 Work offset $P_EXTFRAME and frames
For transverse axes , work offsets in frames are always calculated as radius
values.
5 0 External work office (axis overlay)
For transverse axes, the external work offset is always calculated as radius value.
8 1 Display of remaining path in WCS always as a radius
9 For all transverse axes, with MD11346 $MN_HANDWH_TRUE_DISTANCE==1
0 • half of the path of the specified handwheel increment is traveled, if channel-
specific or axis-specific diameter programming is active for this axis.
1 • half of the path of the specified handwheel increment is always traveled.
13 1 When jogging around circles, the circle center point coordinate is always a radius
value, see SD42690 $SC_JOG_CIRCLE_CENTRE
14 1 For cycle masks, the absolute values of the transverse axis are in the radius.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 805
P1: Transverse axes
11.3 Dimensional information for transverse axes
MD20360 $MC_TOOL_PARAMETER_DEF_MASK
Bit Value Meaning
1 1 Transverse axis tool length as a diameter
2 1 Alarm for wear or tool length as a diameter and plane change
3 1 Work offset in frames of the transverse axis as a diameter
4 1 Preset value as a diameter
5 1 External work offset of transverse as a diameter
6 1 Actual values of the transverse axis as a diameter
7 1 Display of actual values of the transverse axis as a diameter value
10 1 Tool portion of an active tool carrier that can be oriented if no tool is active
11 1 Evaluation of $TC_DP6 as a diameter
12 1 Evaluation of $TC_DP15 as wear of the tool diameter
15 1 Incremental values of the transverse axis for cycle masks as diameter
Basic Functions
806 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P1: Transverse axes
11.3 Dimensional information for transverse axes
Application Examples
X is a transverse axis defined via MD20100 $MC_DIAMETER_AX_DEF.
Y is a geometry axis and U is an additional axis. These two axes are transverse axes with
specified diameter further defined in MD30460 $MA_BASE_FUNCTION_MASK with bit2=1.
DIAMON is not active after power up.
Channel 1
N10 G0 G90 X100 Y50 ;no diameter programming is active
N20 DIAMON ;Channel-specific diameter programming for X
N30 Y200 X200 ;Dimensions: X in the diameter, Y in the radius
N40 DIAMONA[Y] ;Y axis-specific modal diameter programming
N50 Y250 X300 ;Dimensions: X and Y in diameter
N60 SETM(1) ;Synchronous marker 1
N70 WAIT(1,2) ;wait for synchronous marker 1 in channel 2
Channel 2
...
N50 DIAMOF ;channel 2 no diameter programming active
...
N100 WAIT(1,1) ;wait for synchronous marker 1 in channel 1
N110 GETD(Y) ;Axis replacement direct Y
N120 Y100 ;Y the channel-specific diameter programming
;subordinated in channel 2, i.e. dimension in the radius
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 807
P1: Transverse axes
11.4 Data lists
Basic Functions
808 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P3: Basic PLC program for SINUMERIK 840D sl 12
12.1 Brief description
General
The PLC basic program organizes the exchange of signals and data between the PLC user
program and the NCK (Numerical Control Kernel), HMI (Human Machine Interface) and MCP
(Machine Control Panel). In the case of signals and data, a distinction is made between the
following groups:
● Cyclic signal exchange
● Event-driven signal exchange
● Messages
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 809
P3: Basic PLC program for SINUMERIK 840D sl
12.1 Brief description
Messages
User messages are acquired and conditioned by the basic program. The message signals
are transferred to the basic program via a specified bit array. where they are evaluated and,
if message events occur, entered in the PLC's interrupt buffer by means of the ALARM S/SQ
functions. If an HMI (e.g. SINUMERIK Operate) is being used, the messages are transferred
to the HMI and displayed.
Note
The function of the machine is largely determined by the PLC program. Every PLC program
in the RAM can be edited with the programming device.
Requirement
SIMATIC STEP 7 as of Version 5.5 SP3
Basic Functions
810 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P3: Basic PLC program for SINUMERIK 840D sl
12.2 Key data of the PLC CPU
References
NCU 7x0.3 PN Manual, Section "Technical data"
Note
I/O addresses for integrated drives
The I/O addresses above 4096 are reserved for the integrated drives of the NCU and must
not assigned otherwise.
Scope
Axes/spindles 31
Channels 10
Mode groups 10
Functions
Status/control signals +
M decoders (M00-99) +
G group decoders +
Aux. function distributors +
Aux. function transfer, interrupt-driven +
M decoding acc. to list +
Move axes/spindles from PLC +
ASUB interface +
Error/operating messages +
Transfer MCP and HHU signals +
Display control handheld unit +
Read/write NCK variables and GUD +
PI services +
Tool management +
Star/delta switchover +
m:n +
Safety Integrated +
Program diagnostics +
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 811
P3: Basic PLC program for SINUMERIK 840D sl
12.3 PLC operating system version
S 1) Meaning Remark
0 RUN-P The PLC program can be changed without activation of the password
1 RUN Only read access operations are possible using a programming device (PG). It
is not possible to make changes to the PLC program until the password has
been set.
2 STOP Processing the PLC program is stopped and all PLC outputs are set to
substitute values.
3 MRES The PLC is switched into the STOP state followed by a PLC general reset
(default data).
1) Switch position of the PLC mode selector
References
A detailed description of the position of the PLC mode selector on the front of the NCU
module, as well as its use in connection with NCK and PLC general reset can be found in:
CNC Commissioning Manual: NCK, PLC, Drive:
● Section "Switch-on/power-up" > "Operator control and display elements for power-up"
● Section "Switch-on/power-up" > "NCK and PLC general reset"
● Section "General tips" > "Separate NCK and PLC general reset"
Basic Functions
812 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P3: Basic PLC program for SINUMERIK 840D sl
12.5 Reserve resources (timers, counters, FC, FB, DB, I/O)
References
CNC Commissioning Manual: NCK, PLC, Drive:
● Section: "Connect PG/PC to PLC"
● Section: "Commissioning PLC"
● Section: "Basics" > "PLC program"
● Section: "General tips" > "Separate NCK and PLC general reset"
● Section: "General tips" > "Integrating PG/PC into the network (NetPro)"
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 813
P3: Basic PLC program for SINUMERIK 840D sl
12.7 Starting up the PLC program
References
CNC Commissioning Manual: NCK, PLC, Drive; Section: "Commissioning PLC" > "Creating
a PLC program"
Note
Installation/update
Before installing the toolbox for SINUMERIK 840D sl, SIMATIC STEP 7 must be installed.
It is recommended that the hardware expansions for STEP 7 be installed again from the
toolbox after an update of STEP 7.
Contents
The OB source programs, including standard parameterization, interface symbols and data-
block templates for the handheld unit and M decoding functions are included in the basic
program.
Remark
The catalog structures of a project and the procedure for creating projects and user
programs are described in the relevant SIMATIC documentation.
Procedure
The basic program blocks are copied using the SIMATIC Manager and
"File" > "Open" > "Library".
The following components must be copied from the library:
● From the block container: FCs, FBs, DBs, OBs, SFC, SFB, UDT
● The source_files (from the source container): GPOB840D
● Possibly MDECLIST, HHU_DB and others
● The symbols table (from the symbols container)
Basic Functions
814 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P3: Basic PLC program for SINUMERIK 840D sl
12.7 Starting up the PLC program
Basic program
The version of the basic program is displayed on the Version screen of the user interface
along with the controller type.
The controller type is encoded as follows:
User program
Users can also display their own PLC version codes in the Version screen. For this purpose,
a data of type STRING containing a maximum of 54 characters must be defined in any data
block. The data can contain a text of the user's choice. Parameterizations for this string are
made via a pointer in FB 1. Parameterization requires symbolic definition of the data block.
See also section "block descriptions" > "FB 1: RUN_UP Basic program, startup section
(Page 889) ".
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 815
P3: Basic PLC program for SINUMERIK 840D sl
12.7 Starting up the PLC program
If blocks that are called by other blocks are subsequently modified in the interface
(VAR_INPUT, VAR_OUTPUT, VAR_IN_OUT, VAR) as the program is developed, then the
call block and all blocks associated with it must be compiled again. This general procedure
applies analogously to instance data blocks for FBs. If these sequence of operations is not
maintained, time-stamp conflicts occur when the data retranslated into STEP 7. As such, the
recompilability of the blocks is not ensured and with the function "Status of block"
unnecesary conflicts can also appear. It is, moreover, advisable to generate blocks in ASCII-
STL by means of the STEP 7 editor when they have been created in Ladder Diagram or in
single statements (incremental mode).
Note
No sensible recompilation is possible without the related project for this machine. This
especially affects, for instance the function status of the block or the necessary changes
done in the PLC-CPU programs later. It is, therefore, necessary to keep a backup copy of
the STEP 7 project located in the PLC CPU on the machine. This is a great help for the
service case and saves unnecessary consumption of time in restoring the original project.
If the STEP 7 project exists and has been created according to the instructions given above,
then symbols can be processed in the PLCCPU on this machine. It may also be advisable to
store the machine source programs as ".awl" files in case they are required for any future
upgrade.
The source programs of all organization blocks and all instance data blocks should always
be available.
Basic Functions
816 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P3: Basic PLC program for SINUMERIK 840D sl
12.7 Starting up the PLC program
Automation
The process of generating a series archive can be automated (comparable to the command
interface in STEP 7). In generating this series archive, the command interface is expanded.
The following functions are available for this expansion:
The functions (shown here in VB script) are not available until server instantiations and
Magic have been called:
Const S7BlockContainer = 1138689, S7PlanContainer = 17829889
set S7 = CreateObject("Simatic.Simatic.1")
Call S7Ext.Magic("")
Functions:
● Function Magic(bstrVal As String) As Long
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 817
P3: Basic PLC program for SINUMERIK 840D sl
12.7 Starting up the PLC program
Description
Function Magic(bstrVal As String) As Long
The call provides access to certain functions. The function must be called once after server
instantiation. The value of bstrVal can be empty. This initiates a check of the correct STEP 7
version and path name in Autoexec. The functions are enabled with a return parameter of 0.
Return parameter (-1) = incorrect STEP 7 version
Return parameter (-2) = no entry in Autoexec.bat
Function MakeSeriesstart-up(FileName As String, Option As Long, Container As
S7Container) As Long
"Option" parameter:
0 = OK
-1 = Function unavailable, call Magic function beforehand
-2 = File name cannot be generated
-4 = Container parameter invalid or container block empty
-5 = Internal error (memory request rejected by Windows)
-6 = Internal error (problem in STEP 7 project)
-7 = Write error when generating series startup files (e.g. diskette full)
Use in script
Program code
If S7Ext.Magic("") < 0 Then
Wscript.Quit(1)
End If
Set Proj1 = s7.Projects("new")
set S7Prog = Nothing
Set s7prog = Proj1.Programs.Item(1) 'if there is only one program'
For Each cont In s7prog.Next
If (Cont.ConcreteType = S7BlockContainer) Then
' Check block container
Exit For
End if
Basic Functions
818 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P3: Basic PLC program for SINUMERIK 840D sl
12.7 Starting up the PLC program
Program code
Cont = Nothing
Next
Error = S7Ext.MakeSerienIB("f:\dh\arc.dir\PLC.arc", 0, Cont)
' Now error analysis
The For Each ... Next block programmed above can be programmed in the Delphi
programming language as follows (the programming for C, C++ programming languages is
similar):
Program code
Var
EnumVar: IEnumVariant;
rgvar: OleVariant;
fetched: Cardinal;
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 819
P3: Basic PLC program for SINUMERIK 840D sl
12.7 Starting up the PLC program
2. Copy the new basic program blocks into the SIMATIC S7 project (for a description, see
Section "Application of the basic program (Page 814)")
3. All user programs "*.awl" must be recompiled in the correct order! (see also: " Machine
program (Page 815)"):
4. This newly compiled SIMATIC S7 project should then be downloaded with STEP 7 into
the PLC.
However, it is normally sufficient to recompile the organization blocks (OBs) and the instance
data blocks of the S7 project. This means before upgrading, only the sources for the
organization blocks and the instance data blocks have to be generated.
NC variables
The latest NC VAR selector can be used for each NC software version (even earlier
versions). The variables can also be selected from the latest list for earlier NC software
versions. The data content in DB 120 (default DB for variables) does not depend on the
software status. That is, variables selected in an older software version need not be
reselected when the software is upgraded.
Identical numbers
If handling and basic program blocks have identical numbers, the block numbers of the basic
program must remain unchanged. The block numbers of the handling blocks must be
renamed to free numbers via STEP 7.
Basic Functions
820 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P3: Basic PLC program for SINUMERIK 840D sl
12.7 Starting up the PLC program
12.7.9 Troubleshooting
This section describes problems which may occur, their causes and remedies and should be
read carefully before hardware is replaced.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 821
P3: Basic PLC program for SINUMERIK 840D sl
12.8 Coupling of the PLC CPU
12.8.1 General
A CPU of the S7-300 automation system is used as PLC for the SINUMERIK 840D sl. The
PLC-CPU is integrated into the NCU component as a sub-module. A reference to the
performance data of the PLC CPU can be found in Section "Key data of the PLC CPU
(Page 811)".
Note
As with the PLC integrated in SINUMERIK, there is no automatic start of the PLC after power
failure and recovery for a SIMATIC S7-300 PLC when a "PLC stop" is triggered by an
operator action on the programming device. For safety reasons, the PLC remains in the stop
state with an appropriate diagnostic entry. You can start the PLC only by an operator action
on the programming device, "Execute a restart", or via the mode selector "Stop" > "Run"
(warm restart).
Physical interfaces
With the SINUMERIK 840D sl, the PLC integrated in the NCU offers the option of
exchanging signals between the NCK and PLC directly via a dual-port RAM.
Basic Functions
822 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P3: Basic PLC program for SINUMERIK 840D sl
12.8 Coupling of the PLC CPU
Programming devices should preferably be connected via Ethernet or via MPI (Multi-Point
Interface) directly to the PLC.
230&3
(63*
(WKHUQHW
6WDUWXSSRUW
(WKHUQHW3RUW
(WKHUQHW7&3,3
ZRUNVEXV
LQWHUQDOEXVಯ&EXVUDFNರ 6SURWRFRO
& 6 6
&EXV
6 &
6XEVWFRPP
'3'LUHFW &5LVF
$FFHVV
,QWHUQDOYLUWXDO352),%86
5HDOWLPHV\VWHP
6,180(5,.&RQWURO8QLW1&8
352),%86 03,352),%86
([WHUQDO
'ULYH
(7
8QLWV
Interface: NCK/PLC
The data exchange between NCK and PLC is organized by the basic program on the PLC
side. The status information, such as "Program running", stored by the NCK in the NCK/PLC
interface is copied to data blocks by the basic program at the beginning of the cycle (OB 1)
and can then be accessed in the user program (user interface). The control signals for the
NCK (e.g. NC start) entered in the interface data block by the user are also written to the
internal DPR and transferred to the NCK at the start of the cycle.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 823
P3: Basic PLC program for SINUMERIK 840D sl
12.8 Coupling of the PLC CPU
Interface: HMI/PLC
HMI/PLC data exchange is performed via the integrated CP, whereby the HMI is always the
active partner (client) and the PLC is always the passive partner (server). Data transferred or
requested by the HMI is read from and written to the HMI/PLC interface area by the PLC
operating system (timing: Cycle control point). From the viewpoint of the PLC application, the
data is identical to I/O signals.
Basic Functions
824 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P3: Basic PLC program for SINUMERIK 840D sl
12.9 Interface structure
Interface DBs
Mapping in interface data blocks is necessary due to the large number of signals exchanged
between the NCK and PLC. These are global data blocks from the viewpoint of the PLC
program. During system start-up, the basic program creates these data blocks from current
NCK machine data (no. of channels, axes, etc.). The advantage of this approach is that the
minimum amount of PLC RAM required for the current machine configuration is used.
General
The PLC/NCK interface comprises a data interface on one side and a function interface on
the other. The data interface contains status and control signals, auxiliary functions and G
functions, while the function interface is used to transfer jobs from the PLC to the NCK.
Data interface
The data interface is subdivided into the following groups:
● NCK-specific signals
● Mode-group-specific signals
● Channel-specific signals
● Axis/spindle/drive-specific signals
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 825
P3: Basic PLC program for SINUMERIK 840D sl
12.9 Interface structure
Function interface
The function interface is formed by FBs and FCs. The figure below illustrates the general
structure of the interface between the PLC and the NCK.
'%
+0, 0HVVDJHV
'% 1&
6LJQDOVWR1&.FRPSLOHF\FOHV
1& 6LJQDOVIURP1&.FRPSLOHF\FOHV
'% 1&
6LJQDOVWR1&
6LJQDOVIURP1&
0RGHJURXS
'% 0RGHJURXS
%$* '% 0RGHJURXS
6LJQDOVWRPRGHJURXS
6LJQDOVIURPPRGHJURXS
'DWDLQWHUIDFH
'% +0,
+0, 6LJQDOVWR+0,
6LJQDOVIURP+0, 3/&XVHU
SURJUDP
'% &KDQQHO
'% &KDQQHO
'% &KDQQHO
6LJQDOVWRFKDQQHO
1&FKDQQHO 6LJQDOVIURPFKDQQHO
'% $[LVVSLQGOH
'% $[LVVSLQGOH
$[LV '% $[LVVSLQGOH
VSLQGOH 6LJQDOVWRD[LV
GULYH 6LJQDOVIURPD[LV
'% 7RROPDQDJHPHQW
7RRO -REIRUORDGLQJXQORDGLQJORFDWLRQV
PDQDJHPHQW -REIRUVSLQGOHDQGWXUUHW
)&
1&FKDQQHO 6WDUW$68%
$[LV 6WDUWFRQFXUUHQWD[LVVSLQGOH
VSLQGOH 3RVLWLRQLQJD[LVLQGH[LQJD[LV
7RRO $FNQRZOHGJPHQWIRUWRROPDQDJHPHQW
)XQFWLRQLQWHUIDFH
PDQDJHPHQW 'LUHFWLRQVHOHFWLRQIRUWRROPDJD]LQH
'ULYH 6WDUGHOWDVZLWFKRYHU
)%
5HDGZULWH1&.YDULDEOHV
1& 3,VHUYLFHV
5HDG*8'
+0, PQ
6DIHW\ 6,UHOD\%UDNHVWHVW
LQWHJUDWHG
Basic Functions
826 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P3: Basic PLC program for SINUMERIK 840D sl
12.9 Interface structure
Compile-cycle signals
In addition to the standard signals exchanged between the PLC and NCK, an interface data
block for compile cycles is also generated if required (DB 9). The associated signals which
are dependent on the compile cycles are transmitted cyclically at the start of OB 1. The basic
program starts transmission at the lowest address and works up to the highest. First, signals
are transferred from the PLC to the NCK, then from the NCK to the PLC. The user must
synchronize the NCK and PLC as necessary (e.g. using the semaphore technique). Signal
transmission is asynchronous between NCK and PLC. This means, for example, that active
NCK data transmission can be interrupted by the PLC. This can mean that data is not always
consistent.
PLC/NCK signals
The group of signals from the PLC to NCK includes:
● Signals for modifying the digital and analog I/O signals of the NCK
● Keyswitch and emergency stop signals
'%
%\WH &RQWURORIGLJLWDO1&.LQSXWV
RQERDUGLQSXWV
&RQWURORIGLJLWDO1&.RXWSXWV
RQERDUGRXWSXWV
$[LVWDEOHV
.H\VZLWFKHPHUJHQF\6723
$FWXDOYDOXHVIRUGLJLWDO1&.LQSXWV
RQERDUGLQSXWV
6HWSRLQWVIRUGLJLWDO1&.RXWSXWV
RQERDUGRXWSXWV
9DULRXVVLJQDOV
1&.
+DQGZKHHOVHOHFWLRQ
+0,VWDWXVVLJQDOV +0,
%DVLFSURJUDPVWDWXVVLJQDOV %3
6WDWXVVLJQDOV
6RIWZDUHFDP
'HFRGLQJ &RQWURORIGLJLWDO1&.LQSXWV
KDQGZKHHO H[WHUQDOLQSXWV
VHOHFWLRQ &RQWURORIGLJLWDO1&.RXWSXWV
H[WHUQDORXWSXWV
$[LVLQWHUIDFH &RQWURORIDQDORJ1&.LQSXWV
*HRD[LVLQWHUIDFHLQ H[WHUQDOLQSXWV
FKDQQHO
&RQWURORIDQDORJ1&.RXWSXWV
H[WHUQDORXWSXWV
$FWXDOYDOXHVIRUGLJLWDO1&.LQSXWV
H[WHUQDOLQSXWV
6HWSRLQWVIRUGLJLWDO1&.RXWSXWV
H[WHUQDORXWSXWV
$FWXDOYDOXHVIRUDQDORJ1&.LQSXWV
H[WHUQDOLQSXWV
6HWSRLQWVIRUDQDORJ1&.RXWSXWV
H[WHUQDORXWSXWV
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 827
P3: Basic PLC program for SINUMERIK 840D sl
12.9 Interface structure
NCK/PLC signals
The group of signals from the NCK to PLC includes:
● Actual values of the digital and analog I/O signals of the NCK
● Ready and status signals of the NCK
Also output in this group are the HMI handwheel selection signals and the status signals.
The signals for handwheel selection are decoded by the basic program and entered in the
machine/axis-specific interface.
Note
While realizing the digital and analog NCK I/Os the information contained in the following
documentation must be taken into account:
References:
Functions Manual Extended Functions; Digital and analog NCK I/Os (A4)
Basic Functions
828 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P3: Basic PLC program for SINUMERIK 840D sl
12.9 Interface structure
'%
%\WH
%DVLFSURJUDP
&RQWUROVLJQDOV
0RGHJURXS
0RGHVHOHFWLRQ
0RGH
VHOHFWLRQ +0,
6HOHFWLRQVLJQDOVIURP+0,
$FWLYHPRGH
0&3 1&.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 829
P3: Basic PLC program for SINUMERIK 840D sl
12.9 Interface structure
The triggering and parameter assignment of NCK functions is performed by means of PLC
function calls.
The following function calls are available:
● Position a linear axis or rotary axis
● Position an indexing axis
● Start a prepared asynchronous subprogram (ASUB)
● Reading/writing of NC variables
● Update magazine and tool motion
Some of the above functions are described in their own function documentation.
0&3
+0,
'%
%\WHV 3URJUDPFRQWURO
&RQWUROVLJQDOV
$FWLYDWLQJSURWHFWLRQ
]RQHV
7UDYHUVHVLJQDOV
%3 *(2D[HV
+0,VLJQDO 3URJUDPFRQWURO
URXWLQJ IURP+0,
3URJUDPFKDQQHO
VWDWXV 6WDWXVVLJQDOV
*HRD[HVVWDWXV
$X[LOLDU\IXQFWLRQ
FKDQJHVLJQDOV $X[LOLDU\*IXQFWLRQV
067''/+)
YDOXHV %3 1&FKDQQHO
'HFRGHG0VLJQDOV 0GHFRGHU
00
$FWLYH*IXQFWLRQV *JURXS
GHFRGHU
6WDWXVVLJQDOV
3URWHFWLRQ]RQHV
$[LVVSLQGOH 06)
LQWHUIDFH GLVWULEXWRU
Basic Functions
830 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P3: Basic PLC program for SINUMERIK 840D sl
12.9 Interface structure
The signals are transmitted cyclically at the start of OB 1 with the following exceptions:
Exceptions include:
● Axial F value
● M value
● S value
An axial F value is entered via the M, S, F distributor of the basic program if it is transferred
to the PLC during the NC machining process.
The M and S value are also entered via the M, S, F distributor of the basic program if one or
both values require processing.
'%
)HHGUDWHVSLQGOH
6KDUHG RYHUULGH
%\WHV D[LVVSLQGOH &RQWUROVLJQDOV
VLJQDOV 7UDYHUVHVLJQDOV
1&.
YDOXHVRI06DQG)GLVWULEXWRUVRIEDVLFSURJUDP
General
The following groups of functions are required for the PLC/HMI interface:
● Control signals
● Machine operation
● PLC messages
● PLC status display
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 831
P3: Basic PLC program for SINUMERIK 840D sl
12.9 Interface structure
Control signals
Some control signals are signal inputs, for example, via the machine control panel, which
have to be taken into account by the HMI. This group of signals includes, for example,
display actual values in MCS or WCS, key disable, etc. These are exchanged with the HMI
via a separate interface data block (DB19).
Machine operation
All operator inputs, which lead to response actions on the machine, are monitored by the
PLC. Operator actions are usually performed on the machine control panel (MCP). However,
it is also possible to perform some operator actions on the HMI, e.g. mode selection.
The PLC operating system enters the operating signals sent by the HMI directly into the
interface data blocks. As standard, the basic program routes these operating signals in such
a way that, provided equivalent operator actions are available, these can be performed either
on the HMI or on the MCP. If required, the user can switch off the operation via HMI through
a parameter "MMCToIF" of FB1.
PLC messages
The signaling functions are based on the system diagnostic functions integrated in the
operating system of the AS 300. These have the following characteristics:
● The PLC operating system enters all important system states and state transitions in a
diagnostics status list. Communication events and I/O module diagnostics data (for
modules with diagnostic functions) are also entered.
● Diagnostics events, which lead to a system stop, are also entered with a time stamp in a
diagnostic buffer (circular buffer) in the chronological order of their occurrence.
● The events entered in the diagnostic buffer are automatically transmitted to human
machine interface systems (OP or HMI) via the bus systems once these have issued a
ready signal (message service). Transfer to the node ready is a function of the PLC
operating system. Receipt and interpretation of the messages are executed by the HMI
software.
● The PLC user program can also use SFCs (System Function Calls) to enter messages in
the diagnostic buffer or ALARM S/ALARM SQ buffer.
● The events are entered in the interrupt buffer.
The associated message texts must be stored on the OP or HMI.
An FC (FC 10) for message acquisition is prepared in conjunction with the basic program.
This FC records events, subdivides them into signal groups and reports them to the HMI via
the interrupt buffer.
The message acquisition structure is shown in the figure "Acquisition and signaling of PLC
events". The features include:
● Bit fields for events related to the NC/PLC interface are combined in a single data block
(DB2) with bit fields for user messages.
Basic Functions
832 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P3: Basic PLC program for SINUMERIK 840D sl
12.9 Interface structure
Acknowledgement concept
The following acknowledgement procedures are implemented for error and operational
messages:
Operating messages are intended for the display of normal operating states as information
for the user. Acknowledgement signals are, therefore, not required for this type of message.
An entry is made in the diagnostic status list for incoming and outgoing messages. The HMI
maintains an up-to-date log of existing operating messages using the identifiers "operating
message arrived" and "operating message gone".
Interrupt messages are used to display error states on the machine, which will usually lead
to the machine being stopped. Where several errors occur in rapid succession, it is important
to be able to distinguish their order of occurrence for troubleshooting purposes. This is
indicated, on the one hand, by the order in which they are entered in the diagnostic buffer
and on the other, by the time stamp, which is assigned to every entry.
If the cause of the error disappears, the associated interrupt message is only deleted if the
user has acknowledged it (e.g. by pressing a key on the MCP). In response to this signal, the
"Message acquisition" FC examines which of the reported errors have disappeared and
enters these in the diagnostic buffer with the entry "Interrupt gone". This enables the HMI to
also maintain an up-to-date log of pending interrupt messages. The time of day indicating the
time at which the error occurred is maintained for messages, which are still pending (in
contrast to a received interrogation).
STEP 7
A tool can be started in the SIMATIC Manager via menu item "Target system" > "CPU
messages". Alarms and messages can be displayed by number using this tool. To do this,
acivate the "Alarm" tab and enter a check mark under "A" in the upper half of the screen.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 833
P3: Basic PLC program for SINUMERIK 840D sl
12.9 Interface structure
User program
The user PLC program merely needs to call the basic program block FC 10 with appropriate
parameter settings in the cyclic program section and set or reset the bit fields in DB2. All
further necessary measures are implemented by the basic program and HMI.
&KDQJHVLJQDOV
%LWILHOGV
0HVVDJH
DFTXLVLWLRQ
&KDQQHO )HHGGLVDEOH
5HDGLQGLVDEOH
1&VWDUWGLVDEOH
&KDQQHOQ $/$50B6
6)&
$/$50B64
$[LVVSLQGOH )HHGUDWHVSLQG
OHGLVDEOH
$[LVVSLQGOHQ
8VHUDUHD ,QWHUUXSW
EXIIHU
$FTXLVLWLRQ 0HVVDJHVHUYLFH
*URXSVLJQDOV RIJURXSVLJQDOV
GLVDEOHVLJQDOV IRUFKDQQHODQG 3* +0,23
D[LV'%
Basic Functions
834 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P3: Basic PLC program for SINUMERIK 840D sl
12.9 Interface structure
● The alarms / messages also get the 16-bit integer additional value (%Z parameter in the
alarm text) in addition to the alarm number for the user area 0. The user must write the
16-bit integer values in the DB 2 in the Array variable ZInfo0 parallel to setting an alarm
bit. An integer value is available for each bit in the user area 0, see UDT1002 in the basic
program.
● The user messages can be parameteized in the second decade of the message number
in the numerical range 0 to 9. The display value of the second decade must be written by
the user in the DB5 in the array variable UserDek2No. A number can be defined for each
user area, see DB 5 in the basic program.
The value 0 is set by default for second decade.
The structuring of the DB 2 in UDT1002 can be recoginzed (basic program). In case of new
alarm functions, the UDT1002 must be assigned symbolically to the DB2.
At the start of DB 2 there are bit fields for signals without alarm generation. This is followed
by an array of size 64 integer for additional info of the user area 0.
Thereafter follow the areas, which also trigger alams / messages (see List manual) These
areas are extended to 10 channels, 31 axes.
General
There are different connection options for the machine control panel (MCP) and the
handheld unit (HHU). This is in part due to the history of the MCP and HHU. This description
focuses primarily on the connection of the Ethernet components.
On the SINUMERIK 840D sl, the machine control panel (MCP) and handheld unit (HHU) are
connected via the Ethernet bus, which also links the TCU to the NCU. The advantage of this
is that only one bus cable is required to connect the operating unit.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 835
P3: Basic PLC program for SINUMERIK 840D sl
12.9 Interface structure
++8
&XVWRPL]HG
7&8
NH\VGLVSOD\V 0&3
(WKHUQHWEXV
&3'VO 1&.
+0,
):
3*
(QJLQHHULQJ
(WKHUQHWEXV
'35
)%
0&3
VLJ
3/&
Bus addresses
On Ethernet components, MAC and IP addresses or logic names are determining factors in
respect of communication. The control system's system programs convert logic names into
MAC or IP addresses. On the PLC, the numeric component of the logic name is used for
communication. This numeric part is specified by the user to the FB 1 via the parameter
"MCPxBusAdr".
The logical name of an MCP or HHU always begins with "DIP". This is followed by a number
corresponding to the switch position of the MCP component (e.g. DIP 192, DIP 17).
Basic Functions
836 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P3: Basic PLC program for SINUMERIK 840D sl
12.10 Structure and functions of the basic program
)&
2SHUDWLQJPRGHV
,1&PRGH
,%Q .H\ )HHGUDWHVSLQGOHRYHUULGH
VLJQDOV 'LUHFWLRQNH\V
.H\ORFNVZLWFK
0RGH
8VHUNH\V JURXS
1&.D[LV
&XUUHQWPRGH VSLQGOH
/LJKW &XUUHQW,1&PRGH LQWHUIDFH
4%P HPLWWLQJ )HHGUDWHVSLQGOH1&VWDWXV
GLRGHV $FWLYHGLUHFWLRQNH\
/('V
6WDWXVRIFXVWRPL]HGNH\V
0RQLWRULQJRIWUDQVPLW
$'R
GDWD
$'S 5HFHLYHGDWD
PRQLWRULQJ
'HIDXOWVHWWLQJ
'!Q P R S
General
The PLC program has a modular structure. The organization blocks (OB) form the interface
between the operating system and the basic and user programs.
● Restart (warm restart) with start-up and synchronization (OB 100)
● Cyclic operation (OB 1)
● Process alarms (OB 40)
● Asynchronous errors: Diagnostic alarm (OB 82), module failure (OB 86)
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 837
P3: Basic PLC program for SINUMERIK 840D sl
12.10 Structure and functions of the basic program
The calls of the function blocks of the basic and user programs must be programmed by the
user in the organization blocks (OB).
2% )%
%DVLFSURJUDP
5HVWDUW
8VHUSURJUDP
)&
2% )&
0&3VLJQDOV
%DVLFSURJUDP +7VLJQDOV
)&
7RROPDQDJHPHQW )&
6SLQGOHFRQWURO
&\FOLFSURFHVVLQJ
)&
6WDUWRI$68% )%
8VHUSURJUDP
5HDGZULWHYDULDEOHV
)& 3,VHUYLFHV
6WDUGHOWD )&
'LVSOD\FRQWURO
)& +7
(UURUDQGRSHUDWLRQDO
PHVVDJHV
2% )&
%DVLFSURJUDP
3URFHVVDODUP
8VHUSURJUDP
Startup,
The synchronization of NCK and PLC is performed during startup. The system and user data
blocks are checked for integrity and the most important basic program parameters are
verified for plausibility. In cases of errors, the basic program produces an alarm (visible on
HMI) and switches the PLC to the Stop state.
A warm restart is not provided, i.e. following system initialization, the operating system runs
organization block OB 100 and always commences cyclic execution at the start of OB 1.
Basic Functions
838 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P3: Basic PLC program for SINUMERIK 840D sl
12.10 Structure and functions of the basic program
Synchronization
The PLC is synchronized with the HMI and NCK and CP during powerup.
Sign-of-life
After a correct initial start and the first complete OB1 cycle (initial setting cycle) the PLC and
NCK continuously exchange sign of life signals. If the sign of life from the NCK fails to
materialize, the PLC/NCK interface is initialized and the signal "NCK CPU ready" in DB 10 is
set to FALSE.
General
The NCK PLC interface is processed completely in cyclic mode. From a chronological
viewpoint, the basic program runs ahead of the user program. In order to minimize the
execution time of the basic program, only the control/status signals are transmitted cyclically;
transfer of the auxiliary functions and G functions only takes place on request.
The following functions are performed in the cyclic part of the basic program:
● Transmission of the control/status signals
● Distribution of the auxiliary functions
● M decoding (M00 - M99),
● M, S, F distribution
● Transfer the MCP signals via NCK
● Acquisition and conditioning of the user errors and operating messages.
Control/status signals
A shared feature of the control and status signals is that they are bit fields. The basic
program updates them at the start of OB1.
The signals can be subdivided into the following groups:
● General signals
● Mode group-specific signals (such as mode types)
● Channel-specific signals (such as program and feed modifications)
● Axis- and spindle-specific signals (such as feed disable)
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 839
P3: Basic PLC program for SINUMERIK 840D sl
12.10 Structure and functions of the basic program
The M, S, T, H, D and F values sent by the NCK are output together with the accompanying
change signals to the CHANNEL DB interface via the auxiliary/G functions (see List Manual).
The function value and the extended address are transferred to the appropriate data word.
The accompanying modification signal is activated to 1 for one PLC cycle. When the
modification signal is reset, the acknowledgement is passed to the NCK. The
acknowledgement of high-speed auxiliary functions is given by the basic program
immediately the basic program detects the auxiliary function.
In addition to distribution of the auxiliary and G functions, selected signals are processed as
described below.
M decoder
M functions can be used to transfer switching commands and fixed-point values. Decoded
dynamic signals are output to the CHANNEL DB interface for standard M functions (range
M00 - M99) signal length = 1 cycle time).
Basic Functions
840 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P3: Basic PLC program for SINUMERIK 840D sl
12.10 Structure and functions of the basic program
G group decoders
In the case of G functions sent by the NCK, the related groups are decoded and the current
G number is entered in the corresponding interface byte of the CHANNEL DB, i.e. all active
G functions are entered in the channel DBs. The entered G functions are retained even after
the NC program has terminated or aborted.
Note
During system startup, all G group bytes are initialized with the value "0".
M, S, F distributor
The M, S, F, distributor is used to enter spindle-specific M words M(1...6)=[3,4,5], S words
and F words for axial feeds in the appropriate spindle and axis data blocks. The criterion for
distribution is the extended address which is passed to the PLC for M words, S words and
axial F words.
User messages
The acquisition and processing of the user error and operational messages is performed by
an FC in the basic program.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 841
P3: Basic PLC program for SINUMERIK 840D sl
12.10 Structure and functions of the basic program
General
A module diagnosis or module failure on an I/O module triggers OB 82 / OB 86. These
blocks are supplied by the basic program. The basic program block FC5 is called in these
OBs. This is wired by default to trigger a PLC stop in the event of an error being detected.
A PLC Stop is not initiated when it is "fault cause corrected" and for the PROFIBUS MCP
specified on the FB 1.
The response can be changed by modifying the FC5 parameter setting.
PROFIBUS diagnostics
The slaves of both the PROFIBUS connections MPI/DP or DP1 are registered by the basic
program as group message in the form of a ready signal in the interface signal
● DB10 DBX92.0 (MPI/DP Bus Slaves OK)
● DB10, DBX92.1 (DP1 Bus Slaves OK)
The group message is derived from the LED status of the respective PROFIBUS (System
state list SZL 0x174).
Note
A PROFIBUS diagnosis is also possible using FC 125. The block occupies relatively little
cycle time. The DB 10 interface can be used to update the slave status by activating the
FC 125 block.
General
During cyclic operation, the PLC basic program continuously monitors NCK availability by
polling the signoflife character. If the NCK is no longer reacting, the NCK PLC interface is
initialized, and the NCK CPU ready signal in the area of the signals from NC (DB 10.DBX
104.7) is reset. Furthermore, the signals sent from the NCK to the PLC and vice versa are
set to an initial state.
The PLC itself remains active so that it can continue to control machine functions. However,
it remains the responsibility of the user program to set the machine to a safe state.
Basic Functions
842 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P3: Basic PLC program for SINUMERIK 840D sl
12.10 Structure and functions of the basic program
Status signals:
The status signals from the NCK, channels, axes, and spindles are reset.
Auxiliary-function modification signals:
Auxiliary-function modification signals are also reset.
Auxiliary-function values:
Auxiliary-function values are retained so that it is possible to trace the last functions triggered
by the NCK.
G-function values:
G function values are reset (i.e. initialized with the value 0 respectively).
12.10.7 Functions of the basic program called from the user program
General
In addition to the modules of the basic program which are called at the start of OBs 1, 40 and
100, functions are also provided which have to be called and supplied with parameters at a
suitable point in the user program.
These functions can be used, for example, to pass the following jobs from the PLC to the
NCK:
● Traversing concurrent axes (FC 18)
● Start asynchronous subprograms (ASUBs) (FC 9),
● Selecting NC programs (FB 4)
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 843
P3: Basic PLC program for SINUMERIK 840D sl
12.10 Structure and functions of the basic program
Note
Checking and diagnostics of a function call of the basic PLC program
To simplify the checking and diagnostics of a function call (FB or FC) of the basic PLC
program that is controlled via a trigger (e.g. via Req, Start parameters) and that provide
an execution acknowledgement as output parameter (e.g. via Done, NDR, Error
parameters), proceed as follows.
A variable compiled of other signals which produce the trigger for the function call should
be set. Start conditions may be reset only as a function of the states of parameters Done,
NDR and Error.
The appropriate control mechanism can be placed in front of or behind the function call. If
the mechanism is placed after the call, the output variables can be defined as local
variables (advantage: Reduction of global variables, markers, data variables and time-
related advantages over data variables).
The trigger parameter must be a global variable (e.g. marker, data variable).
Jobs that are still active must be reset from the user program in OB 100 (Req, Start,
parameters,
etc. from TRUE ⇒ FALSE). A POWER OFF/ON could result in a state in which jobs are
still active.
Concurrent axes
The distinguishing features of concurrent axes are as follows:
● They must be defined as such via the NC machine data.
● They can be traversed either from the PLC or from the NC by means of the JOG keys.
● Starting from the PLC is possible in the NC operating modes MDA and AUTOMATIK via
FC.
● The start is independent of NC block boundaries.
Function calls are available for positioning axes, indexing axes and spindles (FC 18).
)&
6SLQ&WUO
6WDUW ,Q3RV
6WRS
(UURU
)XQFW
6WDWH
0RGH
$[LV1R
3RV
)5DWH
Basic Functions
844 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P3: Basic PLC program for SINUMERIK 840D sl
12.10 Structure and functions of the basic program
)&
$683
6WDUW $FWLY
&KDQ1R 'RQH
,QW1R (UURU
6WDUW(UU
5HI
Note
If an asynchronous subprogram has not been prepared by an NC program or by FB 4
(ASUB) (e.g. if no interrupt no. has been assigned), a start error is output (StartErr = TRUE).
Read/Write NC variables
NCK variables can be read with FB GET while values can be entered in NCK variables with
FB PUT. The NCK variables are addressed via identifiers at inputs Addr1 to Addr8. The
identifiers (symbols) point to address data which must be stored in a global DB. To allow
generation of this DB, the PC software is supplied with the basic program with which the
required variables can be selected from a table, which is also supplied. The selected
variables are first collected in a second, project-related list. Command Generate DB creates
a "*.AWL" file which must be linked to the program file for the machine concerned and
compiled together with the machine program.
1 to 8 values can be read or written with a read or write job. If necessary, the values are
converted [e.g. NCK floating-point values (64-bit) are converted to PLC format (32-bit with
24-bit mantissa and 8-bit exponent) and vice versa]. A loss of accuracy results from the
conversion from 64-bit to 32-bit REAL. The maximum precision of 32-bit REAL numbers is
approximately 10 to the power of 7.
)% )%
*(7 387
5HT (UURU 5HT (UURU
1XP9DU 1'5 1XP9DU 'RQH
$GGU 6WDWH $GGU 6WDWH
8QLW 8QLW
&ROXPQ &ROXPQ
/LQH /LQH
5' 6'
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 845
P3: Basic PLC program for SINUMERIK 840D sl
12.10 Structure and functions of the basic program
AG_SEND/AG_RECV functions
The AG_SEND/AG_RECV functions correspond to the functions of the library
"SIMATIC_NET_CP" of the S7-300 CPU in STEP 7. In general, the online help is valid for
these functions.
The AG_SEND/AG_RECV functions can be used for data exchange with another station via
the integrated "CP 840D sl". A description of the functions is provided in Section "Block
descriptions (Page 889)".
Note
Other communication blocks (e.g. BSEND, USEND) which possess a CP343-1 are not
supported in SINUMERIK 840D sl.
General
Note
The basic program library on the CD supplied with the Toolbox for the 840D contains files
NST_UDTB.AWL and TM_UDTB.AWL.
The compiled UDT blocks from these two files are stored in the CPU program of the basic
program.
A UDT is a data type defined by the user that can, for example, be assigned to a data block
generated in the CPU.
Symbolic names of virtually all the interface signals are defined in these UDT blocks.
The UDT numbers 2, 10, 11, 19, 21, 31, 71, 72, 73 are used.
The assignments have been made as follows:
UDT assignments
UDT number Assignment to interface DB Significance
UDT 2 DB 2 Interrupts/Messages
UDT 10 DB 10 NCK signals
UDT 11 DB 11 Mode group signals
UDT 19 DB 19 HMI signals
UDT 21 DB 21 to DB 30 Channel signal
UDT 31 DB 31 to DB 61 Axis/spindle signals
UDT 71 DB71 Tool management: Load/unload locations
UDT 72 DB 72 Tool management: Change in spindle
UDT 73 DB 73 Tool management: Change in revolver
Basic Functions
846 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P3: Basic PLC program for SINUMERIK 840D sl
12.10 Structure and functions of the basic program
UDT assignments
UDT number Assignment to interface DB Significance
UDT 77 DB 77 MCP and HHU signals with standard SDB 210
UDT 1002 DB 2 extended alarms / messages (FB 1-Parameter
"ExtendAlMsg:=TRUE"
To symbolically program the interface signals, the interface data blocks must first be
symbolically assigned using the symbol editor.
For example, symbol "AxisX" is assigned to operand DB31 with data type UDT 31 in the
symbol file.
After this input, the STEP 7 program can be programmed in symbols for this interface.
Note
Programs generated with an earlier software version that utilize the interface DBs described
above can also be converted into symbol programs. A fully qualified instruction for data
access e.g. "U DB31.DBX60.0" is then necessary here for (spindle/ no axis) in the program
created till now. This command is converted upon activation of the symbolics in the editor
"AxisX.E_SpKA".
Description
Abbreviated symbolic names of the interface signals are defined in the two STL files
NST_UDTB.AWL and TM_UDTB.AWL.
In order to create the reference to the names of the interface signals, the name is included in
the comment after each signal.
The names are based on the English language. The comments are in English.
The symbolic names, commands and absolute addresses can be viewed by means of a
STEP 7 editor command when the UDT block is opened.
Note
Unused bits and bytes are listed, for example, with the designation "f56_3".
• "56": Byte address of the relevant data block
• "3": Bit number in this byte
Description of functions
When the M decoding according to list function is activated via the GP parameter of FB1
"ListMDecGrp" (number of M groups for decoding), up to 256 M functions with extended
address can be decoded by the basic program.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 847
P3: Basic PLC program for SINUMERIK 840D sl
12.10 Structure and functions of the basic program
The assignment of the M function with extended address and the bit to be set in the signal
list is defined in the decoding list. The signals are grouped for this purpose.
The signal list contains 16 groups with 16 bits each as decoded signals.
There is only one decoding list and one signal list i.e. this is a cross-channel function.
The M functions are decoded. Once they are entered in the decoding list, then the
associated bit in the signal list is set.
When the bit is set in the signal list, the readin disable in the associated NCK channel is set
simultaneously by the basic program.
The readin disable in the channel is reset once the user has reset all the bits output by this
channel and thus acknowledged them.
The output of an M function decoded in the list as a highspeed auxiliary function does not
result in a readin disable.
The figure below shows the structure of the M decoding according to list:
'HFRGLQJOLVW )&;
0GHFRGLQJ
10 DFFWROLVW
6LJQDOVWR1& '%
6LJQDOOLVW
5HDGLQGLVDEOH
0DFKLQLQJ
6WDWXVFRQWURO
&KDQQHO VLJQDOV
1&SDUWSURJUDP 5HDGLQGLVDEOH ฺ
'% )&<
ฺ
5HDGLQGLVDEOH
10
'%
5HDGLQGLVDEOH
Basic Functions
848 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P3: Basic PLC program for SINUMERIK 840D sl
12.10 Structure and functions of the basic program
Assignment of groups
Group Extended First M address in group Last M address in group
M address
1 MSigGrp[1].MExtAdr MSigGrp[1].MFirstAdr MSigGrp[1].MLastAdr
2 MSigGrp[2].MExtAdr MSigGrp[2].MFirstAdr MSigGrp[2].MLastAdr
... ... ... ...
16 MSigGrp[16].MExtAdr MSigGrp[16].MFirstAdr MSigGrp[16].MLastAdr
Signal list
Data block DB 76 is set up when the function is activated.
A bit is set in the appropriate group in DB 76 for an M signal decoded in the list.
At the same time, a readin disable is set in the channel in which the M function has been
output.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 849
P3: Basic PLC program for SINUMERIK 840D sl
12.10 Structure and functions of the basic program
Example
Three groups of M commands are to be decoded in the following example:
● M2 = 1 to M2 = 5
● M3 = 12 to M3 = 23
● M40 = 55
Structure of the decoding list in DB 75:
Example parameters
Group Decoding list (DB 75) Signal list
Extended First Last DB 76
M address M address M address
in group in group
1 2 1 5 DBX 0.0 ... DBX 0.4
2 3 12 23 DBX 2.0 ... DBX 3.3
3 40 55 55 DBX 4.0
DATA_BLOCK DB 75
TITLE =
VERSION : 0.0
STRUCT
MSigGrp : ARRAY [1 .. 16 ] OF STRUCT
MExtAdr : INT ;
MFirstAdr : DINT;
MLastAdr : DINT;
END_STRUCT;
END_STRUCT;
BEGIN
MSigGrp[1].MExtAdr := 2;
MSigGrp[1].MFirstAdr := L#1;
MSigGrp[1].MLastAdr := L#5;
MSigGrp[2].MExtAdr := 3;
MSigGrp[2].MFirstAdr := L#12;
MSigGrp[2].MLastAdr := L#23;
MSigGrp[3].MExtAdr := 40;
MSigGrp[3].MFirstAdr := L#55;
MSigGrp[3].MLastAdr := L#55;
END_DATA_BLOCK
Basic Functions
850 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P3: Basic PLC program for SINUMERIK 840D sl
12.10 Structure and functions of the basic program
Call FB 1, DB 7(
...
ListMDecGrp := 3, //M decoding of three groups
...
);
The appending of the entry in OB 100 and transfer of DB 75 (decoding list) to the AG must
be followed by a restart. During the restart, the basic program sets up DB76 (signal list).
If the NC program is started at this point and the expanded M function (e.g. M3=17) is
processed by the NCK, this M function will be decoded and bit 2.5 set in DB 76 (see
decoding list DB 75). At the same time, the basic program sets the read-in disable and the
processing of the NC program is halted (in the corresponding NC-channel DB the entry
"expanded address M function" and "M function no." is made).
The readin disable in the channel is reset once the user has reset and, therefore,
acknowledged, all the bits output by this channel in the signal list (DB 76).
General
The user has the option of storing PLC-specific machine data in the NCK. The user can then
process these machine data after the power-up of the PLC (OB 100). This enables, for
example, user options, machine expansion levels, machine configurations, etc., to be
implemented.
The interface for reading these data lies in the DB 20. However, DB20 is set up by the basic
program during power-up only when user machine data are used i.e. sum of GP parameters
"UDInt", "UDHex" and "UDReal" is greater than zero.
The sizes of the individual areas, and hence the total length of the DB 20, is set by the
following PLC machine data:
MD14504 $MN_MAXNUM_USER_DATA_INT
MD14506 $MN_MAXNUM_USER_DATA_HEX
MD14508 $MN_MAXNUM_USER_DATA_FLOAT
These settings are specified to the user in the GP parameters "UDInt", "UDHex" and
"UDReal".
The data is stored in the DB 20 by the BP in the sequence:
1. Integer MD
2. Hexa-fields MD
3. Real MD
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 851
P3: Basic PLC program for SINUMERIK 840D sl
12.10 Structure and functions of the basic program
'%
8VHUPDFKLQH 1RRI8',QW
GDWDW\SH,17
8VHUPDFKLQH 1RRI8'+H[
GDWDW\SH%<7(
8VHUPDFKLQH 1RRI8'5HDO
GDWDW\SH5($/
Figure 12-13 DB 20
Note
If the number of PLC machine data used is increased later, then DB20 must be deleted
beforehand. To prevent such extensions in use having any effect on the existing user
program, the data in DB20 should be accessed in symbolic form wherever possible, e.g. by
means of a structure definition in the UDT.
Alarms
400120 Delete DB 20 in PLC and restart
Explanation DB length is not the same as the required DB length
Reaction Alarm display and PLC stop
Remedy Delete DB 20 followed by RESET
Continuation After cold restart
Basic Functions
852 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P3: Basic PLC program for SINUMERIK 840D sl
12.10 Structure and functions of the basic program
Example
The project in the example requires 4 integer values, 2 hexadecimal fields with bit
information and 1 real value.
Machine data:
DB 20
Address Data
0.0 123
2.0 456
4.0 789
6.0 1011
8.0 b#16#12
9.0 b#16#AC
10.0 1.234560e+02
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 853
P3: Basic PLC program for SINUMERIK 840D sl
12.10 Structure and functions of the basic program
TYPE UDT 20
STRUCT
UDInt : ARRAY [0 .. 3] OF INT;
UDHex0 : ARRAY [0 .. 15]OF BOOL;
UDReal : ARRAY [0 .. 0] OF REAL; //Description as field, for
// later expansions
END_STRUCT;
END_TYPE
Note
ARRAY OF BOOL are always sent to even-numbered addresses. For this reason, an array
range of 0 to 15 must generally be selected in the UDT definition or all Boolean variables
specified individually.
Although only a REAL value is used initially in the example, a field (with one element) has
been created for the variable. This ensures that extensions can be made easily in the future
without the symbolic address being modified.
Symbolic accesses
An entry is made in the symbol table to allow data access in symbolic form:
Access operations in user program (list includes only symbolic read access):
...
L "UData".UDInt[0];
L "UData".UDInt[1];
L "UData".UDInt[2];
L "UData".UDInt[3];
U "UData".UDHex0[0];
U "UData".UDHex0[1];
U "UData".UDHex0[2];
U "UData".UDHex0[3];
U "UData".UDHex0[4];
U "UData".UDHex0[5];
U "UData".UDHex0[6];
U "UData".UDHex0[7];
... ...
U "UData".UDHex0[15];
L "UData".UDReal[0];
...
Basic Functions
854 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P3: Basic PLC program for SINUMERIK 840D sl
12.10 Structure and functions of the basic program
General
Up to two machine control panels and one handheld unit can be in operation at the same
time. There are various connection options (Ethernet/PROFINET, PROFIBUS) for the
machine control panel (MCP) and handheld unit (HHU). It is possible to connect two MCPs
to different bus systems (mixed operation is only possible on Ethernet and PROFIBUS). This
can be achieved using FB1 parameter "MCPBusType". In this parameter, the right-hand
decade (units position) is responsible for the first MCP and the left-hand decade (tens
position) for the second MCP.
The components are parameterized by calling basic-program block FB 1 in OB 100. FB 1
stores its parameters in the associated instance DB (DB 7, symbolic name "gp_par").
Separate parameter sets are provided for each machine control panel and the handheld unit.
The input/output addresses of the user must be defined in these parameter sets. These
input/output addresses are also used in FC 19, FC 24, FC 25, FC 26 and FC 13. Further, the
addresses for status information, PROFIBUS or Ethernet/PROFINET are also to be defined.
The default time settings for timeout and cyclic forced retriggering should not be changed.
Please refer to the Operator Components manual for further information on MCPs and
handheld unit components.
Activation
Each component is activated either via the number of machine control panels ("MCPNum"
parameter) or, in the case of the handheld unit, via the "HHU" parameter. The MCP and
HHU connection settings are entered in FB1 parameters "MCPMPI", "MCPBusType" or
"BHG", "BHGMPI".
Configuration
Essentially, there are various communication mechanisms for transferring data between the
MCP/HHU and PLC. These mechanisms are characterized by the bus connection of the
MCP and HHU. In one case (Ethernet), data is transported via the "CP 840D sl".
The mechanism is parameterized completely via the MCP/HHU parameters in FB1.
In the other case the transmission is via the PLC operating system through the PROFIBUS
configuration.
The parameter setting is done via STEP 7 in HW-Config. To enable the basic program to
access the data and failure monitoring of MCP/HHU, the addresses set in FB 1-parameters
must be made available to the basic program.
An overview of the various coupling mechanisms is shown below. Mixed operation can also
be configured.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 855
P3: Basic PLC program for SINUMERIK 840D sl
12.10 Structure and functions of the basic program
If an error is detected due to a timeout monitor, an entry is made in the alarm buffer of the
PLC CPU (alarms 400260 to 400262). In this case, the input signals from the MCP or from
the handheld unit (MCP1In/MCP2In or BHGIn) are reset to 0. If it is possible to
resynchronize the PLC and MCP/HHU, communication is resumed automatically and the
error message reset by the GP.
Note
The abbreviation "(n.r.)" in the tables below means "Not relevant".
(WKHUQHW
&3 1&
'VO 0&3 0&3 ++8
LQW '
3
3/& 5
03,'3
'3
Basic Functions
856 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P3: Basic PLC program for SINUMERIK 840D sl
12.10 Structure and functions of the basic program
An error entry is also made in the PLC alarm buffer for timeouts. As a result, the following
error messages are output at the HMI:
● 400260: MCP 1 failure
or
● 400261: MCP 2 failure
● 400262: HHU failure
An MCP or HHU failure is detected immediately after a cold restart even if no data has yet
been exchanged between the MCP/HHU and PLC.
The monitoring function is activated as soon as all components have signaled "Ready" after
powerup.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 857
P3: Basic PLC program for SINUMERIK 840D sl
12.10 Structure and functions of the basic program
MCP identification
Via the Identify interface in the DB 7 it is possible to query the type of the Ethernet
component (MCP, HT2, HT8 or direct keys) with the relevant parameters at the input/output
in cyclic operation:
● Relevant parameters at the input:
"IdentMcpBusAdr", "IdentMcpProfilNo", "IdentMcpBusType", "IdentMcpStrobe"
● Relevant parameters at the output:
"IdentMcpType", "IdentMcpLengthIn", "IdentMcpLengthOut"
Basic Functions
858 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P3: Basic PLC program for SINUMERIK 840D sl
12.10 Structure and functions of the basic program
Here the DIP device address or the TCU index at the parameter "IdentMcpBusAdr" is
activated by the user program together with setting of the Strobe signal.
The input parameter "IdentMcpProfilNo" is normally to be set to the value 0. This parameter
is to be set to the value 1 only in the identification of the direct keys. The parameter
"IdentMcpBusType" currently has no significance for a user program and is to be left in its
default value.
After resetting the Strobe signal by the basic program, valid output information becomes
available to the user. The resetting of the Strobe signals by the basic program can last for
several PLC cycles (up to two seconds).
The output parameters should show the user the size of the data areas for the addressed
device. Furthermore, it can be defined here, whether an HT2 or an HT8 or no device is
connected to the connection box. With this information, the MCP channel or the HHU
channel can be activated. In the cyclic operation the parameters can be written symbolically
by the user program and read via the symbol names of the DB 7 (gp_par).
IdentMcpBusProfilNo Value
MCP, BHG, HT8, HT2 B#16#0
Direct keys, such as OP08T, OP12T B#16#1
IdentMcpType (Mcp-Type)
no device connected 0
MCP 483C IE (Compact) B#16#80
MCP 483C IE B#16#81
MCP 310 B#16#82
MCP OEM B#16#83
MCP DMG B#16#84
HT8 B#16#85
TCU_DT (direct keys) B#16#86
MCP_MPP B#16#87
HT2 B#16#88
OP08T (direct keys) B#16#89
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 859
P3: Basic PLC program for SINUMERIK 840D sl
12.10 Structure and functions of the basic program
(WKHUQHW
&3 1&.
'VO 0&3 0&3 ++8
'
LQW3/& 3
5
03,'3
'3
352),%86SURMHFW
IRU0&3++8
Basic Functions
860 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P3: Basic PLC program for SINUMERIK 840D sl
12.10 Structure and functions of the basic program
MCP failure normally switches the PLC to the STOP state. If this is undesirable, OB 82, OB
86 can be used to avoid a stop. The basic program has, as standard, the OB 82 and OB 86
call. FC5 is called in these OBs. This FC5 checks whether the failed slave is an MCP. If this
is the case, no PLC stop is triggered. Setting "MCPxStop" := TRUE causes the basic
program to deactivate the MCP as a slave via SFC 12. If the PLC does not switch to the stop
state following the failure or fault of the MCP, an alarm message will be generated via the
basic program. The interrupt is deleted when the station recovers.
(WKHUQHW
&3 1&.
'VO 0&3 0&3 ++8
'
LQW3/& 3
5
03,'3
'3
352),%86
FRQILJIRU0&3
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 861
P3: Basic PLC program for SINUMERIK 840D sl
12.10 Structure and functions of the basic program
MCP failure normally switches the PLC to the STOP state. If this is not wanted, OB 82, OB
86 can be used to avoid a PLC stop. The basic program has, as standard, the OB 82 and
OB 86 call. FC5 is called in these OBs. This FC5 checks whether the failed slave is an MCP.
If this is the case, no PLC stop is triggered. Setting MCPxStop := True causes the basic
program to deactivate the MCP as a slave via SFC 12. If the PLC does not switch to the stop
state following the failure or fault of the MCP, an alarm message will be generated via the
basic program. The alarm is deleted when the station returns.
Basic Functions
862 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P3: Basic PLC program for SINUMERIK 840D sl
12.10 Structure and functions of the basic program
(WKHUQHW
&3 1&.
'VO 0&3 0&3 ++8
'
LQW3/& 3
5
03,'3
'3
352),1(7
352),1(7
SURMHFWIRU0&3
MCP failure normally switches the PLC to the STOP state. If this is not wanted, then OB 82,
OB 86 can be used to avoid a PLC stop. The basic program has, as standard, the OB 82
and OB 86 call. FC5 is called in these OBs. This FC5 checks whether the failed slave is an
MCP. If this is the case, no PLC stop is triggered. The input address at parameter MCPxIn is
of significance when monitoring for MCPxIn failure.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 863
P3: Basic PLC program for SINUMERIK 840D sl
12.10 Structure and functions of the basic program
Setting MCPxStop := True causes the basic program to deactivate the MCP as a slave via
SFC 12. If the PLC does not switch to the stop state following the failure or fault of the MCP,
an alarm message will be generated via the basic program. The alarm is deleted when the
station returns.
Control signals
Parameters MCP1Stop, MCP2Stop and BHGStop can be used to stop communication with
individual components (parameter setting = 1). This function is available only on Ethernet
variants. This stop or activation of communication can be applied in the current cycle.
However, the change in value must be implemented through the symbolic notation of the
parameters and not by means of another FB 1 call.
Example of stopping transfer from the 1st machine control panel:
SET;
S gp_par.MCP1Stop;
Basic Functions
864 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P3: Basic PLC program for SINUMERIK 840D sl
12.10 Structure and functions of the basic program
3. In this PLC cycle, communication with the new component can now be activated again by
means of parameter MCP1Stop or MCP2Stop or BHGStop = 0.
4. Communication with the new component is taking place when the checkback is in DB 10
byte 104 (relevant bits 0, 1, 2 are set to 1).
Example:
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 865
P3: Basic PLC program for SINUMERIK 840D sl
12.11 SPL for Safety Integrated
Number Significance
FB 15 Basic program
FB 1, FC 2, FC 3, FC 5 Basic program
FC 0 ... 29 Reserved for Siemens
FB 0 ... 29 Reserved for Siemens
FC 30 ... 999 1) Free for user assignment
FB 30 ... 999 1) Free for user assignment
FC 1000 ... 1023 Reserved for Siemens
FB 1000 ... 1023 Reserved for Siemens
FC 1024 ... upper limit Free for user assignment
FB 1024 ... upper limit Free for user assignment
1) The actual upper limit of the block number (FB/FC) depends on the PLC CPU on which the
selected NCU is located.
Note
Values of FC, FB see " Memory requirements of the basic PLC program (Page 872)".
Basic Functions
866 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P3: Basic PLC program for SINUMERIK 840D sl
12.12 Assignment overview
12.12.3 Assignment: DB
Note
Only as many data blocks as are required according to the NC machine data configuration
are set up.
Note
The data blocks of channels, axes/spindles and tool management functions that are not
activated may be assigned as required by the user.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 867
P3: Basic PLC program for SINUMERIK 840D sl
12.13 PLC functions for HMI
Function
The NC program to be executed can be specified via the PLC. The names of the NC
programs are entered in program lists.
There are two types of program lists that are dependent on the access level where NC
programs are combined into different files for SINUMERIK Operate:
1. user: Editing possible by the user (access level 3).
2. manufacturer: Editing possible only by the manufacturer (access level 1).
References
SINUMERIK Operate (IM9) Commissioning Manual; General Settings, Section "Access
levels"
Basic Functions
868 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P3: Basic PLC program for SINUMERIK 840D sl
12.13 PLC functions for HMI
Interface signals
Jobs from the PLC to HMI; perform a program selection in the NC:
Acknowledgement byte from HMI for the current data transfer status:
Job processing
A PLC job is processed according to the following scheme:
● The PLC may only initiate a job in the job byte if the acknowledgement byte is 0.
● The HMI mirrors the job (excluding the parameter set) in the acknowledgement byte
(signaling to the PLC that its job is being processed). The PLC receives a "job active"
signal for an unfinished job.
● Once the operation is finished (without error or with error), the PLC must respond again
and delete the job byte.
● The HMI then sets the acknowledgement byte to 0. This ensures a sequential procedure.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 869
P3: Basic PLC program for SINUMERIK 840D sl
12.13 PLC functions for HMI
For further explanations of the interface signals, see Section "A2: Various NC/PLC interface
signals and functions (Page 33)".
Interface signal
Basic Functions
870 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P3: Basic PLC program for SINUMERIK 840D sl
12.13 PLC functions for HMI
Byte Meaning
0 Saves the PLC-ID of the active operating
area.
2 Saves the PLC-ID of the window that is
3 currently selected.
The machine data is a string and is interpreted as a pointer to a PLC data area with specified
byte offset, e.g. DB60.DBB10. The PLC data area encompasses 8 bytes of the PLC. The
start address must have an even byte offset (0, 2, 4, 6, 8, etc.).
Example
DB60.DBB10 for data block 60, byte 10
Reserves the bytes 10, 11, 12, 13, 14, 15, 16, 17 as HMI monitor
DB60.DBB10: PLC-ID of the active operating area
DB60.DBW12: PLC-ID of the window that is currently selected
Note
When using the HMI monitor, the corresponding variables in the PLC user interface –
DB19.DBB21 and DB19.DBW24 – are no longer supplied.
This means that either the user interface or the HMI monitor can be used – but not both
simultaneously.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 871
P3: Basic PLC program for SINUMERIK 840D sl
12.14 Memory requirements of the basic PLC program
Basic Functions
872 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P3: Basic PLC program for SINUMERIK 840D sl
12.14 Memory requirements of the basic PLC program
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 873
P3: Basic PLC program for SINUMERIK 840D sl
12.14 Memory requirements of the basic PLC program
Example:
Based on the memory requirements in the table above, the memory requirements have been
determined for two sample configurations (see table below).
Basic Functions
874 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P3: Basic PLC program for SINUMERIK 840D sl
12.15 Basic conditions and NC VAR selector
Hardware
For the PLCs used in SINUMERIK 840D sl, the following equipment is required for the
programming devices or PCs:
Minimum Recommendation
Processor Pentium Pentium
RAM (MB) 256 512 or more
Hard disk, 500 > 500
free capacity (MB)
Interfaces MPI, Ethernet incl. cable
Memory card
Graphic SVGA (1024*768)
Mouse Yes
Operating system Windows 2000 /XP Professional, STEP 7 version 5.3 SP2 or
higher
The required version of STEP 7 can be installed on equipment meeting the above
requirements in cases where the package has not already been supplied with the
programming device.
The following functions are possible with this package:
● Programming
– Editors and compilers for STL (complete scope of the language incl. SFB/SFC calls),
LAD, FBD
– Creation and editing of assignment lists (symbol editor)
– Data block editor
– Input and output of blocks ON/OFF line
– Insertion of modifications and additions ON and OFF line
– Transfer of blocks from programming device to the PLC and vice versa
● Parameterizing
– Parameterizing tool HW Config for CPU and I/O device parameterization
– NetPro parameterizing tool for setting the CPU communication parameters
– Output of system data such as hardware and software version, memory capacity, I/O
expansion/assignment
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 875
P3: Basic PLC program for SINUMERIK 840D sl
12.15 Basic conditions and NC VAR selector
Note
More information about possible functions can be found in SIMATIC catalogs and
STEP 7 documentation.
Basic Functions
876 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P3: Basic PLC program for SINUMERIK 840D sl
12.15 Basic conditions and NC VAR selector
12.15.2.1 Overview
General
The PC application "NC VAR selector" fetches the addresses of required NC variables and
processes them for access in the PLC program (FB 2/FB 3). This enables the programmer to
select NC variables from the entire range of NC variables, to store this selection of variables,
to edit them by means of a code generator for the STEP 7 compiler and finally to store them
as an ASCII file (*.AWL) in the machine CPU program. This process is shown in the figure
"NC VAR selector".
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 877
P3: Basic PLC program for SINUMERIK 840D sl
12.15 Basic conditions and NC VAR selector
For storing the files created by NC-VAR-selector a catalog is to be implemented via the
Windows Explorer with any catalog name. The selected data of the NC-VAR selector
(data.VAR and data.AWL files) must be stored in this catalog. Thereafter, the STL file is to
be transferred and compiled via the menu option "Code" → "in STEP 7 Project". The
"data.AWL" (STL data) file must then be inserted into the STEP 7 machine project via
"Insert", "External Source" in the STEP 7 Manager. The source container must be selected
in the manager for this purpose. This action stores this file in the project structure. Once the
file has been transferred, these AWL (STL) files must be compiled with STEP 7.
Note
The latest NC VAR selector can be used for each NC software version (even earlier
versions). For older NC software versions the variables can also be selected from the latest
complete list. The data content in DB 120 (default DB for variables) does not depend on the
software status. That is, variables selected in an older software version need not be
reselected when the software is upgraded.
3URMHFW
YDU DZO
PGE
+DUGGLVN
After the "NC VAR selector" application has been started, select a list of variables of an NC
variant (hard disk → file Ncv.mdb) to display all the variables contained in this list in a
window.
Basic Functions
878 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P3: Basic PLC program for SINUMERIK 840D sl
12.15 Basic conditions and NC VAR selector
Variables List
NC variables including machine and setting data: ncv_NcData.mdb
Parameters of the drive: ncv_SinamicsServo.mdb
The user can also transfer variables to a second list (separate window). This latter selection
of variables can then be stored in an ASCII file or edited as a STEP 7 source file (.awl) and
stored.
After generating a PLC data block by means of the STEP 7 compiler, the programmer is able
to read or write NCK variables via the basic program function blocks "PUT" and "GET" using
the STEP 7 file.
The list of selected variables is also stored as an ASCII file (file extension .var).
The variable list supplied with the "NC VAR selector" tool is adapted to the current NC
software version. This list does not contain any variables (GUD variables) defined by the
user. These variables are processed by the function block FB 5 in the basic program.
Note
The latest version of the "NC VAR selector" is capable of processing all previous NC
software versions. It is, therefore, not necessary to install different versions of the "NC VAR
selector" in parallel.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 879
P3: Basic PLC program for SINUMERIK 840D sl
12.15 Basic conditions and NC VAR selector
Overview
The figure below illustrates how the NC VAR selector is used within the STEP 7
environment.
1&9$5VHOHFWRU 67(3b
8VHUGDWD
8, 9DU,'
&DOO)%9DU $UHDXQLW
9DU1DPH &ROXPQ
The NC VAR selector is used to generate a list of selected variables from a list of variables
and then to generate an .awl file that can be compiled by the STEP 7 compiler.
● A *.awl file contains the names and alias names of the NC variables, as well as
information about their address parameters. Any data block generated from this file will
only contain the address parameters (10 bytes per parameter).
● The generated data blocks must always be stored in the machine-specific file storage
according to STEP 7 specifications.
● To ensure that the parameterization of the GET/PUT (FB 2/3) blocks with respect to NC
addresses can be implemented with symbols, the freely assignable, symbolic name of the
generated data block must be included in the STEP 7 symbol table.
Basic Functions
880 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P3: Basic PLC program for SINUMERIK 840D sl
12.15 Basic conditions and NC VAR selector
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 881
P3: Basic PLC program for SINUMERIK 840D sl
12.15 Basic conditions and NC VAR selector
If, after selection of the project, new variables are to be added, a complete list of NC
variables must be selected. No complete list need be called if the user only wishes to delete
variables from the project.
Basic Functions
882 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P3: Basic PLC program for SINUMERIK 840D sl
12.15 Basic conditions and NC VAR selector
Storing a project
The variable list is stored using the "Project" > "Save" or "Save As...." menu items.
"Save" stores the variable list under a path, which is already specified. If the project path is
not known, then the procedure is as for "Save As....".
"Save As..." displays a window in which the path for the project to be stored can be
specified.
Printing a project
The "Print" command under the "Project" menu item can be selected to print a project file.
The number of lines per page is selected under the "Print Setting" menu item. The default
setting is 77 lines.
Undoing actions
Operator actions relating to the creation of the project file (transfer variables, delete
variables, change alias names) can be undone in this menu.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 883
P3: Basic PLC program for SINUMERIK 840D sl
12.15 Basic conditions and NC VAR selector
The field variables (e.g. axis area, T area data, etc.) are indicated by means of brackets ([.]).
Additional information must be specified here. When the variables are transferred to the
project list, the additional information required is requested.
Displaying subsets
Double-click on any table field (with the exception of variable fields) to display a window in
which filter criteria can be preset.
Figure 12-24 Window with filter criteria for displaying list of variables
Basic Functions
884 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P3: Basic PLC program for SINUMERIK 840D sl
12.15 Basic conditions and NC VAR selector
Alias name
The variable names provided can be up to 32 characters in length. To make variables clearly
identifiable in the data block to be generated, several ASCII characters are added to the
selected name. However, the STEP 7 compiler recognizes only 24 ASCII characters as an
unambiguous STEP 7 variable. Since it cannot be precluded that variable names can only be
differentiated by the last 8 character positions, ALIAS names are used for names, which are
too long. When a variable is selected, the length of the STEP 7 name to be used is,
therefore, checked. If the name is longer than 24 characters, the user must enter an
additional name, which is then used as the alias.
In this case, the user must ensure that the alias name is unambiguous.
Alias input can always be activated by the user in the "Options" menu.
An alias name can then be entered every time a variable is transferred.
It is also possible to edit alias names at a later point in time by double-clicking on the S7
variable name field. This action can also be undone under the "Edit" menu item.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 885
P3: Basic PLC program for SINUMERIK 840D sl
12.15 Basic conditions and NC VAR selector
Scrolling
A scroll bar is displayed if it is not possible to display all variables in the window. The
remaining variables can be reached by scrolling (page up/down).
Figure 12-26 Entry field for line, column and block no.
Basic Functions
886 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P3: Basic PLC program for SINUMERIK 840D sl
12.15 Basic conditions and NC VAR selector
Delete variables
Variables are deleted in the window of selected variables by selecting the appropriate
variables (single mouse click) and pressing the "Delete" key. No deletion action is taken with
the double-click function. It is possible to select several variables for deletion (see Section
"Example of search criteria > Selecting variables").
This action can also be undone under the "Edit" menu item.
Note
Deleting of variables results in a change of the absolute addresses of the pointer structures
to the variables. When changing the variable selection, it is, therefore, absolutely necessary
to generate one or several text files of all user blocksprior to the change. This is the only way
to ensure that the assignment of the variables in FB "GET" or FB "PUT" remains correct,
even after recompilation.
Figure 12-27 Window for project path and name of file to be stored
Code generation
This menu item contains three selection options:
1. Settings (input of data block number to be generated) and other settings
2. Generate (create data block)
3. In the STEP 7 project (transferring the data block to a STEP 7 project)
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 887
P3: Basic PLC program for SINUMERIK 840D sl
12.15 Basic conditions and NC VAR selector
Settings
Under this menu item, the DB number and the symbol for this DB number for which the code
is created is entered.
Under the "Mass System" tab, a selection is made to determine how the unit system
variables are calculated in the PLC.
Under the "Generate" tab, the project creation is defined for the relevant target system.
Generate
Under this menu item, the STEP 7 file from the selected variable list with extension ".awl" is
set.
A file is generated when "Select" is clicked:
An .awl file that can be used as an input for the STEP 7 compiler.
A window opens, in which path and name for the .awl file to be generated must be specified
for the file to be saved.
In STEP 7 project
The generated STL file is transferred to a selectable SIMATIC project (program path) and
compiled. Furthermore, the symbol can also be transferred. This function is available as of
STEP 7 Version 5.1. This process takes a longer time owing to the call of STEP 7. Before
transferring a new STL file the file window of the STL file is to be closed in the LAD/FBD/STL
editor.
Basic Functions
888 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
Function
The synchronization of NCK and PLC is performed during startup. The data blocks for the
NC/PLC user interface are created with reference to the NC configuration defined in the
machine data and the most important parameters verified for plausibility. In the event of an
error, FB 1 passes an error identifier to the diagnostics buffer and switches the PLC to the
STOP state.
To enable an orderly start-up of the control, it is vital to synchronize the NCK and PLC, as
these systems have their own types of power-up procedure. During startup routine,
therefore, the CPUs perform "subsidiary startup functions" and exchange ID information to
ensure that the procedure is functioning correctly.
Since the startup procedure is asynchronous, it is unavoidable that one CPU may have to
"wait" until the other has "caught up". This is automatically managed by the basic program.
The integrated PLC only supports cold starts. A warm restart is not provided, i.e. following
system initialization, the operating system runs organization block OB 100 and always
commences cyclic execution at the start of OB 1.
Users need only supply the FB 1 parameters that are relevant to their applications. The
preset values in the associated instance DB 7 do not need to be assigned. The block can
only be called in OB 100.
Output parameters
The output parameters in FB 1 provide the PLC user with information about the control
system configuration. This data can also be accessed in the cyclic program section.
There are two access options:
1. Direct access to the DB 7 data block (instance of the FB 1) in symbolic format (e.g. L
gp_par.MaxChan; in this case, gp_par is the symbolic name of the DB 7).
2. Assignment of a flag; during parameterization of the FB 1, the data element is assigned
to the relevant parameter (e.g. MaxChan:=MW 20). Information about the maximum
number of channels can then be polled in memory word 20 in the rest of the user
program.
Note
For the values of the parameters of MCP and HHU see "Configuration machine control
panel, handheld unit, direct keys (Page 855) ".
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 889
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
FUNCTION_BLOCK FB 1
VAR_INPUT
MCPNum: INT:=1; //0: No MCP
//1: 1 MCP (default)
//2: 2 MCPs
MCP1In: POINTER; //Start addr. input signals MCP 1
MCP1Out: POINTER; //Start addr. output signals MCP
1
MCP1StatSend: POINTER; //Status DW for sending MCP 1
MCP1StatRec: POINTER; //Status DW for receiving MCP 1
MCP1BusAdr: INT:=6; //Default
MCP1Timeout: S5TIME:= S5T#700MS;
MCP1Cycl: S5TIME:= S5T#200MS;
MCP2In: POINTER; //Start addr. input signals MCP 2
MCP2Out: POINTER; //Start addr. output signals MCP
2
MCP2StatSend: POINTER; //Status DW for sending MCP 2
MCP2StatRec: POINTER; //Status DW for receiving MCP 2
MCP2BusAdr: INT;
MCP2Timeout: S5TIME:= S5T#700MS;
MCP2Cycl: S5TIME:= S5T#200MS;
MCPMPI: BOOL:= FALSE;
MCP1Stop: BOOL:= FALSE;
MCP2Stop: BOOL:= FALSE;
MCP1NotSend: BOOL:= FALSE;
MCP2NotSend: BOOL:= FALSE;
MCPSDB210: BOOL:= FALSE;
MCPCopyDB77: BOOL:= FALSE;
MCPBusType: BYTE=B#16#0;
HHU: INT:=0; //Handheld unit interface
//0: No HHU
//1: HHU on MPI
//2: HHU on OPI
BHGIn: POINTER; //Transmit data of the HHU
BHGOut: POINTER; //Receive data of the HHU
BHGStatSend: POINTER; //Status DW for sending HHU
BHGStatRec: POINTER; //Status DW for receiving HHU
BHGInLen: BYTE:= B#16#6; //Input 6 bytes
BHGOutLen: BYTE:= B#16#14; //Output 20 bytes
BHGTimeout: S5TIME:= S5T#700MS;
BHGCycl: S5TIME:= S5T#100MS;
BHGRecGDNo: INT:=2;
BHGRecGBZNo: INT:=2;
BHGRecObjNo: INT:=1;
BHGSendGDNo: INT:=2;
BHGSendGBZNo: INT:=1;
BHGSendObjNo: INT:=1;
BHGMPI: BOOL:= FALSE;
BHGStop: BOOL:= FALSE;
BHGNotSend: BOOL:= FALSE;
Basic Functions
890 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
VAR_OUTPUT
MaxBAG: INT;
MaxChan: INT;
MaxAxis: INT;
ActivChan: ARRAY[1..10] OF BOOL;
ActivAxis: ARRAY[1..31] OF BOOL;
UDInt : INT;
UDHex: INT;
UDReal : INT;
IdentMcpType : BYTE ;
IdentMcpLengthIn : BYTE ;
IdentMcpLengthOut BYTE ;
:
END_VAR
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 891
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
Basic Functions
892 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 893
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
Basic Functions
894 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 895
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
ORGANIZATION_BLOCK OB 100
VAR_TEMP
OB100_EV_CLASS : BYTE ;
OB100_STRTUP : BYTE ;
OB100_PRIORITY : BYTE ;
OB100_OB_NUMBR : BYTE ;
OB100_RESERVED_1 : BYTE ;
OB100_RESERVED_2 : BYTE ;
OB100_STOP : WORD ;
OB100_RESERVED_3 : WORD ;
OB100_RESERVED_4 : WORD ;
OB100_DATE_TIME : DATE_AND_TIME;
END_VAR
BEGIN
CALL FB 1, DB 7 (
MCPNum := 1,
MCP1In := P#E0.0,
MCP1Out := P#A0.0,
MCP1StatSend := P#A8.0,
MCP1StatRec := P#A12.0,
MCP1BusAdr := 6,
MCP1Timeout := S5T#700MS,
MCP1Cycl := S5T#200MS,
NC-CyclTimeout := S5T#200MS,
NC-RunupTimeout := S5T#50S);
//INSERT USER PROGRAM HERE
END_ORGANIZATION_BLOCK
Basic Functions
896 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
Function
The FB 2 "GET" function block can be used to read variables from the area of the NC from
the PLC user program. The FB is multi-instance-capable.
FB 2 also includes an Instance DB from the user area.
When FB 2 is called with a positive signal edge change at control input "Req", a job is
started, which reads the NCK variables referenced by "Addr1" to "Addr8" and then copies
them to the PLC operand areas referenced by "RD1" to "RD8". Successful completion of the
read process is indicated by a logical "1" in status parameter "NDR".
The read operation lasts for several PLC cycles (normal case: 1 - 2 PLC cycles). The block
can be called up in cyclic mode only.
Any errors are displayed via "Error" and "State".
In order to reference the NC variables, they are first selected with the "NC VAR selector" tool
and generated as STL source in a data block. A name must then be assigned to this data
block in the signal list. When calling FB 2, the variable addresses are then transferred in the
following form for parameters "Addr1" to "Addr8":
"<DB name>.<S7 name>".
Variable addressing
For some NC variables, it is necessary to select "Area no." and/or "Line" or "Column" from
the NC VAR selector. For these variables it is possible to select a basic type,
i.e. "Area no.", "Line" and "Column" are preassigned "0".
The contents of the "Area no.", "Line" and "Column" specified by the NC VAR selector are
checked for a "0" in FB 2. If a "0" is present, the value is transferred to the input parameter.
Before calling FB 2, the user must supply the appropriate parameters:
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 897
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
Note
FB 2 can read NC variables only if basic program parameter NCKomm "1" has been set to
"1" (in OB 100: FB 1, DB 7). The call is permitted only in cyclic program OB1. An assignment
for all parameters with "Req" = 0 is also permitted in OB 100.
Channel-specific variables
When channel-specific variables are read, only variables from one channel may be
addressed via "Addr1" to "Addr8" when FB 2 is called.
Drive-specific variables
When drive-specific variables are read, only variables from one SERVO drive object may be
addressed via "Addr1" to "Addr8" when FB 2 is called. The SERVO drive object must be
assigned to a machine axis of the NC. The line index corresponds to the logical drive
number.
Error case
In the event of an error, reading of variables from different channels or drive objects, or
simultaneously from a channel and a drive object, the following is provided as feedback:
• "Error" == TRUE
• "State" == W#16#02
Area
Group 1 C[1] N B A T
Group 2 C[2] N B A T
Group 3 V[.] H[.]
The same rules apply for channels 3 to 10 as for group 1 and group 2 shown in the example.
Note
The number of usable variables can be less than eight when simultaneously reading several
variables of the "String" type.
FUNCTION_BLOCK FB 2
VAR_INPUT
Req : BOOL;
NumVar : INT;
Addr1 : ANY ;
Unit1 : BYTE ;
Column1 : WORD ;
Line1 : WORD ;
Addr2 : ANY ;
Unit2 : BYTE ;
Basic Functions
898 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
Column2 : WORD ;
Line2 : WORD ;
Addr3 : ANY ;
Unit3 : BYTE ;
Column3 : WORD ;
Line3 : WORD ;
Addr4 : ANY ;
Unit4 : BYTE ;
Column4 : WORD ;
Line4 : WORD ;
Addr5 : ANY ;
Unit5 : BYTE ;
Column5 : WORD ;
Line5 : WORD ;
Addr6 : ANY ;
Unit6 : BYTE ;
Column6 : WORD ;
Line6 : WORD ;
Addr7 : ANY ;
Unit7 : BYTE ;
Column7 : WORD ;
Line7 : WORD ;
Addr8 : ANY ;
Unit8 : BYTE ;
Column8 : WORD ;
Line8 : WORD ;
END_VAR
VAR_OUTPUT
Error : BOOL;
NDR : BOOL;
State : WORD ;
END_VAR
VAR_IN_OUT
RD1 : ANY ;
RD2 : ANY ;
RD3 : ANY ;
RD4 : ANY ;
RD5 : ANY ;
RD6 : ANY ;
RD7 : ANY ;
RD8 : ANY ;
END_VAR
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 899
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
Error identifiers
If it was not possible to execute a job, the failure is indicated by "logic 1" on status parameter
"Error". The error cause is coded at the block output State:
Basic Functions
900 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
Configuration steps
Proceed as follows to read NC variables:
● Select variables with the NC VAR selector.
● Save selected variables in a *.VAR file.
● Generate a STEP 7 *.STL source file.
● Generate a DB with the associated address data.
● Enter the symbol for the generated DB in the symbol table so that it is possible to access
the address parameters symbolically in the user program.
● Parameterization of FB 2.
Pulse diagram
5HT
1'5
(UURU
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 901
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
Call example
Reading of three channel-specific machine data from channel 1, whose address
specifications are stored in DB120.
Select data with NC VAR selector and store in file DB120.VAR; then create file DB120.AWL:
Basic Functions
902 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
NDR := M100.1,
State := MW104,
RD1 := P#DB99.DBX0.0 BYTE 1,
RD2 := P#DB99.DBX1.0 BYTE 1,
RD3 := P#M110.0 INT 1);
DATA_BLOCK DB 120
VERSION : 0.0
STRUCT
C1_RP_rpa0_0:
STRUCT
SYNTAX_ID : BYTE := B#16#82;
area_and_unit : BYTE := B#16#41;
column : WORD := W#16#1;
line : WORD := W#16#0;
block type : BYTE := B#16#15;
NO. OF LINES : BYTE := B#16#1;
type : BYTE := B#16#F;
length : BYTE := B#16#8;
END_STRUCT;
END_STRUCT;
BEGIN
END_DATA_BLOCK
CALL FB 2, DB 110 (
Req := M 0.0,
NumVar := 2,
Addr1 := "NCVAR".C1_RP_rpa0_0,
Line1 := W#16#1,
Addr2 := "NCVAR".C1_RP_rpa0_0,
Line2 := W#16#2,
Error := M 1.0,
NDR := M 1.1,
State := MW 2,
RD1 := P#M 4.0 REAL 1,
RD2 := P#M 24.0 REAL 1);
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 903
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
Data types
The data types of the NCK are listed in the NC VAR selector with the variables. The tables
below give the assignments to the S7 data types.
In order to read a variable of the "double" type from the NCK without adapting the format, an
ANY pointer of the REAL 2 type must be specified in the target area for read data (e.g.
P#M100.0 REAL 2). If the basic program recognizes REAL 2 as the target type when
reading a variable of the "double" type, the data is applied to the PLC data area as a 64-bit
floating-point number.
Function
The FB 3 "PUT" function block can be used to write variables to the area of the NC from the
PLC user program. The FB is multi-instance-capable.
Every FB 3 call must be assigned a separate instance DB from the user area.
When FB 3 is called with a positive signal edge change at control input "Req", a job is
started to overwrite the NC variables referenced by "Addr1" to "Addr8" with the data of the
PLC operand areas locally referenced by "SD1" to "SD8". Successful completion of the write
process is indicated by a logical "1" in status parameter "Done".
The write operation lasts for several PLC cycles (normal case: 1 - 2 PLC cycles). The block
can be called up in cyclic mode only.
Any errors are displayed via "Error" and "State".
In order to reference the NC variables, all required variables are first selected with the "NC
VAR selector" tool and generated as STL source in a data block. A name must then be
assigned to this DB in the symbol table. When calling FB 3, the variable addresses are then
transferred in the following form for parameters "Addr1" to "Addr8":
"<DB name>.<S7 name>".
Basic Functions
904 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
Variable addressing
For some NC variables, it is necessary to select "Area no." and/or "Line" or "Column" from
the NC VAR selector. For these variables it is possible to select a basic type, i.e. "Area no.",
"Line" and "Column" are preassigned "0".
The contents of the "Area no.", "Line" and "Column" specified by the NC VAR selector are
checked for a "0" in FB 3. If a "0" is present, the value is transferred to the input parameter.
Before calling FB 3, the user must supply the appropriate parameters:
Note
FB 3 can only write NC variables if basic program parameter "NCKomm" has been set to
"1" (in OB 100: FB 1, DB 7). The call is permitted only in cyclic program OB1. An
assignment for all parameters with "Req" = 0 is also permitted in OB 100.
Channel-specific variables
When channel-specific variables are written, only variables from one channel may be
addressed via "Addr1" to "Addr8" when FB 3 is called.
Drive-specific variables
When drive-specific variables are written, only variables from one SERVO drive object
may be addressed via "Addr1" to "Addr8" when FB 3 is called. The SERVO drive object
must be assigned to a machine axis of the NC. The line index corresponds to the logical
drive number.
Error case
In the event of an error, writing of variables from different channels or drive objects, or
simultaneously from a channel and a drive object, the following is provided as feedback:
• "Error" == TRUE
• "State" == W#16#02
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 905
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
Area
Group 1 C[1] N B A T
Group 2 C[2] N B A T
Group 3 V[.] H[.]
The same rules apply for channels 3 to 10 as for group 1 and group 2 shown in the example.
Note
The number of usable variables can be less than eight when simultaneously writing several
variables of the "String" type.
FUNCTION_BLOCK FB 3
VAR_INPUT
Req : BOOL;
NumVar : INT;
Addr1 : ANY ;
Unit1 : BYTE ;
Column1 : WORD ;
Line1 : WORD ;
Addr2 : ANY ;
Unit2 : BYTE ;
Column2 : WORD ;
Line2 : WORD ;
Addr3 : ANY ;
Unit3 : BYTE ;
Column3 : WORD ;
Line3 : WORD ;
Addr4 : ANY ;
Unit4 : BYTE ;
Column4 : WORD ;
Line4 : WORD ;
Addr5 : ANY ;
Unit5 : BYTE ;
Column5 : WORD ;
Line5 : WORD ;
Addr6 : ANY ;
Unit6 : BYTE ;
Column6 : WORD ;
Basic Functions
906 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
Line6 : WORD ;
Addr7 : ANY ;
Unit7 : BYTE ;
Column7 : WORD ;
Line7 : WORD ;
Addr8 : ANY ;
Unit8 : BYTE ;
Column8 : WORD ;
Line8 : WORD ;
END_VAR
VAR_OUTPUT
Error : BOOL;
Done : BOOL;
State : WORD ;
END_VAR
VAR_IN_OUT
SD1 : ANY ;
SD2 : ANY ;
SD3 : ANY ;
SD4 : ANY ;
SD5 : ANY ;
SD6 : ANY ;
SD7 : ANY ;
SD8 : ANY ;
END_VAR
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 907
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
Error identifiers
If it was not possible to execute a job, the failure is indicated by "logic 1" on status parameter
error. The error cause is coded at the block output State:
Configuration steps
To write NC variables, the same configuration steps are required as for reading NC
variables. It is useful to store the address data of all NC variables to be read or written in a
DB.
Basic Functions
908 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
Pulse diagram
5HT
'RQH
(UURU
Call example
Writing of three channel-specific machine data of channel 1:
Select the three data with NC VAR selector and store in the file DB120.VAR:
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 909
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
DATA_BLOCK DB 120
VERSION : 0.0
STRUCT
C1_RP_rpa0_0:
STRUCT
SYNTAX_ID : BYTE := B#16#82;
area_and_unit : BYTE := B#16#41;
column : WORD := W#16#1;
line : WORD := W#16#0;
block type : BYTE := B#16#15;
NO. OF LINES : BYTE := B#16#1;
type : BYTE := B#16#F;
length : BYTE := B#16#8;
END_STRUCT;
END_STRUCT;
BEGIN
END_DATA_BLOCK
CALL FB 3, DB 122 (
Req := M 10.0,
NumVar := 2,
Addr1 := "NCVAR".C1_RP_rpa0_0,
Line1 := W#16#1,
Addr2 := "NCVAR".C1_RP_rpa0_0,
Line3 := W#16#2
Error := M 11.0,
Done := M 11.1,
Basic Functions
910 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
State := MW 12,
SD1 := P#M 4.0 REAL 1,
SD2 := P#M 24.0 REAL 1);
12.16.4 PI services
Function
The function block FB 4 "PI_SERV" can be used to start program instance services (PI
services) in the NC area. Every FB 4 call must be assigned an instance DB from the user
area.
Note
It is recommended that instead of FB 4 the extended function block FB 7 is used. See
Section "FB 7: PI_SERV2 (PI service request) (Page 947)".
The required PI service must be referenced via the "PIService" parameter. The Addr and
WVar parameters can be used to parameterize the selected PI service.
The job is started when FB 4 is called by means of a positive edge change at control input
"Req". Successful execution of the job is displayed by means of a logical "1" at the "Done"
output. Any errors are displayed via the "Error" and "State" outputs.
The DB 16 "PI" data block contains internal descriptions of the possible PI services. A name
must then be assigned to this data block in the signal list. On calling the FB 4, "DB-Name.PI-
Name" is transferred as the actual parameter for "PIService".
The execution of the PI service generally extends over several PLC cycles.
Requirements
FB 4 can start PI services only if the basic program parameter NCKomm = 1 has been set
(OB 100: FB 1, DB 7).
Supplementary conditions
The call is permitted only in cyclic program OB1. Writing of the parameters in OB 100 is also
permissible without starting the request (Req = 0).
FUNCTION_BLOCK FB 4
VAR_INPUT
w Req : BOOL;
PIService : ANY ;
Unit : INT;
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 911
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
Addr1 : ANY ;
Addr2 : ANY ;
Addr3 : ANY ;
Addr4 : ANY ;
WVar1 : WORD ;
WVar2 : WORD ;
WVar3 : WORD ;
WVar4 : WORD ;
WVar5 : WORD ;
WVar6 : WORD ;
WVar7 : WORD ;
WVar8 : WORD ;
WVar9 : WORD ;
WVar10 : WORD ;
END_VAR
VAR_OUTPUT
Error : BOOL;
Done : BOOL;
State : WORD ;
END_VAR
Basic Functions
912 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
Error identifiers
If it was not possible to execute a job, the failure is indicated by "logic 1" at "Error" output.
The cause of the error is displayed at the "State" output:
Flow diagram
5HT
'RQH
(UURU
General PI services
PI service Function
ASUB (Page 914) Assign interrupt
CANCEL (Page 915) Execute cancel
CONFIG (Page 916) Reconfiguration of tagged machine data
DIGION (Page 916) Digitizing on
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 913
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
PI service Function
DIGIOF (Page 916) Digitizing off
FINDBL (Page 917) Activate block search
LOGIN (Page 917) Activate password
LOGOUT (Page 917) Reset password
NCRES (Page 918) Trigger NC-RESET
SELECT (Page 918) Select program for processing for one channel
SETUDT (Page 919) Sets the current user data to active
SETUFR (Page 919) Activate user frame
RETRAC (Page 919) Retraction of the tool in the tool direction
PI service Function
CRCEDN (Page 920) Create a tool cutting edge with specification of the T number
CREACE (Page 921) Create a tool cutting edge with the next higher/free D number
CREATO (Page 921) Create a tool with specification of a T number.
DELECE (Page 922) Delete a tool cutting edge
DELETO (Page 922) Delete tool
MMCSEM (Page 923) Semaphores for various PI services
TMCRTO (Page 924) Create a tool with specification of a name, a duplo number
TMFDPL (Page 925) Empty location search for loading
TMFPBP (Page 926) Empty location search
TMGETT (Page 927) T number for the specified tool name with duplo number
TMMVTL (Page 928) Prepare magazine location for loading, unload tool
TMPOSM (Page 929) Position magazine location or tool
TMPCIT (Page 930) Set increment value for workpiece counter
TMRASS (Page 931) Reset active status
TRESMO (Page 931) Reset monitoring values
TSEARC (Page 932) Complex search using search screen forms
TMCRMT (Page 935) Create multitool
TMDLMT (Page 935) Delete multitool
POSMT (Page 936) Position multitool
FDPLMT (Page 937) Search/check an empty location within the multitool
Basic Functions
914 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
References
Programming Manual, Job Planning; Section: "File and Program Management" > "Program
Memory".
Parameterization
Note
The ASUB PI service must only executed in the RESET state of the specified channel.
References:
Programming Manual, Job Planning; Section: "Flexible NC-Programming" > "Interrupt
routine (ASUB)"
Parameterization
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 915
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
Parameterization
Parameterization
Signal Type Range of values Meaning
PIService ANY PI.CONFIG Reconfiguration
Unit INT 1
WVar1 INT 1 Classification
Parameterization
Parameterization
Basic Functions
916 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
Parameterization
Example
Password: STRING[8] := 'SUNRISE';
Parameterization
Parameterization
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 917
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
Parameterization
References
Programming Manual, Job Planning; Section: "File and Program Management" > "Program
Memory".
Block types
Workpiece directory WPD
Main program MPF
Subprogram SPF
Cycles CYC
Asynchronous subprograms ASP
Binary files BIN
Parameterization
Basic Functions
918 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
Parameterization
Parameterization
Parameterization
Signal Type Range of values Meaning
PIService ANY PI.SETUFR Activate
user frames
Unit INT 1 to 10 Channel
Note
The PI service can only be activated in the "Reset" state in the JOG mode.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 919
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
Parameterization
Parameterization
Basic Functions
920 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
Parameterization
Parameterization
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 921
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
Parameterization
Parameterization
Basic Functions
922 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
Note
On completion of the operation (reading data of this PI service) it is essential that the
semaphore is enabled again.
Parameter
● WVar1 = <function number>
● WVar2 = <value>
Value Meaning
0 Reset semaphore
1 Test and set semaphore
Parameterization
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 923
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
Note
Before and after this PI service, the MMCSEM PI service must be called up with the
associated parameter WVar1 for this PI service. See Section "PI service: MMCSEM
(Page 923)".
Parameterization
Basic Functions
924 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
Function: Search for empty location for loading, depending on the parameter assignment
● Location_number_to = -1, Magazine_number_to = -1
Searches all magazines in the specified area (= channel) for an empty location for the
tool specified with a T number. After execution of the PI service, the magazine and
locations numbers found during the search are listed in the configuration block of the
channel (component magCMCmdPar1 (magazine number) and magCMCmdPar2
(location number)). Location_number_ID and magazine_number_ID can be set as search
criteria or not (= -1). The PI service is acknowledged positively or negatively depending
on the search result.
● Location_number_to = -1, Magazine_number_to = Magazine_number
An empty location for the tool specified with a T number is searched for in the specified
magazine. Location_number_ID and magazine_number_ID can be set as search criteria
or not (= -1). The PI is acknowledged positively or negatively depending on the search
result.
● Location_number_to = Location_number, Magazine_number_to = Magazine_number
The specified location is checked, to confirm that it is free to be loaded with the specified
tool. Location_number_ID and magazine_number_ID can be set as search criteria or not
(= -1). The PI service is acknowledged positively or negatively depending on the search
result.
Command parameters 1 and 2 are located at source.
Loading: If source is an internal loading magazine, then the command parameters are
located at the target (a real magazine).
Unloading: Source is always a real magazine.
Note
Before and after this PI service, the MMCSEM PI service must be called up with the
associated parameter WVar1 for this PI service. See Section "PI service: MMCSEM
(Page 923)".
Parameterization
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 925
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
Note
The PI service can only be requested with FB 7. See Section "FB 7: PI_SERV2 (PI
service request) (Page 947)".
Note
Before and after this PI service, the MMCSEM PI service must be called up with the
associated parameter WVar1 for this PI service. See Section "PI service: MMCSEM
(Page 923)".
Parameterization
Basic Functions
926 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
Function: Determine T number for the specified tool name with duplo number
Determining the T number for a specified tool name with duplo number. Whether a T number
from the PI service was found, is displayed in the variable resultNrOfTools in the TF block. If
the specified tool does not exist, then the number 0 is returned. If the number 1 is returned,
then the T number is displayed in the variable resultToolNr in the TF block. Since the PI
service returns a result in the variable resultToolNr, the service is to be backed up using the
semaphore mechanism (PI service _N_MMCSEM) with the function number for
_N_TMGETT.
Note
Before and after this PI service, the MMCSEM PI service must be called up with the
associated parameter WVar1 for this PI service. See Section "PI service: MMCSEM
(Page 923)".
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 927
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
Parameterization
Loading
Prepares the specified real magazine for the specified channel for loading, i.e. the magazine
traverses to the selected location for loading at the specified loading point/station
(location_number_from, magazine_number_from) and inserts the tool.
When location_number_to = -1, an empty location for the tool specified by a T number is first
sought in the specified magazine and the magazine then traversed. After execution of the PI
service, the number of the location found is listed in the TM area in component
magCMCmdPar2 for the real magazine of the channel.
Basic Functions
928 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
With location_number_to = -2 and a valid magazine number, loading takes place into the
currently queued magazine position of the specified magazine. After execution of the PI
service, the number of the location for tool loading is listed in the TM area in component
magCMCmdPar2 for the real magazine of the channel.
Unloading
The tool specified by the tool number is unloaded at the specified loading point/station
(location_number_to, magazine_number_to), i.e. the magazine is traversed to the position for
unloading and the tool is then removed. The magazine location for the tool is marked as
being free in the TP block. The tool can be specified either using a T number or by means of
the location and magazine numbers. An unused specification has the value -1.
Note
Before and after this PI service, the MMCSEM PI service must be called up with the
associated parameter WVar1 for this PI service. See Section "PI service: MMCSEM
(Page 923)".
Parameterization
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 929
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
Parameterization
Parameterization
Basic Functions
930 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
Parameterization
Parameterization
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 931
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
Function: Complex search using search screen form, depending on the parameter
assignment
The PI service allows you to search for tools with specified properties within a search domain
(in one or more magazines starting and ending at a specific location). The specified
properties refer only to data of the tools and their cutting edges.
The PI service is only available if tool management is activated.
You can define a search direction and the number of hits for the PI service (e.g. one tool for
the next tool with matching properties or all tools with the specified properties).
As a result of this service, the user who made the call receives a list of the internal T
numbers of the tools found.
The search criteria can only be specified as AND operation. If an application needs to define
an OR operation for the search criteria, it must first execute a series of queries with AND
criteria and then combine/evaluate the results of the individual queries.
To assign the parameters of the PI service, the properties of the required tools are first
defined via variable service in the TF block. For this purpose, the relevant comparison
criteria (which tool data is to be compared?) are highlighted in the TF block in the operand
screen forms (parMaskT..), the comparison operator data (parDataT..) assigned the
appropriate comparison types to be executed ( ==, <, >, < =, > =, &&) and the comparison
values entered in the operand data.
The PI service is then initiated and, after its successful return, the variable service from the
TF block is used to read out the number of hits in the variable resultNrOfTools and the result
list in the variable resultToolNr (i.e. the list of internal T numbers of the tools found in the
search (resultNrOfTools quantity)).
The PI service must be encapsulated with a semaphore from its preparation until the
successful return of the result. This is the only way to ensure exclusive access and the
exclusive use of the TF block in conjunction with the TSEARC PI service (see MMCSEM PI
service).
If the service is configured incorrectly, a malfunction occurs. In all other cases, it will return a
result, even if no tools are found (resultNrOfTools = 0).
The search domain can be defined as follows in the parameters
"MagNrFrom", "PlaceNrFrom", "MagNrTo", "PlaceNrTo":
Basic Functions
932 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
For a symmetric search (see "SearchDirection" parameter), the search area may stretch
over only a single magazine (cases 2 and 5 from the above table). If another search domain
is specified, the service will malfunction. A reference location must be entered in the
parameters "MagNrRef" and "PlaceNrRef", with respect to which the symmetric search is
done.
The reference location is a buffer location (a location from the magazine buffer, i.e. change
position, gripper, etc.) or a load point (a location from the internal loading magazine). The
search is executed symmetrically with reference to the magazine location in front of the
specified reference location. A multiple assignment to the magazine being searched must be
configured in the TPM block for the reference location. If this is not the case, a malfunction
occurs. If the magazine location in front of the reference location is outside the search
domain, the service responds as if it has not found a matching location.
Note
Before and after this PI service, the MMCSEM PI service must be called up with the
associated parameter WVar1 for this PI service. See Section "PI service: MMCSEM
(Page 923)".
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 933
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
Parameterization
Basic Functions
934 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
Note
Before and after this PI service, the MMCSEM PI service must be called up with the
associated parameter WVar1 for this PI service. See Section "PI service: MMCSEM
(Page 923)".
Parameterization
Parameterization
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 935
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
Parameterization
Basic Functions
936 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
Function: Search/check an empty location within the multitool, depending on the parameter
assignment
Searches in the multitool for a free location to accept the specified tool or checks the
specified location in the multitool whether it is free for accepting the specified tool. The tool
can either be specified using its T number, or alternatively, using its identifier and its duplo
number.
Calling up the PI service is acknowledged positively or negatively depending on the search
result.
Note
Before and after this PI service, the MMCSEM PI service must be called up with the
associated parameter WVar1 for this PI service. See Section "PI service: MMCSEM
(Page 923)".
Parameterization
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 937
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
Call example
Parameterization
Symbol Operand Data type
PI DB 16 DB 16
STR DB 124 DB 124
DATA_BLOCK DB 124
struct
PName: string[32]:= '_N_TEST_MPF ';
Path: string[32]:= '/_N_MPF_DIR/'; //Main program
PName_WST: string[32]:= '_N_ABC_MPF';
Path_WST: string[32]:= //Workpiece program
'/_N_WCS_DIR/_N_ZYL_WPD';
end_struct
BEGIN
END_DATA_BLOCK
Function FC "PICall" : VOID
U I 7.7; //Unassigned machine control panel key
S M 0.0; //Activate req.
U M 1.1; //Done completed message
R M 0.0; //Terminate job
U I 7.6; //Manual error acknowledgement
Basic Functions
938 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
CALL FB 4, DB 126 (
Req := M0.0,
PIService := PI.SELECT,
Unit := 1, // CHAN 1
Addr1 := STR.Path,
Addr2 := STR.PName, //Main-program selection
//Addr1:=STR.Path_WST,
//Addr2:=STR.PName_WST, //Workpiece-program selection
Error := M1.0,
Done := M1.1,
State := MW2);
Function
The PLC user program can read a GUD variable (GUD = Global User Data) from the NCK or
channel area using the FB GETGUD.
The FB has multi-instance capability. The call is permitted only in cyclic program OB1. An
assignment for all parameters with Req = 0 is also permitted in OB 100. Capital letters must
be used for the names of GUD variables.
Every FB 5 call must be assigned a separate instance DB from the user area.
A job is started when FB 5 is called by means of a positive edge change at control input Req.
This job includes the name of the GUD variable to be read in parameter "Addr" with data
type "STRING". The pointer to the name of the GUD variables is assigned symbolically to
the "Addr" parameter with <DataBlockName>.<VariableName>. Additional information about
this variable is specified in parameters "Area", "Unit", "Index1" and "Index2" (see table of
block parameters).
When parameter "CnvtToken" is activated, a variable pointer (token) can be generated for
this GUD variable as an option. This pointer is generated via the NC-VAR selector for
system variables of the NC. Only this method of generating pointers is available for GUD
variables. Once a pointer has been generated for the GUD variable, then it is possible to
read and write via FB 2 and FB 3 (GET, PUT) with reference to this variable pointer. This is
the only method by which GUD variables can be read. When FB 2 or FB 3 is parameterized,
only parameter Addr1 ... Addr8 need to be parameterized for this GUD variable pointer. GUD
variable fields are an exception. In these fields Line1 to Line8 must also be parameterized
with the field device from these variables. The successful completion of the read process is
displayed by the status parameter "Done"=TRUE.
The read process extends over several PLC cycles (generally 1 to 2).
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 939
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
Any errors are displayed via the output parameters "Error" and "State".
Note
In order to read a double variable from the NCK without adapting the format, an ANY pointer
of the REAL 2 type must be specified in the target area for read data (e.g.: P#M100.0 REAL
2). If the basic program recognizes REAL 2 as the target type when reading a "double"
variable, the data is applied to the PLC data area as a 64-bit floating point number.
FB 5 can only write GUD variables if basic program parameter "NCKomm" has been set to
"TRUE" (in OB 100: FB 1, DB 7; see "FB 1: RUN_UP Basic program, startup section
(Page 889)").
VAR_OUTPUT
Error : BOOL;
Done : BOOL;
State : WORD ;
END_VAR
VAR_IN_OUT
RD: ANY ;
END_VAR
BEGIN
END_FUNCTION_BLOCK
Basic Functions
940 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
Error identifiers
If it was not possible to execute a job, the failure is indicated by "logic 1" on status parameter
error. The error cause is coded at the block output State:
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 941
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
Configuration steps
To be able to read a GUD variable, its name must be stored in a string variable. The data
block with this string variable must be defined in the symbol table so that the "Addr"
parameter can be assigned symbolically for FB GETGUD. A structure variable can be
defined optionally in any data area of the PLC to receive the variable pointer (see
specification in following example).
Pulse diagram
5HT
'RQH
(UURU
Basic Functions
942 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
Call example 1
Read a GUD variable from channel 1 with the name "GUDVAR1" (type definition of the
variables: INTEGER). The user-defined variable should be converted in a 10-byte variable
pointer for the subsequent writing with the F3 (see also the table "Assignment of the data
types" in "FB 2: Read GET NC variable (Page 897) ").
Call and parameterization of FB 5 with instance DB 111:
STRUCT
GUDVar1 : STRING[32] := 'GUDVAR1'; //Name is defined by user
GUDVar1Token :
STRUCT
SYNTAX_ID : BYTE ;
area_and_unit : BYTE ;
column : WORD ;
line : WORD ;
block type : BYTE ;
NO. OF LINES : BYTE ;
type : BYTE ;
length : BYTE ;
END_STRUCT;
END_STRUCT;
BEGIN
END_DATA_BLOCK
FB 5
BEGIN
END_DATA_BLOCK
FB 3
BEGIN
END_DATA_BLOCK
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 943
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
CALL FB 5, DB 111 (
Req := M 100.0, //Starting edge for reading
Area := B#16#2, //Channel variable
Unit := B#16#1, //Channel 1
Index1 := 0, //No field index
Index2 := 0, //No field index
CnvtToken := TRUE, //Conversion into 10-byte token
VarToken := DB_GUDVAR.GUDVar1Token,
Error := M 102.0,
Done := M 100.1,
State := MW 104
RD := P#DB99.DBX0.0 DINT 1 // free memory area
);
After a successful FB-5 call the writing can be done via the returned address of the FB 5
parameter ("VarToken") with the help of FB3.
CALL FB 3, DB 112 (
Req := M 200.0,
NumVar := 1, //Write 1 GUD variable
Addr1 := DB_GUDVAR.GUDVar1Token,
Error := M 102.0,
Done := M 100.1,
State := MW 104
SD1 := P#DB99.DBX0.0 DINT 1);
Basic Functions
944 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
Call example 2
Read a GUD variable from channel 1 with the name "GUD_STRING" (type definition of the
variables: STRING with length 30 bytes). The user-defined variable should be converted in a
10-byte variable pointer for subsequent writing with the FB 3.
Call and parameterization of FB 5 with instance DB 111:
STRUCT
GUDVarS : STRING[32] := 'GUD_STRING'; //Name is defined by user
GUDVarSToken :
STRUCT
SYNTAX_ID : BYTE ;
area_and_unit : BYTE ;
column : WORD ;
line : WORD ;
block type : BYTE ;
NO. OF LINES : BYTE ;
type : BYTE ;
length : BYTE ;
END_STRUCT;
BEGIN
END_DATA_BLOCK
FB 5
BEGIN
END_DATA_BLOCK
FB 3
BEGIN
END_DATA_BLOCK
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 945
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
CALL FB 5, DB 111 (
Req := M 100.0, //Starting edge for reading
Addr := DB_GUDVAR.GUDVarS,
Area := B#16#2, //Channel variable
Unit := B#16#1, //Channel 1
Index1 := 0, //No field index
Index2 := 0, //No field index
CnvtToken := TRUE, //Conversion into 10-byte token
VarToken := DB_GUDVAR.GUDVarSToken,
Error := M 102.0,
Done := M 100.1,
State := MW 104
RD := DB_GUDVAR.string_of_GUD);
After a successful FB-5 call the writing can be done via the returned address of the FB 5
parameter ("VarToken") with the help of FB3.
CALL FB 3, DB 112 (
Req := M 200.0,
NumVar := 1, //Write 1 GUD variable
Addr1 := DB_GUDVAR.GUDVarSToken,
Error := M 102.0,
Done := M 100.1
State := MW 104
SD1 := DB_GUDVAR.new_name);
Basic Functions
946 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
Function
Apart from a larger number of WVar parameters, the FB 7 function block has the same
functionality as the FB 4. It is therefore recommended that you use the FB 7 function block
instead of the FB 4.
For a detailed description of requesting a PI service, see Section "FB 4: PI_SERV PI service
request (Page 911)".
FUNCTION_BLOCK FB 7
Var_INPUT
Req : BOOL;
PIService : ANY ;
Unit : INT;
Addr1 : ANY ;
Addr2 : ANY ;
Addr3 : ANY ;
Addr4 : ANY ;
WVar1 : WORD ;
WVar2 : WORD ;
WVar3 : WORD ;
WVar4 : WORD ;
WVar5 : WORD ;
WVar6 : WORD ;
WVar7 : WORD ;
WVar8 : WORD ;
WVar9 : WORD ;
WVar10 : WORD ;
WVar11 : WORD ;
WVar12 : WORD ;
WVar13 : WORD ;
WVar14 : WORD ;
WVar15 : WORD ;
WVar16 : WORD ;
END_VAR
VAR_OUTPUT
Error : BOOL;
Done : BOOL;
State : WORD ;
END_VAR
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 947
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
Function
This block allows switchover between several control units (HMI operator panel fronts and/or
MCP machine control panels), which are connected to one or more NCU control modules via
a bus system.
References:
Function Manual, Extended Functions; Several Control Panels on Multiple NCUs,
Decentralized Systems (B3)
The Interface between the individual control units and the NCU (PLC) is the M : N interface
in the data block DB 19. The FB 9 works with the signals of these interfaces.
Apart from initialization, sign-of-life monitoring and error routines, the following basic
functions are also performed by the block for control unit switchover:
Basic Functions
948 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
MCP switchover
As an option, an MCP assigned to the HMI can be switched over at the same time. To
achieve this, the MCP address must be entered in the "mstt_adress" parameter of the
NETNAMES.INI configuration file on the HMI and "MCPEnable" must be set to TRUE. The
MCP of the passive HMI is deactivated so that there is only ever one active MCP on an NCU
at one time.
Boot condition
To prevent the previously selected MCP being reactivated when the NCU is restarted, input
parameters MCP1BusAdr = 255 (address of 1st MCP) and "MCP1STOP" =TRUE
(deactivate 1st MCP) must be set when FB1 is called in OB100.
Approvals
When one MCP is switched over to another, any active feed or axis enables will be retained.
Note
Keys actuated at the moment of switchover remain operative until the new MCP is activated
(by the HMI, which is subsequently activated). The override settings for feedrate and spindle
also remain valid. To deactivate actuated keys, the input image of the machine control
signals must be switched to nonactuated signal level on a falling edge of DB10.DBX104.0.
The override settings should remain unchanged. Measures for deactivating keys must be
implemented in the PLC user program (see example "Override Changeover").
The call is permitted only in cyclic program OB1.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 949
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
FUNCTION_BLOCK FB 9
VAR_INPUT
Ack : BOOL ; //Acknowledge interrupts
OPMixedMode: BOOL:= FALSE; //Mixed operation with non-M-to-N-enabled
OP //deactivated
ActivEnable: BOOL:= TRUE; // Not supported
MCPEnable : BOOL:= TRUE; // Activate MCP switchover
END_VAR
VAR_OUTPUT
Alarm1 : BOOL ; // Interrupt: Error in HMI bus address, bus
type!
Alarm2 : BOOL ; // Interrupt: No confirmation HMI 1
offline!
Alarm3 : BOOL ; // Interrupt: HMI 1 is not going offline!
Alarm4 : BOOL ; // Interrupt: No confirmation HMI 2
offline!
Alarm5 : BOOL ; // Interrupt: HMI 2 is not going offline!
Alarm6 : BOOL ; // Interrupt: Queuing HMI is not going
online!
Report : BOOL ; // Message: Signoflife monitoring
ErrorMMC : BOOL ; // Error detection HMI
END_VAR
Basic Functions
950 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
Note
The block must be called by the user program. The user must provide an instance DB with
any number for this purpose. The call is multi-instance-capable.
CALL FB 9, DB 109 (
Ack := Error_ack, //e.g., MCP RESET
OPMixedMode := FALSE,
ActivEnable := TRUE,
MCPEnable := TRUE); // Enable for MCP switchover
Note
Input parameter “MCPEnable” must be set to TRUE to enable the MCP switchover. The
default value of these parameters is set in this way and need not be specially assigned when
the function is called.
Interrupts, errors
The output parameters "Alarm1" to "Alarm6" and "Report" exist as information in the PLC
and are output in the event of M:N errors visualized on the HMI by the appearance of alarms
410900 - 410906.
If execution of an HMI function has failed (and an appropriate error message cannot be
displayed), status parameter "ErrorMMC" is set to 'logical 1' (e.g., booting error, when no
connection is made).
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 951
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
// Save override
L DB21.DBB 4; //Feed override interface
T EB 28; //Buffer storage (freely input
// or flag byte)
wei1:
U M 100.2; //Switchover takes place
O DB10.DBX 104.0; //MCP1Ready
JCN smth2;
U DB10.DBX 104.0; //MCP1Ready
FP M 100.1; //Edge trigger flag 2
JC smth2;
U M 100.2; //Switchover takes place
Basic Functions
952 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
Function
The SPL block "Safety relay" for "Safety Integrated" is the PLC equivalent of the NC function
of the same name. The standard SPL "Safety relay" block is designed to support the
implementation of an emergency stop function with safe programmable logic. However, it
can also be used to implement other similar safety functions, e.g., control of a protective
door. The function contains 3 input parameters (In1, In2, In3). On switchover of one of these
parameters to the value 0, the output Out0 is deactivated without delay and outputs Out1,
Out2 and Out3 deactivated via the parameterized timer values (parameters TimeValue1,
TimeValue2, TimeValue3). The outputs are activated again without delay, if inputs In1 to In3
take the value 1 and a positive edge change is detected at one of the acknowledgement
inputs Ack1, Ack2. To bring the outputs to their basic setting (values = 0) after booting, the
parameter "FirstRun" must be configured as follows. The parameter "FirstRun" must be
switched to the value TRUE via a retentive data (memory bit, bit in data block) on the 1st run
after control booting. This data can be preset, e.g., in OB 100. The parameter is reset to
FALSE when FB 10 is executed for the first time. Separate data must be used for parameter
"FirstRun" for each call with its own instance.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 953
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
FUNCTION_BLOCK FB 10
VAR_INPUT
In1 : BOOL := TRUE; //Input 1
In2 : BOOL := TRUE; //Input 2
In3 : BOOL := TRUE; //Input 3
Ackn1 : : BOOL; //Ack 1 signal
Ackn2 : :BOOL; //Ack 2 signal
TimeValue1 : TIME := T#0ms ; //TimeValue for output 1
TimeValue2 : TIME := T#0ms ; //TimeValue for output 2
TimeValue3 : TIME := T#0ms ; //TimeValue for output 3
END_VAR
VAR_OUTPUT
Out0 : BOOL; //Output without delay
Out1 : BOOL; //Delayed output to false by timer 1
Basic Functions
954 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
Note
The block must be called once by the user program (per SI relay) cyclically in the OB1 cycle
from when the SPL program starts. The user must provide an instance DB with any number
for this purpose. The call is multi-instance-capable.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 955
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
Function
The braking operation check should be used for all axes, which must be prevented from
moving in an uncontrolled manner by a holding brake. This check function is primarily
intended for the socalled "vertical axes".
The machine manufacturer can use his PLC user program to close the brake at a suitable
moment in time (guide value every 8 hours, similar to the SI test stop) and allow the drive to
produce an additional torque / additional force equivalent to the weight of the axis. In error-
free operation, the brake can produce the necessary braking torque/braking force and keep
the axis at a virtual standstill. When an error occurs, the actual position value exits the
parameterizable monitoring window. In this instance, the position controller prevents the axis
from sagging and negatively acknowledges the mechanical brake test.
The necessary parameterization of NC and Drive is described in:
References:
Functions Manual Safety Integrated
The brake test must always be started when the axis is at a standstill. For the entire duration
of the brake test, the enable signals of the parameterized axis must be set to enable (e.g. the
controller inhibit, feed enable signals). Furthermore, the signal at the axis/spindle
DB31, ... .DBX28.7 (PLC-controlled axis) is to be set to status 1 by the user program for the
complete duration of the test.
Before activating the signal DB31, ... .DBX28.7 (PLC-controlled axis) the axis is to be
switched as "neutral axis", e.g. DB31, ... .DBX8.0 - 8.3 (assign NC axis to channel) is to be
set to channel 0 as well as DB31, ... .DBX8.4 (activation signal when using this byte) is to be
set.
The return message:
● about the current status can be queried in DB31, ... DBB68.
● the Nc via the signal DB31, ... .DBX63.1 (PLC controls axis) is to be awaited before the
block is started. The direction in which the drive must produce its torque/force is specified
by the PLC in the form of a "traversing motion" (e.g., via FC 18).
The axis must be able to reach the destination of this movement without risk of collision if the
brake is unable to produce the necessary torque/force.
Note
Instructions for FC 18
If FC18 is called for the same axis in the remainder of the user program, the calls must be
mutually interlocked. For example, this can be achieved via a common call of this function
with an interlocked common data interface for the FC 18 parameters. A second option is to
call the FC18 repeatedly, in which case the inactive FC18 will not be processed by the
program. A multiple-use interlock must be provided.
Basic Functions
956 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
Function_BLOCK FB 11
VAR_INPUT
Start : BOOL ; //Start of brake test
Ackn : BOOL ; //Acknowledge error
Bclosed : BOOL ; //Brake closed input (single channel - PLC)
Axis : INT; //Testing axis no.
TimerNo : TIMER ; //Timer from user
TV_BTactiv : S5TIME ; //TimeValue -> brake test active
TV_Bclose : S5TIM; //TimeValue -> close brake
TV_FeedCommand : S5TIME ; //TimeValue -> force FeedCommand
TV_FXSreached : S5TIME ; //TimeValue -> fixed stop reached
TV_FXShold : S5TIME ; //TimeValue -> test brake
END_VAR
VAR_OUTPUT
CloseBrake : BOOL ; //Signal close brake
MoveAxis : BOOL ; //Do move axis
Done : BOOL ;
Error : BOOL ;
State : BYTE ; //Error byte
END_VAR
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 957
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
Fault IDs
State Significance
0 No error
1 Start conditions not fulfilled, e.g. the axis is not in closed-loop control / brake closed / axis
inhibited
2 No NC checkback in "Brake test active" signal on selection of brake test
3 No "Brake applied" checkback by input signal Bclosed
4 No travel command output (e.g., axis motion has not been started)
5 Fixed end stop will not be reached → axis RESET was initiated.
6 Traversing inhibit/Approach too slow → fixed stop cannot be reached. TV FXSreached
monitoring timeout
7 Brake is not holding at all (the end position is reached)/approach speed is too high
8 Brake opens during the holding time
9 Error when deselecting the brake test
10 Internal error
11 "PLC-controlled axis" signal not enabled in the user program
Basic Functions
958 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
Note
The block must be called by the user program. The user must provide an instance DB with
any number for this purpose. The call is multi-instance-capable.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 959
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
U M 111.2; //Moveaxis
FP M 111.5; //FC18 Start
S M 111.7; //Start FC18
//optional begin
JCN m002:
L MB 115; //old channel status
OW W#16#10;
T DBB 8; //Request channel axis
m002: NOP 0;
//optional end
Basic Functions
960 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
Stop := FALSE,
Funct := B#16#5, //Mode: Axis mode
Mode := B#16#1, //Procedure: Incremental
AxisNo := 3, //Axis number of axis to be traversed
//axis Z-axis
Pos := -5.000000e+000, //Traversing distance: Minus 5 mm
FRate := 1.000000e+003, //Feedrate: 1000 mm/min
InPos :=M 113.0, //Position reached
Error :=M 113.1, //Error has occurred
State := MB 114); //Error status
Function
Signal recorder
The diagnostics FB allows various diagnostic routines to be performed on the PLC user
program. A diagnostic routine logs signal states and signal changes. In this diagnostic
routine, function number 1 is assigned to the "Func" parameter. Up to 8 signals of the
parameters "Signal_1" to "Signal_8" are recorded in a ring buffer each time one of the
signals changes. The current information of parameters "Var1" as BYTE value, and "Var2"
and "Var3" as INTEGER values are also stored in the ring buffer.
The number of past OB 1 cycles is also stored in the buffer as additional information. This
information enables the graphical evaluation of signals and values in OB 1 cycle grid. The
first time the diagnostics FB is called in a new PLC cycle, the "NewCycle" parameter must be
set to TRUE. If the diagnostics FB is called several times in the same OB 1 cycle, the
"NewCycle" parameter must be set to FALSE for the second and subsequent calls. This
prevents a new number of OB 1 cycles from being calculated.
The ring buffer, specified by the user, must have an ARRAY structure specified as in the
source code. The array can have any number of elements. A size of 250 elements is
recommended. The "ClearBuf" parameter is used to clear the ring buffer and set the BufAddr
pointer (I/O parameter) to the start. The instance DB related to the FB is a DB from the user
area and is to be transferred to the FB Diagnostics with the parameter "BufDB".
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 961
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
Data trigger
The data trigger function is intended to allow triggering on specific values (or bits) at any
permissible memory cell. The cell to be triggered is "rounded" with a bit mask ("AndMask"
parameter) before the "TestVal" parameter is compared in the diagnostic block.
Note
The source code for the function is available in the source container of the basic-program
library under the name "Diagnose.awl". The instance DB and the ring buffer DB are also
defined in this source block. The function call is also described in the function. The DB
numbers and the call must be modified.
FUNCTION_BLOCK FB 29
VAR_INPUT
Func : INT ; //Function number: 0 = No function,
//1 = Signal recorder, 2 = Data trigger
Signal_1 : BOOL ; //Start of brake test
Signal_2 : BOOL ;
Signal_3 : BOOL ;
Signal_4 : BOOL ;
Signal_5 : BOOL ;
Signal_6 : BOOL ;
Signal_7 : BOOL ;
Signal_8 : BOOL ;
NewCycle : BOOL ;
Var1 : BYTE ;
Var2 : INT;
Var3 : INT;
BufDB : INT;
ClearBuf : BOOL ;
DataAdr : POINTER; //Area pointer to testing word
TestVal : WORD ; //Value for triggering
AndMask : WORD ; //AND mask to the testing word
END_VAR
VAR_OUTPUT
TestIsTrue : BOOL ;
END_VAR
VAR_IN_OUT
BufAddr : INT;
END_VAR
Basic Functions
962 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
TITLE =
//Ring buffer DB for FB 29
VERSION : 1.0
STRUCT
Field: ARRAY [0 .. 249 ] OF STRUCT //can be any size of this struct
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 963
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
Configuration steps
● Select function of diagnostics block.
● Define suitable data for the recording as signal recorder or data triggering.
● Find a suitable point or points in the user program for calling the diagnostics FB.
● Create a data block for the ring buffer, see call example.
● Call the diagnostics FB with parameters in the user program.
In function 1, it is advisable to clear the ring buffer with the "ClearBuf" parameter. When the
recording phase with function 1 is completed, read out the ring buffer DB in STEP7 with the
function "opening the data block in the data view". The content of the ring buffer DB can now
be analyzed.
Call example
BEGIN
NETWORK
TITLE = NETWORK
CALL FB 29, DB 80 (
Func := 1,
Signal_1 :=M 100.0,
Signal_2 :=M 100.1,
Signal_3 :=M 100.2,
Signal_4 :=M 100.3,
Signal_5 :=M 10.4,
Signal_6 :=M 100.5,
Signal_7 :=M 100.6,
Signal_8 :=M 100.7,
Basic Functions
964 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
NewCycle := TRUE,
Var1 := MB 100,
BufDB := 81,
ClearBuf :=M 50.0);
END_FUNCTION
Function
The complete processing of the NCKPLC interface is carried out in cyclic mode. In order to
minimize the execution time of the basic program, only the control/status signals are
transferred cyclically; transfer of the auxiliary functions and G functions only takes place
when requested by the NCK.
In the block, handwheel selections, modes and other operating signals are transferred from
the operator panel front (HMI) to the NCK/PLC interface so that the modes support selection
from the MCP or HMI.
Transfer of HMI signals to the interface can be deactivated by setting the value of the
parameter "MMCToIF" to "FALSE" in FB 1 (DB 7).
The handwheel selection signals from the HMI are decoded and activated in the machine
axis or the geometry axis interface of the handwheel selected (only if parameter
"HWheelMMC := TRUE" in FB 1). = TRUE").
Declaration
FUNCTION FC 2: VOID
// no parameters
Call example
As far as the time is concerned, the basic program must be executed before the user
program. It is, therefore, called first in OB 1.
The following example contains the standard declarations for OB 1 and the calls for the basic
program (FC2), the transfer of the MCP signals (FC19), and the acquisition of error and
operating messages (FC10).
ORGANIZATION_BLOCK OB 1
VAR_TEMP
OB1_EV_CLASS : BYTE ;
OB1_SCAN_1 : BYTE ;
OB1_PRIORITY : BYTE ;
OB1_OB_NUMBR : BYTE ;
OB1_RESERVED_1 : BYTE ;
OB1_RESERVED_2 : BYTE ;
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 965
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
OB1_PREV_CYCLE : INT;
OB1_MIN_CYCLE : INT;
OB1_MAX_CYCLE : INT;
OB1_DATE_TIME : DATE_AND_TIME;
END_VAR
BEGIN
CALL FC 2; //Call basic program as first FC
//INSERT USER PROGRAM HERE
CALL FC 19( //MCP signals to interface
BAGNo := B#16#1, //Mode group no. 1
ChanNo := B#16#1, //Channel no. 1
SpindleIFNo := B#16#4, //Spindle interface number = 4
FeedHold := m22.0, //Feed stop signal
//modal
SpindleHold := db2.dbx151.0); //Spindle stop modal
//in message DB
CALL FC 10 ( //Error and operational messages
ToUserIF := TRUE, //Signals transferred from DB2 to
interface
//to interface
Ack := I6.1); //Acknowledgment of error messages
//via I 6.1
END_ORGANIZATION_BLOCK
Function
Blocksynchronized transfers from the NCK to the PLC (auxiliary and G functions) are carried
out in the interruptdriven part of the basic program. Auxiliary functions are subdivided into
normal and highspeed auxiliary functions.
The highspeed functions of an NC block are buffered and the transfer acknowledged to the
NC. These are passed to the application interface at the start of the next OB1 cycle.
Highspeed auxiliary functions programmed immediately one after the other, are not lost for
the user program. This is ensured by a mechanism in the basic program.
Normal auxiliary functions are acknowledged to the NC only after one completed cycle
duration. This allows the application to issue a read disable to the NC.
The G Functions are evaluated immediately and passed to the application interface.
Basic Functions
966 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
NC process interrupts
If the interrupt is triggered by the NC (possible in each IPO cycle), a bit in the local data of
OB 40 ("GP_IRFromNCK") is set by the basic program, when the FB 1 parameter "UserIR":
= TRUE"). This data is not set on other events (process interrupts through I/Os). This
information makes it possible to branch into the associated interrupt routine in the user
program in order to initiate the necessary action.
To be able to implement highspeed, jobdriven processing of the user program for the
machine, the following NC functions are available in the interrupt processing routine (OB 40
program section) for the PLC user program:
● Selected auxiliary functions
● Tool-change function for tool-management option
● Position reached for positioning axes, indexing axes and spindles with activation via PLC
The functions listed above can or must be evaluated by the user program in OB 40 in order
to initiate reactions on the machine. As an example, the revolver switching mechanism can
be activated when a T command is programmed on a turning machine.
For further details on programming hardware interrupts (time delay, interruptibility, etc.) refer
to the corresponding SIMATIC documentation.
Auxiliary functions
Generally, high-speed or acknowledging auxiliary functions are processed with or without
interrupt control independently of any assignment.
Basic-program parameters in FB 1 can be set to define which auxiliary functions (T, H, DL)
must be processed solely on an interruptdriven basis by the user program.
Functions which are not assigned via interrupts are only made available by the cyclic basic
program as in earlier versions. The change signals of these functions are available in a PLC
cycle.
Even if the selection for the auxiliary function groups (T, H, DL) is made using interrupt
control, only one interrupt can be processed by the user program for the selected functions.
A bit is set channelspecifically in the local data "GP_AuxFunction" for the user program (if
"GP_AuxFunction[1]" is set, then an auxiliary function is available for the 1st channel).
In the related channel-DB the change signal and the function value are available for the user.
Das Änderungssignal dieser interrupt driven function is reset to zero in the cyclic basic
program section after the execution of at least one full OB1 cycle (max. approx. two OB1
cycles).
Tool change
With the tool-management option, the tool-change command for revolver and the tool
change in the spindle is supported by an interrupt. The local data bit "GP_TM" in OB 40 is
set for this purpose. The PLC user program can thus check the tool management DB (DB 72
or DB 73) for the tool change function and initiate the tool change operation.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 967
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
Position reached
In the bit structure, "GP_InPosition" of the local data of OB 40 is specific to the machine axis
(each bit corresponds to an axis/spindle, e.g. GP_InPosition[5] corresponds to axis 5).
If a function has been activated via FC 18 (spindle control, positioning axis, indexing axis) for
an axis or spindle, the associated "GP_InPosition" bit can be used to implement
instantaneous evaluation of the "InPos" signal of the FCs listed above. This feature can be
used, for example, to obtain immediate activation of clamps for an indexing axis.
Declaration
FUNCTION FC 3 : VOID
// no parameters
Call example
As far as the time is concerned, the basic program must be executed before other interrupt-
driven user programs. It is, therefore, called first in OB 40.
The following example contains the standard declarations for OB 40 and the call for the
basic program.
ORGANIZATION_BLOCK OB 40
VAR_TEMP
OB40_EV_CLASS : BYTE ;
OB40_STRT_INF : BYTE ;
OB40_PRIORITY : BYTE ;
OB40_OB_NUMBR : BYTE ;
OB40_RESERVED_1 : BYTE ;
OB40_MDL_ID : BYTE ;
OB40_MDL_ADDR : INT;
OB40_POINT_ADDR : DWORD;
OB40_DATE_TIME : DATE_AND_TIME;
Basic Functions
968 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
Function
Module defects and module failures are detected in this section of the basic program.
The FC5 block parameter can be used to define whether the PLC is to be placed in Stop
mode. The PLC is placed in STOP mode only for incoming events. Exceptions of the
parameter "PLC-Stop" are the Profibus-MCPs parameterized at FB 1 (must be connected to
the DP1 Bus).
Declaration
FUNCTION FC 5: VOID
VAR_INPUT
PlcStop: BOOL:= TRUE;
END_VAR
Call example
As far as timing is concerned, the basic program can be executed after other user programs.
This is advisable since the FC5 circuitry will place the PLC in Stop mode.
This example contains the standard declarations for OB 82 and OB 86 and the call of the
basic program block.
ORGANIZATION_BLOCK OB 82
VAR_TEMP
OB82_EV_CLASS : BYTE ;
OB82_FLT_ID : BYTE ;
OB82_PRIORITY : BYTE ;
OB82_OB_NUMBR : BYTE ;
OB82_RESERVED_1 : BYTE ;
OB82_IO_FLAG : BYTE ;
OB82_MDL_ADDR : INT ;
OB82_MDL_DEFECT : BOOL ;
OB82_INT_FAULT : BOOL ;
OB82_EXT_FAULT : BOOL ;
OB82_PNT_INFO : BOOL ;
OB82_EXT_VOLTAGE : BOOL ;
OB82_FLD_CONNCTR : BOOL ;
OB82_NO_CONFIG : BOOL ;
OB82_CONFIG_ERR : BOOL ;
OB82_MDL_TYPE : BYTE ;
OB82_SUB_NDL_ERR : BOOL ;
OB82_COMM_FAULT : BOOL ;
OB82_MDL_STOP : BOOL ;
OB82_WTCH_DOG_FLT : BOOL ;
OB82_INT_PS_FLT : BOOL ;
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 969
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
OB82_PRIM_BATT_FLT : BOOL ;
OB82_BCKUP_BATT_FLT : BOOL ;
OB82_RESERVED_2 : BOOL ;
OB82_RACK_FLT : BOOL ;
OB82_PROC_FLT : BOOL ;
OB82_EPROM_FLT : BOOL ;
OB82_RAM_FLT : BOOL ;
OB82_ADU_FLT : BOOL ;
OB82_FUSE_FLT : BOOL ;
OB82_HW_INTR_FLT : BOOL ;
OB82_RESERVED_3 : BOOL ;
OB82_DATE_TIME : DATE_AND_TIME;
END_VAR
BEGIN
CALL FC 5
(PlcStop := FALSE) ;
END_ORGANIZATION_BLOCK
ORGANIZATION_BLOCK OB 86
VAR_TEMP
OB86_EV_CLASS : BYTE ;
OB86_FLT_ID : BYTE ;
OB86_PRIORITY : BYTE ;
OB86_OB_NUMBR : BYTE ;
OB86_RESERVED_1 : BYTE ;
OB86_RESERVED_2 : BYTE ;
OB86_MDL_ADDR : WORD ;
OB86_RACKS_FLTD : ARRAY [0 .. 31]OF BOOL;
OB86_DATE_TIME : DATE_AND_TIME;
END_VAR
BEGIN
CALL FC 5
(PlcStop := TRUE) ;
END_ORGANIZATION_BLOCK
Function
The TM_TRANS2 block is used for position changes of the tool, status changes and
multitool.
The FC 6 block includes the same functionality as for the FC 8, only that in addition the
multitool functionality is also integrated. This is the reason that only the parts of the multitool
functionality are explained in this chapter. The functionality that is included that goes beyond
this is described in "FC 8: TM_TRANS transfer block for tool management (Page 975)".
Basic Functions
970 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
FUNCTION FC 6 : VOID
VAR_INPUT
Start: BOOL;
TaskIdent: BYTE ;
TaskIdentNo: BYTE ;
NewToolMag: INT;
NewToolLoc: INT;
OldToolMag: INT;
OldToolLoc: INT;
Status: INT;
MtoolPlaceNum: INT;
END_VAR
VAR_OUTPUT
Ready BOOL;
Error: INT;
END_VAR
BEGIN
END_FUNCTION
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 971
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
Function
After a revolver has been changed, the user will call the block FC TM_REV. The revolver
number (corresponding to interface number in DB 73) must be specified in parameter
"ChgdRevNo" for this purpose. As this block is called, the associated "Interface active" bit in
data block DB73.DBW0 of FC 7 is reset after parameter "Ready" = TRUE is returned.
Block FC TM_REV may be started (with "Start" parameter = "TRUE") only if an activation
signal for the appropriate interface (DB73.DBW0) for this transfer has been supplied by the
tool management function.
When this job is executed correctly, the output parameter "Ready" contains the value TRUE.
The user must then set the"Start" parameter to FALSE or not call the block again.
If the parameter "Ready" == FALSE AND the parameter "Error" <> 0, the job must be
repeated in the next PLC cycle. The "Start" parameter must be set to TRUE for this. The
transfer job has not yet been completed. See "Call example" and "Pulse diagram" below.
The "Start" parameter does not need a signal edge for a subsequent job.
Note
A cancellation of the transfer (e.g. reset) is not permitted. The "Start" parameter must retain
TRUE until the "Ready" or "Error" parameters <> 0.
Note
Further PI services for tool management: FB 4, FC 8 and FC 22
References
For detailed information about tool management, refer to:
Function Manual, Tool Management
TaskIdent = 4
TaskIdentNo = Channel no.
NewToolMag = Magazine no. of the revolver
NewToolLoc = Original location of the tool
Basic Functions
972 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
If the revolver is now turned to an arbitrary position at which a tool is located, this tool must
be activated. This is done easiest by the new T programming in the part program. However,
if this is to be performed, for example, at the end of the revolver switching by the PLC, the
PLC must start an ASUB for this purpose. The current revolver position must be transferred
to the ASUB. In this way, the tool at this location is determined in the ASUB and is selected
(see Jobshop example in the toolbox).
FUNCTION FC 7 : VOID
//NAME :TM_REV
VAR_INPUT
Start: BOOL;
ChgdRevNo: BYTE ;
END_VAR
VAR_OUTPUT
Ready: BOOL;
Error : INT;
END_VAR
BEGIN
END_FUNCTION
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 973
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
Pulse diagram
6WDUW
5HDG\
(UURU !
Call example
Basic Functions
974 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
Function
The user calls this block FC TM-TRANS when the position of the tool or the status of the
transfer operation changes. The parameter "TaskIdent" specifies the transfer job for the
block FC 8 at the tool management interface:
● For loading/unloading positions
● For spindle change positions
● For revolver change positions as transfer identifier
● Asynchronous transfer
● Asynchronous transfer with location reservation
The interface number is indicated in parameter "TaskIdentNo".
Example for loading point 5:
Parameter "TaskIdent":= 1 and "TaskIdentNo":= 5.
Furthermore, the current tool positions and status data (list of "Status" parameter in the
following text) are also transferred for this transfer function.
Note
FC8 informs the NCK of the current positions of the old tool.
The NCK knows where the old and the new tool have been located until the position change.
In the case of a transfer without a socalled "old tool" (e.g. on loading), the value 0 is
assigned to parameters "OldToolMag", "OldToolLoc".
Block FC TM_TRANS may be started only with "Start" parameter = "TRUE" if an activation
signal for the appropriate interface (DB 71, DB 72, DB 73 in word 0) for this transfer has
been supplied by the tool management function.
When this job is executed correctly, the output parameter "Ready" contains the value TRUE.
The user must then set the"Start" parameter to FALSE or not call the block again.
If the "Ready" parameter = FALSE, the error code in the "Error" parameter must be
interpreted (see Call example FC 8 and timing diagram).
If the error code = 0, then this job must be repeated in the next PLC cycle (e.g. "Start"
remains set to "TRUE"). This means that the transfer operation has not yet been completed.
If the user assigns a value of less than 100 to the "Status" parameter, then the associated
interface in data block DB 71 or DB 72 or DB 73, word 0 is deactivated (process completed).
The appropriate bit for the interface is set to 0 by FC 8.
The "Start" parameter does not need a signal edge for a subsequent job. This means that
new parameters can be assigned with "Start = TRUE" immediately when "Ready = TRUE" is
received.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 975
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
Asynchronous transfer
To ensure that changes in the position of a tool are automatically signaled from PLC to tool
management (e.g. power failure during an active command or independent changes in the
position by the PLC), block FC 8 TM_TRANS with "TaskIdent": = 4 or 5 is called. This call
does not require interface activation by tool management.
If parameter "TaskIdent" = 5 the tool management reserves the location in addition to
changing the position. The location is only reserved if the tool has been transported from a
real magazine to a buffer storage.
A relevant NC channel must be parameterized in the "TaskIdentNo" parameter.
The previous position of the tool is specified in parameters "OldToolMag", "OldToolLoc"; the
current position of the tool is specified in parameters "NewToolMag", "NewToolLoc". Status =
1 must be specified.
With status 5, the specified tool remains at location "OldToolMag", "OldToolLoc". This
location must be a buffer (e.g. spindle). The real magazine and location must be specified in
the parameters "NewToolMag", "NewToolLoc"; the location is at the position of the buffer.
This procedure must always be used if the tool management is to be informed of the position
of a specific magazine location. This procedure is used for alignment in search strategies.
Note
A cancellation of a transfer (e.g. through an external signal RESET) is not permitted. The
"Start" parameter must always retain the 1 signal until the "Ready" and/or "Error" parameters
<> 0.
Note
For further details on tool management (also with regard to the PLC) refer to the Function
Manual Tool Management. In addition, PI services for tool management via FB 4, FC 7 and
FC 22 are available.
FUNCTION FC 8: VOID
//NAME :TM_TRANS
VAR_INPUT
Start: BOOL;
TaskIdent: BYTE ;
TaskIdentNo: BYTE ;
NewToolMag: INT;
NewToolLoc: INT;
OldToolMag: INT;
OldToolLoc: INT;
Basic Functions
976 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
Status: INT;
END_VAR
VAR_OUTPUT
Ready BOOL;
Error : INT;
END_VAR
BEGIN
END_FUNCTION
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 977
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
Pulse diagram
6WDUW
5HDG\
(UURU !
Status list
Status = 1:
The WZV operation is completed (loading/unloading/reloading, prepare change, change).
The parameters "NewToolMag", "NewToolLoc", "OldToolMag", "OldToolLoc" of the FC 8
block are to be parameterized to the actual positions of the tools involved. Except in the case
of preparing change these are normally the specified target position of the tools of the
associated WZV interface, see also "Explanations of the formal parameters".
1. In the case of loading/unloading/reloading, the tool has arrived at the required target
address. If the bit in the interface in DB 71.DBX (n+0).3 "position at loading point" is
enabled, status 1 cannot be used for the function termination. Status 5 must be used for
correct termination.
2. In the case of "Prepare change", the new tool is now available. The tool may, for
example, be positioned in a buffer (gripper). In some cases, the target (magazine,
location) of the old tool has been moved to the toolchange position after placement of the
new tool in a buffer. However, the old tool still remains in the spindle. The preparations
for a tool change are thus complete. After this acknowledgement, the "Change" command
can be received. The positions in parameters "NewToolMag", "NewToolLoc",
"OldToolMag" and "OldToolLoc" correspond to the current tool positions.
Basic Functions
978 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
3. In the case of "Change" (spindle or revolver), the tools addressed in the interface have
now reached the required target addresses.
The tool-change operation is thus completed.
Status = 2: The "new" tool cannot be made available.
This status is only admissible in conjunction with the "Prepare Change" command. When this
status is applied, the PLC must be prevented from making a change with the proposed tool.
The proposed (new) tool is disabled by the tool management function in the NCK. A new
command is then output by the tool management with a duplo tool. The positions in
parameters "NewToolMag", "NewToolLoc", "OldToolMag", and "OldToolLoc" correspond to
the original tool positions.
Status = 3: An error occurred.
The tool positions must not have been changed. Any changes to the magazine positions
which have taken place in the meantime must be notified beforehand, for example, with
status = 105 via FC 8 transfer block Only then will the tool positions be taken into account by
the tool management function.
Status = 4: It would be better to position the "old" tool in the magazine position specified in
parameters "OldToolMag" and "OldToolLoc".
This status is permissible only in conjunction with preparation for tool change (change into
spindle). After this status has been transferred to the tool management in the NCK, the tool
management tries to consider the specified magazine position in the next command. But this
is done only when this position is free. Parameters "NewToolMag" and "NewToolLoc" are not
taken into account.
Status = 5: The operation is complete.
The "new" tool is in the position specified in parameters "NewToolMag", "NewToolLoc". In
this case, the specified tool is not really in this position, but is still in the same magazine
location. However, this magazine location has been moved to the position set in the
parameters (e.g. tool change position). This status may be used only for revolvers, chain-
type magazines and disk magazines. Status 5 enables the tool management function to
adjust the current position of a magazine and to improve the search strategy for subsequent
commands. This status is permissible only in conjunction with loading, unloading, and
reloading operations and with preparations for a tool change.
The "OldToolMag" and "OldToolLoc" parameters must be parameterized with the data of a
buffer.
● Loading, reloading:
On loading or reloading, a location for the tool is already reserved in the NCK. The
machine operator must then insert the tool at the target location. Notice: The location
reservation is canceled when the control system is switched on again.
● Tool-change preparation:
Tool motions still to be executed are not carried out until after the tool has been changed.
● Positioning to load point:
If the bit in the interface in DB 71.DBX (n+0).3 "position at loading point" is enabled,
status 1 cannot be used for the function termination.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 979
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
Status definition
A general rule for the acknowledgement status is that the status information 1 to 7 leads to
the termination of the command. If FC 8 receives one of the states, the "Interface active bit"
of the interface specified in FC 8 is reset to "0" (see also interface lists DB 71 to DB 73), thus
completing the operation. The response if different in the case of status information 103 to
105. When the FC 8 receives one of these items of status information, the “Interface active
bit” of this interface remains at “1”. Further processing is required by the user program in the
PLC (e.g. continuation of magazine positioning). This item of status information is generally
used to transfer changes in position of one or both tools while the operation is still in
progress.
Basic Functions
980 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
Call example
error: //Troubleshooting
r m 20.5: //Reset start
Function
The FC ASUB can be used to trigger any functions in the NC. Before an ASUB can be
started from the PLC, it must have been selected and parameterized by an NC program or
by FB 4 (PI service ASUB). The channel and the interrupt numbers for the parameters in FC
9 must match here.
Once prepared in this way, it can be started at any time from the PLC. The NC program
running on the channel in question is interrupted by the asynchronous subprogram. Only one
ASUB can be started in the same channel at a time. If the start parameter is set to logical 1
for two FC 9s within one PLC cycle, the ASUBs are started in the sequence in which they
are called.
The start parameter must be set to logic 0 by the user once the ASUB has been terminated
(Done) or if an error has occurred.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 981
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
For the purpose of job processing, every FC ASUB requires its own WORD parameter "Ref"
from the global user memory area. This parameter is for internal use only and must not be
changed by the user. The parameter "Ref" is initialized with the value 0 in the first OB 1 cycle
and, for this reason, every FC 9 must be called absolutely. Alternatively, the user can
initialize parameter "Ref" with a value of 0 during startup. This option makes conditional calls
possible. When a conditional call is activated by parameter "Start" = 1, it must remain active
until parameter "Done" has made the transition from 1 to 0.
Note
The FB 4 call must be terminated before the FC 9 can be started. FC 9 cannot be started if
"Emergency stop" is set. Neither can FC 9 be started if the channel reset is active.
FUNCTION FC 9: VOID
//NAME :ASUP
VAR_INPUT
Start: BOOL;
ChanNo: INT;
IntNo: INT;
END_VAR
VAR_OUTPUT
Active: BOOL;
Done : BOOL;
Error : BOOL;
StartErr: BOOL;
END_VAR
VAR_IN_OUT
Ref: WORD ;
END_VAR
Basic Functions
982 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
Pulse diagram
6WDUW
$FWLY
'RQH
(UURU
Call example
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 983
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
Function
FC AL_MSG evaluates the signals entered in DB 2 and displays them as incoming and
outgoing error and operational messages on the HMI.
The incoming signals (positive edge) are displayed immediately in the case of both error and
operational messages.
Outgoing signals (negative edge) are only canceled immediately in the case of operating
messages. Error messages remain stored on the HMI - even if the signals no longer exist -
until the "acknowledge" parameter is issued, WCS.e. until the user acknowledges the
messages.
The "ToUserIF" parameter can be used to transfer the group signals for the feed, read and
NC start disabling signals and feed stop signal to the existing axis, spindle and channel
interfaces. The group signals are transferred to the user interface directly from the status
information in DB 2 irrespective of an interrupt acknowledgment.
1. If parameter "ToUserIF": is set to FALSE, signals are not transferred to the user interface.
In this case, the user must take measures in his PLC program to ensure that these
signals are influenced in the interface.
2. If parameter "ToUserIF": is set to TRUE, all signals listed above are sent to the user
interface as a group signal in each case. The user PLC program can, therefore, influence
these signals only via DB 2 in connection with a message or interrupt output. The
appropriate information is overwritten in the user interface.
As an alternative to the procedure described under paragraph 2, the user can influence the
disable and stop signals without a message output by applying a disable or stop signal state
to the interface signals after FC AL_MSG has been called.
The following program illustrates this method:
CALL FC 10 (
ToUserIF := TRUE,
Ack := I 6.1);
Basic Functions
984 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
FB 1-Parameter "ExtendAlMsg"
With the activation of the parameter a new structuring of the DB 2 becomes effective (see
"Interface PLC/HMI (Page 831)"). Upon activation the bit fields are available to the user for
the disable and halt signals, which do not generate any alarms, messages. As a result, the
user need not implement the aforesaid measures. The desired functionality is given
automatically by a simple setting, resetting of signals in the new DB 2 areas.
The error and the operating messages are stored by the user in data block DB 2 (see
description of DB 2 in the lists of interface signals).
Note
In DB 2, a "1" signal must be present for several OB1 cycles to ensure that a message can
also be displayed on the HMI. There is an upper limit for the number of interrupts and
messages that can be pending at the same time. This upper limit is dependent on the PLC
CPU. On PLC 317-2DP, the upper limit for messages pending simultaneously is 60.
See also Parameter Manual (Lists, Manual 2), chapter on PLC Alarms / Messages
FUNCTION FC 10 : VOID
// NAME: AL_MSG
VAR_INPUT
ToUserIF : BOOL ;
Ack : BOOL ;
END_VAR
END_FUNCTION
Call example
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 985
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
12.16.19 FC 12: AUXFU call interface for user with auxiliary functions
Function
FC AUXFU is generally called on an eventdriven basis in the basic program if the channel
transferred in the input parameter contains new auxiliary functions. The PLC user can extend
FC AUXFU with program instructions for processing his auxiliary function to avoid cyclic
polling of the channel DBs. This mechanism permits auxiliary functions to be processed on a
jobdriven basis. FC AUXFU is supplied as a compiled empty block in the basic program. In
this case, the basic program supplies parameter "Chan" with the channel number. The PLC
user knows which channel has new auxiliary functions available. The new auxiliary functions
can be determined by the auxiliary-function change signals in the channel concerned.
Example
BEGIN
L Chan; //Channel index no., (0,1,2,..)
+ 21; //Channel DB offset
T ChanDB; //Save channel DB no.
Basic Functions
986 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
Function
This block carries out the display control for the handheld unit (HHU or HT2). The
information to be output on the display is stored as 32 characters in string data ChrArray
(these are 64 characters when using an HT2). A fixed text assignment of 32 or 64 characters
is, therefore, required for this string when the data block is created.
16 characters are sent to BHG/HT2 for each job, which lasts for several OB 1-cycle. The
assignment of the characters in ChrArray to each line is unique. For line 1 the characters 1
to 16 and for the line 2 the characters 17 to 32 of the string data ChrArray are transferred. In
addition, for HT2 the line 3 with the characters 33 to 48 and line 4 made of characters 49 to
64 are shown.
The block checks, whether the minimum length of the ChrArray is available for operating the
BHG or the HT2. If less characters are present in the string data than are to be displayed,
then the line is filled with blanks.
By setting parameter Row to 0, it is possible to suppress the display (e.g. if several variables
in one or several PLC cycles need to be entered in the string without any display output). If
several lines are to be updated "simultaneously" (transfer of the characters to the lines lasts
for several OB 1 cycles) (Parameter Row > 1), then the lines are updated one by one each
with 16 characters per line.
Variable portions within the string can be inserted by means of the numerical converter
functionality (optional). For the numeric converter the parameter "Convert" must be set to
TRUE. The variable to be displayed is referenced via the pointer Addr. Parameter
"DataType" contains the format description of this parameter (see parameter table). The
number of bytes of the variable is linked to the format description. The address justified to
the right within the string is specified by parameter "StringAddr". The number of written
characters is shown in the parameter table.
Signals
Byte 1 is supplied by the output signals of the HHU and the character specifications are
supplied by the block. These may not be written by the PLC user program.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 987
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
Additional parameters
HHU
The pointer parameters for the input and output data of the handheld unit must be
parameterized in the start OB 100 in FB 1, DB 7. Parameter "BHGIn" corresponds to the
input data of the PLC from the handheld unit (data received by PLC). Parameter "BHGOut"
corresponds to the output data of the PLC to the handheld unit (data transmitted by PLC).
These two pointers must be set to the starting point of the relevant data area (which is also
parameterized in SDB 210 with an MPI link).
For operating a BHG a "2" is to be entered at FB 1 parameter BHG.
HT2
For using a HT2 a "5" is to be entered at FB 1 parameter BHG. The pointer parameter of the
input and output data are also to be supplied, as described above.
In the parameters BHGRecGDNo and BHGRecGBZNo the value is to be entered, which is
configured at the S2 of the DIP-Fix-switch (rotary coding switch) of the connection module of
the HT2.
Note
Numerical conversion
If the numerical converter is used to display information, then it is better to avoid performing
a conversion in every PLC cycle for the sake of reducing the PLC cycle time.
The conversion routine can be used independently of the display control. This is to be
queried in parameter row "0", although the convert parameter should be set. Consequently,
only the string is processed, and the converter routine is executed.
High display resolution
If, for example, the actual axis value is to be displayed with a higher resolution, the following
should be noted:
Variables will continue to be read with FB 2 or FB 5. REAL 2 is used instead of ANY pointer
BYTE 8 as the criterion for output as a 64-bit floating point number (e.g. P#M100.0 REAL 2).
When specifying the 64-bit floating point number on the HHU/HT2, an output format of up to
14 places, split freely between places before and after the decimal point, can be selected
instead of fixed formats.
Basic Functions
988 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
FUNCTION FC 13 : VOID
VAR INPUT
Row : BYTE ; //Display line (see table)
ChrArray : STRING ; //Transfer at least string[32/64]
Convert : BOOL; //Activate numerical conversion
Addr: POINTER; //Points to the variable being converted
DataType : BYTE ; //Data type of the variables
StringAddr : INT; //right-justified string address (1...32/64)
Digits : BYTE ; //Number of decimal places (1...3)
END VAR
VAR OUTPUT
Error : BOOL; //Conversion or string error
END VAR
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 989
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
Ranges of values
Basic Functions
990 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
Call example
//DB with the name strdat is declared in symbol table, data element disp is declared as
String[32] (in HT2:
//String[64]) and completely assigned with characters
CALL FC 13 (
Row := MB 26,
ChrArray := "strdat".disp,
Convert := M 90.1,
Addr := P#M 20.0, //Number to be converted
DataType := MB 28, //Data type of the variables
StringAddr := MW 30,
Digits := B#16#3, //3 decimal places
Error := M 90.2);
Function
The block for the star-delta changeover controls the timing of the defined switching logic
such that the changeover can be performed in either direction even when the spindle is
running. This block may be used only for digital main spindle drives and must be called
separately for each spindle.
The changeover operation is implemented via 2 separate contactors in a sequence involving
4 steps:
Step 1: Deleting the interface signal DB31, ... .DBX21.5 (motor selection done) in the related
axis-DB and registering the changeover process via A with DB31, ... .DBX21.3 (motor
selection).
Step 2: As soon as the checkback message IS DB31, ... DBX93.7 (Pulse enabled) = 0 and
the acknowledgment of the announced motor selection from the drive have appeared,
the currently energized contactor drops out.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 991
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
Step 3: The other contactor is energized after the time period set by the user in parameter
"TimeVal" has elapsed.
Step 4: After a further delay, the changeover is signaled to the drive with NST DB31, ...
.DBX21.5 (motor selection done):
Error message
If the parameter "SpindleIFNo" is not in the permissible range, the PLC is stopped with
output of interrupt message number 401702.
Special features
When parameterizing "TimeVal" with the value 0, a default value of 100 ms is used. With a
value of less than 50 ms, the minimum setting of 50 ms is applied.
The block must be called unconditionally.
Note
Switchover does not take place if the spindle is in an axis mode such as M70, SPOS.
Basic Functions
992 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
Boundary conditions
Star-delta changeover on digital main spindle drives initiates a process, which contains
closed-loop control sequences. Since the closed-loop control system supports automatic
star-delta changeover, certain restrictions should be noted:
● Due to the automatic deactivation of the pulse on the drive, the NST DB31, ... .DBX93.7
(Pulse enabled) deactivates simultaneously the IS DB31, ... .DBX61.7 (current controller
active) and DB31, ... .DBX61.6 (speed controller active).
● If a changeover from star to delta takes place while the spindle is rotating and the spindle
position controller is switched on, IS "Position controller active" (DB31, ... DBX61.5), this
triggers alarm 25050 "Contour monitoring".
● Once the star-delta changeover has been initiated with FC 17, it cannot be delayed by
the user, e.g. by waiting until the star/delta contactors change over during the course of
operation. The user can implement this signal interaction with PLC logic.
VAR_INPUT
YDelta: BOOL; //Star = 0, delta = 1
SpindleIFNo: INT; //Machine axis number
TimeVal: S5TIME ; //Time value
TimerNo : INT; //User timer for changeover time
END_VAR
VAR_OUTPUT
Y: BOOL; //Star contactor
Delta: BOOL; //Delta contactor
END_VAR
VAR_IN_OUT
Ref: WORD ; //Block status word (instance)
END_VAR
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 993
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
Call example
CALL FC 17 (
YDelta := I 45.7, //Star delta
SpindleIFNo := 4,
TimeVal := S5T#150ms,
TimerNo := 10, //Timer 10
Y := Q 52.3, //Star contactor
Delta := Q 52.4, //Delta contactor
Ref := mw 50); //Instance
Function
FC SpinCtrl can be used to control spindles and axes from the PLC.
References
/FB1/Function Manual, Basic Functions; Spindles (S1)
Function Manual, Extended Functions; Positioning Axes (P2)
Function Manual, Extended Functions; Indexing Axes (T1)
This block supports the following functions:
● Position spindle
● Rotate spindle
● Oscillate spindle
● Indexing axes
● Positioning axes
Each function is activated by the positive edge of the appropriate initiation signal (start, stop).
This signal must remain in the logic "1" status until the function has been acknowledged
positively or negatively by InPos="1" or Error = "1". The output parameters are deleted when
the relevant trigger signal is reset and the function terminated.
To be able to control an axis or spindle via the PLC, it must be activated for the PLC. This
can, for example, be achieved by calling the FC "SpinCtrl" with activation of the "Start" or
"Stop" parameter. In this case, the FC "SpinCtrl" requests control over the spindle/axis from
the NC.
The NC feeds back the status of this spindle/axis in byte 68 in the associated spindle/axis
interface (DB31, ...) (see interface lists). Once the axis/spindle is operating under PLC
control, the travel command for the active status can be evaluated via the relevant axis
interface.
Basic Functions
994 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
On completion ("InPos" is TRUE, "Start" changes to zero), the axis/spindle check function is
switched to a neutral status by FC "SpinCtrl".
Alternatively, the PLC user program can also request the check for the PLC prior to calling
FC "SpinCtrl".
By calling this function several times in succession, a better response by the spindle/axis can
be obtained as the changeover process in the FC can be omitted.
Activation through the PLC user program is executed in the corresponding spindle interface
in byte 8.
After return of the check, the spindle can again be programmed by the NC program.
WARNING
Changed response behavior of the axis/spindle
If several block calls (FC 18) have been programmed for the same axis/spindle in the PLC
user program, then the functions concerned must be interlocked by conditional calls in the
user program. The conditional call of a started block (parameter Start or Stop = TRUE)
must be called cyclically until the signal state of output parameter "Active" or "InPos"
changes from 1 to 0.
Note
Please note:
FC 18 must be called cyclically until signal "InPos" or, in the case of an error "Error",
produces an edge transition of 1 to 0. Only when the "InPos"/"Error" signal has a 0 state can
the axis/spindle concerned be "started" or "stopped" again (the next "start" must be delayed
by at least one PLC cycle). This also applies when the assignment in data byte 8 on the axial
interface has been changed.
Abort:
The function cannot be aborted by means of parameter "Start" or "Stop", but only by means
of the axial interface signals (e.g. delete distance-to-go). The axial interface also returns
status signals of the axis that may need to be evaluated (e.g. exact stop, traverse
command).
InPos on spindle - rotation/oscillation:
For the function "Rotate spindle" and also for "Oscillate spindle" the meaning of the "InPos"
parameter is defined as follows:
Setpoint speed is output → function started without errors.
Reaching the desired spindle speed must be evaluated via the spindle interface.
Simultaneity:
Several axes can be traversed simultaneously or subject to a delay by FC 18 blocks. The
upper limit is defined by the maximum number of axes. The NCK handles the PLC function
request (FC 18) via independent interfaces for each axis/spindle.
Axis disable:
With the axis disabled, an axis controlled via FC 18 will not move. Only a simulated actual
value is generated (behavior as with NC programming).
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 995
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
Functions
1. Position spindle:
The following signals are relevant:
2. Rotate spindle:
The following signals are relevant:
3. Oscillate spindle:
The following signals are relevant:
Basic Functions
996 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
Note
With Funct: "4" = Indexing axis
The modulo conversion can be compared with approaching the indexing position via POS[AX]
= CIC (value) in the part program.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 997
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
5. to 8. Position axes:
The following signals are relevant:
Basic Functions
998 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 999
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
FRate
The feedrate in FC 18 can also be specified as:
● Cutting rate with unit m/min or feet/min
● Constant grinding wheel surface speed in m/s or feet/s
These alternative velocity settings can be used only if this function is activated by the NC
program. Checkback signals for successful activation can be found in byte 84 on the axis
interface.
Error identifiers
If a function could not be executed, this is indicated by the "Error" state parameter being set
to 'logic 1'. The error cause is coded at block output "State":
State Meaning
Errors caused by PLC handling:
1 B#16#1 Several functions of the axis/spindle were activated simultaneously
20 B#16#14 A function was started without the position being reached
30 B#16#1e The axis/spindle was transferred to the NC while still in motion
40 B#16#28 The axis is programmed by the NC program, NCK internal error
50 B#16#32 Permanently assigned PLC axis. Traverses (JOG) or is referencing
60 B#16#3C Permanently assigned PLC axis. Channel status does not permit a
start
Errors that occur due to handling of the NCK. The alarm numbers are described in the
Diagnostics Manual:
100 B#16#64 False position programmed for axis/spindle
(corresponds to alarm number 16830)
101 B#16#65 Programmed speed is too high
102 B#16#66 Incorrect value range for constant cutting rate
(corresponds to alarm number 14840)
104 B#16#68 Following spindle: Illegal programming
(corresponds to alarm number 22030)
105 B#16#69 No measuring system available
Basic Functions
1000 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
State Meaning
(corresponds to alarm number 16770)
106 B#16#6a Positioning process of the axis still active
(corresponds to alarm number 22052)
107 B#16#6b Reference mark not found
(corresponds to alarm number 22051)
108 B#16#6c No transition from speed control to position control (corresponds
to alarm number 22050)
109 B#16#6d Reference mark not found
(corresponds to alarm number 22051)
110 B#16#6e Velocity/speed is negative
111 B#16#6f Setpoint speed is zero
112 B#16#70 Invalid gear stage
115 B#16#73 Programmed position has not been reached
117 B#16#75 G96/G961 is not active in the NC
118 B#16#76 G96/G961 is still active in the NC
120 B#16#78 Axis is not an indexing axis
(corresponds to NCK alarm 20072)
121 B#16#79 Indexing position error (corresponds to NCK alarm 17510)
125 B#16#7d DC (shortest distance) not possible (corresponds to NCK alarm
16800)
126 B#16#7e Absolute value minus not possible (corresponds to NCK alarm 16820)
127 B#16#7f Absolute value plus not possible (corresponds to NCK alarm 16810)
128 B#16#80 No transverse axis available for diameter programming
(corresponds to NCK alarm 16510)
130 B#16#82 Software limit switch plus (corresponds to NCK alarm 20070)
131 B#16#83 Software limit switch minus (corresponds to NCK alarm 20070)
132 B#16#84 Working area limit plus (corresponds to NCK alarm 20071)
133 B#16#85 Working area limit minus (corresponds to NCK alarm 20071)
134 B#16#85 Frame not permitted for indexing axis
135 B#16#87 Indexing axis with "Hirth-toothing" is active
(corresponds to NCK alarm 17501)
136 B#16#88 Indexing axis with "Hirth toothing" is active and axis not
referenced (corresponds to NCK alarm 17503)
137 B#16#89 Spindle operation not possible for transformed spindle/axis
(corresponds to NCK alarm 22290)
138 B#16#8A The corresponding effective coordinate-system-specific working area
limit plus violated for the axis (corresponds to NCK alarm 20082)
139 B#16#8B The corresponding effective coordinate-system-specific working area
limit minus violated for the axis (corresponds to NCK alarm 20082)
System or other serious interrupts:
200 B#16#c8 Corresponds to system alarm number 450007
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1001
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
Pulse diagram
6WDUW
,Q3RV
(UURU
6WDUW(UU
(1) Activation of function by means of a positive signal edge with start or stop
(2) Positive acknowledgement: Function executed / Position reached
(3) Reset function activation after receipt of acknowledgement
(4) Signal change using FC
6WDUW
,Q3RV
(UURU
6WDUW(UU
(1) Activation of function by means of a positive signal edge with start or stop
(2) Negative acknowledgement: Error has occurred
(3) Reset function activation after receipt of acknowledgement
(4) Signal change using FC
Basic Functions
1002 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
Call examples
1. Position spindle:
CALL FC 18(
Start := M100.0,
Stop := FALSE,
Funct := B#16#1, //Position spindle
Mode := B#16#2, //Shortest path
AxisNo := 5,
Pos := MD104,
FRate := MD108,
InPos := M112.0,
Error := M113.0,
State := MB114);
CALL FC 18(
Start := M100.0,
Stop := FALSE,
Funct := B#16q#, //Rotate spindle
Mode := B#16#5, //Direction of rotation as for M4
AxisNo := 5,
Pos := 0.0,
FRate := MD108,
InPos := M112.0,
Error := M113.0,
State := MB114);
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1003
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
CALL FC 18(
Start := M100.0,
Stop := FALSE,
Funct := B#16#3, //Oscillate spindle
Mode := B#16#0,
AxisNo := 5,
Pos := 0.0,
FRate := MD108,
InPos := M112.0,
Error := M113.0,
State := MB114);
CALL FC 18(
Start := M100.0,
Stop := FALSE, //Not used
Funct :=B#16#4, //Traverse indexing axis
Mode := B#16#0, //Position absolutely
AxisNo := 4,
Pos := MD104, //Default setting in REAL: 1.0;2.0;..
FRate := MD108,
InPos := M112.0,
Error := M113.0,
State := MB114);
5. Position axes
CALL FC 18(
Start := M100.0,
Stop := FALSE, //Not used
Funct := B#16#5, //Position axes
Mode := B#16#1, //Position incrementally
AxisNo := 6,
Pos := MD104,
FRate := MD108,
InPos := M112.0,
Error := M113.0,
State := MB114);
Basic Functions
1004 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
Function
With the FC MCP_IFM (M-variant) from the machine control panel a range of 19 inches, e.g.
MCP 483 are transferred to the corresponding signals of the NCK/PLC interface:
● Modes
● Axis selections
● WCS/MCS switchover commands
● Traversing keys
● Overrides
● Key switch
The following specifications apply to the feed override, axis travel keys and INC keys
depending on the active mode or on the coordinate system selected:
● Feed override:
– The feed override is transferred to the interface of the selected channel and to the
interface of the axes.
– The feed override signals are transferred to the NC channel in addition to the "Rapid
traverse override" (DBB 5) interface byte if the "Feed override for rapid traverse
effective" HMI signal is set (exception: Switch setting "Zero"). "Rapid traverse override
effective" is also set with this HMI signal.
● Machine functions for INC and axis travel keys:
– When the MCS is selected, the signals are transferred to the interface of the selected
machine axis.
– When the WCS is selected, the signals are transferred to the geometry axis interface
of the parameterized channel.
– When the system is switched between MCS and WCS, the active axes are generally
deselected.
The LEDs on the machine control panel derived from the selections in the
acknowledgement.
Feedrate and spindle Start/Stop are not transferred to the interface, but output modally as a
"FeedHold" or "SpindleHold" signal. The user can link these signals to other signals leading
to a feed or spindle stop (this can be implemented, e.g. using the appropriate input signals in
FC 10: AL_MSG). The associated LEDs are activated at the same time.
If the machine control panel fails, the signals it outputs are preset to zero; this also applies to
"FeedHold" and "SpindleHold" output signals.
Multiple calls of FC 19 or FC 24, FC 25, FC 26 are permitted in a single PLC cycle. In this
case, the first call in the cycle drives the LED displays. Furthermore, all actions of the
parameterized block are carried out in the first call. In the following calls, only a reduced level
of processing of the channel and mode group interface takes place. The geometry axes are
supplied with directional data only in the first block call in the cycle.
Single block processing can be selected/deselected only in the first call in the cycle.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1005
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
The second machine control panel can be processed if parameter "ModeGroupNo" has been
increased by B#16#10. When parameterizing, the HHU number is contained in the lower
nibble (lower 4 bits).
"BAGNo" = 0 or B#16#10 means that the mode group signals are not processed.
"ChanNo" = 0 means that the channel signals are not processed.
The INC selections are transferred to the mode group interface. The activation for this
specification is done via the DB10.DBX57.0 (INC inputs in BAG area active) through this
block once after power up.
Two machine control panels can still be handled in parallel by this module. The module call
for the second machine control panel in OB1 cycle must come after the call of the first MCP.
Support for two MCPs is provided in the control panel blocks up to certain limits (support is
not provided as standard for mutual interlocking of axis selections with identical assignments
on two MCPs).
Basic Functions
1006 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
Example
More than nine axes are to be controlled with FC19 using a special application. We
recommend that you proceed as follows:
● Reserve free key on MCP.
● Evaluate this key as a flipflop.
● Evaluate the flipflop output as pos. and neg. edge.
● For pos. edge write one set of axis numbers in the axis table (DB10) and switch on LED
via this key.
● For neg. edge write one set of axis numbers in the axis table (DB10) and switch on LED
via this key.
VAR_INPUT
BAGNo : BYTE ;
ChanNo: BYTE ;
SpindleIFNo: BYTE ;
END_VAR
VAR_OUTPUT
FeedHold : BOOL;
SpindleHold : BOOL;
END_VAR
BEGIN
END_FUNCTION
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1007
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
Source: Destination:
MCP - Switch Interface DB
Position 0 DB10.DBX56.4
Position 1 DB10.DBX56.5
Position 2 DB10.DBX56.6
Position 3 DB10.DBX56.7
Source: Destination:
MCP - Key Interface DB (parameter BAGNo)
Display for BAG 1
AUTOMATIC DB11.DBX0.0
MDA DB11.DBX0.1
JOG DB11.DBX0.2
REPOS DB11.DBX1.1
REF DB11.DBX1.2
TEACH IN DB11.DBX1.0
INC 1 ... 10 000, INC Var. DB11.DBX2.0 - 2.5
Source: Destination:
MCP - Key Interface DB (parameter ChanNo)
Direction key + DB21, ... .DBX12.7
Direction key - DB21, ... .DBX12.6
Rapid traverse override DB21, ... .DBX12.5
Direction key + DB21, ... .DBX16.7
Direction key - DB21, ... .DBX16.6
Rapid traverse override DB21, ... .DBX16.5
Direction key + DB21, ... .DBX20.7
Direction key - DB21, ... .DBX20.6
Rapid traverse override DB21, ... .DBX20.5
Basic Functions
1008 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
Source: Destination:
MCP - Key Interface DB (all axis DBs)
Direction key + DB31, ... .DBX4.7
Direction key - DB31, ... .DBX4.6
Rapid traverse override DB31, ... .DBX4.5
The transfer is dependent upon the selected axis. The associated interface bits are deleted
for axes which are not selected.
Source: Destination:
MCP - Switch Interface DB (parameter ChanNo)
Feedrate override DB21, ... .DBB4
Source: Destination:
MCP - Switch Interface DB (all axis DBs)
Feedrate override DB31, ... .DBB0 (selected axis number) The feed
override of the 1st MCP is applied to all axes.
Spindle override DB31, ... .DBB19 (parameter SpindleIFNo)
Source: Destination:
MCP - Keys Interface DB (parameter ChanNo)
NC start DB21, ... .DBX7.1
NC stop DB21, ... .DBX7.3
RESET DB21, ... .DBX7.7
Single block DB21, ... .DBX0.4
Source: Destination:
MCP - Keys FC output parameters
Feed stop Parameter: "FeedHold" linked with memory, LEDs
Feed enable are controlled
Spindle stop Parameter: "SpindleHold" linked with memory,
Spindle enable LEDs are controlled
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1009
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
Destination: Source:
MCP - LED Interface DB (parameter BAGNo)
Display for BAG 1
AUTOMATIC DB11.DBX6.0
MDA DB11.DBX6.1
JOG DB11.DBX6.2
REPOS DB11.DBX7.1
REF DB11.DBX7.2
TEACH IN DB11.DBX7.0
Destination: Source:
MCP - LED Interface DB (parameter BAGNo)
Display for BAG 1
INC 1 ... 10 000, INC Var. DB11.DBX8.0 - 8.5
Destination: Source:
MCP - LED Interface DB (parameter ChanNo)
NC start DB21, ... .DBX35.0
NC stop DB21, ... .DBX35.2 or DB21, ... .DBX35.3
Single block DB21, ... .DBX0.4
Note
Direction key LEDs are controlled by operating the direction keys.
Axis selection and WCS/MCS LEDs are controlled by operating the relevant pushbutton
switch.
Call example
Basic Functions
1010 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
With these parameter settings, the signals are sent to the first mode group, the first channel
and all axes. In addition, the spindle override is transferred in the 4th axis/spindle interface.
The feed hold signal is passed to bit memory 22.0 and the spindle stop signal to data block
DB2, data bit 151.0.
Solution:
The value 4 must be entered in DB10 byte (8+(9-1)) for the 4th axis.
Function
When the Transfer block is called, data are exchanged between the PLC and NCK according
to the selected function code. Data are transferred as soon as FC 21 is called, not only at the
start of the cycle.
The "Enable" signal activates the block.
FC 21 is processed only when "Enable" = "1".
The following functions for the data exchange between PLC and NCK are supported:
1. Signal synchronized actions at the NCK - channel
2. Signals synchronized actions from NCK - channel
3. Fast data exchange PLC-NCK (Read function in NCK)
4. Fast data exchange PLC-NCK (Write function in NCK)
5. Update control signals to NCK - channel
6. Update control signals to axes (data byte 2 of the user interface)
7. Update control signals to axes (data byte 4 of the user interface)
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1011
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
VAR_INPUT
Enable : BOOL ;
Funct: BYTE ;
S7Var : ANY ;
IVar1 : INT ;
IVar2 : INT ;
END_VAR
VAR_OUTPUT
Error : BOOL ;
ErrCode : INT ;
END_VAR
Basic Functions
1012 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
Call example:
VAR_TEMP
myAny: ANY ;
END_VAR
BEGIN
NETWORK
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1013
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
END_FUNCTION
Basic Functions
1014 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
)XQFW )XQFW
UHDG ZULWH
QR QR
6HPDSKRUH " 6HPDSKRUH "
\HV \HV
7UDQVIHU 7UDQVIHU
(UURU (UURU
GDWDIURP GDWDIURP
(UU&RGH (UU&RGH
1&WR3/& 3/&WR1&
6HPDSKRUH 6HPDSKRUH
(UURU (UURU
(UU&RGH (UU&RGH
5HDGLQ :ULWHLQ
1&. 1&.
QR QR
6HPDSKRUH " 6HPDSKRUH "
\HV \HV
5HDGGDWD 7UDQVIHU
IURP3/& GDWDIURPWR
3/&
6HPDSKRUH 6HPDSKRUH
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1015
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
Call example:
1. Read double word of position offset 4 with semaphore in byte 0 and store in MD100:
Data type Dword (4 bytes)
Position offset 4
6HPDSKRUHV
Basic Functions
1016 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
CALL FC 21 (
Enable := M 10.0, //if TRUE, FC 21 active
Funct := B#16#3, //Read data
S7Var := P#M 100.0 DWORD 1,
IVAR1 := 4,
IVAR2 := 0,
Error := M 10.1,
ErrCode := MW12);
UN M10.1; //Enable while 1, until value is read
R M10.0;
CALL FC 21 (
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1017
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
Basic Functions
1018 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
Function
The block TM_DIR provides the shortest path for positioning a magazine or a revolver based
on the actual and setpoint position.
As long as a 1 signal is applied to the Start input, all output parameters are updated
cyclically. Changes can be made to input parameters (e.g. position values) in subsequent
PLC cycles.
The output signals are undefined when the start signal is at 0 level.
In the case of direction selection with special positioning input "Offset" > 0, a new setpoint
position is calculated from the setpoint and special positions and the number of magazine
locations according to the following formula:
New setpoint position = (setpoint pos. - (special pos. -1)) neg. modulo # locations
The new setpoint position corresponds to the location number at which the magazine must
be positioned so that the setpoint position requested by the user corresponds to the location
number of the special position. The directional optimization is active both with and without
special positioning.
The block must be called once with the appropriate parameter settings for each magazine.
WARNING
The block may only be called in conjunction with the tool management.
Note
For further details on tool management (also with regard to PLC) refer to the Description of
Functions Tool Management. Furthermore, PI services are provided for tool management via
the FB 4, FC 7 and FC 8 (see also the corresponding Sections in this documentation).
FUNCTION FC 22 : VOID
// NAME: TM_DIR
VAR_INPUT
MagNo: INT ;
ReqPos: INT;
ActPos: INT;
Offset: BYTE ;
Start: BOOL ;
END_VAR
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1019
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
VAR_OUTPUT
Cw: BOOL ;
Ccw: BOOL ;
InPos: BOOL ;
Diff: INT;
Error : BOOL ;
END_VAR
BEGIN
END_FUNCTION
Call example
Basic Functions
1020 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
Function
With FC MCP_IFM2 (M variant slimline machine control panel, e.g. MCP 310), the following
are transferred from the machine control panel (MCP) to the corresponding signals of the
NCK/PLC interface:
● Modes
● Axis selections
● WCS/MCS switchover
● Traversing keys
● Overrides or override simulation signals
● Keyswitch setting
The following specifications apply to the feed override, axis travel keys and INC keys
depending on the active mode or on the coordinate system selected:
● Feed override:
– The feed override is transferred to the interface of the selected channel and to the
interface of the axes.
– The feed override signals are transferred to the NC channel in addition to the "Rapid
traverse override" (DBB 5) interface byte if the "Feed override for rapid traverse
effective" HMI signal is set (exception: Switch setting "Zero"). "Rapid traverse override
effective" is also set with this HMI signal.
● Machine functions for INC and axis travel keys:
– When the MCS is selected, the signals are transferred to the interface of the selected
machine axis.
– When the WCS is selected, the signals are transferred to the geometry axis interface
of the parameterized channel.
– When the system is switched between MCS and WCS, the active axes are generally
deselected.
The associated LEDs on the machine control panel are derived from the acknowledgements
from the relevant selections.
Feedrate and spindle Start/Stop are not transferred to the interface, but output modally as a
"FeedHold" or "SpindleHold" signal. The user can link these signals to other signals leading
to a feed or spindle stop (this can be implemented, e.g. using the appropriate input signals in
FC 10: AL_MSG). The associated LEDs are activated at the same time.
The spindle direction (+, -) is not switched directly either, but made available as output
parameter "SpindleDir" permitting, for example, FC 18 to be parameterized. A spindle enable
signal is also switched via parameter "SpindleHold". One possible method of moving a
spindle directly is to preselect it as an axis so that it can be traversed via (axis) direction
keys.
If the machine control panel fails, the signals it outputs are preset to zero; this also applies to
"FeedHold" and "SpindleHold" output signals.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1021
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
Multiple calls of FC 24 or FC 19, FC 25, FC 26 are permitted in a single PLC cycle. In this
case, the first call in the cycle drives the LED displays. Furthermore, all actions of the
parameterized block are carried out in the first call. In the following calls, only a reduced level
of processing of the channel and mode group interface takes place. The geometry axes are
supplied with directional data only in the first block call in the cycle.
Single block processing can be selected/deselected only in the first call in the cycle.
The second machine control panel can be processed if parameter "ModeGroupNo" has been
increased by B#16#10. When parameterizing, the HHU number is contained in the lower
nibble (lower 4 bits).
"BAGNo" = 0 or B#16#10 means that the mode group signals are not processed.
ChanNo = 0 means that the channel signals are not processed.
The INC selections are transferred to the mode group interface. The activation for this
specification is done via the DB10.DBX57.0 (INC inputs in BAG area active) through this
block once after power up.
Furthermore, two machine control panels can be handled in parallel by this block. The
module call for the second machine control panel in OB1 cycle must come after the call of
the first MCP Support for two MCPs is provided in the control panel blocks up to certain
limits (support is not provided as standard for mutual interlocking of axis selections with
identical assignments on two MCPs).
Keyswitch setting
As of software version 4.5 SP2, the keyswitch signals in the FC 24 are also transferred to the
user interface (DBX56.5 to 7). This transfer is made independent of whether a keyswitch is
mounted on the MCP.
Note
For further information see "FC 19: MCP_IFM transmission of MCP signals to interface
(Page 1005) ".
Basic Functions
1022 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
For FC 24, the maximum possible number of axis selections can also be restricted.
This upper limit is set for the first machine control panel in DB10.DBW30 (symbolic name:
MCP1MaxAxis) or for the second machine control panel in DB10.DBW54 (symbolic name:
MCP2MaxAxis) for the respective MCP.
The default setting is 0, corresponding to the maximum number of configured axes. The axis
numbers and the limit can also be adapted dynamically. Afterwards, a new axis must be
selected on FC 24. Axis numbers may not be switched over while the axes are traversing the
relevant direction keys. The compatibility mode is preset with axis numbers 1 to 6 for both
MCPs and restricted to the configured number of axes.
VAR_INPUT
BAGNo : BYTE ;
ChanNo: BYTE ;
SpindleIFNo: BYTE ;
END_VAR
VAR_OUTPUT
FeedHold : BOOL;
SpindleHold : BOOL;
SpindleDir: BOOL;
END_VAR
BEGIN
END_FUNCTION
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1023
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
Call example
With these parameter settings, the signals are sent to the first mode group, the first channel
and all axes. In addition, the spindle override is transferred in the 4th axis/spindle interface.
The feed hold signal is passed to bit memory 22.0 and the spindle stop signal to data block
DB2, data bit 151.0. The spindle direction feedback signal supplied via parameter
"SpindleDir" can be used as a direction input for an additional FC 18 call.
Function
With the FC MCP_IFM (M variant) from the machine control panel a range of 19 inches, e.g.
MCP 483 are transferred to the corresponding signals of the NCK/PLC interface:
● Modes
● Direction keys of four axes
● WCS/MCS switchover commands
● Overrides
● Key switch
The following specifications apply to the feed override, axis travel keys and INC keys
depending on the active mode or on the coordinate system selected:
● Feed override:
– The feed override is transferred to the interface of the selected channel and to the
interface of the axes.
– The feed override signals are transferred to the NC channel in addition to the "Rapid
traverse override" (DBB 5) interface byte if the "Feed override for rapid traverse
effective" HMI signal is set (exception: Switch setting "Zero"). "Rapid traverse override
effective" is also set with this HMI signal.
● Machine functions for INC and axis travel keys:
– When the MCS is selected, the signals are transferred to the interface of the selected
machine axis.
– When the WCS is selected, the signals are transferred to the geometry axis interface
of the parameterized channel.
Basic Functions
1024 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
The associated LEDs on the machine control panel derived from the acknowledgements of
the relevant selections.
Feedrate and spindle Start/Stop are not transferred to the interface, but output modally as a
"FeedHold" or "SpindleHold" signal. The user can link these signals to other signals leading
to a feed or spindle stop (this can be implemented, e.g. using the appropriate input signals in
FC 10: AL_MSG). The associated LEDs are activated at the same time.
If the machine control panel fails, the signals it outputs are preset to zero; this also applies to
"FeedHold" and "SpindleHold" output signals.
Multiple calls of FC 25 or FC 19, FC 24, FC 26 are permitted in a single PLC cycle. In this
case, the first call in the cycle drives the LED displays. Furthermore, all actions of the
parameterized block are carried out in the first call. In the following calls, only a reduced level
of processing of the channel and mode group interface takes place. The geometry axes are
supplied with directional data only in the first block call in the cycle.
Single block processing can be selected/deselected only in the first cycle.
The second machine control panel can be processed if parameter "ModeGroupNo" has been
increased by B#16#10. When parameterizing, the HHU number is contained in the lower
nibble (lower 4 bits).
"BAGNo" = 0 or B#16#10 means that the mode group signals are not processed.
ChanNo = 0 means that the channel signals are not processed.
Note
For further information see "FC 19: MCP_IFM transmission of MCP signals to interface
(Page 1005) ".
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1025
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
VAR_INPUT
BAGNo : BYTE ;
ChanNo: BYTE ;
SpindleIFNo: BYTE ;
END_VAR
VAR_OUTPUT
FeedHold : BOOL;
SpindleHold : BOOL;
END_VAR
BEGIN
END_FUNCTION
Call example
With these parameter settings, the signals are sent to the first mode group, the first channel
and all axes. In addition, the spindle override is transferred in the 4th axis/spindle interface.
The feed hold signal is passed to bit memory 22.0 and the spindle stop signal to data block
DB2, data bit 151.0.
Basic Functions
1026 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
Function declaration
VAR_INPUT
BAGNo : BYTE ;
ChanNo: BYTE ;
END_VAR
BEGIN
END_FUNCTION
Parameter
Call examples
Call of the FC 26 for the first MCP, the first mode group and the first channel of the NC.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1027
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
Call of the FC 26 for the second MCP, the second mode group and the third channel of the
NC.
Note
Mode switchover through HT 8 and/or HMI
The function FC 2 "GP_HP Basic program, cyclic part" transfers the signals of the block-
switchover in such a way that an alternative selection of MCP of HT 8 and of the HMI is
possible. The transfer of the HMI signals to the NC/PLC interface can also be switched
off in the function block FB 1 with the parameter "MMCToIF" = FALSE .
Active axes:
Using HT 8 a maximum of 6 axes can be addressed at the same time. The selection of
the axes is to be realized by the user/machine manufacturer in the PLC user program.
Basic Functions
1028 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
Note
Please note the following constraints:
• A check of the permissible machine axis numbers is not done. Invalid machine axis
numbers can lead to a PLC stop.
• The machine axis numbers can be changed dynamically. The table may not be written, if
currently a machine axis is being moved via a traversing key.
Transfer of the traversing key signals depending upon the active coordinate system
The traversing key signals for 6 axes lie in the HT 8 input data area below:
● EB n + 2, Bit 0 - Bit 5 (positive traversing direction)
● EB n + 3, Bit 0 - Bit 5 (negative traversing direction)
The switchover of the coordinate system is done via the input signal:
● EB n + 0, Bit 0 (MCS/WCS)
The input signal is evaluated in FC 26 with the help of the edge trigger flag. The active
coordinate system is shown in the following output signal:
● AB n + 0, Bit 0 (MCS/WCKS) with 0 = MCS, 1 = WCS
In case of active MCS the traversing key signals of the axes 1 - 6 are transferred in the axis-
specific interfaces (DB31, ... .DBX4.6 and DBX4.7 (traversing key +/-)) of the axes specified
in the machine axis tables (DB10.DBB8 to DBB13 or DBB32 to DBB37).
In case of active WCS it is assumed that the axes 1 - 3 of the machine axis table are
geometric axes. For this reason the traversing key signals:
● Of the axes 1 - 3 (EB n + 2 / 3, Bit 0 - Bit 2) are transferred in the interface of the
geometric axes in DB21, ... .DBB 12 + (n * 4), with n = 0, 1, 2), Bit 6 and Bit 7 (traversing
keys +/-) of the channel specified with the parameter "ChanNo" .
The assignment of the traversing key signals of the axes 1, 2 and 3 to the geometric axes
1, 2 and 3 of the channel is permanent and may not be changed.
● Of the axes 4 - 6 (EB n + 2 / 3, Bit 3 - Bit 5) are transferred in the axis-specific interface
(DB31, ... .DBX4.6 and DBX4.7 (traversing keys +/-)) of the axes 4 - 6 entered in the
machine axis table (DB10.DBB11 to DBB13 or DBB35 to DBB37).
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1029
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
Feed override
The value of the HT8 override switch is transferred as feed override in the chanel-specific
interface DB 21, ... .DBB4 (feedrate override) of the programmed channel (parameter:
"ChanNo") and in the axis-specific interfaces DB31, ... .DBB0 (feedrate override) of the axes
programmed in the table DB10.DBB8 to DBB13 (machine axis number).
Basic Functions
1030 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
The selection signals of the INC machine functions are transferred in the mode group-
specific interface DB11 DBB 2 + (n * 20), Bit 0 to Bit 5 (with n = 0, 1, 2, ...). The FC 26
informs the NCK about the activation of the mode group-interface for the INC machine
function once after the power-up with DB10.DBX57.0 (INC inputs active in the mode group
area).
Handwheel selection
The hand-wheel selection signals are evaluated by HMI and transferred to the corresponding
NC/PLC interface signals of the machine or geometric axes:
● Geometry axes: DB21, ... DBB 12 + (n * 4), Bit 0 to Bit 2 (with n = 0, 1, 2)
● Machine axes: DB31, ... .DBX4.0 to DBX4.2
Requirement: FB 1 parameter: "HWheelMMC" = TRUE
Note
If an axis can be traversed from two MCP, then the implementation of a mutual interlocking
is the responsibility of the user (machine manufacturer).
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1031
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
Source: MCP Aim: Geometry axis of the prog. channel (Parameter: ChanNo)
Traversing key + DB21, ... .DBX12.7
Traversing key - DB21, ... .DBX12.6
Rapid traverse override DB21, ... .DBX12.5
Traversing key + DB21, ... .DBX16.7
Traversing key - DB21, ... .DBX16.6
Rapid traverse override DB21, ... .DBX16.5
Traversing key + DB21, ... .DBX20.7
Traversing key - DB21, ... .DBX20.6
Rapid traverse override DB21, ... .DBX20.5
Source: MCP Aim: Prog. axes corresponding to the table in DB 10, DBB 8 - 13
(1. MCP) or DBB 32 - 37 (2. MCP)
Traversing key + DB31, ... .DBX4.7
Traversing key - DB31, ... .DBX4.6
Rapid traverse override DB31, ... .DBX4.5
Basic Functions
1032 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
Override
Source: MCP Aim: Prog. axes corresponding to the table in DB 10, DBB 8 - 13
(1. MCP) or DBB 32 - 37 (2. MCP)
Feed override DB31, ... .DBB0
Channel signals
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1033
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
Task
Machine control panel to application interface (FC 19 M variant, FC 24 slim variant, FC 25 T
variant, FC 26 HT8 variant)
Associated blocks
DB 7, no. of MOGs, channels, axes
DB 7, pointer of machine control panel
DB 8, storage for the next cycle
Resources used
None.
General
The blocks FC 19 (M version), FC 24 (slim-line version), FC 25 (T version) and FC 26 (HT8
version) transfer the signals of the machine control panel to and from the application
interface. In the input parameters, "ModeGroupNo" selects the mode group to be processed
by the block. The "ModeGroupNo" parameter also selects the number of the machine control
panel (Bit 4). "ChanNo" selects the channel to be processed.
Not FC 26:
The "SpindleIFNo" parameter defines the axis interface of the spindle. The spindle override
is transferred to this spindle interface. The parameters are checked for incorrect
parameterization.
Not FC 26:
Output parameters "FeedHold" and "SpindleHold" are generated from the 4 feed/spindle
disable and feed/spindle enable keys and are returned with "logical 1" for disable.
Information for the next cycle is stored in DB8, bytes 0 to 3 or bytes 62 to 65, depending on
the machine control panel number. This information is the edge trigger flag, feed value and
selected axis number. The blocks are provided with user data via the pointer parameters in
DB 7 "MCP1In" and "MCP1Out" ("MCP2In" and "MCP2Out"). The pointers are addressed
indirectly via a further pointer from the VAR section of DB7 in order to avoid absolute
addressing. This additional pointer is determined symbolically in FB1.
Block Description
All 4 components have a similar structure and are classified for the individual subtasks:
In the Input network, various parameters are copied to local variables. The machine control
signals (user data for input/output area) are also copied between locations using the various
pointers in DB 7 (gp_par). These local variables are handled in the block for reasons of
efficiency. Some values are initialized for the startup.
Basic Functions
1034 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
MCS/WCS switchover with edge evaluation, axis selections, direction keys and rapid
traverse overlay is determined in the Global_IN network for further processing in the block
User-specific changes must take place in this part of the program, which are mainly oriented
at the axis selection.
Only the keyswitch information is copied in Network NC .
The mode group network transfers the modes of the keys as dynamic signals to the NCK.
The INC checkback signals from the NC are stored temporarily for the corresponding LEDs.
If the mode group number is 0, this network is not processed. A too large number generates
the message 401901 or 402501 and changes over after stop.
In the Channel network the NC Start, Stop, Reset and Single Block functions are activated
by corresponding checkback signals. The direction keys of the geometry axes are supplied if
a corresponding preselection is made, otherwise they are cleared. If the channel number is
0, this network is not processed. A too large number generates the message 401902 or
402502 and changes over after stop.
The Spindle network transfers the spindle override to the interface configured via
"SpindleIFNo".
The Network Axes transfers the feed override to the selected axis interface. The direction
keys are assigned to the selected axis/spindle. If an axis has been selected previously, the
direction information is set to 0.
The output parameters are prepared and the LED signals of the INC machine function are
generated in the Global_OUT network .
The Output network transfers the output signals of the machine control panel from the
VAR_TEMP image to the logical address. The data for the next cycle are also saved.
Note
The blocks are made available as STL sources if required. But they do not match the
current status of the block. Some details of the actual implementation in C have been
developed further. For this reason we recommend that you specify your additional
requirements for the blocks and that you pass these onto project management via the
sales department.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1035
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
Function
The FC block AG_SEND transfers data to the Ethernet CP for transfer via a configured
connection.
The specified functions correspond to the functions of the library "SIMATIC_NET_CP" of the
S7-300 CPU in STEP 7. In general, the online help of these functions applies for these
functions and therefore a detailed description is not provided here.
The functions AG_SEND, AG_RECV can be used for data exchange with another station via
the integrated "CP 840D sl".
When using the functions AG_SEND and AG_RECV, data is transported to the
communication partner via the Ethernet bus of the CP. The communication partner is
configured in STEP 7 in the "NetPro" tool.
The special feature when calling the functions involves the specification of parameter
"LADDR" at the named blocks. In the case of SINUMERIK 840D sl, value W#16#8110 must
be connected to parameter "LADDR".
In the basic program, this function is available under the FC number 1005 (this FC
corresponds to the FC number FC 5 in the library "SIMATIC_NET_CP").
The block can also be used in a SIMATIC-CPU 3xx with CP343-1.
The protocols TCP and UDP are supported. TCP is the preferred protocol.
Note
With the function AG_SEND, parameter ACT must be TRUE until a result is signaled in
DONE or ERROR.
Basic Functions
1036 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P3: Basic PLC program for SINUMERIK 840D sl
12.16 Block descriptions
Function
The FC block AG_RECV receives data transferred via a configured connection from the
Ethernet CP.
The specified functions correspond to the functions of the library "SIMATIC_NET_CP" of the
S7-300 CPU in STEP 7. In general, the online help of these functions applies for these
functions and therefore a detailed description is not provided here.
The functions AG_SEND, AG_RECV can be used for data exchange with another station via
the integrated "CP 840D sl".
When using the functions AG_SEND and AG_RECV, data is transported to the
communication partner via the Ethernet bus of the CP. The communication partner is
configured in STEP 7 in the "NetPro" tool.
The special feature when calling the functions involves the specification of parameter
"LADDR" at the named blocks. In the case of SINUMERIK 840D sl, value W#16#8110 must
be connected to parameter "LADDR".
In the basic program, this function is available under the FC number 1006 (this FC
corresponds to the FC number FC 6 in the library "SIMATIC_NET_CP").
The block can also be used in a SIMATIC-CPU 3xx with CP343-1.
The protocols TCP and UDP are supported. TCP is the preferred protocol.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1037
P3: Basic PLC program for SINUMERIK 840D sl
12.17 Signal/data descriptions
References
The NCK/PLC, HMI/PLC and MCP/PLC interface signals are contained in the Lists
document.
Lists sl (Book2)
The reference code contained therein (according to the signal names) refer to the respective
function description, in which the signal is described.
The NCK signals that are evaluated by the basic program and transferred in conditioned
form to the user interface are presented in the following sections.
Note
The spindle-specific M functions below are not decoded: M3, M4, M5, and M70.
Basic Functions
1038 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P3: Basic PLC program for SINUMERIK 840D sl
12.17 Signal/data descriptions
Note
The M02/M30 auxiliary function output to the PLC does not state that the part program has
been terminated. To determine definitely the end of a part program in the channel, the
following interface signal must be evaluated:
DB21, ... .DBX33.5 (M02/M30 active)
The channel status must be RESET. The auxiliary function output could arise from an
asynchronous subroutine (ASUB) or a synchronized action and has nothing to do with the
real end of the parts program in this case.
12.17.3 G Functions
The M functions programmed in the part program, ASUB or synchronized actions are
channel specifically transferred from the NC to the PLC:
● G functions from channel 1: DB 21
● G functions from channel 2: DB 22
● etc.
The signal length is one PLC cycle.
POWER ON
After POWER ON, the value zero, i.e. active G groups undefined, is specified in the NC/PLC
interface for all G groups.
Part program end or abort
After part program end or abort, the last state of the G group is retained.
NC START
After NC-START the values of the 8 G-groups specified in the machine data:
MD22510 $NC_ GCODE_GROUPS_TO_PLC
are overwritten according to the default setting set via the machine data as well as the
values programmed in the part program.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1039
P3: Basic PLC program for SINUMERIK 840D sl
12.17 Signal/data descriptions
Basic Functions
1040 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P3: Basic PLC program for SINUMERIK 840D sl
12.18 Programming tips with STEP 7
Note
The number of user areas can be parameterized via FB 1.
After the configuration has been modified (FB 1: MsgUser), DB 2/3 must be deleted.
Copying variants
For the high-speed copying of data from one DB into another it is recommended
● for larger data quantities to use the system function SFC BLKMOV or SFC FILL, because
here a high-speed copying takes place.
● the routine given below is for smaller data quantities, because the supply of ANY
parameter to the SFCs consumes additional time.
Example
Code Comment
// DB xx.[AR1] is the source
// DI yy.[AR2] is the destination
OPEN DB 100; //Source DB
LAR1 P#20.0; //Source start address on data byte 20
OPEN DI 101; //Destination DB
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1041
P3: Basic PLC program for SINUMERIK 840D sl
12.18 Programming tips with STEP 7
Code Comment
LAR2 P#50.0; //Destination start address on data byte 50
//AR1, AR2, DB, DI loaded beforehand
L 4; //Transfer 8 bytes
M001:
L DBW [AR1,P#0.0]; //Copy word-oriented
T DIW [AR2,P#0.0];
+AR1 P#2.0;
+AR2 P#2.0;
TAK;
LOOP M001;
Function
FC 99 has inputs parameters that are defined as POINTER or ANY.
The example shows a body program via which the subcomponents of the POINTER or ANY
can be accessed. In this case, the DB parameterized with POINTER or ANY is opened and
the address offset stored as a crossarea pointer in address register AR1, Thus allowing
access to data elements of variables (generally structures and arrays) that are addressed via
the POINTER, ANY.
This access operation is described at the end of the relevant program sequence in the
example. With data type ANY, it is also possible to execute a check or branch when the
variable is accessed based on the data type and the number of elements involved.
Example
Code Comment
FUNCTION FC 99: VOID
VAR_INPUT
Row : BYTE ;
Convert : BOOL ; //Activate numerical conversion
Addr: POINTER; //Points to variable
Addr1 : ANY ;
END_VAR
VAR_TEMP
Basic Functions
1042 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P3: Basic PLC program for SINUMERIK 840D sl
12.18 Programming tips with STEP 7
Code Comment
dbchr : WORD ;
Number: WORD ;
type : BYTE ;
END_VAR
BEGIN
NETWORK
TITLE =
//POINTER
L P##Addr;
LAR1 ; //Retrieve pointer
L W [AR1,P#0.0]; //Retrieve DB number
T #dbchr;
L D [AR1,P#2.0]; //Offset part of pointer
LAR1 ;
AUF DB [#dbchr]; //Open DB of variables
L B [AR1,P#40.0]; //Retrieve byte value using pointer with
//address offset 40
//ANY
L P##Addr1;
LAR1 ; //Retrieve ANY
L B [AR1,P#1.0]; //Retrieve type
T #typ;
L W [AR1,P#2.0]; //Retrieve amount
T #Amount;
L W [AR1,P#4.0]; //Retrieve DB number
T #dbchr;
L D [AR1,P#6.0]; //Offset part of pointer
LAR1 ;
OPEN DB [#dbchr]; //Open DB of variables
L B [AR1,P#0.0]; //Retrieve byte value using ANY
Function
FB 99 has inputs parameters that are defined as POINTER or ANY.
The example shows a body program via which the subcomponents of the POINTER or ANY
can be accessed. In this case, the DB parameterized with POINTER or ANY is opened and
the address offset stored as a crossarea pointer in address register AR1, thus allowing
access to data elements of variables (generally structures and arrays) that are addressed via
the POINTER, ANY.
This access operation is described at the end of the relevant program sequence in the
example. With data type ANY, it is also possible to execute a check or branch when the
variable is accessed based on the data type and the number of elements involved.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1043
P3: Basic PLC program for SINUMERIK 840D sl
12.18 Programming tips with STEP 7
Example
Code Comment
FUNCTIONBLOCK FB 99
VAR_INPUT
Row : BYTE ;
Convert : BOOL ; //Activate numerical conversion
Addr: POINTER; //Points to variable
Addr1 : ANY ;
END_VAR
VAR_TEMP
dbchr : WORD ;
Number: WORD ;
type : BYTE ;
END_VAR
BEGIN
NETWORK
TITLE =
//POINTER
L P##Addr;
LAR1 ; //Retrieve pointer from instance DB
L DIW [AR1,P#0.0]; //Retrieve DB number
T #dbchr;
L DID [AR1,P#2.0]; //Offset part of pointer
LAR1 ;
OPEN DB [#dbchr]; //Open DB of variables
L B [AR1,P#40.0]; //Retrieve byte value using pointer with
//address offset 40
//ANY
L P##Addr1;
LAR1 ; //Retrieve ANY from instance DB
L DIB [AR1,P#1.0]; //Retrieve type
T #typ;
L DIW [AR1,P#2.0]; //Retrieve amount
T #Amount;
L DIW [AR1,P#4.0]; //Retrieve DB number
T #dbchr;
L DID [AR1,P#6.0]; //Offset part of pointer
LAR1 ;
OPEN DB [#dbchr]; //Open DB of variables
L B [AR1,P#0.0]; //Retrieve byte value using ANY
Basic Functions
1044 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P3: Basic PLC program for SINUMERIK 840D sl
12.18 Programming tips with STEP 7
Note
Address register AR2 is used in the block. However, this address register AR2 is also used
for multiinstance DBs. For this reason, this FB should not be declared as multi-instance DB.
Code Comment
FUNCTIONBLOCK FB 100
CODE_VERSION1 //starting from STEP 7 Version 2 for deactivating the
//multi-instance DB
VAR_INPUT
WhichAny : INT ;
Addr1 : ANY ; //Observe predetermined order
Addr2 : ANY ;
Addr3 : ANY ;
Addr4 : ANY ;
END_VAR
VAR_TEMP
dbchr : WORD ;
Number: WORD ;
type : BYTE ;
Temp_addr : ANY ;
END_VAR
BEGIN
NETWORK
TITLE =
L WhichAny;
DEC 1;
L P#10.0; //10 bytes per ANY
*I;
LAR2;
L P##Addr1;
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1045
P3: Basic PLC program for SINUMERIK 840D sl
12.18 Programming tips with STEP 7
Code Comment
+AR2; //Add ANY start addresses
L P##Temp_addr;
LAR1 ; //Retrieve pointer from VAR_TEMP
L DID [AR2,P#0.0]; //Transfer pointer value to VAR_TEM
T LD [AR1,P#0.0];
L DID [AR2,P#4.0];
T LD [AR1,P#4.0];
L DIW [AR2,P#8.0];
T LW [AR1,P#8.0];
Code Comment
FUNCTIONBLOCK FB 100
VAR_INPUT
DBNumber: INT ;
DBOffset : INT ;
Data type: INT ;
Number: INT ;
END_VAR
VAR_TEMP
dbchr : WORD ;
Temp_addr : ANY ;
END_VAR
BEGIN
NETWORK
TITLE =
L P##Temp_addr;
LAR1 ; //Retrieve pointer from VAR_TEMP
L B#16#10; //ANY identifier
T LB [AR1,P#0.0];
L Data type;
T LB [AR1,P#1.0];
L Amount;
T LW [AR1,P#2.0];
L DBNumber;
T LW [AR1,P#4.0];
L DBOffset;
Basic Functions
1046 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P3: Basic PLC program for SINUMERIK 840D sl
12.18 Programming tips with STEP 7
Code Comment
SLD 3; //Offset is a bit offset
T LD [AR1,P#6.0];
CALL FB 101, DB 100
(ANYPAR := #Temp_addr); //ANYPAR is data type ANY
12.18.3 Multiinstance DB
Function
From Version 2 in STEP 7, you can provide multi-instance enabled FBs, i.e. with multi-
instance DBs. The primary characteristic of multiinstance DBs is that a data module can be
used for various instances of FBs (see STEP 7 documentation), The quantity structure of the
DBs can be optimized this way.
Multi-instance DBs should be activated only when they are actually going to be used since
they increase the runtime and code size of the FBs.
Note
When complex programs are implemented in multiinstance enabled FBs that use a pointer
and address register, it is important for the programmer to observe certain rules.
With multiinstance DBs, the start address of the variable (VAR_INPUT, VAR_OUTPUT,
VAR_IN_OUT, VAR) is transferred with the DI data block register and address register AR2.
When variables are accessed within the multiinstance enabled FB, the compiler
independently controls the access operation via address register AR2. However, when
complex program sections also have to work with address registers in the same FB (e.g. to
copy data), then the old contents of AR2 must be saved before the register is changed. The
contents of AR2 must be restored to their original state before an instance variable
(VAR_INPUT, VAR_OUTPUT, VAR_IN_OUT, VAR) is accessed. The AR2 register of the
instance is to be saved most usefully in a local variable (VAR_TEMP).
The command "Load pointer to an instance variable" returns a pointer value from the start of
the instance data. To be able to access this variable via a pointer, the offset stored in AR2
must be added.
Example
Code Comment
FUNCTION_BLOCK FB 99
VAR_INPUT
varin: INT ;
END_VAR
VAR
variable1: ARRAY[[0..9] of INT;
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1047
P3: Basic PLC program for SINUMERIK 840D sl
12.18 Programming tips with STEP 7
Code Comment
variable2: INT ;
END_VAR
BEGIN
L P##variable1; //Pointer at start of ARRAY
//The value 8500 0010 is now in the accumulator
//and a cross-area pointer is in the AR2
//Pointer. If one is to work across areas
//then, during the addition of these
//two pointers, an area is to be disabled.
AD DW#16#00FF_FFFF, //Skipping of an area
LAR1 //Load into AR1
TAR2;
+AR1 AR2; //AR2 instance offset to be added
//You can now indirectly access the ARRAY
//of variable 1 via AR1.
L DIW [AR1, P#0.0]; //E.g. access to the first element
END_FUNCTION_BLOCK
12.18.4 Strings
The STRING data type is required by certain services of the basic program. For this reason,
some additional facts about the string structure and general handling procedures for
parameter assignments are given below.
Structure of strings
A data of type STRING is generally stored (defined) in a data block. There are two methods
of defining a string:
1. Only the data type STRING is assigned to a variable. The STEP7 compiler automatically
generates a length of 254 characters.
2. Data type STRING is assigned to a variable together with a string length in square
parenthesis (e.g. [32]). With this method, the STEP7 compiler generates a string length
corresponding to the input.
Two bytes more than prescribed by the definition are always stored for variables of the
STRING data type. The STEP 7 compiler stores the maximum possible number of
characters in the 1st byte. The 2nd byte contains the number of characters actually used.
Normally, the useful length of the assigned strings is stored by the STEP 7 compiler. The
characters (1 byte per character) are then stored from the 3rd byte onwards.
String parameters are generally assigned to blocks of the basic program by means of a
POINTER or ANY. Such assignments must generally by made using symbolic programming
methods. The data block, which contains the parameterizing string, must be stored in the
symbol list. The assignment to the basic program block is then made by means of the
symbolic data block name followed by a full stop and the symbolic name of the string
variable.
Basic Functions
1048 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P3: Basic PLC program for SINUMERIK 840D sl
12.18 Programming tips with STEP 7
Function
Another task, which occurs frequently, is symbolic determination of an offset address within
a structured DB, e.g. an ARRAY or STRUCTURE is stored somewhere within the DB. After
loading the address register symbolically with the start address, you might like to access the
individual elements of the ARRAY or STRUCTURE via an address register. One way of
loading the address register symbolically is to use an FC whose input parameter is a pointer.
The address of the ARRAY or STRUCTURE is then assigned symbolically to the input
parameter of this FC in the program. The program code in the FC now determines the offset
address from the input parameter, and passes the offset address in the address register
(AR1) to the calling function. Symbolic addressing is thus possible even with indirect access.
Example
Code Comment
FUNCTION FC 99: VOID
VAR_INPUT
Addr: POINTER; //Points to variable
END_VAR
BEGIN
NETWORK
TITLE =
L P##Addr;
LAR1 ; //Retrieve pointer from Addr
L D [AR1,P#2.0]; //Offset part of pointer of variable
LAR1 ;
END_FUNCTION
12.18.6 FB calls
Function
For optimizing the flow speeds, it is useful to call all function block calls with many static
parameters, such as the blocks FB 2, 3, 4, 5, and 7 provided by the basic program in start-up
with the related instance parameters. In the start-up (OB 100), the preassignment of the
parameters must be done, which can then no longer be changed in the cyclic part (OB 1).
These fixed parameter values are no longer parameterized in the cyclic call, because they
have already been written in the Instance DB.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1049
P3: Basic PLC program for SINUMERIK 840D sl
12.18 Programming tips with STEP 7
CALL FB 2, DB 110 (
Req := M 100.0,
NumVar := 2, //Read 2 variables
Addr1 := NCVAR.C1_RP_rpa0_0
Line1 : W#16#1
Addr2 := NCVAR.C1_RP_rpa0_0
Line2 . W#16#2
Error := M1.0,
NDR := M1.1,
State := MW 2,
RD1 := P#M 4.0 REAL 1,
RD2 := P#M 24.0 REAL 1,
CALL FB 2, DB 110 (
Req := FALSE,
NumVar := 2, //Read 2 variables
Addr1 := NCVAR.C1_RP_rpa0_0
Line1 : W#16#1
Addr2 := NCVAR.C1_RP_rpa0_0
Line2 . W#16#2
RD1 := P#M 4.0 REAL 1,
RD2 := P#M 24.0 REAL 1,
CALL FB 2, DB 110 (
Req := M0.0,
Error := M1.0,
NDR := M1.1,
State := MW 2,
Note
Owing to this measure, a shorter cycle time is achieved in OB 1, because the static
parameter values need not be copied in the instance DB in each OB-1 cycle.
Basic Functions
1050 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P3: Basic PLC program for SINUMERIK 840D sl
12.19 Data lists
Note
Machine data in integer/hex format is operated in the NC as DWORD. A machine data in
floating point format is managed in the NC as FLOAT (8-byte IEEE). They are stored only in
the NC/PLC interface and can be read by the PLC user program from DB 20 even during
PLC booting.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1051
P3: Basic PLC program for SINUMERIK 840D sl
12.19 Data lists
Basic Functions
1052 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P4: PLC for SINUMERIK 828D 13
13.1 Overview
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1053
P4: PLC for SINUMERIK 828D
13.1 Overview
'%
8VHUGDWD
+0,
+0, '%
6LJQDOVWR+0,
6LJQDOVIURP+0,
1&
'DWDLQWHUIDFH
1& '%
6LJQDOVWR1&
6LJQDOVIURP1&
'%
'%
0RGHVLJQDOV
'% 6LJQDOVWR1&
0RGH 6LJQDOVIURP1&
'%
3/&XVHU
SURJUDP
&KDQQHO
1&FKDQQHO '%
6LJQDOVWRFKDQQHO
6LJQDOVIURPFKDQQHO
'%
$[LVVSLQGOHQ
$[LVVSLQGOH
$[LV $[LVVSLQGOH
'%
VSLQGOH 6LJQDOVWRD[LV
GULYH '%
6LJQDOVIURPD[LV
1&FKDQQHO '%
6WDUW$68%
'%
$[LV 3/&D[LVFRQWURO
'%
VSLQGOH
)XQFWLRQLQWHUIDFH
7RROPDQDJHPHQW
'%
-REIRUORDGLQJXQORDGLQJORFDWLRQV
7RRO '%
0DQDJHPHQW -REIRUVSLQGOHDQGWXUUHW
'% $FNQRZOHGJHPHQWIRUORDGLQJXQORDGLQJ
ORFDWLRQV
'%
$FNQRZOHGJHPHQWVIRUVSLQGOHDQGWXUUHW
'%
3/&XVHUDODUPV
1& '%
5HDGLQJZULWLQJ1&GDWD
'%
3,VHUYLFHV
Basic Functions
1054 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P4: PLC for SINUMERIK 828D
13.1 Overview
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1055
P4: PLC for SINUMERIK 828D
13.1 Overview
References
SINUMERIK 828D Parameter Manual
Basic Functions
1056 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P4: PLC for SINUMERIK 828D
13.2 PLC Programming Tool
Note
This block can be used to perform a star/delta changeover - also for 1PH8 spindle motors
with SMI connected to a SINAMICS S120.
(WKHUQHW33IDFWRU\QHWZRUN
3&3*
338KRUL]RQWDO 3&
56&
*60PRGHP
(WKHUQHW
6HUYLFH
LQWHUIDFH '5,9(&/L4 '0&
+XE0RGXOH
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1057
P4: PLC for SINUMERIK 828D
13.3 Programming
References:
Commissioning Manual SINUMERIK 828D
When calling the PLC Programming Tool – without specifying an existing project – then
implicitly a new project is created with the "Project1" default name. This project can be
immediately used to generate the PLC user program and then saved under any name and
loaded into the control system.
Existing projects can be opened in the typical Windows fashion, also typical for Windows, a
user-friendly online help is available by pressing F1.
13.3 Programming
13.3.1 Introduction
Project
A project is the largest possible organizational unit for the user when working with the PLC. It
is comparable with a container, and can:
● Accept program and data blocks, symbol and status tables, cross-references as well as
interface and debug settings.
● Be saved on a data carrier or loaded from there.
● Be loaded into the CPU or retrieved from there.
Basic Functions
1058 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P4: PLC for SINUMERIK 828D
13.3 Programming
Data classes
Data classes are especially the properties of actual values of such data blocks that the user
explicitly brings into the project. (Data blocks that are inherent to the system are not meant,
e.g. the user interface.)
The data classes "Manufacturer", "Individual" and "User" were introduced into
SINUMERIK 828D in order to:
● Be able to assign the DB actual values to specific user groups.
● Be able to load values belonging to a user group (i.e. data class) into or out of the CPU.
● Simplify troubleshooting and maintenance.
All programs (with the exception of the two interrupt programs INT100 and INT101) and all
data block structures (i.e. the inner structure, the "Type" of data blocks) and data block initial
values have the "Manufacturer" data class.
The interrupt programs INT100 and INT101 are of the "Individual" type.
Program
A program (also a program organization unit "POU") is a block for a sequence of commands
(including comments) that the users assemble one after the other using the LAD Editor to
solve their particular task. The users have three types of these POUs at their disposal:
● The main program (MAIN)
There is only one of these. The system calls this in the PLC cycle.
● 256 optional subprograms (SBR_xyz)
Subprograms are used to structure and encapsulate functions.
Once coded, they can be called a multiple number of times.
● Three optional interrupt programs
These are executed with a higher priority at a different location in the PLC cycle and are
reserved for special tasks.
Data block
A data block is a block for data (initial values, actual values) and comments with the
following properties:
● The data is saved in precisely the same sequence as specified by the user. This means
that the inner structure of the data block is defined and if several data blocks are created
with the same inner structure (i.e. the same type), then a certain data is always located at
a specific location. This location is called offset and is the relative length in bytes from the
beginning of the data block (DB) up to the actual piece of data.
● Initial values can be assigned to the data that they assume after being loaded into the
PLC for the first time.
● The actual values of the data can also be read online from the control, changed and also
saved with the project.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1059
P4: PLC for SINUMERIK 828D
13.3 Programming
3URMHFWLQWKH3/&3URJUDPPLQJ7RRO
'%
'% '%FXUUHQWYDOXHV
0$,1
3URJUDPFRGHFRPPHQWV
FURVVUHIHUHQFHVV\PERODQGVWDWXVWDEOHV
YDULDEOHVFRQVWDQWV
'%VWUXFWXUHDQG'%VWDUWYDOXHV
Symbol tables
The symbol table is used for symbolic addresses. Frequently, symbols simplify programming
and increase the transparency of programs. In the compiled program, which is loaded into
the target system, all of the symbols are converted into absolute addresses. The data
relating to the symbol table is loaded into the target system.
Status table
In the status tables, you can observe how the process values change as the program is
executed. Status tables are not loaded into the target system. They are only intended to be
able to monitor the activities of the target system (or the simulated target system).
NC variables
NC variables are listed variables and drive parameters that can be selected and
parameterized individually. The highlighted address information is stored in the data block
DB9910 and loaded into the PLC user program. This allows access to selected variables.
This allows PLC interfaces to be freely configured.
Basic Functions
1060 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P4: PLC for SINUMERIK 828D
13.3 Programming
Cross references
The following are displayed in tabular form in the cross reference window:
● The symbolic or absolute addresses and the locations where they are used
● The bytes that are being used
● The bits that are being used
The cross references and the data on the elements used are not loaded into the target
system.
Note
If you have created a project, then you can start to write your program. However, you should
have executed the following tasks beforehand:
• Range check according to the target system
You can select the target system type before you write your program so that the PLC
Programming Tool can check the parameter range corresponding to the target system. (If
you have selected a CPU type for your project, the operations that cannot be used for
your target system are marked with a red x in the operation tree.)
• Setting-up the work environment
You can set up your work environment in various ways ("Windows look and feel"). More
detailed information is provided in the online help under "Setting-up the Programming
Tool display".
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1061
P4: PLC for SINUMERIK 828D
13.3 Programming
MAIN
MAIN cannot be renamed and is permanently assigned to the "Manufacturer" data class.
Subprograms
Subprograms are useful if you wish to execute a function a multiple number of times. In
order that you do not have to include the logic in the main program at each location where
you wish to execute the function, you write the logic once in a subprogram and you then call
this subprogram as often as required while executing the main program. Meaningful names
can be assigned to subprograms; these are also assigned to the "Manufacturer" data class.
Advantages:
● The functional sequence in the main program is very transparent.
● Subprograms are easy to port. You can easily demarcate a function and without many
resources, call it from other programs with other parameter values.
Note
The use of global variables restrict the portability of subprograms as the assignment of
addresses in the variable memory of a program can always be in conflict with the
assignment of addresses in another program. Subprograms, which access local variables
for all address assignments, are on the other hand extremely easy to port, because there
is no danger of conflicting addresses.
Basic Functions
1062 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P4: PLC for SINUMERIK 828D
13.3 Programming
Interrupt programs
Interrupt programs are used to be able to handle special process conditions or requirements.
The PLC828 makes a differentiation as follows:
See also
Addressing (Page 1068)
Type of memory (Page 1065)
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1063
P4: PLC for SINUMERIK 828D
13.3 Programming
<n>: Index for addressing the external digital I/O bytes (0 to 3) or the external analog I/O
bytes (0 to 7)
NC/PLC assignment
Addressing
Access
These inputs/outputs not assigned an image memory; reading and writing is performed
directly from or to the hardware. For the fastest possible access (servo-synchronous), use of
the direct operation commands in the interrupt program INT0 is recommended:
Command Symbol
Direct NO contact -| I |-
Direct NC contact -| /I |-
Directly set bit value -(SI)-
Directly reset bit value -(RI)-
Directly assign bit value -( I )-
Basic Functions
1064 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P4: PLC for SINUMERIK 828D
13.3 Programming
Response times
This results in the following response times depending on the position control cycle, place of
execution and used digital inputs/outputs:
Type Description Access in the Access in the Access in the Access in the can be
bit format type format word format double word retentive
format
I Digital inputs and process read / write read / write read / write read / write no
image input
Q Digital outputs and read / write read / write read / write read / write no
process image output
M Internal bit memory read / write read / write read / write read / write no
SM Special bit memory read / write read / write read / write read / write no
(SM0.0 - SM0.6 are write-
protected)
V Variable memory read / write read / write read / write read / write yes
T Actual values of timers Time bit no actual value of no no
and time bits read / write time
read / write
C Actual values of the Counter bit no actual value of no no
counters and count bits read / write the counter
read / write
AC Accumulators no read / write read / write read / write no
L Local data memory read / write read / write read / write read / write no
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1065
P4: PLC for SINUMERIK 828D
13.3 Programming
Address ranges
Basic Functions
1066 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P4: PLC for SINUMERIK 828D
13.3 Programming
1) Range of the process image variables! The assignment of these variables to the physical
inputs and outputs can be taken from the system overview in the SINUMERIK 828D
Commissioning Manual.
2) These addresses directly serve (i.e. without image memory) the eight onboard inputs and
the six onboard outputs if these are assigned to the PLC.
3) Only the DB numbers are specified in the table for reasons of simplicity. Their addressing
depends on the DB structure and is realized according to the following scheme:
' % ' % ;
%LWQXPEHU
2IIVHW
6XEDUHD
$UHDQXPEHUD[LVFKDQQHO
8VHUDUHD
The access type is part of the address notation and must not be considered to be the same
as the data type or confused with this (see "Data types (Page 1070)").
Note
The permitted offset for an address is dependent on the access:
• Bit or byte access: Any offset permitted.
Byte-size variables are placed one beside another seamlessly in a DB.
• Word access: Offset must be divisible by 2.
Word variables (2 bytes) are always saved on even offsets.
• Double word access: Offset must be divisible by 4.
Double word variables (4 bytes) are always saved on offsets which are divisible by 4.
See also "Data types (Page 1070)".
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1067
P4: PLC for SINUMERIK 828D
13.3 Programming
User interface is an interface comprising data blocks that the firmware creates on the target
system. It is used to exchange data between the PLC on one side and the NCK and HMI on
the other side (→ List Manual SINUMERIK 828D).
This DB neither has to be loaded from the CPU nor into the CPU because it is created by the
firmware and therefore belongs to the system.
User data blocks are exclusively created by the user. If it is intended to indirectly access
blocks of the same structure, then these should be located one after the other regarding the
numbering.
Special data blocks are permanently specified as far as their structure is concerned from the
system and can be found in the PLC Programming Tool in "Libraries". However, whether
they are integrated in the user program, assigned to a data class and loaded into the CPU is
the responsibility of the users and their design philosophy (if e.g. a maintenance planner is
not used, then these do not have to be integrated as far as the DB is concerned).
13.3.2.3 Addressing
Direct addressing
For direct addressing, the memory type as well as the address number must be specified
(also refer to "Addressing range of the target system (Page 1066)").
The CPU memory (V, I, Q, M and SM) can be accessed bit by bit as well as in the byte, word
and double-word format. The direct address comprises the memory type and a valid address
number.
To access a bit in a memory area, enter the byte address and the number of the bits.
Separate the byte from the bit using a decimal point.
Examples:
Indirect addressing
Indirect addressing can only be used for data blocks with the same structure (the same
type). These are used so that when accessing data blocks, the number of the data block can
be variably addressed. The data block number must be located in one of the accumulators
AC0 ... AC3 (see "Data blocks (Page 1074)").
Basic Functions
1068 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P4: PLC for SINUMERIK 828D
13.3 Programming
Local variables
Local variables are assigned in the local variable table of the particular POU and are limited
to the validity range of the POU in which they were set-up. Each program organizational unit
has its own local variable table.
Example:
You define a variable with the name INPUT1 in the local variable table of a subprogram with
the SBR1 name.
If you refer to INPUT1 from SBR1, then the program editor identifies INPUT1 as a local
variable from SBR1.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1069
P4: PLC for SINUMERIK 828D
13.3 Programming
However, if you refer to INPUT1 at another location in the program (e.g. in MAIN or in a
second program), the program editor does not recognize INPUT1 as a local variable and
treats INPUT1 as a non-defined global symbol.
Note
Assigning names to local and global symbols
If you use the same name for an address at the local and at the global level, then the local
use has priority. This means that if the program editor defines a definition for the name in the
local variable table of a certain program block, then this definition is used. If a definition is not
found, then the program editor checks the symbol table.
Example:
You define the global symbol "PumpOn" You also define "PumpOn" as local variable in
SBR2, however, not in SBR1.
If the program is compiled, the local definition for "PumpOn" in SBR2 is used. The global
definition is used for "PumpOn" in SBR1.
Note
Using local and global symbols
Local variables use the temporary, local memory of the target system. Subprograms that
only use local variables and transfer parameters, are easy to port and can be flexibly used.
If you wish to use a parameter in several program organizational units, then it makes sense
to define this parameter as global symbol in the symbol table - and not in the local variable
table. This reason for this is that then you would have to include the parameter in every local
variable table of the individual POUs.
Note
Initialization of local variables
As local variables occupy temporary memories, you must initialize the local variables in the
POU each time that the POU is called. You cannot assume that a local variable keeps a data
value from one POU call to the next.
Basic Functions
1070 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P4: PLC for SINUMERIK 828D
13.3 Programming
The operations and parameterized subprograms are recognized using a precise definition.
This definition is also called signature. For all standardized operations, the data types
permissible for the addresses of the operation are specified in the signature. For
parameterized subprograms, the signature of the subprogram is generated by the user in the
local variable table.
The PLC Programming Tool has two data type checking stages:
1. Elementary data type check
For the elementary data type check, if a symbol or a variable is assigned a data type, then all
data types are automatically assigned, which correspond to the bit size of the user-defined
data type. If, for instance, you specify DINT as data type, then the local variable is also
automatically assigned the DWORD data type, because both data types are 32-bit types.
The REAL data type is not automatically assigned although it also involves a 32-bit data
type. The REAL data type is defined so that it does not have any equivalent data types: it is
always clear. The elementary data type check is only performed when using local variables.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1071
P4: PLC for SINUMERIK 828D
13.3 Programming
2. No data check
This mode is only available for global variables where no data types can be specified. If a
data type check is not active, all data types of the same size are automatically assigned to
the symbol.
Example:
If a symbol is assigned to address DB1400.DBD4, the following data types are automatically
assigned by the programming software: DWORD, DINT and REAL.
Basic Functions
1072 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P4: PLC for SINUMERIK 828D
13.3 Programming
Conversion of data Conversion operations Complete data type Data check, permissible
types check, permissible addresses
addresses
INT in BCD I_BCD IN: INT IN: WORD, INT
OUT: INT OUT: WORD, INT
BCD in INT BCD_I IN: INT IN: WORD, INT
OUT: INT OUT: WORD, INT
DINT in REAL DI_R IN. DINT IN: DWORD, DINT
OUT: REAL OUT: REAL
REAL in DINT TRUNC IN: REAL IN: REAL
(ROUND) OUT: DINT OUT: DWORD, DINT
13.3.2.5 Constants
Range of constants
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1073
P4: PLC for SINUMERIK 828D
13.3 Programming
Note
Underscore characters can increase the readability in imported ASCII files.
Example: 16#A_B_C_D
Note
According to the notation type and addressing, although they are data blocks, these DBs
do not make a distinction between initial and actual values and they are also not part of
the PLC user project. The information provided in the section "Properties of data blocks"
does not apply to these DBs.
Basic Functions
1074 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P4: PLC for SINUMERIK 828D
13.3 Programming
Note
If you just want to rename your data block, click the right mouse button in the operation tree
on the object you want to rename and chose "Rename".
You can also easily edit your data block in another program (e.g. Microsoft Excel).
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1075
P4: PLC for SINUMERIK 828D
13.3 Programming
The maximum size of a data block is limited (512 bytes), if it is exceeded the PLC
Programming Tool marks the excess variable addresses using a red wavy line. The PLC
Programming Tool returns an error when compiling the project.
Basic Functions
1076 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P4: PLC for SINUMERIK 828D
13.3 Programming
Example:
The structure of the data block in the project must match the structure of the data block in
the target system. If you have modified the structure of the data block, or re-created the DB,
then the complete project has to be loaded again.
You can access the data view in the following ways:
● Click in the standard function bar on the symbol "Display data block values".
or
● Select the menu command "View" > "Display data block values".
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1077
P4: PLC for SINUMERIK 828D
13.3 Programming
Basic Functions
1078 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P4: PLC for SINUMERIK 828D
13.3 Programming
0$,1
3URMHFWLQ&386,180(5,.3/&
%ORFNV0$,16%5,17'%
'%VWUXFWXUHLQLWLDOYDOXHV
0DQXIDFWXUHU ,QGLYLGXDO
6%5 ,17
6%5 '%DFWXDOYDOXHV
6%5
,17 8VHU
,17 ,QGLYLGXDO
0DQXIDFWXUHU
'%
'% '%
'%
0$,1
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1079
P4: PLC for SINUMERIK 828D
13.3 Programming
Example:
DB9000.DBB0
● Symbolic addressing
The variables of the data blocks can be assigned names in the symbol table. When using
the variable it is sufficient to specify this name from the symbol table.
If no name is assigned to the DB variable in the symbol table, then the symbolic address
comprises the DB name (e.g. myDB_9000) and the name of the variables in the data
block (e.g. Vcorrection1).
)HHG&RUU$[ P\'%B9FRUUHFWLRQ
The menu command "View" > "Symbolic addressing" (Ctrl+Y)" is used to switch over
between absolute and symbolic representation.
Basic Functions
1080 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P4: PLC for SINUMERIK 828D
13.3 Programming
P\'%B>$&@9FRUUHFWLRQ
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1081
P4: PLC for SINUMERIK 828D
13.3 Programming
You can easily edit your data block in this way, e.g. in Microsoft Excel.
Basic Functions
1082 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P4: PLC for SINUMERIK 828D
13.3 Programming
Resolving errors
The PLC Programming Tool marks errors made when data is being entered (e.g. in the LAD
Editor, the NC variables or the symbol table). For example, an illegal syntax or the use of
invalid values can result in input errors. You must correct all errors that have occurred before
you can compile error-free and load the program into the CPU.
Every data block is involved in the compilation run of the project.
Compilation is started:
● Using the menu command "Target system" > "Compile"
or
● By clicking on the symbol.
If any errors occur during compilation, then they are displayed in the output window. Position
the cursor to an error message in the output window and double-click it so that you see the
line in the data block with the error.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1083
P4: PLC for SINUMERIK 828D
13.3 Programming
● After making changes to the actual values of a data block, these must then be
subsequently loaded into the target system. The structure of the data block in the target
system must match the structure of the data block in the project. There are two ways of
loading the actual values into the CPU:
– By clicking on the "Write all" symbol.
– By loading the DB in the RUN mode:
Basic Functions
1084 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P4: PLC for SINUMERIK 828D
13.3 Programming
● If you only want to load the actual values of a data block from the PLC, then first open the
corresponding project in the PLC Programming Tool or load it from the PLC. You can
now load the actual values. You cannot load the data block if the structure of the data
block in the target system does not match that of the data block of the project that has
been opened, or if the project that has been opened does not have a data block.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1085
P4: PLC for SINUMERIK 828D
13.3 Programming
Call NC variables
To edit NC variables in the PLC Programming Tool:
● In the navigation bar, click the "NC variables" button.
or
● Select the "View" > "NC variables" menu command.
● In the operation tree, double-click the "NC variables" button and then the variables list to
be edited:
– NC_0 (NC variables)
– NC_1 (drive parameters)
The selected variables list opens in the PLC Programming Tool.
Basic Functions
1086 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P4: PLC for SINUMERIK 828D
13.3 Programming
Selecting an NC variable
The "NC variables" variables list is divided into two areas. The upper area shows the NC
variables or the drive parameters of the selected variables list available for selection. The
lower area shows the variables selected from the variables list. The tab at the lower edge
can be used to switch between the variable lists.
Example of the "NC variables" variables list:
Note
The variables list contains NC variables that cannot be processed for all CPU types. In this
case, the reading or writing of the NC variable in the PLC user program produces error
messages.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1087
P4: PLC for SINUMERIK 828D
13.3 Programming
Note
If an NC variable represents an array, it suffices to transfer this NC variable once to the
variables list. In this case, the individual elements are addressed using the row index. Enter
a zero for the row in the "Variable parameters" dialog. When this NC variable is used, the
desired row for the row index must be entered in the user interface in addition to the
variables index. This allows several NC variables to be addressed with one entry in the
variables list.
For example, the following can be entered into the DB120x RW_NCDx user interface
Compiling NC variables
The list of the selected NC variables must be compiled for their subsequent use in the PLC
user program and in the PLC firmware. The special DB9910 data block (selected NC data) is
generated.
The compilation of the list is started as follows:
● In the standard toolbar, click the "Program block" symbol.
or
● Select the "Target system" > "Compile" menu command.
The DB9910 data block is generated and stored with the "Read-only" attribute and the
"Manufacturer" data class in the PLC user project. The data block is listed for further
processing in the operation tree.
Basic Functions
1088 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P4: PLC for SINUMERIK 828D
13.3 Programming
Note
If the list of the selected NC variables is changed, a new compilation is required so that the
DB9910 data block can be updated. The compilation is performed automatically for "Export"
or "load into CPU".
Overview
Data classes are user-related organizational units for programs and data blocks as project
subcontainer.
They are special in that they mutually demarcate the contents: The data and programs
assigned to them can be handled as group, i.e. as data class. This applies when loading into
the control and from the control as well as for data backup using export and import.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1089
P4: PLC for SINUMERIK 828D
13.3 Programming
3URMHFWLQWKH3/&3URJUDPPLQJ7RRO
%ORFNV0$,16%5,17'%
3URJUDPFRGHFRPPHQWVFURVVUHIHUHQFHVV\PERO
DQGVWDWXVWDEOHVYDULDEOHVFRQVWDQWV'%VWUXFWXUH
DQG'%VWDUWYDOXHV
0DQXIDFWXUHU
6%5
6%5
6%5
'DWDEORFNVRQO\FXUUHQWYDOXHV
,17 8VHU
,QGLYLGXDO ,QGLYLGXDO
'%
'% ,17 0DQXIDFWXUHU
'%
,17 '%
0$,1
6,180(5,.'
'DWDPHGLXPKDUG
GLVNRUH[WHUQDO
VWRUDJHPHGLXP
Figure 13-5 Project structure in the PLC Programming Tools and the structure of the data class
transport paths
Basic Functions
1090 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P4: PLC for SINUMERIK 828D
13.3 Programming
Example
With a standard (series) machine, where the machine manufacturer also commissioned the
PLC user program, a PLC input (I/O module) fails. The input is rewired to a free input. The
INT100 interrupt program can be used so that the service/erection technician doesn't have to
change the PLC user program of the machine manufacturer due to the rewiring, which is a
complex and tedious task: This runs in front of the main program (MAIN) and writes the
rewired input to the original input in the image. INT100 is assigned to data class "Individual"
and is loaded into the CPU with this data class.
The project block of the machine manufacturer has the data class "Manufacturer" and is
loaded into the CPU with this data class.
If machine manufacturers update their PLC user programs, the correction program is not
influenced. The corrections remain independent of this and are still effective.
,17 ,17
'%
'%
0$,1
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1091
P4: PLC for SINUMERIK 828D
13.3 Programming
Procedure
1. In the operation tree, right click on the corresponding block and select "Properties":
Here, for DB9000, in addition to the data class "User", the "Non-Retain" property was also
selected. Data blocks with this attribute are reset to the initial values after each power off and
power on.
See also
Defining data classes (Page 1089)
Basic Functions
1092 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P4: PLC for SINUMERIK 828D
13.3 Programming
Procedure
1. In the window "Load into CPU", select the data class(es) whose blocks are to be loaded:
2. Select the option "Blocks (MAIN, SUBR, INT, DB)", if program or data block changes are
to be loaded into the target system.
3. Select the option "Data blocks (only actual values)" if actual values of one or several data
blocks are to be loaded into the target system.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1093
P4: PLC for SINUMERIK 828D
13.3 Programming
4. Select one of the following options in the message window "Load into CPU":
– "Bring target system into the stop condition"
→ If structurally modified programs or initial values of data blocks are to be loaded into
the target system.
or
– "Load in the RUN operating state"
→ If neither program nor data block structures have changed.
Basic Functions
1094 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P4: PLC for SINUMERIK 828D
13.3 Programming
Procedure
1. In the window "Load from CPU", select the data class(es) whose blocks are to be loaded:
2. Select the option "Blocks (MAIN, SUBR, INT, DB)", if program or data block changes are
to be loaded from the target system.
3. Select the option "Data blocks (only actual values)" if actual values of one or several data
blocks are to be loaded from the target system.
4. If required, save the opened project in the PLC Programming Tool, it is then overwritten
when "Load from CPU":
A new project with the name of the project located in the target system is created.
5. After a warning that the existing project will be possibly changed as a result of "Load from
CPU", the requested data is loaded from the target system (also refer to the diagram
"Project structure in the PLC Programming Tool and the structure of the data classes
transport paths" in Defining data classes (Page 1089)").
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1095
P4: PLC for SINUMERIK 828D
13.3 Programming
Example:
The differences between the actual values saved (offline) in the project (e.g. +22) and the
actual values available in the target system (online) (e.g. +11) are displayed in the lower field
"data blocks".
Basic Functions
1096 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P4: PLC for SINUMERIK 828D
13.3 Programming
See also
Defining data classes (Page 1089)
Function
Addresses in the PLC user program can be centrally changed - e.g. IW0 to IW8 - using the
"rewire" function. This means that user programs can be quickly adapted to the modified I/O
expansion stage.
Example:
The customer writes a PLC user program for a series of machines. Due to the different
machine expansion stage, the I/O expansion stage of several machines differs, which is the
reason that addresses must be individually changed in the user program. Under certain
circumstances, this can involve several hundred addresses. Using the "rewire" dialog box,
for these machines, it is now possible to enter a list of the addresses to be changed, e.g.
inputs and outputs. This is executed using the "rewire" function, and the addresses are
changed in the user program.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1097
P4: PLC for SINUMERIK 828D
13.3 Programming
Procedure
Use the dialog box "rewire", to rewire addresses:
Basic Functions
1098 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P4: PLC for SINUMERIK 828D
13.3 Programming
3. Enter the old and the new addresses for rewiring in the "Replacements" list.
Permitted addresses include:
– Inputs
– Outputs
– Bit memory
– Special bit memory
– Variable memory / data blocks
– Timers
– Counters
Editing the list of addresses
The following functions are supported using the context menu (right mouse button):
– Cut (Ctrl+X)
– Copy (Ctrl+C)
– Paste (Ctrl+V)
– Select all (Ctrl+A)
– Paste row (Ctrl+I)
– Delete selection
This means that it is possible to copy the list or parts of the list from other or into other
applications, e.g. Microsoft Excel.
"Old address"
In this column, enter the name or the address which you wish to rewire.
"New address"
In this column, enter the new name or the new address. Please ensure that the type of
the new address corresponds to that of the old address, e.g. old address IW0 and new
address IW4, not IB4, or old address DB9000.DBB0 and new address MB0, not MW0.
Checking the validity of addresses
If the name of the address (symbol) does not exist in the open project, then this is marked
with a green wavy line.
If the type of the old address does not match that of the new address, or if only one
address was entered (old or new address), then this address is marked using a red wavy
line.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1099
P4: PLC for SINUMERIK 828D
13.4 Test and diagnostic functions
4. Select or deselect the option "All accesses within the specified addresses".
If the option is enabled, then the addresses ranges (BYTE, WORD, DWORD) are
rewired.
Example:
You specify IW0 and IW4 as address ranges. The, addresses I0.0 ... I1.7 are rewired to
addresses I4.0 ... I5.7. Addresses from the rewired range (e.g. I0.1) can then no longer
be individually entered into the table.
5. Click on the button "Rewire" to start the function.
Note
If you wish to exit the dialog box, without activating the function "Rewire", then use the
"Exit" button.
After executing the rewire function, the results are displayed in the list "Results of rewiring".
The list contains the address list with the columns "Old address" and "New address". These
list the individual blocks and the number of wiring operations that were carried out in each
block. Using the context menu (right mouse button), the results can be copied into other
applications, e.g. Microsoft Word.
Note
The following must be taken into account when rewiring:
• Name or number of a POU cannot be changed using the "Rewire" function. For this
purpose, in the operation tree in the POU context menu (click with the right mouse button,
e.g. on SBR_0) using the functions "Rename" or "Properties ...".
• Timers can only be rewired to remain timers (e.g. old address T0, new address T16) and
counters can only be rewired to remain counters (e.g. old address C0, new address C1).
Basic Functions
1100 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P4: PLC for SINUMERIK 828D
13.4 Test and diagnostic functions
Note
Please note that unnecessary project components (e.g. the operation tree and the output
window) have been omitted, in order to provide more space to display the required
components (LAD program editor, status chart, function bar to test and symbol for the status
chart in the navigation bar). Using the menu "View", you can set-up the environment in the
PLC Programming Tool corresponding to your particular tasks, i.e. you can display just the
project components that you require.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1101
P4: PLC for SINUMERIK 828D
13.4 Test and diagnostic functions
Basic Functions
1102 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P4: PLC for SINUMERIK 828D
13.4 Test and diagnostic functions
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1103
P4: PLC for SINUMERIK 828D
13.4 Test and diagnostic functions
Note
If, in the STOP mode, you have loaded a program into the target system, you must switch
the target system back into the RUN mode before you can display continuous updates of the
program status!
Procedure
To enable the program status, proceed in one of the following ways:
● Select the menu command "Test" > "Program status".
or
● To test, click in the function bar on the "Program status" button.
The program status is displayed in the program editor.
Boolean operations (contacts, coils) are displayed as colored blocks if the operand value is 1
(the bit is enabled).
The value of non-boolean addresses is displayed and updated as quickly as the
communication permits it.
Note
If you enable the program status, many other functions in the PLC Programming Tool are
deactivated. For instance, you cannot change your program unless you disable the program
status again. Other functions, e.g. switching the display from one program editor to another,
mean that the program status is automatically disabled. If you wish to display the status
again, you must reselect the command "Program Status".
Basic Functions
1104 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P4: PLC for SINUMERIK 828D
13.4 Test and diagnostic functions
Note
If you have problems when enabling the program status, please consider the following
prerequisites:
• You must have set up communication (so that you can load your program into the PLC).
• You must have selected the correct CPU version so that you can load your program into
the PLC.
• Your program must be able to be compiled error-free.
• Your program must be able to be loaded error-free into the target system.
• Your PLC must be in the RUN mode in order to be able to display continuous updates of
the status. Otherwise, only changes at the inputs and outputs (if they are available) are
displayed. As the program is not executed in the PLC, changes at the inputs and outputs
do not have the same effects as you would expect on the program logic in the displayed
program status.
• If you display another program area, which is not executed (e.g. an interrupt program or
subprogram or an area, which was skipped due to a jump operation), the status is not
displayed as the code is not interrogated.
Procedure
To pause the program status, proceed in one of the following ways:
● Select the "Test" > "Stop program status" menu command.
or
● To test, click the "Stop program status" button in the function bar.
The program status display is stopped in the program editor.
This can be necessary if values change too quickly for you to read them. In the execution
status this can also make a single execution of a program section, e.g. a subprogram,
visible. To do this, set the networks which are not being processed in the program editor and
pause the status display with the execution status activated. The next time the networks are
executed in the program editor, the status display is updated. The status update then stops.
For further information on the variant status, see Section "Execution status (Page 1107)".
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1105
P4: PLC for SINUMERIK 828D
13.4 Test and diagnostic functions
Basic Functions
1106 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P4: PLC for SINUMERIK 828D
13.4 Test and diagnostic functions
Function
If the execution status is activated for the program status, the status values at the time of
execution of the operations of a program cycle are acquired. The states of the local data
memory and the accumulators are displayed. The status values are updated and displayed
only if the PLC is in the RUN mode.
Note
The execution status may only be run as the program status once for each CPU at any one
time. If you attempt to run the execution status in a different application, such as in a second
Programming Tool, which is connected to the same PLC, an error will be displayed.
Note
If the same operand is used as the input and output parameter in a command, the value of
this operand can only be determined by the execution status at one time. In this case, it is
the value after execution of the command. The value after execution of the command is also
displayed for the input parameter and not the actual input value.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1107
P4: PLC for SINUMERIK 828D
13.4 Test and diagnostic functions
Color settings
User color settings are possible, see Section "Adapting the program status display
(Page 1111)".
Function
If the execution status is deactivated for the program status, the cycle-end status processes
the status results. The status results are fetched and displayed at the end of the program
cycle. These results may not indicate all changes to the values in the PLC, because
subsequent program commands can write a value and overwrite it again before the end of
the program scan cycle is reached. The end-of-scan status shows the values that are
scanned at the end of multiple scan cycles. The states of the local data memory and the
accumulators are not displayed. If you switch the PLC into the STOP mode, a status update
is also possible.
Basic Functions
1108 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P4: PLC for SINUMERIK 828D
13.4 Test and diagnostic functions
Color settings
User color settings are possible, see Section "Adapting the program status display
(Page 1111)".
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1109
P4: PLC for SINUMERIK 828D
13.4 Test and diagnostic functions
Note
The color marking for "Signal flow" does not mean that there is always a signal flow!
In the program status in LAD, the values are only displayed at the end of the cycle. This
means that it can be sometimes difficult to evaluate just what the "signal flow" display really
means. Boolean contacts and coils are shown color-coded in the program status in LAD
corresponding to the value of the bit addresses. If the bit value is 1 (bit is enabled), then the
operation is marked in color. However, this does not necessarily mean that the operation
was actually executed. There are several conditions that can result in an unclear signal flow
display:
• If, when evaluating the status, the target system is in the STOP mode, contacts can be
activated, however, coils and boxes are not switched-on because the program is not
being executed.
• If the program contains a jump operation, then it is possible that the networks that you are
investigating, do not display the expected results because the target system skipped
these operations while executing the program.
• It is a similar situation if you consider a subprogram. The boolean addresses can be
activated, however, the subprogram logic can only be executed if the subprogram is
activated. If the subprogram was not called from the main program, then no logic of the
networks was executed regardless of what the bit values of the operations display.
Continuous
Open the program editor window and enable the program status in order to view continuous
updates of the program execution status when the PLC is in the RUN mode.
Note
"Continuous" should not be understood as "real time"; it means that the programming device
scans the PLC for status information continuously and displays it on your screen, updating
the display as quickly as your communication setup permits. Some rapidly fluctuating values
may not be recorded and displayed on your screen. It is also possible that the values change
too quickly for you to read them.
Snapshot
If the PLC is in the STOP mode, you can use the "Debug" > "Multiple Scans…" menu
command to display the status values of one or more scan cycles or with the "Debug" >
"First Scan" menu command to display the status values of the first scan cycle.
For information about stopping the status values of the program status, see Section "Pause
Program Status (Page 1105)".
Basic Functions
1110 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P4: PLC for SINUMERIK 828D
13.4 Test and diagnostic functions
Note
If the execution status is activated for a CPU that does not support this status, the end-of-
scan status is automatically executed.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1111
P4: PLC for SINUMERIK 828D
13.4 Test and diagnostic functions
Application
After you have loaded your program into the target system, you can generate one or several
status charts to monitor and test program execution.
The program is continuously executed if the target system is in the RUN operating state. You
can enable the chart status so that the status values in the chart are continuously updated
(not interrupted). As an alternative, using the "Single read" function, you can generate a
"Snapshot" of the status values in the table without having to enable the status chart.
While you look at a status chart, you can also switch the target system into the STOP
operating state and only execute the first or a certain number of cycles in which you monitor
program execution.
Note
Please note that you cannot change your chart if the chart status is enabled! Disable the
chart status if you wish to edit the chart.
Basic Functions
1112 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P4: PLC for SINUMERIK 828D
13.4 Test and diagnostic functions
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1113
P4: PLC for SINUMERIK 828D
13.4 Test and diagnostic functions
Procedure
● Click on the button "Status chart" in the navigation bar.
or
● Select the menu command "View" > "Status chart".
or
● Open the directory of the status chart in the operation tree and double click on the symbol
of a chart.
● If your project includes more than one status chart, using the tab for the status charts at
the lower edge of the window, you can switch over between the individual charts:
Note
If you open a status chart, then the status is still not displayed. You must enable the status
chart so that the status information is updated (see "Enabling the status table (Page 1118)").
Basic Functions
1114 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P4: PLC for SINUMERIK 828D
13.4 Test and diagnostic functions
Procedure
To create a status chart, proceed as follows:
1. Enter the addresses of the required value in the "Address" column.
All memory types are valid with the exception of accumulators and data constants.
To edit an address field:
– Select the required field using the cursor keys or the mouse.
– If you enter data, existing data are deleted and the new characters are entered.
– The field is selected if you double click with the mouse or press key <F2>. You can
then move the cursor using the cursor keys to the position that you wish to edit.
2. If the element involves a bit (e.g. I, Q or M), then the bit format is displayed in the second
column. If the element involves a byte, word or double word, select the field in the column
"Format" and double click or press the space bar or ENTER in order to scroll through the
valid formats until the correct format is displayed.
Note
You can select addresses in the symbol table and copy these into the status chart in
order to more quickly generate your table.
You can display the status a multiple number of times. You can classify the elements in
logical groups to display each group in an individual table. In this way, you avoid having
to scroll through extremely long lists.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1115
P4: PLC for SINUMERIK 828D
13.4 Test and diagnostic functions
Displays
Changing
Selecting
Inserting
To insert a new row with the following address and the same data format:
• Select an address field and press the enter key.
Basic Functions
1116 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P4: PLC for SINUMERIK 828D
13.4 Test and diagnostic functions
Delete
Navigating
DB9002 is shown symbolically addressed in the diagram. The possible display formats for
variables, type INTEGER or WORD are shown using an example of block variable iData7.
Note
Bit and binary values are both introduced by the number 2 and the # symbol.
Hexadecimal values are introduced by the number 16 and the # symbol.
Bit values have one digit. Binary values have eight digits.
Signed and unsigned values use the basis 10 (decimal).
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1117
P4: PLC for SINUMERIK 828D
13.4 Test and diagnostic functions
Procedure
If you wish to continually update the status information in the status chart, enable the chart
status:
● To do this, select the menu command "Test" > "Chart status".
or
● Click on the appropriate button in the function bar.
If you only require a "snapshot" of the values, execute the function "Single read":
● Select the menu command "Test" > "Single read".
or
● Click on the appropriate button in the function bar.
Note
When the chart status is enabled, then the "Single read" function is deactivated.
Note
If the chart is still empty, then enabling the status chart has not effect: You must first create
your status chart by entering program values (addresses) in the "Address" column and you
must enter a data type in the "Format" column for each address (see "Creating a status chart
(Page 1115)" and "Data formats (Page 1117)").
Single read
Use single read if you require a "snapshot", i.e. a single update of the program status of all
values.
As default, the chart status continually interrogates the target system for status updates. If
you click on a status chart and the chart status is disabled, then the button for single read is
activated.
Write all
After you have entered the values in the column "New value" in the status chart, write the
required changes to the target system using the command "Write all".
Basic Functions
1118 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P4: PLC for SINUMERIK 828D
13.4 Test and diagnostic functions
3. Specify how many cycles should be executed, and confirm with "OK".
Note
Ensure that you switch the target system back into the RUN operating state if you wish to
return to normal program processing:
• To do this, press the button "RUN" in the function bar.
or
• Select the menu command "Target system" > "RUN" window.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1119
P4: PLC for SINUMERIK 828D
13.5 Data interface
DB3000, 3100
The mode signals specified by the machine control panel or the HMI are transferred to the
NCK.
There actual states are signaled to the PLC from the NCK.
'% 1&.
&RQWUROVLJQDOV
0RGHVHOHFWLRQ
'%
6WDWXVVLJQDOV
0RGHVHOHFWLRQ
Basic Functions
1120 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P4: PLC for SINUMERIK 828D
13.5 Data interface
'%
6LJQDOVIRUSURJUDP
FRQWURO
'% 1&FKDQQHO
&RQWUROVLJQDOVWR1&FKDQQHO
&RQWUROVLJQDOVWRD[HVLQ:RUN
'%
&RQWUROVLJQDOVIURP1&FKDQQHO
&RQWUROVLJQDOVIURPD[HVLQ:RUN
'%
)XQFWLRQWUDQVIHUIURP1&FKDQQHO
076'+
'%
$FWLYH*IXQFWLRQVIURP1&FKDQQHO
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1121
P4: PLC for SINUMERIK 828D
13.5 Data interface
'%Q
2IIVHW 6LJQDOWR
$[LVVSLQGOH
$[LV
6SLQGOH
3/&D[LV
'ULYH
7HFKQRORJ\IXQFWLRQV
'%Q
2IIVHW 6LJQDOIURP
$[LVVSLQGOH
$[LV
6SLQGOH
3/&D[LV
'ULYH
7HFKQRORJ\IXQFWLRQV
Basic Functions
1122 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P4: PLC for SINUMERIK 828D
13.5 Data interface
'%
*HQHUDOVLJQDOV
'%
6LJQDOVWRIDVW,2
'%
6LJQDOVWRIDVW,2
'%
3/&PDFKLQHGDWD
2IIVHW 6LJQDO
,17YDOXHV
+H[YDOXHV
)/2$7YDOXHV
&RQILJXULQJXVHUDODUPV
'%
&KDQJHVLJQDOVRI
WRROPDQDJHUIXQFWLRQV
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1123
P4: PLC for SINUMERIK 828D
13.5 Data interface
DB4900
Data block DB4900 with a size of 1024 bytes is used for fast information exchange between
the PLC and NCK.
The assignment of the area (structure) must be identically negotiated in the NC part program
and PLC user user program.
This data can be accessed from the NC part program using the commands $A_DBB[x],
$A_DBW[x], $A_DBD[x] and $A_DBR[x]; 0 ≤ x ≤ 1023 (see Parameter Manual, System
variables).
In this case, the alignment of the data must be selected corresponding to its format, i.e. a
Dword starts at a 4byte limit and a word at a 2byte limit. Bytes can be located at any offset
within the data field.
Data consistency is guaranteed for byte, word and Dword accesses. When transferring
several data, the consistency must be guaranteed on the user-side using semaphores, which
can be used to detect the validity or consistency of a block.
Basic Functions
1124 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P4: PLC for SINUMERIK 828D
13.6 Function interface
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1125
P4: PLC for SINUMERIK 828D
13.6 Function interface
Note
Channel-specific variables
When reading/writing channel-specific variables, only the variables of exactly one channel
may be addressed in a job.
Drive-specific variables
When reading/writing drive-specific variables, only the variables of exactly one SERVO drive
object may be addressed in a job. The SERVO drive object must be assigned to a machine
axis of the NC. The line index corresponds to the logical drive number.
Error case
In the event of an error, reading/writing variables from different drive objects, or
simultaneously from a channel and a drive object, an error message is output:
DB1200.DBX3000.1 == 1 (error occurred)
Basic Functions
1126 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P4: PLC for SINUMERIK 828D
13.6 Function interface
Job type
● Read variable: DB1200.DBX0.1 = 0
● Write variable: DB1200.DBX0.1 = 1
Start job
The start signal must be set to start the job via a specified number of variables:
DB1200.DBX0.0 = 1
Note
A new job can only be started if the previous job was completed. See Section "Job
management: Waiting for end of job (Page 1127)".
The execution of a job may take several PLC cycles and vary depending on the utilization.
Therefore, the time for this function cannot be defined.
Job status
● End of job without error
DB1200.DBX2000.0 == 1 AND DB1200.DBX2000.1 == 0
● End of job with error
DB1200.DBX2000.0 == 1 AND DB1200.DBX2000.1 == 1
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1127
P4: PLC for SINUMERIK 828D
13.6 Function interface
Requirement
In order to complete the job, the start signal of the job must be reset from the PLC user
program after detection of the end of the job:
DB1200.DBX0.0 = 0
Feedback signal
As feedback, the NC resets the status signals:
● DB1200.DBX2000.0 == 0
● DB1200.DBX2000.1 == 0
The job is now completed.
6WDUW
-RE
FRPSOHWHG
(UURULQMRE
① Start job:
DB1200.DBX0.0 (start) = 1
② Waiting for end of job:
DB1200.DBX2000.0 (job completed) == 1 AND
DB1200.DBX2000.1 (error in job) == 0
⇒ Reset job request:
DB1200.DBX0.0 = 0 (start)
③ With DB1200.DBX0 0 == 0 (start), the job is completed by the basic PLC program:
DB1200.DBX2000.0 (job completed) = 0
Basic Functions
1128 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P4: PLC for SINUMERIK 828D
13.6 Function interface
Key statement
The variable-specific result interface must be evaluated for each variable processed in the
job.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1129
P4: PLC for SINUMERIK 828D
13.6 Function interface
Note
Channel-specific variables
When reading/writing channel-specific variables, only the variables of exactly one channel
may be addressed in a job.
Drive-specific variables
When reading/writing drive-specific variables, only the variables of exactly one SERVO drive
object may be addressed in a job. The SERVO drive object must be assigned to a machine
axis of the NC. The line index corresponds to the logical drive number.
Error case
In the event of an error, reading/writing variables from different drive objects, or
simultaneously from a channel and a drive object, an error message is output:
DB1200.DBX3000.1 == 1 (error occurred)
Access result
DBB3001
Value Meaning
0 No error
3 Access to object is not permitted
5 Invalid address
10 Object does not exist
Basic Functions
1130 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P4: PLC for SINUMERIK 828D
13.6 Function interface
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, 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).
For a detailed description of tool parameters, refer to Chapter W1: Tool offset (Page 1389).
Variable numCuttEdgeParams
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1131
P4: PLC for SINUMERIK 828D
13.6 Function interface
Variable linShift
Basic Functions
1132 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P4: PLC for SINUMERIK 828D
13.6 Function interface
Variable numMachAxes
Variable rpa
R-variables
Variable actLineNumber
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1133
P4: PLC for SINUMERIK 828D
13.6 Function interface
Basic Functions
1134 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P4: PLC for SINUMERIK 828D
13.6 Function interface
Variable r0078[1]
CO: Current actual value, torque-generating [Arms]
Index: [1] = Smoothed with p0045
Variable r0079[1]
CO: Torque setpoint at the output of the speed controller (before clock cycle interpolation)
[Nm]
Index: [1] = Smoothed with p0045
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1135
P4: PLC for SINUMERIK 828D
13.6 Function interface
Variable r0081
CO: Torque utilization in percent
Variable r0082[1]
CO: Active power actual value [kW]
Index: [1] = Smoothed with p0045
Basic Functions
1136 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P4: PLC for SINUMERIK 828D
13.6 Function interface
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1137
P4: PLC for SINUMERIK 828D
13.6 Function interface
Variable index
The variable index refers to the name of the NC variable. The variable index consists of a
start value 100 and the offset of the NC variable in the list (0 to 41).
The variable index is entered as DBB1000 A_VarIdx in the DB120x RW_NCDx user
interface.
The comment contains the following data record with space as separator:
● Range
● Block
● VariablenName
● VarType
● Column
● VarAnzByte
Basic Functions
1138 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P4: PLC for SINUMERIK 828D
13.6 Function interface
Job specification
PI services are specified via their job interface (DB1200 from offset 4000) via their
parameter.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1139
P4: PLC for SINUMERIK 828D
13.6 Function interface
PI index
DB1200.DBB4001 specifies the specific PI service.
PI parameter n
From DB1200.DBW4004, PI parameter n must be specified for the specific service.
Start
DB1200.DBX4000.1 = 1: Job is started for the specified number of variables.
Job feedback
The PLC firmware provides feedback as to whether the started PI service was successful or
not successful in the result interface (DB1200 from offset 5000).
The job end is signaled using one of two signals:
DB1200.DBX5000.0 == 1 or DB1200.DBX5000.1 == 1
The signals are written by the PLC operating system; therefore, they can only be read by the
user. A job has been completed if both acknowledgement signals are zero. They become
zero if the user resets the signal "Start" (DB1200.DBX4000.1) after the job end.
Job completed
DB1200.DBX5000.0 = 1 job processing completed without error.
DB1200.DBX5000.0 = 0 otherwise is zero, if the user resets "Start".
Error in job
DB1200.DBX5000.1 = 1 job had an error, execution terminated.
DB1200.DBX5000.1 = 0 otherwise is zero, if the user resets "Start".
Basic Functions
1140 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P4: PLC for SINUMERIK 828D
13.6 Function interface
6WDUW
-RE
FRPSOHWHG
(UURULQMRE
13.6.2.2 PI services
PI service ASUB
Function
With the "ASUB" PI service, it is possible to assign one program each to the interrupt
numbers 1 and 2 from the PLC. These programs must be present in the NC in the machine
manufacturer directory (CMA) with fixed program names:
If the above mentioned programs are not available, they must be created in the machine
manufacturer directory (CMA) of the NC. A power on reset must then be performed on the
NC.
The PI service must only be executed once after a restart. The assignment of the interrupt to
the program is retained.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1141
P4: PLC for SINUMERIK 828D
13.6 Function interface
PI service: ASUB
Address Description Valid values
DB1200.DBW4001 PI index 1, 2
DB1200.DBW4004 LIFTFAST 0, 1
DB1200.DBW4006 BLSYNC 0, 1
Supplementary conditions
● The PI service may only be executed when the channel is in the RESET state.
● If a "run-up" is configured as the initiating event for the event-driven program call, the PI
service must only be started after the end of the event-driven program.
PI service LOGOUT
Reset password
The password last transferred to the NCK is reset.
PI index Function
3 Reset password
PI service _N_DASAVE
PI index Function
4 Data save from SRAM to FLASH
Basic Functions
1142 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P4: PLC for SINUMERIK 828D
13.6 Function interface
PI service TMMVTL
Function
Using the PI service TMMVTL, it is possible to initiate a job from the PLC to relocate a tool.
After an error-free PI start, the TM executes an empty location search in the target magazine
for the tool in the specified source location. The PLC then receives a job to relocate the tool
via DB41xx.DBB0.
PI service: TMMVTL
Address Description Valid values
DB1200.DBW4001 PI index 5
DB1200.DBW4004 Tool number -1, 1 … 31999
DB1200.DBW4006 Source location number -1, 1 … 31999
DB1200.DBW4008 Source magazine number -1, 1 … 9999
DB1200.DBW4010 Target location number -1, 1 … 31999
DB1200.DBW4012 Target magazine number -1, 1 … 9999
● The tool can be specified either using a T number or by means of the location and
magazine numbers. An unused specification has the value -1.
● With the target location number = -1, a search is made in the complete magazine for an
empty location for the tool according to the search strategy that has been selected. If a
target location is specified, then a check is made as to whether the location with the
specified target location number is free and suitable for the particular tool.
● For a target magazine number = -1, a search is made in a buffer for the tool
corresponding to the assignment obtained from $TC_MDP2.
Examples
● When using buffers to return the tool (for example Toolboy and/or shifter), an explicit
empty location search in the magazine may be needed during the asynchronous return
transport. In this case,the PLC does not have to note the original location, this PI service
searches for a suitable location.
● A tool should be moved from a background magazine to the foreground magazine.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1143
P4: PLC for SINUMERIK 828D
13.6 Function interface
Note
Although the name user "alarms" is used in the following, it is only defined as to whether it
involves a message or an alarm when entering the particular cancel criterion in bits 6 and 7
of machine data MD14516[x].
The user alarms are created in the HMI and are prepared for automatic processing. The user
interface of the DB1600 permits:
● these 248 user alarms of numbers 700000 to 700247 to be activated,
● to be provided with an additional numerical parameter, and
● to be activated and acknowledged as well as
● to evaluate the system reactions initiated by it.
Basic Functions
1144 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P4: PLC for SINUMERIK 828D
13.6 Function interface
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1145
P4: PLC for SINUMERIK 828D
13.6 Function interface
One bit is set if for at least one active alarm the corresponding response or the
corresponding cancel criterion is configured. It is canceled, if this response/cancel criterion is
no longer configured for any of the alarms present.
The codings of the cancel criteria and the corresponding priorities are:
Note
If none of bits 0 to 4 are set for an alarm/message in the machine data, then this defines that
it involves a so-called "display message" that has no effect on the system. This especially
indicates that also bits 6 and 7 of the corresponding machine data are evaluated.
One bit is set if for at least one active alarm the corresponding response or the
corresponding cancel criterion is configured. It is canceled, if this response/cancel criterion is
no longer configured for any of the alarms present.
Basic Functions
1146 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P4: PLC for SINUMERIK 828D
13.6 Function interface
Requirement
Requirement to acknowledge a user alarm is that the corresponding activation bit is reset.
● Messages with cancel criterion {0,0} then disappear automatically from the display.
● Alarms with cancel criterion {0,1} are canceled by the acknowledgement bit Ack.
● Alarms with cancel criterion {1,0} are not influenced when the acknowledgement bit is set
and can only be canceled by a Power On.
Interface to HMI.
The PLC can transfer eight messages or alarms for display on the HMI, which are displayed
in the sequence that they occur.
When additional messages/alarms occur, the first seven are kept in the HMI, and the latest
message or the latest alarm is displaced from one that has just occurred according to the
following rules:
● System message/alarm displaces user message/alarm
● Messages/alarms with a higher priority displace those of a lower priority.
The first seven messages/alarms are kept in the display because it is very probable that
these define the cause of the problem and the following are just of a secondary nature.
However, if one or several messages/alarms are acknowledged and therefore cleared, then
a corresponding number of alarms/messages that have been received move up in the HMI.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1147
P4: PLC for SINUMERIK 828D
13.6 Function interface
13.6.4.1 Overview
Target
The PLC can control eight axes or spindles via data blocks of the user interface; the
axis/spindle is specified by its DB number:
● DB380x PLC → NCK interface
● DB390x NCK → PLC interface
● DB390x Axis index: 0 ≤ x ≤ 7, whereby axis index = axis number-1
The following functions are supported:
● Positioning axes
● Spindle positioning
● Rotate spindle
● Oscillate spindle
● Indexing axes
References:
● Function Manual, Extended Functions; Positioning Axes (P2) and Indexing axes (T1)
● Function Manual, Basic Functions; Spindles (S1)
Precondition
The axis to be controlled must be assigned to the PLC. An axis can be interchanged
between NC and PLC using the user interface "Axis interchange"
(DB3800.DBB8/DB3900.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 notpossible 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 movement has ended.
No error code is output in this situation.
Basic Functions
1148 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P4: PLC for SINUMERIK 828D
13.6 Function interface
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).
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1149
P4: PLC for SINUMERIK 828D
13.6 Function interface
[ 3/&UHFHLYHV6LJQDOD[LVLQWHUFKDQJHSRVVLEOH
1&D[LVDQGSRVVLEO\QHXWUDOD[LVVSLQGOH[
3/&UHTXHVWVD[LV
3/&UHVHWVWKHDFWLYDWLRQVLJQDO
$[LVLVDVVLJQHGWRWKH3/&FDQEHXVHGDQGLVWKHQUHOLQTXLVKHGWRWKH1&
3/&UHWXUQVD[LVWR1&
3/&UHVHWVDFWLYDWLRQVLJQDO
6WDWXV1&D[LVDQG$[LVLQWHUFKDQJHSRVVLEOH
$[LVLVDVVLJQHGWRWKH3/&FDQEHXVHGDQGLVWKHQHQDEOHG
3/&HQDEOHVD[LV
3/&UHVHWVDFWLYDWLRQVLJQDO
6WDWXVQHXWUDOD[LVVSLQGOH1&D[LVDQGD[LV
LQWHUFKDQJHSRVVLEOH
Basic Functions
1150 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P4: PLC for SINUMERIK 828D
13.6 Function interface
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:
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.
The following requirements must be satisfied in order to use the functions listed below:
● The axis or spindle is correctly assigned to the PLC.
● Controller and pulse enable are set.
● After setting all of the control signals, only one of the start signals is set in
DB380x.DBB3000.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1151
P4: PLC for SINUMERIK 828D
13.6 Function interface
Basic Functions
1152 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P4: PLC for SINUMERIK 828D
13.6 Function interface
WR3/&D[LV
6WDUW
6SLQGOHUHVHW
IURP3/&D[LV
3RVLWLRQLQJD[HVDFWLYH
3RVLWLRQUHDFKHG
$[LVVWDWLRQDU\
(UURUELW
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1153
P4: PLC for SINUMERIK 828D
13.6 Function interface
WR3/&D[LV
6WDUW
6WRS
IURP3/&D[LV
3RVLWLRQLQJD[HVDFWLYH
3RVLWLRQUHDFKHG
6SLQGOHVWDWLRQDU\
(UURU
Basic Functions
1154 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P4: PLC for SINUMERIK 828D
13.6 Function interface
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1155
P4: PLC for SINUMERIK 828D
13.6 Function interface
WR3/&D[LV
6WDUW
6WRS
IURP3/&D[LV
3RVLWLRQLQJD[HVDFWLYH
6SLQGOHVWDWLRQDU\
$[LVFDQQRWEHVWDUWHG
Basic Functions
1156 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P4: PLC for SINUMERIK 828D
13.6 Function interface
WR3/&D[LV
6WDUW
6WRS
IURP3/&D[LV
3RVLWLRQLQJD[HVDFWLYH
3RVLWLRQUHDFKHG
6SLQGOHVWDWLRQDU\
(UURU
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1157
P4: PLC for SINUMERIK 828D
13.6 Function interface
Basic Functions
1158 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P4: PLC for SINUMERIK 828D
13.6 Function interface
WR3/&D[LV
6WDUW
'HOHWHGLVWDQFHWRJR
IURP3/&D[LV
3RVLWLRQLQJD[HVDFWLYH
3RVLWLRQUHDFKHG
(UURU
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1159
P4: PLC for SINUMERIK 828D
13.6 Function interface
WR3/&D[LV
6WDUW
'HOHWHGLVWDQFHWRJR
IURP3/&D[LV
3RVLWLRQLQJD[HVDFWLYH
3RVLWLRQUHDFKHG
(UURU
Basic Functions
1160 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P4: PLC for SINUMERIK 828D
13.6 Function interface
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1161
P4: PLC for SINUMERIK 828D
13.6 Function interface
WR3/&D[LV
6WDUW
'HOHWHGLVWDQFHWRJR
IURP3/&D[LV
3RVLWLRQLQJD[HVDFWLYH
3RVLWLRQUHDFKHG
(UURU
Basic Functions
1162 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P4: PLC for SINUMERIK 828D
13.6 Function interface
WR3/&D[LV
6WDUW
'HOHWHGLVWDQFHWRJR
IURP3/&D[LV
3RVLWLRQLQJD[HVDFWLYH
3RVLWLRQUHDFKHG
(UURU
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1163
P4: PLC for SINUMERIK 828D
13.6 Function interface
Basic Functions
1164 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P4: PLC for SINUMERIK 828D
13.6 Function interface
WR3/&D[LV
6WDUW
6WRS
IURP3/&D[LV
3RVLWLRQLQJD[HVDFWLYH
3RVLWLRQUHDFKHG
6SLQGOHVWDWLRQDU\
(UURU
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1165
P4: PLC for SINUMERIK 828D
13.6 Function interface
WR3/&D[LV
6WDUW
6WRS
IURP3/&D[LV
3RVLWLRQLQJD[HVDFWLYH
3RVLWLRQUHDFKHG
6SLQGOHVWDWLRQDU\
(UURU
Basic Functions
1166 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P4: PLC for SINUMERIK 828D
13.6 Function interface
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1167
P4: PLC for SINUMERIK 828D
13.6 Function interface
WR3/&D[LV
6WDUW
6WRS
IURP3/&D[LV
3RVLWLRQLQJD[HVDFWLYH
3RVLWLRQUHDFKHG
6SLQGOHVWDWLRQDU\
(UURU
Basic Functions
1168 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P4: PLC for SINUMERIK 828D
13.6 Function interface
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1169
P4: PLC for SINUMERIK 828D
13.6 Function interface
13.6.5.1 General
An ASUB (asynchronous subprogram) is an NC program that can be started by the PLC at
any time, i.e. it is an NC interrupt program, because the running NC program is interrupted
by the ASUB.
Requirement is that the ASUB is selected and parameterized using an NC program or using
the PI service ASUB (Page 914). By executing the PI service ASUB with the appropriate PI
index, one of the two interrupts INT1 or INT2 is assigned the ASUB intended for the purpose.
Only one ASUB can be started at one time. If, in a PLC cycle, both start signals of the
function interface described below are set to a logical 1, then the ASUBs are started in the
sequence in which they are called. The user must set the start signal to a logical 0 if an
acknowledgement was set in the interface for the job result.
Note
A start signal must not be set in the following cases:
• PI service "ASUB" has not been completed yet.
• DB2600.DBX0.1 == 1 (emergency stop)
• Request for a channel reset by the PLC is active.
The ASUB can only be started again when the channel is in the "Reset" state AND
DB3300.DBX3.7 == 1 (channel state reset).
Basic Functions
1170 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
P4: PLC for SINUMERIK 828D
13.6 Function interface
DBB 1002
DBB 2003
1) Negative acknowledgement: E.g. for emergency stop or channel reset request.
2) Negative acknowledgement: Number has not been assigned yet. Remedy: Execute PI service "ASUB".
3) Positive acknowledgement: ASUB successfully completed. Reset start signal (DB000, DB001).
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1171
P4: PLC for SINUMERIK 828D
13.6 Function interface
Signal flow
,17VWDUW
$68%LVEHLQJ
H[HFXWHG
$68%FRPSOHWHG
,171RQRWDOORFDWHG
$68%H[HFXWLRQQRW
SRVVLEOH
Basic Functions
1172 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
R1: Referencing 14
14.1 Brief Description
Function
The "Reference Point Approach" function is used to synchronize the measuring system of a
machine axis with machine zero. The machine axis is traversed to machine zero and the
measuring system set to zero.
If it is not possible to approach machine zero directly, a reference point within the traversing
range of the machine axis is used whose position with reference to machine zero precisely
known.
After the reference point approach, the measuring system of the machine axis is not set to
zero but to the corresponding reference point value.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1173
R1: Referencing
14.2 Axisspecific referencing
Start
The reference point approach of a machine axis can be started manually or via the part
program:
● Manual: Operation mode JOG and MDA, machine function REF
● Part program: Part program command G74
Direction enable
To avoid faulty operation, the direction release must be parameterized:
MD34010 $MA_REFP_CAM_DIR_IS_MINUS (approach reference point in minus direction)
The direction enable specifies which traversing key starts the reference point approach:
Value Description
0 Reference point approach in plus direction
1 Reference point approach in minus direction
Basic Functions
1174 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
R1: Referencing
14.2 Axisspecific referencing
Jog mode
The following machine data element can be used to specify whether reference point
approach is completed when the direction key is pressed once or whether the operator is
required to keep the direction key pressed (jogging) for safety reasons:
MD11300 $MN_JOG_INC_MODE_LEVELTRIGGRD (INC and REF in jog mode)
If the machine operator releases the direction key, the machine axis is decelerated to zero
speed. Reference point approach is not aborted. Reference point approach is continued the
next time the direction key is pressed.
Referencing status
The referencing status of the machine axis is reset with the start of the reference point
approach:
DB31, ... DBX60.4 (referenced / synchronized 1)
DB31, ... DBX60.5 (referenced / synchronized 2)
DB21, ... DBX36.2 (all axes with obligatory reference point are referenced)
Sequence
The machine operator or machine manufacturer (via the PLC user program) is responsible
for ensuring that the machine axes are referenced in the proper order.
● Machine operator
The machine axes must be started by the machine operator in the specified order.
● Machine manufacturer
The PLC user program of the machine manufacturer allows machine axes to be started
only in the proper order.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1175
R1: Referencing
14.3 Channelspecific referencing
Number Description
-1 The machine axis does not have to be referenced for NC START in the channel.
0 The machine axis does not participate in channel-specific reference point approach.
1 - 15 Sequence number in channel-specific reference point approach.
Basic Functions
1176 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
R1: Referencing
14.3 Channelspecific referencing
Referencing status
The referencing status of the machine axis is reset with the start of the reference point
approach:
DB31, ... DBX60.4 (referenced / synchronized 1)
DB31, ... DBX60.5 (referenced / synchronized 2)
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1177
R1: Referencing
14.4 Reference point appraoch from part program (G74)
Programming
Syntax
G74Machine axis { Machine axis }
Function
Machine axes can be referenced from a part program with part program instruction G74
Parameter: Machine axes
The name of the machine axis must be specified. The machine axis must be a channel axis
of the channel in which the part program is processed.
Effective:
G74 is non-modal.
Special features
G74 must be programmed in a separate part program block.
Reset response
Mode group reset or channel reset aborts the reference point approach for all programmed
machine axes:
DB11, ... DBX0.7 (mode group reset)
DB21, ... DBX7.7 (channel reset)
All machine axes for which the reference point approach is not yet successfully completed
when the action is cancelled remain in status "Not referenced":
DB31, ... DBX60.4 (referenced / synchronized 1)
DB31, ... DBX60.5 (referenced / synchronized 2)
Basic Functions
1178 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
R1: Referencing
14.5 Referencing with incremental measurement systems
Reference cam
● Connection
The reference cam signal can be connected to a digital input of an external PLC I/O
module or to a fast input on the NCU X142 interface.
● NC/PLC interface signal
The reference cam signal must be transferred from the PLC user program to the axial
NC/PLC interface:
DB31, ... DBX12.7 (deceleration of reference point approach)
Overview
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1179
R1: Referencing
14.5 Referencing with incremental measurement systems
References
● NCU interfaces: SINUMERIK 840D sl Manual, NCU7x0.3 PN,
Section "Connecting" > "Digital I/Os"
● Drive parameters: SINAMICS S120/S150 List Manual
Function
Referencing of incremental measuring systems is based on the unique position of the
encoder zero mark relative to the overall traversing range of the machine axis. If because of
machine-specific conditions, several encoder zero marks are detected in the traversing
range of the machine axis (for examples, see figure below), a BERO must be mounted on
the machine for clear determination of the reference point. The position of the reference
point is then derived from the combination of BERO signal and encoder zero mark.
60& 60&
1&8 $/0 00 1&8 $/0 00
*HWULHEH
Figure 14-1 Measuring gear between the motor and encoder or reduction gear between the motor
and spindle
Parameterization
Note
BERO signal: Zero mark selection
The processing of the BERO signal is performed exclusively in the drive. Connection and
parameterization, see Section "Hardware signals (Page 1179)".
Basic Functions
1180 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
R1: Referencing
14.5 Referencing with incremental measurement systems
'%'%;GHFHOHUDWLRQRI
UHIHUHQFHSRLQWDSSURDFK
'%'%;WUDYHOFRPPDQGSOXV
'%'%;WUDYHOFRPPDQGPLQXV
'%'%;DQGWUDYHUVLQJNH\SOXVPLQXV
'%'%;DQGUHIHUHQFHGV\QFKURQL]HG
3RVLWLRQPHDVXULQJV\VWHP]HURPDUN
9HORFLW\
0'0$B5()3B9(/2B6($5&+B&$0
UHIHUHQFHSRLQWDSSURDFKYHORFLW\
0'0$B5()3B9(/2B326
UHIHUHQFHSRLQWSRVLWLRQLQJYHORFLW\
0'0$B5()3B9(/2B6($5&+B0$5.(5
UHIHUHQFHSRLQWFUHHSYHORFLW\
W
Figure 14-2 Time sequence when referencing with incremental measuring systems (example)
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1181
R1: Referencing
14.5 Referencing with incremental measurement systems
'%'%;GHFHOHUDWLRQRIUHIHUHQFHSRLQWDSSURDFK
'%'%;WUDYHOFRPPDQGSOXV
'%'%;WUDYHOFRPPDQGPLQXV
'%'%;DQGWUDYHUVLQJNH\SOXVPLQXV
'%'%;DQGUHIHUHQFHGV\QFKURQL]HG
3RVLWLRQPHDVXULQJV\VWHP]HURPDUN
9HORFLW\
0'0$B5()3B9(/2B6($5&+B&$0
UHIHUHQFHSRLQWDSSURDFKYHORFLW\
0'0$B5()3B9(/2B6($5&+B0$5.(5
UHIHUHQFHSRLQWFUHHSYHORFLW\
0'0$B5()3B9(/2B326
UHIHUHQFHSRLQWSRVLWLRQLQJYHORFLW\
3KDVH W
Phase 1: Start
To start the reference point approach, see Sections "Axisspecific referencing (Page 1174)"
and "Axisspecific referencing (Page 1174)".
Phase 1: Sequence
In Phase 1, depending on the position of the machine axis with reference to the reference
cam, we distinguish between three cases:
1. The machine axis is positioned before the reference cam
2. The machine axis is positioned on the reference cam
3. The machine axis has no reference cam
Basic Functions
1182 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
R1: Referencing
14.5 Referencing with incremental measurement systems
0'0$B5()3B9(/2B6($5&+B0$5.(5
60,1
0'0$B0$;B$;B$&&(/
0'0$B5()3B0$;B&$0B',67
PD[LPXPGLVWDQFHWRUHIHUHQFHFDP
9HORFLW\
PLQGLVWDQFH
0'0$B5()3B9(/2B6($5&+B&$0
UHIHUHQFHSRLQWDSSURDFKYHORFLW\
6WDUWLQJSRVLWLRQRI 'LVWDQFH
WKHPDFKLQHD[LV =HURPDUN 5HIHUHQFHFDP
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1183
R1: Referencing
14.5 Referencing with incremental measurement systems
Phase 1: Properties
● Feed override active.
● Feed stop (channel-specific and axis-specific) is active.
● NC stop and NC start are active.
● The machine axis is stopped if the reference cam is not reached within the parameterized
maximum distance:
MD34030 $MA_REFP_MAX_CAM_DIST (max. distance to the reference cam)
See also
Channelspecific referencing (Page 1176)
'%'%;GHFHOHUDWLRQRIUHIHUHQFHSRLQWDSSURDFK
'%'%;WUDYHOFRPPDQGSOXV
'%'%;WUDYHOFRPPDQGPLQXV
'%'%;DQGWUDYHUVLQJNH\SOXVPLQXV
'%'%;DQGUHIHUHQFHGV\QFKURQL]HG
3RVLWLRQPHDVXULQJV\VWHP]HURPDUN
9HORFLW\
0'0$B5()3B9(/2B6($5&+B&$0
UHIHUHQFHSRLQWDSSURDFKYHORFLW\
0'0$B5()3B9(/2B326
UHIHUHQFHSRLQWSRVLWLRQLQJYHORFLW\
0'0$B5()3B9(/2B6($5&+B0$5.(5
UHIHUHQFHSRLQWFUHHSYHORFLW\
3KDVH
Basic Functions
1184 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
R1: Referencing
14.5 Referencing with incremental measurement systems
Phase 2: Start
Phase 2 is automatically started when Phase 1 has been completed without an alarm.
Initial situation:
The machine axis is positioned on the reference cam.
Phase 2: Sequence
The synchronization in Phase 2 can be performed via the falling or rising edge of the
reference cam. The parameterization is performed via:
MD34050 $MA_REFP_SEARCH_MARKER_REVERSE[<axis>] = <value>
Value Meaning
0 Synchronization with falling reference cam edge
1 Synchronization with rising reference cam edge
Note
If the actual velocity of the machine axis at approach of the reference cam has not yet
reached the target velocity of Phase 2 within the parameterized tolerance limits, Phase 1 will
be restarted. This will be the case, for example, if the machine axis is positioned on the
reference cam when reference point approach is started.
MD35150 $MA_SPIND_DES_VELO_TOL (spindle speed tolerance)
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1185
R1: Referencing
14.5 Referencing with incremental measurement systems
0'0$B5()3B0$;B0$5.(5B',67
9HORFLW\ PD[GLVWDQFHWRUHIHUHQFHPDUN
0'0$B5()3B9(/2B6($5&+B&$0
UHIHUHQFHSRLQWDSSURDFKYHORFLW\
0'0$B5()3B9(/2B6($5&+B0$5.(5
UHIHUHQFHSRLQWFUHHSYHORFLW\
6WDUWLQJSRVLWLRQRI 'LVWDQFH
WKHPDFKLQHD[LV =HURPDUN 5HIHUHQFHFDP
0'0$B5()3B0$;B0$5.(5B',67
9HORFLW\ PD[GLVWDQFHWRUHIHUHQFHPDUN
0'0$B5()3B9(/2B6($5&+B&$0
UHIHUHQFHSRLQWDSSURDFKYHORFLW\
0'0$B5()3B9(/2B6($5&+B0$5.(5
UHIHUHQFHSRLQWFUHHSYHORFLW\
6WDUWLQJSRVLWLRQRI 'LVWDQFH
WKHPDFKLQHD[LV 5HIHUHQFHFDP =HURPDUN
Basic Functions
1186 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
R1: Referencing
14.5 Referencing with incremental measurement systems
7KHUPDOH[SDQVLRQ
PLQ PD[
&DPVLJQDO
=HURPDUNVHDUFKDFWLYH
(TXLGLVWDQW
HQFRGHU]HURPDUNV
Requirement
The electronic reference cam shift is only active for machine axes with reference cam:
MD34000 $MA_REFP_CAM_IS_ACTIVE == 1
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1187
R1: Referencing
14.5 Referencing with incremental measurement systems
Dynamic response
The following factors influence the dynamic response from the arrival of the reference cam to
the machine up to the detection of reference cam signals transferred from the PLC user
program to the NC:
● Switching accuracy of the reference cam switch
● Delay of the reference cam switch (NC contact)
● Delay at the PLC input
● PLC cycle time
● Cycle time for updating the NC/PLC interface
● Interpolation cycle
● Position control cycle
Notes on setting
● Reference cam
Aligning the signal edge of the reference cam directly between two zero marks has
proven to be the most practical method.
● Electronic reference cam shift
WARNING
Risk of collision
If the reference cam adjustment is faulty or inaccurate, an incorrect zero mark can be
evaluated. The controller then calculates an incorrect machine zero. As a result, the
machine axis will approach the wrong positions. Software limit switches, protected areas
and working area limitations act on incorrect positions and are therefore incapable of
protecting the machine. The path difference is +/- of the path covered by the machine
axis between two zero marks.
Information needed for parameterizing the electronic reference cam shift is to be found in
the read-only machine data:
MD34093 $MA_REFP_CAM_MARKER_DIST (distance between reference cam/reference
mark)
The indicated value is equivalent to the distance between departure from the reference
cam and detection of the reference mark. If the values are too small, there is a risk that
the determination of the reference point will be non-deterministic, due to temperature
effects or fluctuations in the operating time of the cam signal.
Phase 2: Properties
● Feedrate override is not active.
Machine axis moves internally when feedrate override = 100%.
If a feedrate override of 0% is specified, an abort occurs.
● Feed stop (channel-specific and axis-specific) is active.
Basic Functions
1188 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
R1: Referencing
14.5 Referencing with incremental measurement systems
'%'%;UHIHUHQFHSRLQWDSSURDFKGHFHOHUDWLRQ
'%'%;WUDYHOFRPPDQGSOXV
'%'%;WUDYHOFRPPDQGPLQXV
'%'%;DQGWUDYHUVLQJNH\SOXVPLQXV
'%'%;DQGUHIHUHQFHGV\QFKURQL]HG
3RVLWLRQPHDVXULQJV\VWHP]HURPDUN
9HORFLW\
0'0$B5()3B9(/2B6($5&+B&$0
5HIHUHQFHSRLQWDSSURDFKYHORFLW\
0'0$B5()3B9(/2B326
5HIHUHQFHSRLQWSRVLWLRQYHORFLW\
0'0$B5()3B9(/2B6($5&+B0$5.(5
5HIHUHQFHSRLQWFUHHSYHORFLW\
3KDVH
Phase 3: Start
At the end of Phase 2 the machine axis travels at reference point creep velocity. Therefore,
as soon as Phase 2 is completed successfully without an alarm, Phase 3 is started without
interruption.
Initial situation
The encoder zero mark has been detected.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1189
R1: Referencing
14.5 Referencing with incremental measurement systems
Phase 3: Sequence
The machine axis moves at the assigned reference point positioning velocity:
MD34070 $MA_REFP_VELO_POS (reference point positioning velocity)
from the encoder zero mark detected in Phase 2 to the reference point.
The path sref to be covered is calculated from the sum of the reference point distance plus
reference point offset:
MD34080 $MA_REFP_MOVE_DIST (reference point distance)
MD34090 $MA_REFP_MOVE_DIST_CORR (reference point offset)
Velocity
Distance
MD34080 $MA_REFP_MOV_DIST + Zero mark Reference cam
MD34090 $MA_REFP_MOVE_DIST_CORR
MD34100 $MA_REFP_SET_POS [0 ... 3]
UHIHUHQFHSRLQWYDOXH
When the reference point is reached, the machine axis is stopped and the actual-value
system is synchronized with the reference point value n specified by the NC/PLC interface.
MD34100 $MA_ REFP_SET_POS[<n>] (reference point value)
The selection of the reference point value is performed via the NC/PLC interface:
DB31, ... DBX2.4 ... 7 (reference point value 1 ... 4)
The actual-value system is synchronized to the reference point value that was selected at
the time the reference cam was reached in Phase 1 (DB31, ... DBX12.7 == 1).
The machine axis is now referenced. The interface signal is set as feedback to the PLC user
program, depending on the active measuring system:
DB31, ... DBX60.4/5 (referenced/synchronized 1/2) = 1
Features of Phase 3
● Feed override active.
● Feed stop (channel-specific and axis-specific) is active.
● NC stop and NC start are active.
Basic Functions
1190 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
R1: Referencing
14.6 Referencing with distance-coded reference marks
Distance
=HURPDUN Reference cam
Figure 14-11 Reference point distance plus reference point offset less than braking distance
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1191
R1: Referencing
14.6 Referencing with distance-coded reference marks
5HIHUHQFHPDUN
Figure 14-12 DIADUR graduated glass scale with distance-coded reference marks
(dimensions in mm for 20 mm scale division)
Basic Functions
1192 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
R1: Referencing
14.6 Referencing with distance-coded reference marks
4. Measure the current position of the machine axis with reference to the machine zero
point.
5. Calculate absolute offset and enter in MD34090.
The absolute offset is calculated with respect to the machine coordinate system and
depending on the orientation of the measuring system (equidirectional or inverse) as:
WARNING
Reference point deviation
After determining the absolute offset and the entry in MD34090, the reference point
traversing for the machine axis must be carried out once more.
Referencing methods
Referencing with distance-coded reference marks can be performed in one of two ways:
● Evaluation of two consecutive reference marks:
MD34200 $MA_ENC_REFP_MODE (referencing mode) = 3
Advantage:
– Short travel path
● Evaluation of four consecutive reference marks:
MD34200 $MA_ENC_REFP_MODE = 8
Advantage:
– Plausibility check by NC is possible
– Increase in reliability of referencing result
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1193
R1: Referencing
14.6 Referencing with distance-coded reference marks
Time sequence
Referencing with distance-coded reference marks can be divided into two phases:
● Phase 1: Travel across the reference marks with synchronization
● Phase 2: Travel to a fixed destination point
'%'%;GHFHOHUDWLRQRI
UHIHUHQFHSRLQWDSSURDFK
'%'%;WUDYHOFRPPDQGPLQXV
'%'%;DQGWUDYHUVLQJNH\SOXVPLQXV
'%'%;UHIHUHQFHGV\QFKURQL]HG
/HQJWKPHDVXULQJV\VWHPUHIHUHQFHPDUNV
9HORFLW\
0'0$B5()3B9(/2B326
UHIHUHQFHSRLQWSRVLWLRQLQJYHORFLW\
0'0$B5()3B9(/2B6($5&+B0$5.(5
UHIHUHQFHSRLQWFUHHSYHORFLW\
3KDVH 3KDVH
Phase 1: Start
To start the reference point approach, see Sections "Axisspecific referencing (Page 1174)"
and "Channelspecific referencing (Page 1176)".
Reference cam
In measuring systems with distance-coded reference marks, reference cams are not
required for the actual referencing action. For functional reasons, however, a reference cam
is required for channel-specific reference point approach and reference point approach from
the part program (G74) before the traversing range end of the machine axis.
Basic Functions
1194 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
R1: Referencing
14.6 Referencing with distance-coded reference marks
Phase 1: Sequence
Sequence without contact witha reference cam
Once the reference point approaching process is started, the machine axis accelerates to
the reference point shutdown speed set by means of parameter assignment:
MD34040 $MA_REFP_VELO_SEARCH_MARKER (reference point creep velocity)
Once the number of reference marks set by means of parameter assignment has been
crossed, the machine axis is stopped again and the actual value system of the machine axis
is synchronized to the absolute position calculated by the NC.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1195
R1: Referencing
14.6 Referencing with distance-coded reference marks
Abort criterion
If the parameterized number of reference marks is not detected within the parameterized
distance, the machine axis is stopped and reference point traversing is aborted.
MD34060 $MA_REFP_MAX_ MARKER_DIST (max. distance to the reference mark)
Features of Phase 1
After Phase 1 is successfully completed, the actual value system of the machine axis is
synchronized.
Phase 2: Start
Phase 2 is automatically started when Phase 1 has been completed without an alarm.
Initial situation:
● The machine axis is positioned directly behind the last of the parameterized number of
reference marks.
● The actual value system of the machine axis is synchronized.
Phase 2: Sequence
In Phase 2, the machine axis completes reference point approach by traversing to a defined
target position (reference point). This action can be suppressed in order to shorten the
reference point approach:
MD34330 $MA_STOP_AT_ABS_MARKER = <value>
Value Meaning
0 Travel to target position
1 No travel to target position
Basic Functions
1196 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
R1: Referencing
14.6 Referencing with distance-coded reference marks
Features of Phase 2
Phase 2 will display different characteristics, depending on whether a reference cam is
parameterized for the machine axis.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1197
R1: Referencing
14.7 Referencing by means of actual value adjustment
Note
The reference point position is mapped onto the assigned (ghost) modulo range even with
axis function "Determination of reference point position rotary, distance-coded encoder within
the configured modulo range":
MD30455 $MA_MISC_FUNCTION_MASK (axis functions), BIT1 = 1
Function
When actual value adjustment to the referencing measuring system is performed, the
resulting absolute actual position after successful referencing of the measuring system of a
machine axis is transferred directly to all other measuring systems of the machine axis, and
the machine axis is designated as referenced:
DB31, ... DBB60.4 / 60.5 (referenced/synchronized 1/2) = 1
Advantage
When the machine axis switches from an explicitly referenced measuring system to the
measuring system referenced by actual value adjustment, continuous servo control is
assured (servo enable active) because the matched actual position prevents a sudden
change in actual value.
Note
In order to improve positioning precision by determining the measuring-system-specific
encoder fine information, we recommend explicitly re-referencing the measuring system
previously referenced by actual value adjustment after switching over.
Activation
The activation of the actual value adjustment to the referencing measuring system is
machine-specifically carried out via:
MD34102 $MA_REFP_SYNC_ENCS = 1
Basic Functions
1198 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
R1: Referencing
14.7 Referencing by means of actual value adjustment
14.7.2 Actual value adjustment for measuring systems with distance-coded reference
marks
Function
In order to improve positioning precision by determining the measuring-system-specific
encoder fine information, we recommend explicitly re-referencing the measuring system
previously referenced by actual value adjustment after switching over the measuring system.
If an encoder with distance-coded reference marks is used for the passive measuring
system, referencing can be avoided if the following conditions are met:
1. Active measuring system: indirect measuring system (motor measuring system) with
absolute encoder, for example
2. Passive measuring system: Direct measuring system with distancecoded reference
marks
3. Travel movement of the machine axis with the referenced indirect measuring system
before measuring system switchover in which the number of reference marks required for
referencing are crossed. This automatically references the passive direct measuring
system.
Parameterization
In addition to the specific machine data required to reference the individual measuring
systems, the following machine data must be set:
● Enable actual value adjustment:
MD34102 $MA_REFP_SYNC_ENCS = 1
● Direct measuring system with distancecoded reference marks:
– MD34200 $MA_ENC_REFP_MODE[measuring system] = 3
Distancecoded reference marks
– MD30242 $MA_ENC_IS_INDEPENDENT[measuring system] = 2
During actual value adjustment, the passive direct measuring system is adjusted to
the actual position of the active indirect measuring system, but is not marked as
referenced. After the parameterized number of reference marks have been crossed,
the passive direct measuring system is automatically referenced. Referencing is
performed in every operating mode.
Sequence
1. Initial situation: Neither of the measuring systems are referenced:
DB31, ... DBX60.4 = 0 (referenced / synchronized 1)
DB31, ... DBX60.5 = 0 (referenced / synchronized 2)
2. Reference the indirect measuring system according to the measuring system type:
DB31, ... DBX60.4 = 1 (referenced / synchronized 1)
DB31, ... DBX60.5 = 0 (referenced / synchronized 2)
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1199
R1: Referencing
14.8 Referencing in follow-up mode
3. Traverse the machine axis across the parameterized number of reference marks.
This automatically references the direct measuring system:
DB31, ... DBX60.4 = 1 (referenced / synchronized 1)
DB31, ... DBX60.5 = 1 (referenced / synchronized 2)
Function
Incremental measuring systems and measuring systems with distance-coded reference
marks can be referenced even when the machine axis is in follow-up mode. Prerequisite for
this is the correct parameterization of the reference point approach according to the used
measuring system (see Section "Referencing with incremental measurement systems
(Page 1179)" and "Referencing with distance-coded reference marks (Page 1191)").
When referencing in follow-up mode the machine axis is moved not by the NC but by means
of an external travel motion over the encoder zero mark and the parameterized number of
distance-coded reference marks. The measuring system is referenced when the encoder
zero mark or parameterized number of distance-coded reference marks are detected.
Note
Reproducibility of the referencing result
In NC-guided reference point approach, reproducibility of the referencing result is ensured
through adherence to the assigned traverse velocities during the referencing operation.
During referencing in follow-up mode, responsibility for achieving reproducibility of the
referencing results lies with the machine manufacturer / user.
Basic Functions
1200 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
R1: Referencing
14.8 Referencing in follow-up mode
Note
BERO signal: Zero mark selection
The processing of the BERO signal is performed exclusively in the drive. Connection and
parameterization, see Section "Hardware signals (Page 1179)".
Enable
The "Referencing in follow-up mode" function is enabled with:
MD34104 $MA_REFP_PERMITTED_IN_FOLLOWUP = TRUE
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1201
R1: Referencing
14.8 Referencing in follow-up mode
Basic Functions
1202 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
R1: Referencing
14.9 Referencing with absolute encoders
Adjustment
Adjustment of an absolute encoder involves matching the actual value of the encoder with
the machine zero once and then setting it to valid.
The current adjustment status of an absolute encoder is displayed in the following axis-
specific machine data of the machine axis, to which it is connected:
MD34210 $MA_ENC_REFP_STATE (status of absolute encoder)
Value Meaning
0 Encoder not calibrated
1 Encoder adjustment enabled
2 Encoder is calibrated
Adjustment methods
The following adjustment methods are supported:
● Adjustment by entering a reference point offset
● Adjustment by entering a reference point value
● Automatic adjustment with probe
● Adjustment with BERO
Readjustment
Readjustment of the absolute encoder is required after:
● Gear change between load and absolute encoder
● Removal/installation of the absolute encoder
● Removal/installation of the motor with the absolute encoder
● Data loss in the static NC memory
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1203
R1: Referencing
14.9 Referencing with absolute encoders
● Battery failure
● Setting actual value (PRESETON)
WARNING
Data backup
During the back-up of machine data of a machine A, the encoder status of the machine
axis (MD34210) is also backed up.
During loading of this data record into a machine B of the same type, e.g. in the context
of a serial start-up or after a case of maintenance, the referenced machine axes will be
automatically regarded as adjusted / referenced by the NC. It is the special responsibility
of the machine manufacturer / user to undertake a readjustment in such cases.
See also explanations regarding machine data:
MD30250 $MA_ACT_POS_ABS (absolute encoder position at the time of switch-off)
Note
The controller can detect a required readjustment of the absolute encoder only during the
following events:
• Gear change with change of gear ratio
• Addressing the zero-mark monitoring
• New encoder serial number after change of the absolute encoder
The controller then sets the status of the absolute encoder to "0":
MD34210 $MA_ENC_REFP_STATE = 0 (encoder not adjusted)
The following alarm is displayed:
Alarm 25022 "Axis <axis name> encoder <number> warning 0"
If the zero-mark monitoring responds, the following alarm is also displayed:
Alarm 25020 "Axis <axis name> zero-mark monitoring of active encoder"
In all other cases (e.g. PRESETON) it is the sole responsibility of the user to display the
misalignment of the absolute encoder by manually setting the status to "0" and to carry
out a readjustment.
Basic Functions
1204 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
R1: Referencing
14.9 Referencing with absolute encoders
Function
During adjustment by entering the reference point offset, the difference between the position
displayed on the operator interface and the true actual position in the machine is determined
and made known to the NC as reference point offset.
Procedure
1. Determining the position of the machine axis with reference to the machine zero point via
e.g.:
– position measurement (e.g. laser interferometer)
– Moving the machine axis to a known position (e.g., fixed stop)
2. Reading the displayed actual position of the machine axis on the operator interface.
3. Calculating the reference point offset (difference between the actual positions determined
under point 1 and 2) and entering in machine data:
MD34090 $MA_REFP_MOVE_DIST_CORR (reference point offset)
4. Marking the absolute value encoder as adjusted:
MD34210 $MA_ENC_REFP_STATE = 2
Note
The encoder adjustment does not become active until the next time the encoder is
activated (e.g., when the controller is powered up).
Note
Backlash compensation
If backlash compensation is parameterized for a measuring system with absolute value
encoder, the following must be observed:
No backlash is permitted during machine axis travel to the adjusted machine position.
Activate reference point offset permanently
The entered reference point offset (MD34090) will be permanently active only after initial
POWER ON - Reset. If the machine axis is moved after the absolute encoder adjustment
without an interim POWER ON - Reset, the reference point offset entered in the machine
data can be overwritten, for example, as part of internal overrun offset.
Checking the actual position
Following adjustment of the absolute encoder, we recommend that you verify the actual
position of the machine axis the next time you power up the controller (POWER ON).
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1205
R1: Referencing
14.9 Referencing with absolute encoders
Function
During adjustment by entering the reference point value, the absolute position of the
machine axis with reference to the machine zero point is determined by e.g.:
● Position measurement (e.g. laser interferometer)
● Moving the machine axis to a known position (e.g. fixed stop)
This determined position value will be made known to the NC as the reference point value.
The NC then calculates the reference point offset from the difference between the encoder
absolute value and the reference point value.
Procedure
1. Set reference mode to "Take over of the reference point value"
MD34200 $MA_ENC_REFP_MODE = 0
2. Traversing machine axis in the JOG mode to the (e.g. Laser interferometer) position to be
measured or already known (e.g. fixed stop).
Note
The machine axis can only be traversed in the direction enabled for referencing with the
travel keys:
MD34010 $MA_REFP_CAM_DIR_IS_MINUS (approach reference point in minus
direction)
To avoid an invalid position because of backlash in the drive train, the known position
must be approached at low velocity.
3. Communicate the position of the machine axis relative to machine zero to the NC as the
reference point value:
MD34100 $MA_REFP_SET_POS = Position
4. Releasing encoder adjustment:
MD34210 $MA_ENC_REFP_STATE = 1
5. Activate NCK-Reset for acceptance of the entered machine data values.
6. Switch to JOG-REF mode.
Basic Functions
1206 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
R1: Referencing
14.9 Referencing with absolute encoders
Note
Activate reference point offset permanently
The entered reference point offset (MD34090) will only be permanently active after
POWER ON - Reset.
If the machine axis is moved after the absolute encoder adjustment without an interim
POWER ON - Reset, the reference point offset entered in the machine data can be
overwritten, for example, within internal overrun corrections.
Checking the actual position
Following adjustment of the absolute encoder, we recommend that you verify the actual
position of the machine axis the next time you power up the controller (POWER ON).
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1207
R1: Referencing
14.9 Referencing with absolute encoders
Function
In automatic adjustment with a probe, a known position in the machine is approached with
the machine axis from a part program. The position value is stored in the NC as a reference
point value. The position is reached when the probe switches, and the NC then calculates
the reference point offset from the difference between the encoder value and reference point
value.
Note
Part program for automatic adjustment
The part program for automatic adjustment using a probe must be created by the machine
manufacturer / user for the specific requirements of the machine.
Freedom from collision
Because actual-value-related monitoring is not active for the machine axes being referenced,
the machine operator must take special care to ensure that collisions do not occur in the
machine while the machine axes are being moved!
Part program
The part program for automatic adjustment of absolute encoders with probe must perform
the points listed below for each axis in the order indicated:
1. Approach the adjustment position of machine axis, which is detected from the probe
response.
The position must be approached several times from the same direction, but at a velocity
which is gradually reduced on each approach, to ensure that the measured value
obtained is as accurate as possible. The measured value is stored in system variable
$AA_IM.
2. Calculating and writing the reference point offset:
0'0$B5()3B029(B',67B&255 0'0$B5()3B6(7B326ದ$$B,0
Sequence
Proceed as follows for automatic adjustment with probe:
1. Enable part program start even for non-referenced machine axes:
MD20700 $MC_REFP_NC_START_LOCK = 0
2. Enter the machine axis position relative to machine zero when probe is switched as the
reference point value for all relevant machine axes:
MD34100 $MA_REFP_SET_POS = reference point value
Basic Functions
1208 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
R1: Referencing
14.9 Referencing with absolute encoders
3. Activate NCK-Reset for the acceptance of the entered machine data values.
4. Start part program.
5. After completion of the part program, re-secure the partial program start for machine axes
which are not referenced:
MD20700 $MC_REFP_NC_START_LOCK = 1
6. Initiate POWER ON - Reset so that the reference point offset written by the part program
is permanently active:
MD34090 $MA_REFP_MOVE_DIST_CORR (reference point offset)
Note
Activate reference point offset permanently
The entered reference point offset (MD34090) will only be permanently active after
POWER ON - Reset.
If the machine axis is moved after the absolute encoder adjustment without an interim
POWER ON - Reset, the reference point offset entered in the machine data can be
overwritten, for example, as part of internal overrun offset.
Checking the actual position
Following adjustment of the absolute encoder, we recommend that you verify the actual
position of the machine axis the next time you power up the controller (POWER ON).
Function
For adjustment using BERO, a reference point approach to a defined machine position is
performed the same as for incremental measuring systems. In this case the BERO replaces
the encoder zero mark that the absolute encoder does not have. After successful completion
of reference point approach, the NC automatically calculates the reference point offset from
the difference between the encoder absolute value and the parameterized reference point
value.
Parameterization
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1209
R1: Referencing
14.9 Referencing with absolute encoders
Execution
Reference point approach can be started manually in JOG-REF mode or in AUTOMATIC or
MDA mode via a part program (G74).
After successful completion of the reference point approach, the absolute encoder is
adjusted and the actual-value system of the machine axis is synchronized.
As feedback for the PLC user program, the NC sets the NC/PLC interface signal for the
machine axis, depending on the active measuring system:
DB31, ... DBB60.4/60.5 (referenced/synchronized 1/2) = 1
Note
If the BERO is removed after adjustment of the absolute encoder, the referencing mode
must be re-parameterized to "Referencing with absolute encoder".
MD34200 $MA_ENC_REFP_MODE[<axis>] = 0
Value Meaning
0 Traversing is enabled.
When reference point approach is initiated, the machine axis moves to the reference point
position. Reference point approach is completed when the reference point position is
reached.
1 Traversing is not enabled.
After the activation of the reference point travel, the machine axis does not travel and the
reference point travel is immediately completed.
Basic Functions
1210 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
R1: Referencing
14.9 Referencing with absolute encoders
14.9.7 Reference point approach in rotary absolute encoders with external zero mark
Function
To be able to use the reference point approach with a zero mark, as is usual in incremental
encoders (refer to Section "Referencing with incremental measurement systems
(Page 1179)"), also with absolute encoders, the missing HW zero marks are created in
software form once every encoder revolution, always at the same position within the rotation.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1211
R1: Referencing
14.9 Referencing with absolute encoders
Requirement
The function can be used only with rotary absolute encoders:
● MD31000 $MA_ENC_IS_LINEAR = 0
● MD30240 $MA_ENC_TYPE = 4
Parameterization
● reference point approach with zero marks:
MD34200 $MA_ENC_REFP_MODE = 1
● A reference point offset should not be input in the following MD:
MD34090 $MA_REFP_MOVE_DIST_CORR
This MD describes, in connection with absolute encoders, the offset between machine
and absolute encoder zero, and it therefore has a different meaning.
● The load-side zero mark search rate MD34040 $MA_REFP_VELO_SEARCH_MARKER
should not exceed the limiting frequency of the absolute trace of the encoder
MD36302 $MA_ENC_FREQ_LIMIT_LOW
.
If the speed is too high, absolute information cannot be read any more, and thus, no
equivalent zero marks are generated.
● If no zero marks are found within:
MD34060 $MA_REFP_MAX_MARKER_DIST
otherwise, an alarm will be triggered.
● A start of the zero mark search with the override of a BERO (MD34200 = 5) is not
supported. MD34200 = 0 is to be used as a equivalent.
● The following MD must be set if the absolute encoder retains even the referenced status
through POWER OFF, besides the last position:
MD34210 $MA_ENC_REFP_STATE = 2
Basic Functions
1212 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
R1: Referencing
14.9 Referencing with absolute encoders
Function
Automatic encoder replacement detection is required for absolute encoders in order to detect
if the encoder has been replaced and therefore needs to be readjusted.
The NC reads the encoder-specific serial number of the encoder from the drive every time
the control is powered up. If the serial number has changed the NC resets the encoder
status to "Encoder not calibrated".
MD34210 $MA_ENC_REFP_STATE = 0
The status of the measuring system is indicated as "Not referenced":
DB31, ... DBB60.4 / 60.5 (referenced/synchronized 1/2) = 0
Note
Currently, only the serial numbers of absolute encoders with an EnDat interface can be read.
For all other encoders the display shows that no serial number has been read.
Automatic encoder replacement detection can therefore only be used with the specified
encoder types.
Avoiding readjustments
In some special cases, for example, when a machine axis (built-on rotary axes) is removed
and then mounted again, readjustment is not necessary / desirable.
To avoid readjustment, zero must be parameterized as a serial number to be ignored for the
measuring system of the machine axis in question.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1213
R1: Referencing
14.9 Referencing with absolute encoders
MD34232 $MA_EVERY_ENC_SERIAL_NUMBER = 0
If the NC now reads zero as the serial number, the encoder status is not reset and the serial
number indicated in the machine data is kept.
Note
PROFIBUS drives
As not every drive connected via PROFIBUS-DP is able to deliver the encoder serial
number in time for build-up of control or at all, the range of the encoder serial number
with PROFIBUS drives is pre-set with zero to avoid unnecessary new NC internal
adjustments:
MD34232 $MA_EVERY_ENC_SERIAL_NUMBER = 0
A manual parameterizing to 1 is ineffective.
Basic Functions
1214 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
R1: Referencing
14.9 Referencing with absolute encoders
0'
0'
0'
0'
Note
The position control switching speed relevant for spindles is set according to the encoder
limiting frequency of the absolute value encoder of the spindle:
MD35300 $MA_SPIND_POSCTRL_VELO (position control switching speed)
MD36300 $MA_ENC_FREQ_LIMIT (Encoder limit frequency)
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1215
R1: Referencing
14.10 Automatic restoration of the machine reference
Absolute encoders
For measuring systems with adjusted absolute encoders, the machine reference is restored
immediately without any additional measures when the encoder value is read.
Incremental encoders
With incremental measuring systems, the machine reference can be restored without
traversing the axes through "Automatic referencing" or "Restoration of the actual position".
Supplementary conditions
WARNING
During the time in which the measuring system of the machine axis is switched off, it must
not be moved mechanically. Otherwise this results in an offset between the last buffered
actual position and the real actual position of the machine axis. This would lead to an
incorrect synchronization of the measuring system resulting in danger to personnel and
machine.
The machine manufacturer must provide such measures as holding brakes, etc. on the
machine so that the actual position is not changed, and this must be ensured by the user.
The responsibility for this rests exclusively with the machine manufacturer / user.
If axis motion cannot be prevented mechanically in the shutdown state, either an absolute
encoder must be used or the axis must be referenced again with reference point approach
after switching on.
Basic Functions
1216 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
R1: Referencing
14.10 Automatic restoration of the machine reference
Note
SMExx sensor modules
Automatic referencing or restoration of the actual position to the last buffered position after
restarting the control is only possible in conjunction with SMExx (externally mounted) sensor
modules. When using SMCxx (cabinet) or SMIxx (integrated) sensor modules, the actual
position cannot be restored after restarting the control (power on). The measuring system of
the machine axis must be referenced again.
Function
During automatic referencing, the actual position of the active measuring system of the
machine axis is set to the last buffered position and "referenced" set as encoder state after
switching on the control. This makes it possible to start programs in the AUTOMATIC and
MDI modes directly after run-up of the control.
Requirements
● The active measuring systems when the control is switched on must already have been
referenced once before switching off.
● At the time the control is switched off, the machine axis must be at standstill with "Exact
stop fine" (DB31, ... DBX60.7 == 1) are located.
Note
If the machine axis is not at standstill with "Exact stop fine" when switching off, the actual
position will be initialized with " 0" when switching on. "Not referenced" is displayed as the
encoder state.
Parameter assignment
The automatic referencing is enabled by setting the encoder state to "Automatic referencing
is enabled, but the encoder has not been referenced":
MD34210 $MA_ENC_REFP_STATE[<encoder>] = 1
After the measuring system has been referenced, the encoder state displays that automatic
referencing will be executed the next time the encoder is activated:
MD34210 $MA_ENC_REFP_STATE[<encoder>] == 2
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1217
R1: Referencing
14.10 Automatic restoration of the machine reference
Supplementary conditions
References
Description of Functions, Basic functions, Section "R1 Referencing" > "Referencing with
incremental measurement systems (Page 1179)" > ""
Function
When restoring the actual position to the last buffered position, the encoder state of the
active measuring system is set to "Restored". The axis can only be traversed manually.
AUTOMATIC mode
To enable NC start for the automatic execution of programs in the AUTOMATIC mode, the
measuring system of the machine axis must be re-referenced.
Requirement
The active measuring systems when the control is switched on must already have been
referenced once before switching off.
Basic Functions
1218 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
R1: Referencing
14.10 Automatic restoration of the machine reference
Parameter assignment
Note
The monitoring of the traversing range limits (software limit switches, working area
limitation, etc.) is already active in the "Position restored" state.
Supplementary conditions
Spindles
If the encoder limit frequency is exceeded, a spindle is reset to the "Not
referenced/synchronized" state:
● DB31, ... DBX60.4/.5 = 1 → 0 (referenced/synchronized 1/2)
● DB31, ... DBX71.4/.5 = 1 → 0 (position restored, encoder 1/2)
References
Description of Functions, Basic functions, Section "R1 Referencing" > "Referencing with
incremental measurement systems (Page 1179)" > ""
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1219
R1: Referencing
14.11 Supplementary conditions
Linear axes with a traversing range > 4096 encoder revolutions, rotatory absolute encoder
EQN 1325 and a parameterized absolute encoder range of
MD34220 $MA_ENC_ABS_TURNS_MODULO = 4096:
The maximum possible travel range corresponds to that of incremental encoders.
Basic Functions
1220 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
R1: Referencing
14.12 Data lists
Note
Linear absolute encoders
The absolute value of linear position encoders, e.g. Heidenhain LC181, is always unique for
the scale lengths available.
Rotary absolute encoders
The absolute value of rotary absolute encoders is only unique within the range of the specific
maximum encoder revolutions.
For example, the EQN 1325 rotary absolute encoder by Heidenhain supplies a unique
absolute value in the range of 0 to 4,096 encoder revolutions.
Depending on how the encoder is connected that will result in:
• Rotary axis with encoder on load: 4096 load revolutions
• Rotary axis with encoder on motor: 4096 motor revolutions
• Linear axis with encoder on motor: 4096 motor revolutions
Example:
An EQN 1325 rotary absolute encoder is mounted on the motor of a linear axis. For an
effective leadscrew pitch of 10 mm this will result in a unique absolute value within the travel
range -20.48 to +20.48 m.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1221
R1: Referencing
14.12 Data lists
Basic Functions
1222 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
R1: Referencing
14.12 Data lists
14.12.2 Signals
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1223
R1: Referencing
14.12 Data lists
Basic Functions
1224 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
S1: Spindles 15
15.1 Brief Description
The primary function of a spindle is to set a tool or workpiece in rotary motion in order to
facilitate machining.
Depending on the type of machine, the spindle must support the following functions in order
to achieve this:
● Input of a direction of rotation for the spindle (M3, M4)
● Input of a spindle speed (S, SVC)
● Spindle stop, without orientation (M5)
● Spindle stop with orientation / Spindle positioning
(SPOS, M19 and SPOSA)
● Gear change (M40 to M45)
● Spindleaxis functionality (spindle becomes rotary axis and vice versa)
● Thread cutting (G33, G34, G35)
● Tapping without compensating chuck (G331, G332)
● Tapping with compensating chuck (G63)
● Revolutional feedrate (G95)
● Constant cutting rate (G96, G961, G97, G971)
● Programmable spindle speed limits (G25, G26, LIMS=)
● Position encoder assembly on the spindle or on the spindle motor
● Spindle monitoring for min. and max. speed as well as
max. encoder limit frequency and end point monitoring of spindle
● Switching the position control (SPCON, SPCOF, M70) on/off
● Programming of spindle functions:
– From the part program
– Via synchronized actions
– Via PLC with FC18 or via special spindle interfaces for simple spindle activation
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1225
S1: Spindles
15.2 Modes
15.2 Modes
15.2.1 Overview
Spindle modes
The spindle can have the following modes:
● Control mode
● Oscillation mode
● Positioning mode
● Synchronous mode, synchronous spindle
References:
Function Manual, Extension Functions, Synchronous Spindle (S3)
● Rigid tapping
References:
Programming Manual, Fundamentals; Chapter: Motion commands
Axis mode
The spindle can be switched from spindle mode to axis mode (rotary axis) if the same motor
is used for spindle and axis operation.
Basic Functions
1226 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
S1: Spindles
15.2 Modes
2VFLOODWLRQPRGH 6\QFKURQRXVPRGH
&KDQJH *HDU
JHDU FKDQJHG &28321 &2832)
632606326$
&RQWUROPRGH 3RVLWLRQLQJPRGH
63&2)
000
0
0
63&2) 63260
000 6326$ $[LVQDPH
0
$[LVPRGH
* *
7DSSLQJ
ZLWKRXW
FRPSHQVDWLQJ
FKXFN
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1227
S1: Spindles
15.2 Modes
Basic Functions
1228 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
S1: Spindles
15.2 Modes
Requirements
A spindle position actual value encoder is absolutely essential for M3/M4/M5 in connection
with:
● Revolutional feedrate (G95)
● Constant cutting speed (G96, G961, G97, G971)
● Thread cutting (G33, G34, G35)
● Tapping without compensating chuck (G331, G332)
● Activate position control (SPCON, M70)
A spindle position actual value encoder is not required for M3/M4/M5 in connection with:
● Inverse-time feedrate coding (G93)
● Feedrate in mm/min or inch/min (G94)
● Tapping with compensating chuck (G63)
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1229
S1: Spindles
15.2 Modes
Value Meaning
0 When the spindle is reset or at the end of the program, the spindle immediately decelerates
to a stop at the active acceleration rate. The last programmed spindle speed and direction of
rotation are deleted.
1 Upon reset or at the end of the program, the last programmed spindle speed (S-value) and
the last programmed direction of spindle rotation (M3, M4, M5) are retained. The spindle is
not braked.
If prior to reset or end of program the constant cutting speed (G96, G961) is active, the
current spindle speed (in relation to 100% spindle override) is internally accepted as the
spindle speed last programmed.
The spindle can only be stopped with the NC/PLC interface signal:
DB31, ... DBX2.2 (delete distance-to-go / spindle reset)
The direction of rotation is deleted in the event of all alarms generating a spindle quick stop.
The last programmed spindle speed (S value) is retained. Once the source of the alarm has
been eliminated, the spindle must be restarted.
Spindle actual speed display and spindle behavior with G96, G961
DB31, ... DBX61.4 (axis/spindle stationary)
The speed at which the spindle is deemed to be "stationary" is set with the machine data:
MD36060 $MA_STANDSTILL_VELO_TOL
The value should be measured in such a way that the following NC/PLC interface signal is
reliably present at a standstill:
DB31,... DBX61.4 (axis/spindle stationary)
If DB31,... DBX61.4 (axis/spindle stationary) is signaled and there is no closed-loop position
control active for the spindle, an actual speed of zero is displayed at the user interface, and
zero is read with the system variable $AA_S[<n>].
Spindle response at constant cutting speed G96, G961
● At the start of machining (transition from G0 to Gx) and after NC stop, G60 (exact stop,
modal) and G9 (exact stop, non-modal) the system waits until the actual speed has
reached the speed setpoint tolerance range before starting the path.
DB31, ... DBX83.5 (nact = nset)
● The NC/PLC IS:
DB31, ... DBX83.5 (nact = nset)
and
DB31, ... DBX83.1 (setpoint speed limited) are also set to defined values
even if significant speed changes are specified (transverse axis travels towards position
0).
Basic Functions
1230 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
S1: Spindles
15.2 Modes
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1231
S1: Spindles
15.2 Modes
SPOS[<n>]=AC(...)
Spindle positioning to an absolute position (0 to 359.999 degrees). The positioning direction
is determined either by the current direction of spindle rotation (spindle rotating) or the
distance-to-go.
SPOS[<n>]=IC(...)
Spindle positioning to an incremental position (+/- 999999.99 degrees) in relation to the last
programmed position. The positioning direction is defined by the sign of the path to be
traversed.
SPOS[<n>]=DC(...)
Spindle positioning across the shortest path to an absolute position (0 to 359.999 degrees).
The positioning direction is determined either by the current direction of spindle rotation
(spindle rotating) or automatically by the control (spindle stationary).
Basic Functions
1232 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
S1: Spindles
15.2 Modes
SPOS[<n>]=...
Same functional sequence as SPOS [<n>]=DC(...).
SPOS[<n>]=ACP(...)
Approaches the position from the positive direction.
When positioning from a negative direction of rotation, the speed is decelerated to zero and
accelerated in the opposite direction to execute the positive approach.
SPOS[<n>]=ACN(...)
Approaches the position from the negative direction.
When positioning from a positive direction of rotation, the speed is decelerated to zero and
accelerated in the opposite direction to execute the negative approach.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1233
S1: Spindles
15.2 Modes
Note
Activation via MD35035 should be preferred when using a spindle in multiple channels
(axis/spindle exchange).
Basic Functions
1234 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
S1: Spindles
15.2 Modes
End of positioning
The positioning can be programmed with:
FINEA[S<n>]: End of motion on reaching "Exact stop fine" (DB31, ... DBX60.7)
COARSEA[S<n>]: End of motion on reaching "Exact stop coarse" (DB31, ...
DBX60.6)
IPOENDA[S<n>]: End of motion on reaching "IPO stop"
In addition, an end-of-motion criterion for block changes can be set in the braking ramp (100-
0%) with IPOBRKA for single-axis interpolation.
References:
Function Manual, Extended Functions; Positioning Axes (P2)
Block change
The program advances to the next block if the end-of-motion criteria for all spindles or axes
programmed in the current block, plus the block change criterion for path interpolation, are
fulfilled. This applies to both part-program and technology-cycle blocks.
SPOS, M19 and SPOSA have the same functionality but differ in their block change
behavior:
● SPOS and M19
The block change is carried out if all functions programmed in the block have reached
their end-of-block criterion (e.g. all auxiliary functions acknowledged by the PLC, all axes
have reached their end points) and the spindle has completed its positioning motion.
● SPOSA
The program moves to the next block if all the functions (except for spindle) programmed
in the current block have reached their end-of-block criterion. If SPOSA is the only entry in
the block, block change is performed immediately. The spindle positioning operation may
be programmed over several blocks (see WAITS).
Coordination
A coordination of the sequence of motions can be achieved with:
● PLC
● MD configuration
● Programming in the part program
PLC
If the NC/PLC interface signal:
DB31, ... DBX83.5 (spindle in the setpoint range)
is not available, then the channel-specific NC/PLC interface signal:
DB21, ... DBX 6.1 (read-in inhibit)
can be set in order to wait for a spindle to reach a certain position.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1235
S1: Spindles
15.2 Modes
MD configuration
Setting:
MD35500 $MA_SPIND_ON_SPEED_AT_IPO_START = 1
is used to perform path interpolation taking the tolerance:
MD35150 $MA_SPIND_DES_VELO_TOL
into account only if the spindle has rotated up to the preselected speed.
The setting
MD35500 $MA_SPIND_ON_SPEED_AT_IPO_START = 2
is used to stop traveling path axes before the start of machining at the last G0.
Machining continues:
● With the next traversing command.
● If the spindle speed is reached.
● When MD35510 $MA_SPIND_STOPPED_AT_IPO_START = 1
(path feed enable, if spindle stationary).
CAUTION
Coordination error
The part program author must ensure that one of the following maintenance conditions
occurs for WAITS.
• Position reached
• Spindle stationary
• Spindle up to programmed speed
In cases where one spindle is used in several channels, the part program author must
ensure that WAITS starts at the earliest in the phase in which the spindle from another
channel has already started to accelerate or decelerate towards the required new speed or
direction of rotation.
Basic Functions
1236 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
S1: Spindles
15.2 Modes
Special cases
● Tolerance for spindle speed:
If the machine data setting is:
MD35150 $MA_SPIND_DES_VELO_TOL = 0
the NC/PLC interface signal:
DB31, ... DBX83.5 (spindle in setpoint range)
is always set to 1.
WAITS is terminated as soon as the spindle has reached the setpoint-side target after a
change in speed or direction (M3/M4).
● Missing enable signals:
If the WAITS function waits for the "Spindle in setpoint range" signal in speed control
mode and the spindle stops or fails to rotate because an enable signal (axial feed enable,
controller, pulse enable, etc.) is missing, the block is not terminated until the "Spindle in
setpoint range" signal is active, once enable signals are being received again.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1237
S1: Spindles
15.2 Modes
Note
In particular when using spindles across different channels, care should be taken when
programming not to start WAITS too early in one channel, i.e. at a time when the spindle
in the other channel is still rotating at its "old" speed.
In such cases, the "Spindle in setpoint range" signal is activated and WAITS is stopped
too soon.
To prevent this happening, it is strongly recommended to set a WAITM before WAITS.
Feedrate
The positioning speed is configured in the machine data:
MD35300 $MA_SPIND_POSCTRL_VELO (position control switching speed)
The configured positioning speed can be modified by programming or by synchronized
actions:
FA[S<n>]=<value>
Acceleration
The accelerations are configured in the machine data:
MD35210 $MA_GEAR_STEP_POSCTRL_ACCEL (acceleration in position control mode)
MD35200 $MA_GEAR_STEP_SPEEDCTRL_ACCEL (acceleration in the speed control
mode)
The configured dynamic response during positioning can be modified by programming or by
synchronized actions:
ACC[S<n>]=<value>
Basic Functions
1238 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
S1: Spindles
15.2 Modes
Special features
The spindle override switch is active.
Initial situation
The spindle can be in speed control mode or in position control mode when positioning starts
(SPOS, M19 or SPOSA command in the program).
One must distinguish between the following cases:
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1239
S1: Spindles
15.2 Modes
Procedure
6SLQGOHVSHHG
UHYPLQ
3KDVHDVSHFLDOFDVH
FRQWUROUHVHUYH
0'(1&B)5(4B/,0,7
(QFRGHUOLPLWIUHTXHQF\
3KDVHE
3KDVH
0'(1&B)5(4B/,0,7B/2:
(QFRGHUOLPLWIUHTXHQF\
5HV\QFKURQL]DWLRQ
3KDVH
0'63,1'B326&75/B9(/2
3KDVHF 3RVLWLRQFRQWURODFWLYDWLRQVSHHG
3KDVHD
3KDVH
Note
The speed arising from the configuration of the encoder limit frequency for the
resynchronization of the encoder (MD36302 $MA_ENC_FREQ_LOW) must be greater than
the position-control activation speed (MD35300 $MA_SPIND_POSCTRL_VELO).
Phase 1
Positioning from phase 1a:
The spindle is rotating at a higher speed than the encoder limit frequency. The spindle is not
synchronized.
Positioning from phase 1b:
The spindle is rotating at a lower speed than the encoder limit frequency. The spindle is
synchronized.
Note
If the position control is active, the speed can only amount to 90% of the maximum speed of
the spindle or the encoder limit frequency (10% control reserve required).
Basic Functions
1240 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
S1: Spindles
15.2 Modes
Phase 2
Spindle speed > Position-control activation speed
When the SPOS, M19 or SPOSA command is activated, the spindle begins to slow down to the
position-control activation speed with the configured acceleration:
MD35200 $MA_GEAR_STEP_SPEEDCTL_ACCEL
The spindle is synchronized once the encoder limit frequency threshold is crossed.
Spindle speed < Position-control activation speed
SPOS, M19 or SPOSA are programmed to switch the spindle to position control mode (if it is not
already in that mode).
The configured acceleration in position control mode is activated:
MD35210 $MA_GEAR_STEP_POSCTRL_ACCEL
The travel path to the target point is calculated.
The spindle travels to the programmed end point optimally in terms of time. This means that
the end point is approached at the highest possible speed (maximum MD35300
$MA_SPIND_POSCTRL_VELO). Depending on the appropriate secondary conditions,
phases 2 - 3 - 4 - 5 or 4a - 5a are executed.
Phase 3
Spindle speed > Position-control activation speed
When the configured position-control activation speed
(MD35300 $MA_SPIND_POSCTRL_VELO) is reached:
● Position control is activated (if not already active).
● The distancetogo (to the target point) is calculated.
● There is a switch to the configured configured acceleration in position control mode (or
this acceleration is retained):
MD35210 $MA_GEAR_STEP_POSCTRL_ACCEL
Spindle speed < Position-control activation speed
The spindle was accelerated up to the configured position-control activation speed
(MD35300 $MA_SPIND_POSCTRL_VELO) to reach the end point. This is not exceeded.
The braking start point calculation detects when the programmed spindle position can be
approached accurately at the acceleration configured in position control mode (MD35210
$MA_GEAR_STEP_POSCTRL_ACCEL).
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1241
S1: Spindles
15.2 Modes
Phase 4
Spindle speed > Position-control activation speed
The spindle brakes from the calculated "braking point" with machine data:
MD35210 $MA_GEAR_STEP_POSCTRL_ACCEL
to the target position.
Spindle speed < Position-control activation speed
At the time identified by the braking start point calculation in phase 3, the spindle brakes to a
standstill with the acceleration configured in position control mode (MD35210
$MA_GEAR_STEP_POSCTRL_ACCEL).
Phase 4a:
When the SPOS command is activated the proximity of the end point is such that the spindle
can no longer be accelerated to the configured position-control activation speed (MD35300
$MA_SPIND_POSCTRL_VELO).
The spindle brakes to a standstill with the acceleration configured in position control mode
(MD35210 $MA_GEAR_STEP_POSCTRL_ACCEL).
Phase 5
Spindle speed > Position-control activation speed
Position control remains active and holds the spindle in the programmed position.
Note
The maximum encoder limit frequency of the spindle position actual-value encoder is
monitored by the control (it may be exceeded); in position control mode, the setpoint speed
is reduced to 90% of the measuring system limit speed.
The following NC/PLC interface signal is set:
DB31, ... DBX83.1 (programmed speed too high)
If "MS limit frequency exceeded" is still pending following a reduction in the setpoint speed,
an alarm is output.
Basic Functions
1242 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
S1: Spindles
15.2 Modes
The exact stop limits are defined with the machine data:
MD36010 $MA_STOP_LIMIT_FINE (exact stop fine)
MD36000 $MA_STOP_LIMIT_COARSE (exact stop coarse)
Note
The positioning procedure is considered complete when the end-of-positioning criterion is
reached and signaled.
The condition is "Exact stop fine". This applies to SPOS, M19 or SPOSA from the part program,
synchronized actions and spindle positioning by the PLC using FC 18.
Procedure
A distinction is made between two cases with regard to positioning from standstill:
● Case 1: The spindle is not synchronized.
This is the case if the spindle is to be positioned after switching on the control and drive
or after a gear step change (e.g. for a tool change).
MD31040 $MA_ENC_IS_DIRECT = 0
● Case 2: The spindle is synchronized.
This is the case if, after switching on the control and drive, the spindle is to be rotated
through a minimum of one revolution with M3 or M4 and then stopped with M5
(synchronization with the zero mark) before the first positioning action.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1243
S1: Spindles
15.2 Modes
&DVH6SLQGOHQRWV\QFKURQL]HG
6SLQGOHVSHHG
UHYPLQ
6326>@
0'63,1'B326&75/B9(/2
3RVLWLRQFRQWURODFWLYDWLRQVSHHG
7LPHV
=HURPDUN
&DVH6SLQGOHV\QFKURQL]HG
UHYPLQ
6SLQGOHVSHHG
D 0'63,1'B326&75/B9(/2
3RVLWLRQFRQWURODFWLYDWLRQVSHHG
D 7LPHV
6326>@
Phase 1
Case 1: Spindle not synchronized
With the programming of SPOS, M19 or SPOSA the spindle accelerates with the acceleration
from the machine data:
MD35200 $MA_GEAR_STEP_SPEEDCTRL_ACCEL (Acceleration in the speed control
mode)
This direction of rotation is defined by the machine data:
MD35350 $MA_SPIND_POSITIONING_DIR (Direction of rotation while positioning to
standstill)
Exception:
If ACN, ACP, IC is used for positioning, the programmed direction of travel is activated.
Basic Functions
1244 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
S1: Spindles
15.2 Modes
The spindle is synchronized at the next zero mark of the spindle position actual-value
encoder and switches to the position control mode.
Whether the zero mark is found in the traversed path (except for IC), is monitored:
MD34060 $MA_REFP_MAX_MARKER_DIST (maximum distance to the reference mark)
If the speed defined in machine data:
MD35300 $MA_SPIND_POSCTRL_VELO (Positioning speed)
is reached before the spindle is synchronized, the spindle will continue to rotate at the
positioning activation speed (it is not accelerated further).
Case 2: Spindle synchronized
SPOS, M19 or SPOSA will switch the spindle to position control mode.
The acceleration from the following machine data is active:
MD35210 $MA_GEAR_STEP_POSCTRL_ACCEL (acceleration in position control mode)
The direction of rotation is defined by the programmed motion (ACP, ACN, IC, DC) or via the
pending distance-to-go.
The speed entered in
MD35300 $MA_SPIND_POSCTRL_VELO (position control activation speed)
is not exceeded in the machine data.
The travel path to the end position is calculated.
The spindle travels to the programmed end point optimally in terms of time. This means that
the end point is approached at the highest possible speed (maximum MD35300
$MA_SPIND_POSCTRL_VELO). Depending on the appropriate secondary conditions, the
phases 1 - 2 - 3 - 4 or 1- 3a - 4a are executed.
Phase 2
Case 1: Spindle not synchronized
When the spindle is synchronized, position control is activated.
The spindle rotates at the maximum speed stored in machine data:
MD35300 $MA_SPIND_POSCTRL_VELO
until the braking start point calculation identifies the point at which the programmed spindle
position can be approached accurately with the defined acceleration.
Case 2: Spindle synchronized
To reach the end point, the spindle is accelerated up to the speed defined in machine data:
MD35300 $MA_SPIND_POSCTRL_VELO.
At the point, which is determined by the braking start point calculation in Phase 1, the spindle
decelerates to a standstill with the acceleration given in the following machine data:
MD35210 $MA_GEAR_STEP_POSCTRL_ACCEL
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1245
S1: Spindles
15.2 Modes
Phase 3
At the point, which is determined by the braking start point calculation in Phase 2, the spindle
decelerates to a standstill with the acceleration given in the following machine data:
MD35210 $MA_GEAR_STEP_POSCTRL_ACCEL
Phase 3a:
When the SPOS command is activated the proximity of the end point is such that the spindle
can no longer be accelerated up to machine data:
MD35300 $MA_SPIND_POSCTRL_VELO.
The spindle is braked to a standstill with the acceleration given in the following machine
data:
MD35210 $MA_GEAR_STEP_POSCTRL_ACCEL
Phase 4, 4a
The spindle is stationary and it has reached the position. The position control is active and
stops the spindle in the programmed position.
NC/PLC IS:
DB31, ... DBX60.6 (Position reached with exact stop coarse)
and
DB31, ... DBX60.7 (Position reached with exact stop fine)
are set if the distance between the spindle actual position and the programmed position
(spindle setpoint position) is less than the settings for the exact stop fine and coarse limits.
This is defined in the machine data:
MD36010 $MA_STOP_LIMIT_FINE
MD36000 $MA_STOP_LIMIT_COARSE
Phase 3:
At the point, which is determined by the braking start point calculation in Phase 2, the spindle
decelerates to a standstill with the acceleration given in the following machine data:
MD35210 $MA_GEAR_STEP_ POSCTRL_ACCEL
Phase 4:
The spindle is stationary and it has reached the position. The position control is active and
stops the spindle in the programmed position.
NC/PLC IS:
DB31, ... DBX60.6 (Position reached with exact stop coarse)
and
DB31, ... DBX60.7 (Position reached with exact stop fine)
are set if the distance between the spindle actual position and the programmed position
(spindle setpoint position) is less than the settings for the exact stop fine and coarse limits.
This is defined in the machine data:
MD36010 $MA_STOP_LIMIT_FINE
MD36000 $MA_STOP_LIMIT_COARSE
Basic Functions
1246 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
S1: Spindles
15.2 Modes
Function
The motion sequence for a tool change, especially for milling machines, mainly comprises
positioning the spindle and then the subsequent (for optimization runs, also at the same
time) approach to the tool change position with the path axes. In this case, the mandatory
requirement is that the spindle is reached before approaching the tool change position.
If the tool change cycle is interrupted by the machine operator (e.g. with an NC stop, NC
stop axes plus spindles, mode group stop, etc.), then it must be completely ruled out that the
spindle moves into the tool changer at an incorrect position.
This is the reason that for spindle positioning, when the last programmed spindle position is
reached with "Exact stop fine" the following NC/PLC interface signal is output to check the
position:
DB31, ... DBX85.5 (spindle in position)
Note
The signal is only output for the "Spindle positioning" function.
This includes:
• SPOS, SPOSA and M19 in the part program
• SPOS and M19 in synchronized actions
• Spindle positioning, using FC18
• Spindle positioning via PLC interface (DB31, ... DBX30.4)
Note
When positioning the spindle, the zero mark is automatically searched for. This is the
reason that for an error-free sequence, the referenced signal is always available at the
end of positioning movement.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1247
S1: Spindles
15.2 Modes
Additional properties
● If the spindle is already at the programmed position after a positioning, then the NC/PLC
interface signal DB31, ... DBX85.5 (spindle in position) remains set.
● If, after a positioning ("Spindle in position" signal was output) the spindle is traversed, e.g.
in the JOG mode, then the NC/PLC interface signal DB31, ... DBX85.5 (spindle in
position) is deleted.
If the spindle is returned to its original position in this mode, then the NC/PLC interface
signal DB31, ... DBX85.5 (spindle in position) is set again. The last position selection is
kept.
Functionality
If for certain machining tasks, e.g. on lathes with end-face machining, it is not sufficient to
traverse the spindle exclusively under speed control via M3, M4, M5 or to position with SPOS, M19
or SPOSA, the spindle can be switched to position-controlled axis mode and traversed as a
rotary axis.
Examples of rotary axis functions:
● Programming with axis name
● Zero offsets (G54, G55, TRANS, etc.)
● G90, G91, IC, AC, DC, ACP, ACN
Basic Functions
1248 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
S1: Spindles
15.2 Modes
Preconditions
● The same spindle motor is used for spindle mode and axis mode.
● The same position measurement system or separate position measurement systems can
be used for spindle mode and axis mode.
● An actual position value encoder is a mandatory requirement for axis mode.
● The spindle must be referenced for use of the axis mode, e.g. referenced with G74.
Example:
Configurable M function
The M function used to switch the spindle to axis mode can be configured channel-
specifically via the following machine data:
MD20094 $MC_SPIND_RIGID_TAPPING_M_NR
Note
The controller detects the transition to axis mode automatically from the program sequence
(see "Implicit transition to axis mode (Page 1251)"). The explicit programming of the
configured M function for switching the spindle to axis mode in the part program is therefore
not necessary. However, the M function can continue to be programmed, e.g. to increase the
readability of the part program.
Special features
● The feed override switch is active.
● The NC/PLC interface signal does not terminate the axis mode per default:
DB21, ... DBX7.7 (reset).
● The NC/PLC interface signals:
DB31, ... DBB16 to DBB19 and DBB82 to DBB91
are not important if:
DB31, ... DBX60.0 (axis / no spindle) = 0
● Axis mode can be activated in all gear steps.
If the actual position value encoder is installed on the motor (indirect measuring system),
the positioning and contouring accuracy can vary for the different gear steps.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1249
S1: Spindles
15.2 Modes
● The gear step cannot be changed when the axis mode is active.
The spindle must be switched to control mode.
This is done with M41 ... M45 and M5, SPCOF.
● In axis mode, the first parameter set is active (machine data index = zero).
References
Function Manual, Basic Functions; Section "Velocities, setpoint / actual value systems,
closed-loop control (G2)" > "Closed-loop control" > "Parameter sets of the position
controller"
Dynamic response
The dynamic limits of the axis apply in axis mode. For example:
● MD32000 $MA_MAX_AX_VELO[<axis>] (maximum axis velocity)
● MD32300 $MA_MAX_AX_ACCEL[<axis>] (maximum axis acceleration)
● MD32431 $MA_MAX_AX_JERK[<axis>] (maximum axial jerk for path motion)
Feedforward control
The feedforward control mode active for the axis is retained.
A detailed description of the "Dynamic feedforward control" function can be found in:
References
Function Manual, Extended Functions; Section "Compensations (K3)" > "Dynamic
feedforward control (following error compensation)"
Programming Comment
SPOS=...
M5 ; Controller enable off (by PLC)
→ is output on PLC
M70 ; Switch actuator (by PLC on account of M70)
Controller enable on (by PLC)
C=... ; NC traverses with axis parameter set
Programming Comment
C=...
M71 ; → Output to PLC
Closed-loop controller enable off (by PLC)
Switch actuator (by PLC)
Switched to spindle parameter set (1-5) internally in
the NC, controller enable on (by PLC)
M3/4/5 or SPOS=... ; NC traverses with spindle parameter set
Basic Functions
1250 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
S1: Spindles
15.2 Modes
Function
The control system detects the transition to axis mode automatically from the program
sequence and generates the requisite M70 sequence within the control system. The situation
will dictate which steps are performed. At most, these will include:
1. Stopping the spindle
2. Switching on of the position control, treatment of feedforward control, and parameter
block changeover
3. Position synchronization of the block preparation (internal preprocessing stop, if
necessary)
This function is always active. Explicit programming of M70 in the part program is, therefore,
essentially not necessary.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1251
S1: Spindles
15.2 Modes
Procedure
Sequence of the implicit transition to axis mode (M70 is not programmed in the part
program):
● Transition from speed control mode (M3, M4, M5, SPCOF, ...) to axis mode:
The transition is detected internally by the control, and an intermediate block is inserted in
front of the block which requests the axis mode. The block created contains the M70
functionality. The execution duration for this block is more or less the same as the time
required to execute a programmed M70 block. Differences may arise in the event of short
switchovers when the spindle is stationary (no braking time) if the implicit generation and
output of the auxiliary function M70 to the PLC is dispensed with (see MD35035).
● Transition from positioning mode (M19, SPOS, SPOSA) to axis mode:
The transition is executed immediately and without the generation of an intermediate
block. Configured accordingly (see MD35035), the auxiliary function M70, which is
generated implicitly, is output to the PLC when the block in which the spindle has its axis
mode is loaded.
Note
An auxiliary function M70 which is programmed in the part program is always output to the
PLC.
Properties
The properties of the implicitly generated auxiliary function output M70 are "Quick" and
"Output during motion". These properties are fixed settings and are independent of the M70
configuration in the auxiliary-function-specific machine data (MD..._$M..._AUXFU_...).
M70 is only generated once during transition to axis mode. No further M70 auxiliary functions
are generated and output in adjacent blocks in which the spindle is operated as an axis. M70
is not implicitly generated and output again until axis mode is exited via, for example, SPOS,
M3, M4, M5, SPCOF, etc. and following a renewed transition to axis mode.
Basic Functions
1252 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
S1: Spindles
15.2 Modes
Constraints
Synchronized actions
When the spindle is programmed as an axis in synchronized actions, it is essential to
continue making provisions in the application to ensure there are criteria for the transition to
axis mode.
If the spindle is in speed control mode, the instruction M70 or SPOS must be programmed prior
to programming as an axis. Otherwise alarm signals occur during axis programming.
FC 18
As with synchronized actions, transition to axis mode must also be undertaken on the
application side in FC 18, e.g. through preparatory positioning instructions. Otherwise, the
FC 18 call is acknowledged with an error bit in the FC 18 status word.
No auxiliary function M70 is implicitly generated in the event of transition to axis mode
through programming via FC 18.
Examples
Example 1:
Part program: Transition from rotating spindle to axis mode
Configuration: MD35035 $MA_SPIND_FUNCTION_MASK, bit 20 = 1
Example 2:
Part program: Transition from positioning mode to axis mode
Configuration: MD35035 $MA_SPIND_FUNCTION_MASK, bit 20 = 1
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1253
S1: Spindles
15.2 Modes
Example 3:
Synchronized actions: Transition from spindle positioning mode to axis mode
Configuration: MD35035 $MA_SPIND_FUNCTION_MASK, bit 20 = 1
Example 4:
Synchronized actions: Transition from speed control mode to axis mode with M70
Configuration: MD35035 $MA_SPIND_FUNCTION_MASK, bit 20 = 1
Example 5:
Synchronized actions: Invalid transition from speed control mode to axis mode
Configuration: MD35035 $MA_SPIND_FUNCTION_MASK, bit 20 = 1
Basic Functions
1254 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
S1: Spindles
15.3 Reference / synchronize
Why synchronize?
In order to ensure that the controller detects the exact position of the spindle when it is
switched on, the controller must be synchronized with the position measuring system of the
spindle.
The following functions are possible only with a synchronized spindle:
● Thread cutting
● Tapping without compensating chuck
● Axis programming
For further explanations about synchronization of the spindle, see Section "R1: Referencing
(Page 1173)".
Why reference?
In order to ensure that the controller detects the exact machine zero when it is switched on,
the controller must be synchronized with the position measurement system of the rotary axis.
This process is known as referencing. The sequence of operations required to reference an
axis is known as search for reference.
Only a referenced axis can approach a programmed position accurately on the machine.
For further explanations about referencing the rotary axis, see Section "R1: Referencing
(Page 1173)".
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1255
S1: Spindles
15.3 Reference / synchronize
Synchronization procedure
When the spindle is switched on, it can be synchronized as follows:
● The spindle is started with a spindle speed (S value) and a spindle rotation (M3 or M4) and
synchronized with the next zero mark of the position measurement system or with the
next Bero signal.
● The spindle is to be positioned from standstill using SPOS, M19 or SPOSA. The spindle
synchronizes with the next zero mark of the position measurement system or with the
next Bero signal. It is then positioned to the programmed position.
● The spindle can be synchronized from the motion (after M3 or M4) using SPOS, M19 or SPOSA.
The responses are as follows:
– With SPOS=<Pos>, SPOS=DC(<Pos>) and SPOS=AC(<Pos>), the direction of motion is
retained and the position is approached.
– With SPOS = ACN(<Pos>) or SPOS = ACP(<Pos>), the position is always approached with
a negative or positive direction of motion. If necessary, the direction of motion is
inverted prior to positioning.
Basic Functions
1256 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
S1: Spindles
15.3 Reference / synchronize
● Crossing the zero mark in JOG mode by means of direction keys in speed control mode.
Note
It does not make any difference whether the synchronization procedure is initiated from
the part program, FC 18 or synchronized actions.
Note
During synchronization of the spindle, all four possible reference point values are
effective depending on the measuring system selected. The measurement system offset
has the same effect.
The following machine data must be observed:
• MD34080 $MA_REFP_MOVE_DIST
(Reference point distance / destination point for a distance-coded system)
• MD34090 $MA_REFP_MOVE_DIST_CORR
(Reference point offset / absolute offset, distance-coded)
• MD34100 $MA_REFP_SET_POS
(Reference point value, with distance-coded system without any significance)
If a non-referenced spindle with SPOS=IC(...) and a path < 360 degrees is positioned, it
may be the case that the zero mark is not crossed and the spindle position is still not
synchronized with the zero mark. This can happen:
• After POWER ON
• By setting the axial NC/PLC interface signals:
DB31, ... DBX17.5 (resynchronize spindle when positioning 2)
DB31, ... DBX17.4 (resynchronize spindle when positioning 1)
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1257
S1: Spindles
15.3 Reference / synchronize
Note
Signal propagation delays are preset on delivery so that the content generally does not have
to be changed.
Referencing sequence
If the spindle is to be programmed in axis mode directly after controller power-up, it must be
ensured that the axis is referenced.
When the controller is switched on, the spindle can be referenced (condition is one zero
mark per revolution).
For information about the referencing procedure, see Section "R1: Referencing
(Page 1173)".
The rotary axis is referenced at the same time as the spindle is synchronized (see section
"Synchronization procedure") if the position measuring system used for the spindle is also
used for the rotary axis.
Basic Functions
1258 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
S1: Spindles
15.3 Reference / synchronize
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1259
S1: Spindles
15.4 Configurable gear adaptation
Note
If machine data MD20700 $MC_REFP_NC_START_LOCK is set to a value of "2", then an
NC start is also possible with "restored" axis positions (in the MDA mode or when
overstoring).
Basic Functions
1260 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
S1: Spindles
15.4 Configurable gear adaptation
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1261
S1: Spindles
15.4 Configurable gear adaptation
Basic Functions
1262 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
S1: Spindles
15.4 Configurable gear adaptation
Note
If the spindle motor is attached to the spindle directly (1:1) or with a non-variable
transmission ratio (MD35010 = 0), then the M40 and M41 ... M45 auxiliary functions are
not relevant to this spindle.
0RWRUVSHHG
UHYPLQ
,QWKHFDVHRIDXWRPDWLFJHDUVWHSVHOHFWLRQ
WKLVVSHHGUDQJHLVQRWXWLOL]HGWRIXOODGYDQ
WDJHLQJHDUVWHS
0D[PRWRUVSHHG
*HDU
VWHS
*HDU
VWHS
6SLQGOHVSHHGUHYPLQ
Q PD[ Q PD[
J PD[
6SHFLILDEOHXVLQJ0'*($5B67(3B0$;B9(/2
Figure 15-3 Gear stage change with selection between two gear stages
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1263
S1: Spindles
15.4 Configurable gear adaptation
In principle, the new gear stage can also be engaged without oscillation
When the new gear stage is engaged, the following NC/PLC interface signals are set by
the PLC program:
DB31, ... DBX16.0-16.2 (actual gear stage A to C)
DB31, ... DBX16.3 (gear is changed)
2. End of gear stage change
The gear stage change is treated as completed (spindle operation type "oscillation mode"
is deselected), if the following NC/PLC interface signal is set:
DB31, ... DBX16.3 (gear is changed)
The new actual gear stage is changed to the servo and interpolation parameter set when
the motor is stationary.
With NC/PLC interface signal:
DB31, ... DBX16.3 (gear is changed)
is used to communicate to the NC that the new gear stage is valid and the oscillation
mode can be completed.
NC/PLC IS:
DB31, ... DBX82.3 (change gear)
is reset by the NCK,
which causes the PLC program to reset NC/PLC IS:
DB31, ... DBX16.3 (gear changed).
Basic Functions
1264 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
S1: Spindles
15.4 Configurable gear adaptation
Note
The number of gear stages in the second data set can vary from the first. If no appropriate
gear stage is found for a programmed speed for M40, then no gear stage change is carried
out (exceptions, see "M40: Automatic gear stage selection for speeds outside the configured
switching thresholds (Page 1321)").
For more information about a typical program sequence in thread cutting without
compensating chuck G331/G332 see:
References:
Programming Manual - Fundamentals; Motion Commands
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1265
S1: Spindles
15.4 Configurable gear adaptation
The gear stages 1 to 5 of the second gear stage data set can be parameterized via the
following machine data:
Note
The number of servo parameter sets concerning the mechanical factors remain unchanged.
Furthermore, five mechanical gear stages for the spindle and one for the axis operation can
be configured.
The speed limitations are configured only once for each gear stage with the following
machine data, independently of the different switching thresholds:
For tapping without compensating chuck (G331, G332) the speed can be limited to the linear
acceleration range of the motor additionally. For this, the maximum speed of the linear motor
characteristics range is specified in the following machine data as a function of the gear
stage:
MD35550 $MA_DRILL_VELO_LIMIT[n]
Basic Functions
1266 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
S1: Spindles
15.4 Configurable gear adaptation
6SHHG
UHYPLQ
0D[LPXPVSLQGOHVSHHG
0D[LPXPVSHHGRIJHDUVWHS
0D[LPXPVSHHGIRUWKHDXWRPDWLF
JHDUVWHSFKDQJHRIJHDUVWHS
0D[LPXPVSHHGRIJHDUVWHS
0D[LPXPVSHHGIRUWKHDXWRPDWLF
JHDUVWHSFKDQJHRIJHDUVWHS
0LQLPXPVSHHGIRUWKHDXWRPDWLF
JHDUVWHSFKDQJHRIJHDUVWHS
0LQLPXPVSHHGIRUWKHDXWRPDWLF 0LQLPXPVSHHGRIJHDUVWHS
JHDUVWHSFKDQJHRIJHDUVWHS
0LQLPXPVSHHGRIJHDUVWHS
7UDQVPLVVLRQ
VWDJH
7UDQVPLVVLRQ
VWDJH
Figure 15-4 Example for two gear stages with overlapping speed ranges for automatic gear stage
change (M40)
Note
In the case of M40, the spindle must be in open-loop control mode for automatic gear stage
selection with an S word. Otherwise the gear stage change is rejected and the following
alarm is set:
Alarm 22000 "gear stage change is not possible"
Note
An active reduction gear is not considered in the selection for the automatic gear stage
change.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1267
S1: Spindles
15.4 Configurable gear adaptation
Basic Functions
1268 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
S1: Spindles
15.4 Configurable gear adaptation
Note
For further details, please refer to the section "Specification of a gear stage in part
program".
Exception:
The block change is not affected by the specification of a gear stage in synchronized
actions.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1269
S1: Spindles
15.4 Configurable gear adaptation
Note
Options for aborting:
DB31, ... DBX2.2 (delete distance-to-go / spindle reset)
or
DB31, ... DBX16.3 (gear changed)
with corresponding acknowledgement from actual gear stage:
DB31, ... DBX16.0-16.2 (actual gear stage).
Special features
The following points must be observed on gear stage change:
● The gear stage change is not terminated by selecting
NC/PLC IS:
DB31, ... DBX20.1 (run-up switchover to V/f mode).
Setpoint 0 is output.
The gear stage change is acknowledged as usual
via the NC/PLC interface signal:
DB31, ... DBX16.3 (gear is changed)
Basic Functions
1270 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
S1: Spindles
15.4 Configurable gear adaptation
● The "Ramp-function generator rapid stop" signal must be reset by the PLC before the
gear stage change is completed by the PLC.
● The process sequence of the gear stage change is ended during NC reset without any
alarm output.
The gear stage output with NC/PLC IS:
DB31, ... DBX16.0-16.2 (actual gear stage A to C)
is applied by the NC.
Technical background
For machine's where the spindle load gear can be changed over, situations can occur where
the gear train between the motor and load (workpiece/tool) is interrupted. This state can
occur, e.g. when pressing Reset or Emergency Stop while performing a gear stage change
or when the machine is commissioned for the first time while it is being installed. The control
must identify this state where the gear train is open and the next gear stage change request
must be unconditionally executed.
Function
When the gear is disengaged, the binary-coded value "0" (≙ gear stage 0) is transferred to
the NC from the PLC using the interface signal bits DB31, ... DBX16.0-2 (actual gear stage A
to C):
DB31, ... DBX16.0-2 = 0
The value is used by the control to identify the state where the gear train is open.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1271
S1: Spindles
15.4 Configurable gear adaptation
Boundary conditions
● Output of DB31, ... DBX16.0-2 = 0
When the gear is disengaged, the PLC must enter gear stage 0 in the NC/PLC interface
DB31, ... DBX16.0-2 (actual gear stage A to C).
● Enabling the gear stage change
The precondition for a gear stage change after reaching gear stage 0 is the general
enable of the gear stage change via via machine data:
MD35010 $MA_GEAR_STEP_CHANGE_ENABLE (assign parameters to the gear stage
change)
MD35090 $MA_NUM_GEAR_STEPS (number of gear stages set up)
MD35092 $MA_NUM_GEAR_STEPS2 (2nd gear stage data set: Number of gear stages
that have been created) if MD35010 $MA_GEAR_STEP_CHANGE_ENABLE, bit 5 = 1
(tapping without compensating chuck)
● PLC user program/ POWER ON ASUB
The PLC user program or POWER ON ASUB should ensure that when the gear is
disengaged (gear stage 0) before spindle motion, a gear stage change request is
programmed. For instance, this can be realized with M41 in the ASUB. Spindle motion
such as e.g. in JOG or in axis operation does not generate any gear stage change itself.
Example
Example for the sequence to select the first gear stage after POWER ON
1. POWER ON.
2. The PLC user program determines, in the mechanical environment, the "Gear is
disengaged" state.
3. The PLC transfers the "Gear is disengaged" state to the NC by setting:
DB31, ... DBX16.0-2 = 0
4. Part program start or POWER ON ASUB.
Basic Functions
1272 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
S1: Spindles
15.4 Configurable gear adaptation
Part program:
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1273
S1: Spindles
15.4 Configurable gear adaptation
Note
For a search, the actual gear stage ($VC_SGEAR[<n>]) can differ from the setpoint gear
stage ($AC_SGEAR[<n>]) as, during the search, no gear stage change takes place.
Therefore, using $VC_SGEAR[<n>] and $AC_SGEAR[<n>], it can be interrogated whether a
gear stage change should be made after a search.
Basic Functions
1274 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
S1: Spindles
15.4 Configurable gear adaptation
Value Meaning
0 In-system parameter set selection
The parameter sets of the servo are assigned permanently.
The following applies:
• For axes and spindles in the axis mode, the first parameter set is active in principle.
Exception:
For G33, G34, G35, G331 and G332, for the axes involved, the parameter set with the
following number is activated:
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1275
S1: Spindles
15.4 Configurable gear adaptation
Spindle mode
MD35590 $MA_PARAMSET_CHANGE_ENABLE = 0 or 1
The parameter set is selected according to the gear stage + 1.
The active gear stage is located in:
DB31, ... DBX16.0-16.2 (actual gear stage A to C)
The active parameter set is output in:
DB31, ... DBX69.0-69.2 (controller parameter set A to C)
One set of parameters, with the following assignment, is provided by the NC for each of the
five gear stages:
Data set for ... NC/PLC interface Parameter set Parameter set
DBX 69.2 / 69.1 / 69.0 Number Index [n]
Axis mode Last active gear stage 1 0
Gear stage 1 001 2 1
Gear stage 2 010 3 2
Gear stage 3 011 4 3
Gear stage 4 100 5 4
Gear stage 5 101 6 5
110
111
Basic Functions
1276 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
S1: Spindles
15.4 Configurable gear adaptation
Note
If an indirect encoder is configured, and the load gearbox transmission ratio changes, then
the reference is lost and the NC/PLC interface signal:
DB31, ... DBX60.4/60.5 (referenced / synchronized 1 or 2)
is reset for the relevant measuring system.
References
For further information about control and servo parameter set, please refer to:
● Functions Manual - Basic Functions; Velocities, Setpoint-Actual Value Systems, Closed-
Loop Control (G2)
● Programming Manual, Job Planning; Section: Programmable servo parameter set
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1277
S1: Spindles
15.4 Configurable gear adaptation
Tool change
If the intermediate gear is changed at the same time as the tool, the user must also
reconfigure the transmission ratio of the numerator and denominator via the machine data of
the intermediate gear.
Example:
CAUTION
Engineering error
It remains the task of the user to stop within the appropriate period in order to make
changes to the machine data when required and then activate a "NewConfig".
In the case of an installed tool with a transmission ratio of 2:1, a suitable intermediate gear is
configured and is activated immediately in the part program with the command NEWCONF.
Program code
N05 $MA_DRIVE_AX_RATIO2-NUMERA[AX5] = 2
M10 $MA_DRIVE_AX_RATIO2-DENOM[AX5] = 1
N15 NEWCONF
Changeover
Changeover to a new transmission ratio is performed immediately by means of NewConfig.
From a technological viewpoint, the associated mechanical changeover process takes some
time, since, in mechanical terms, a different intermediate gear with rotating tool is being
installed.
Note
At zero speed, changeover is jerk-free. The user is therefore responsible for taking
appropriate precautions.
Applications in which changeover takes place during motion and which require smoothed or
soft speed transition can be handled using existing setpoint speed filters.
For further explanations regarding control engineering dependencies, see Section "G2:
Velocities, setpoint / actual value systems, closed-loop control (Page 307)".
Basic Functions
1278 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
S1: Spindles
15.4 Configurable gear adaptation
Mode change
A gear stage change that has not been acknowledged cannot be interrupted by a change in
operating mode (e.g. switchover to JOG).
The switchover is delayed by the maximum period entered in machine data:
MD10192 $MN_GEAR_CHANGE_WAIT_TIME
.
If the gear stage change is not acknowledged within this time, the NC will output an alarm:
Further events
Events that initiate reorganization will also wait until a gear stage change is completed.
The time entered in machine data:
MD10192 $MN_GEAR_CHANGE_WAIT_TIME
determines how long the control waits before executing the gear stage change.
If this time elapses without the gear stage change being completed, the NC responds with an
alarm.
The following events have an analog response:
● User ASUB
● Mode change
● Delete distance-to-go
● Axis interchange
● Activate PI user data
● Enable PI service machine data
● Switch over skip block, switch over Dry Run
● Editing in the modes
● Compensation block alarms
● Overstore
● Rapid retraction with G33, G34, G35
● Subprogram level abort, subprogram abort
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1279
S1: Spindles
15.4 Configurable gear adaptation
What is oscillation?
Oscillation in this context means that the spindle motor rotates alternately in the clockwise
and counter-clockwise directions. This oscillation movement makes it easy to engage a new
gear stage.
Oscillation mode
NC/PLC IS:
DB31, ... DBX82.3 (change gear)
displays that a gear stage change is required.
In principle, the new gear stage can also be engaged without oscillation
1. MD35010 $MA_GEAR_STEP_CHANGE_ENABLE must be set to 1.
2. NC/PLC interface signal DB31, ... DBX84.6 (oscillation mode) is set.
3. The acceleration is set in the machine data:
MD35410 $MA_SPIND_OSCILL_ACCEL
Basic Functions
1280 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
S1: Spindles
15.4 Configurable gear adaptation
Oscillation time
The oscillation time for oscillation mode can be defined in a machine date for each direction
of rotation:
The time - and not the fact that the oscillation speed is reached - is always decisive.
Phase 2:
If time t1 (t2) has elapsed, the spindle motor
accelerates in the opposite direction to the speed defined in machine data:
MD35400 $MA_SPIND_OSCILL_DES_VELO
.
Time t2 (t1) starts.
Phase 3:
If time t2 (t1) has passed, the spindle motor accelerates in the opposite direction (same
direction as in Phase 1) to the speed defined in machine data:
MD35400 $MA_SPIND_OSCILL_DES_VELO
.
Time t1 (t2) starts. The process continues with Phase 2.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1281
S1: Spindles
15.4 Configurable gear adaptation
Special features
Setting/Resetting the NC/PLC IS and machine data in oscillation mode:
● To decelerate the spindle, the PLC user need not set NC/PLC IS:
DB31, ... DBX4.3 (spindle stop)
.
The spindle is brought to a standstill internally by the control when a gear stage change is
requested.
● The gear stage change should always be terminated with NC/PLC IS:
DB31, ... DBX16.3 (gear changed)
.
● NC/PLC IS:
DB31, ... DBX18.5 (oscillation speed)
should be used to support mechanical engagement of the gear.
It has no effect on the internal control mechanism for the gear stage change procedure
and should therefore only be set as necessary.
● If NC/PLC IS:
DB31, ... DBX18.5 (oscillation speed)
is reset, oscillation mode stops.
However, the spindle remains in "oscillation mode".
Basic Functions
1282 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
S1: Spindles
15.4 Configurable gear adaptation
Functionality
Machine tools of conventional design require a gear stage of the spindle in oscillation mode.
If the machine data configuration is:
MD35010 $MA_GEAR_STEP_CHANGE_ENABLE = 1
the following sequence is implemented:
● Deceleration of the spindle.
The braking action corresponds to an M5 movement.
● Output of VDI interface signals:
DB31, ... DBX84.6 (oscillation mode)
DB31, ... DBX82.3 (change gear)
DB31, ... DBX82.0-82.2 (set gear stage A to C).
If position control has been enabled, it is disabled:
DB31, ... DBX61.5 = 0.
● The load gearbox can now "disengage".
● NC/PLC IS:
DB31, ... DBX18.5 (oscillation enable)
can be set by the PLC.
The spindle motor then performs an oscillation motion with preset values.
The oscillation motion is designed to facilitate and accelerate the re-engaging of the gear
wheels.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1283
S1: Spindles
15.4 Configurable gear adaptation
Block change
If the spindle is switched to oscillation mode
with NC/PLC IS:
DB31, ... DBX82.3 (change gear),
the processing of the part program remains suspended.
A new block is not executed.
If oscillation mode is terminated with NC/PLC IS:
DB31, ... DBX16.3 (gear changed),
the processing of the part program is resumed.
A new block is executed.
6SLQGOHVSHHG
UHYPLQ
7LPHV
,6*HDUFKDQJHG
%ORFNFKDQJHRFFXUVKHUH
Basic Functions
1284 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
S1: Spindles
15.4 Configurable gear adaptation
Oscillation mode
Typical time sequence for the gear stage change with a spindle:
'%'%;FRQWUROPRGH
'%'%;RVFLOODWLRQPRGH
'%'%;JHDULVFKDQJHG
'%'%;FKDQJHJHDUVWDJH
'%'%;VHWJHDUVWDJH$&
'%'%;VSLQGOHLQVHWSRLQWUDQJH
'%'%;VSLQGOHVWDWLRQDU\
'%'%;DFWXDOJHDUVWDJH$&
'%'%;RVFLOODWLRQVSHHG
)LUVWJHDUVWDJHHQJDJHGPHFKDQLFDO
6HFRQGJHDUVWDJHHQJDJHGPHFKDQLFDO
,QWHUQDOIHHGGLVDEOH
7 7
6SLQGOHVSHHG
W W W W
t1 : With the programming of S1300, NCK detects a new gear stage (second gear stage), sets NST
DB31, ... DBX82.3 (change gear) and blocks processing for the next part program block (=
internal feed disable*).
t2 : The spindle is stationary, and oscillation starts (oscillation via the NCK). NST DB31, ... DBX18.5
(oscillation speed) must be set at the latest by t2.
t3 : The new gear stage is engaged. The PLC user transfers the new (actual) gear stage to the
NCK and sets NST DB31, ... DBX16.3 (gear is changed).
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1285
S1: Spindles
15.4 Configurable gear adaptation
t4 : NCK then retracts NST DB31, ... DBX82.3 (change gear), ends the oscillation, releases the next
part program block for processing, and accelerates the spindle to the new S value (S1300).
*: The internal feed disable is set if:
• The spindle gear stage change has been programmed via the part program and
• A processing block is activated (i.e. G0 is not active)
The internal feed disable is not set during a gear stage change from synchronized actions or in
the case of specifications via the PLC with FC 18.
Basic Functions
1286 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
S1: Spindles
15.4 Configurable gear adaptation
● After reaching the gear stage change position configured in machine data:
MD35012$MA_GEAR_STEP_CHANGE_POSITION
the machine waits for the time in machine data:
MD35310 $MA_SPIND_POSIT_DELAY_TIME
before switching to oscillation mode,
and the known gear stage change dialog starts.
● Output of NC/PLC interface signals:
DB31, ... DBX84.6 (oscillation mode)
DB31, ... DBX82.3 (change gear)
DB31, ... DBX82.0-82.2 (set gear stage A to C).
● Position control is not disabled when an active measuring system with indirect encoder
(motor encoder) is used:
MD31040 $MA_ENC_IS_DIRECT = 0
If a measuring system with a direct encoder (load encoder) is active, position control is
deactivated:
DB31, ... DBX61.5 = 0,
because the induction flux to the load is interrupted and closed-loop position control is no
longer possible.
● If position-controlled operation is not possible, it can be disabled by
resetting "Controller enable":
DB31, ... DBX2.1 = 0
.
● Mechanical switchover of the gear stage on the machine.
No oscillation movement is required from the drive.
NC/PLC IS:
DB31, ... DBX18.5 (oscillation enable)
and
DB31, ... DBX18.4 (oscillation via PLC)
should not be set.
In principle, oscillation movement is still possible at this point.
● Writing of NC/PLC IS:
DB31, ... DBX16.0-16.2 (actual gear stage A to C)
by the PLC.
● After signal:
DB31, ... DBX16.3 (gear stage changed),
the last movement to be active is continued, if available.
For indirect encoders (motor encoders), the referencing status is cleared:
DB31, ... DBX60.4/5 = 0.
The spindle is in speed control mode and NC/PLC IS:
DB31, ... DBX84.7 (open-loop control mode)
is output.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1287
S1: Spindles
15.4 Configurable gear adaptation
'%'%;SRVLWLRQLQJPRGH
'%'%;FRQWUROPRGH
'%'%;RVFLOODWLRQPRGH
'%'%;JHDULVFKDQJHG
'%'%;FKDQJHJHDUV
'%'%;VHWJHDUVWDJH$&
'%'%;VSLQGOHLQVHWUDQJH
'%'%;VSLQGOHVWDWLRQDU\
'%'%;DFWXDOJHDUVWDJH$&
'%'%;RVFLOODWLRQVSHHG
)LUVWJHDUVWDJHHQJDJHGPHFKDQLFDO
6HFRQGJHDUVWDJHHQJDJHGPHFKDQLFDO
,QWHUQDOIHHGGLVDEOH
6SLQGOHVSHHG
'%'%;H[DFWVWRSILQH
W W W W W
t1 : With the programming of S1300, NCK detects a new gear stage (second gear stage), NCK sets
NST DB31, ... DBX84.5 (positioning mode) and blocks processing for the next part program
block (= internal feed disable*).
t2 : The spindle is stationary, and exact stop is signaled.
t3 : Gear stage change - wait time
Basic Functions
1288 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
S1: Spindles
15.4 Configurable gear adaptation
t4 : The new gear stage is engaged. The PLC user transfers the new (actual) gear stage to the
NCK and sets NST DB31, ... DBX16.3 (gear is changed).
t5 : NCK then retracts NST DB31, ... DBX82.3 (change gear), releases the next part program block
for processing, and accelerates the spindle to the new S value (S1300).
*: The internal feed disable is set if:
• The spindle gear stage change has been programmed via the part program and
• A processing block is activated (i.e. G0 is not active)
The internal feed disable is not set during a gear stage change from synchronized actions or in
the case of specifications via the PLC with FC 18.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1289
S1: Spindles
15.4 Configurable gear adaptation
Speed
The positioning speed is taken from the machine data which is configured depending on the
gear stage:
MD35300 $MA_SPIND_POSCTRL_VELO
NC/PLC IS "Spindle speed override"/"Feedrate override" at
DB31, ... DBX17.0=0: DB31, ... DBB19)
as well as:
DB31, ... DBX17.0=1: DB31, ... DBB0
are effective as normal for positioning.
The positioning speed can be changed proportionally through the program statement
OVRA[Sn].
Note
OVRA[Sn] is valid modally. After the gear stage change, a value appropriate for the machining
should be reset.
The part program statement FA[Sn] does not change the positioning speed during gear stage
change.
Acceleration
The acceleration values are determined by the machine data which is configured depending
on the gear stage:
MD35200 $MA_GEAR_STEP_SPEEDCTRL_ACCEL
and
MD35210 $MA_GEAR_STEP_POSCTRL_ACCEL
The acceleration can be changed proportionally by programming ACC[Sn].
Note
ACC[Sn] is valid modally. After the gear stage change, a value appropriate for the machining
should be reset.
Speed-dependent acceleration
The "knee-shaped acceleration characteristic" is effective as in positioning with SPOS or
FC18.
Jerk
It is currently not possible to limit the change in acceleration.
Basic Functions
1290 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
S1: Spindles
15.4 Configurable gear adaptation
End of positioning
The transition between the end of the positioning action (DB31, ... DBX84.5)
and the start of oscillation mode (DB31, ... DBX84.6) is defined on
reaching "Exact stop fine" (DB31, ... DB60.7) and the time value entered in machine data:
MD3510 $MA_SPIND_POSIT_DELAY_TIME
.
The determination of the transition condition has an effect firstly on the gear stage change
time and secondly on the accuracy of the approach to the preset gear stage change position.
Block change
The block change is stopped and the machining blocks are not started until the gear stage
has been changed by the PLC (DB31, ... DBX16.3).
All gear-specific limit values (min./max. speed of gear stage, etc.) correspond to the check-
back values of the actual gear stage.
Supplementary conditions
● The spindle must have at least one measuring system.
● Position-controlled operation must be possible and must have been activated.
● Generally, it must be possible to execute SPOS from the part program, from a
synchronized action or via FC18: “Start spindle positioning” without errors.
Unless all requirements can be met, the function described cannot be used successfully.
Activation
The function of gear stage change at fixed position
is activated by the configuration:
MD35010 $MA_GEAR_STEP_CHANGE_ENABLE = 2
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1291
S1: Spindles
15.4 Configurable gear adaptation
Technical background
In some machines the spindle needs to be in a particular gear stage during axis mode.
Possible reasons:
● Only one optimization (Kv, feedforward control, filter) to suit a gear stage can be found in
the servo parameter set for axis mode (index 0). The machine data for this parameter set
should not be rewritten.
● There is only one mechanical transmission ratio which, unlike the others, possesses little
or no backlash compensation. The spindle can only follow a path motion or
transformations (e.g. TRANSMIT) together with other axes in this gear step.
Function
If the function is activated, a predefined gear step is loaded automatically during transition to
axis mode.
The gear step change is integrated into the M70 process and occurs after spindle
deceleration and before the loading of the servo parameter set with index 0 (note
MD35590 $MA_PARAMSET_CHANGE_ENABLE!).
The typical dialog between NC and PLC which occurs during gear step changes is executed
in a similar way to programmed gear step changes (M41 ... M45) performed.
Preconditions
Gear step changes during transition to axis mode require general enabling of the gear step
change via the machine data:
MD35010 $MA_GEAR_STEP_CHANGE_ENABLE (assign parameters to the gear step
change).
MD35090 $MA_NUM_GEAR_STEPS (number of gear steps set up)
Activation/Deactivation
The function is activated/deactivated via the machine data:
MD35014 $MA_GEAR_STEP_USED_IN_AXISMODE (gear step for axis mode in M70)
Value Meaning
0 No implicit gear step change occurs in M70. The current gear step is retained (default
setting!).
1 ... 5 A gear stage change to gear stage 1 ... 5 occurs during the processing of M70.
Basic Functions
1292 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
S1: Spindles
15.4 Configurable gear adaptation
Boundary conditions
Gear step change at fixed position (MD35010 $MA_GEAR_STEP_CHANGE_ENABLE = 2)
The "gear step change at fixed position" function is supported. The sequence in M70 is then
extended by the time it takes to position the spindle. The position is approached at the
current gear step.
Transition to axis mode without programming M70
The control system detects the transition to axis mode automatically from the program
sequence (see "Implicit transition to axis mode (Page 1251)") and generates the requisite
M70 sequence, including the gear step change, within the control system.
Transition to axis mode with FC 18
Implicit gear step change is not supported in transition to axis mode with the FC 18 ("Start
axis"). This requires the right gear step to be engaged by the PLC application before
switching to axis mode. The gear step change is also possible with the FC 18 ("Start gear
step change").
Change from axis mode to spindle mode
When changing from axis mode to spindle mode, the gear step loaded with M70 remains
activated. The gear stage which is activated in spindle mode prior to M70 is not automatically
loaded again. The servo parameter set is changed from parameter set 1 (index 0) to
parameter sets 2 ... 6 (index 1 ... 5) to suit the gear step (with
MD35590 $MA_PARAMSET_CHANGE_ENABLE < 2).
Example
Gear step 4 should be loaded in the case of spindle transition to axis mode.
Configuration: MD35014 $MA_GEAR_STEP_USED_IN_AXISMODE[<spindle name>] = 4
Note
MD35014 can be changed in the NewConfig. Thus, the gear step being loaded can still be
changed in the part program before transition to axis mode, if necessary.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1293
S1: Spindles
15.4 Configurable gear adaptation
15.4.10 Suppression of the gear stage change for DryRun, program test and SERUPRO
Function
For test feed rate (DryRun), program test and SERUPRO, normally, a gear stage change is
not required. This is the reason that it can be suppressed for these functions. The
corresponding configuration is realized with bits 0 ... 2 in machine data:
MD35035 $MA_SPIND_FUNCTION_MASK
Sequence
If a gear stage change is suppressed, if necessary, the interpolator will limit the programmed
spindle speed to the permissible speed range of the active gear stage.
NC/PLC interface signals DB31, ... DBX83.2 (setpoint speed increased) and
DB31, ... DBX83.1 (setpoint speed limited) generated as a result of this limit are suppressed.
Monitoring by the PLC program is not necessary during DryRun and in dry run feedrate.
When the gear stage change is suppressed, no new gear stage setpoint (DB31,... DBX82.0-
82.2) is output to the PLC.
The gear stage change request DB31, ... DBX82.3 (change gear) is also suppressed.
This ensures that no gear stage change information has to be processed by the PLC
program.
Basic Functions
1294 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
S1: Spindles
15.4 Configurable gear adaptation
Boundary conditions
If the gear stage change is suppressed, the output spindle speed moves within the speed
range specified by the current gear stage.
The following restrictions apply to the subsequent activation of a gear stage change with
REPOS:
● The gear stage change is not activated subsequently if the spindle in the deselection or
target block is a command spindle (synchronized action) or PLC spindle (FC18).
● If the gear stage cannot be activated because the spindle is in position or axis mode or a
link is active, alarm 22011"Channel%1 block%3 spindle2% Change to programmed gear
stage not possible" is signaled.
Example
Gear stage change in DryRun
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1295
S1: Spindles
15.5 Additional adaptations to the spindle functionality that can be configured
Bit Meaning
0 ... 2 Gear stage change behavior for test feedrate (DryRun), program test and SERUPRO
See "Suppression of the gear stage change for DryRun, program test and SERUPRO
(Page 1294)".
4 The programmed speed S... including speed setpoints FC18 and synchronized actions can
be accepted in setting data SD43200 $SA_SPIND_S (speed for spindle start via PLC
interface).
See "Special spindle motion via the PLC interface (Page 1306)".
5 For bit 5 = 1, the content of setting data SD43200 $SA_SPIND_S acts as the speed setpoint
for JOG. You can use the JOG keys to operate the spindle at the speed defined in SD43200.
If the content is zero, other JOG speed setpoints are active(see SD41200
$SN_JOGSPIND_SET_VELO).
8 The programmed cutting velocity S... including setpoints via FC18 and synchronized
actions can be accepted in setting data SD43202 $SA_SPIND_CONSTCUT_S (cutting rate
for spindle start via the PLC interface).
See "Special spindle motion via the PLC interface (Page 1306)".
10 For the master spindle, the value of the 15th G group (feedrate type) can be accepted in
setting data SD43206 $SA_SPIND_SPEED_TYPE (spindle speed type for spindle start via
the PLC interface).
See "Special spindle motion via the PLC interface (Page 1306)".
Basic Functions
1296 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
S1: Spindles
15.6 Selectable spindles
Bit Meaning
12 Bit 12 = 0 Spindle override is not effective for the zero mark search with M19, SPOS or
SPOSA = 0.
Bit 12 = 1 Spindle override is effective for the zero mark search with M19, SPOS or
SPOSA = 0.
19 When programming SPOS and SPOSA, auxiliary function M19 can be implicitly generated and
output to the PLC.
See "Positioning mode (Page 1232)".
20 In the case of M70 functionality which is generated in the control, auxiliary function M70 can
be implicitly generated and output to the PLC.
See "Implicit transition to axis mode (Page 1251)".
22 Bit 22 = 0 The NC/PLC interface signal DB31, ... DBX17.6 (invert M3/M4) also affects the
function "interpolatory tapping (G331/G332)".
Note:
The following must be observed for this setting:
• For part programs with G331 and G332, it is necessary to set NC/PLC
interface signal DB31, ... DBX17.6 (invert M3/M4) before part program start
to a stable value.
• Existing application-based solutions, e.g. as are used in tapping cycles,
must, if required, be adapted. It is known, for example, in tapping cycles,
that the spindle direction of rotation can be inverted using MIRROR
depending on a cyclic-specific setting data.
Bit 22 = 1 The NC/PLC interface signal DB31, ... DBX17.6 (invert M3/M4) does not affect
the function "interpolatory tapping (G331/G332)".
Function
The "selectable spindles" function allows you to write part programs with reference to the
spindles used ("channel spindle, logical spindle") regardless of the actual assignment of
configured spindles ("physical spindles") to a channel.
The physical spindles loaded or unloaded by "axis replacement" no longer have to be
specified explicitly in the part program.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1297
S1: Spindles
15.6 Selectable spindles
The channel spindles can be switched over because an intermediate level is introduced
between the logical spindle numbers used in the part program and the physical spindles
existing in the channel.
Every logical spindle used in the part program is assigned a physical spindle in a table
comprising setting data:
SD42800 $SC_SPIND_ASSIGN_TAB[<n>] (spindle number converter) = ...
Index <n> corresponds to the programmed spindle number or the programmed address
extension. The contents of the particular SD is the physical spindle that is actually available.
The spindle number converter is effective in spindle programming by means of:
● The part program
● Synchronized actions
The spindle number converter has no effect with PLC commands, which use function block
FC18. The physical spindle must always be addressed there within the context of the axis.
Logical spindles can be changed over by changing SD42800. The changeover can be made
from the part program, from the PLC and/or HMI.
Note
The logical master spindle is contained in setting data SD42800
$SC_SPIND_ASSIGN_TAB[0]. It is only used for display purposes.
This setting data is defined in the part program by SETMS (logical spindle).
Unused spindles are assigned the value 0 in SD42800.
System variables, which are involved in the spindle changeover:
$P_S, $P_SDIR, $P_SMODE, $P_GWPS, $AC_SDIR, §AC_SMODE, $AC_MSNUM, $AA_S
References:
Programming Manual, Job Planning
The converted, physical spindle number is always output as the address extension in the
auxiliary function output.
Supplementary conditions
● Switchable channel spindles are not a substitute for the Axis replacement function.
● You can only switch spindles, which have been assigned to the channel by means of
configuration.
● If spindles, which are presently active in another channel, are designated for switchover,
either the "Auto-Get" function is triggered for the physical spindle or alarm 16105
"Assigned spindles do not exist" is output, depending on the configuration variant.
● If SD42800 $SC_SPIND_ASSIGN_TAB[<n>] is specified by the PLC or from HMI, then
the channel whose table is changed should be in Reset status or the spindle to be
changed should not be used in the running part program.
A synchronized response can be achieved by means of a STOPRE preprocessor stop.
Basic Functions
1298 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
S1: Spindles
15.6 Selectable spindles
● The multiple mapping of logical to physical spindles is not prevented in the NC. However,
with the display of logical spindle in the user interface, there are ambiguities
corresponding to the change table.
● Spindle conversion operates on spindles via FC 18.
Activation
SD42800 $SC_SPIND_ASSIGN_TAB[<n>] is enabled by setting the following machine data
setting:
MD20092 $MC_SPIND_ASSIGN_TAB_ENABLE=1
Example
Spindle configurations:
● Assignment, spindle number and machine axis:
MD20070 $MC_AXCONF_MACHAX_USED[0] = 4
MD20070 $MC_AXCONF_MACHAX_USED[1] = 5
MD20070 $MC_AXCONF_MACHAX_USED[2] = 6
MD20070 $MC_AXCONF_MACHAX_USED[3] = 7
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1299
S1: Spindles
15.6 Selectable spindles
MD20090 $MC_SPIND_DEF_MASTER_SPIND = 1
SD42800 $SC_SPIND_ASSIGN_TAB[2]=2
SD42800 $SC_SPIND_ASSIGN_TAB[3]=3
SD42800 $SC_SPIND_ASSIGN_TAB[4]=0 ; Logical spindle not assigned
...
M5 ; Master spindle = address extension=2, the unset spindle number
is output. M3=5
The physical spindle configured with number "3" stops.
...
GET(S4) ; Alarm 16105, as logical spindle "4" cannot be switched.
...
RELEASE(S1) ; Channel spindle "1" = physical. Spindle "5" is enabled.
...
M30
Basic Functions
1300 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
S1: Spindles
15.7 Programming
15.7 Programming
Programming statements
Statement Description
SETMS: Master spindle is the spindle specified in the following machine data:
MD20090 $MC_SPIND_DEF_MASTER_SPIND (position of deletion of the master
spindle in the channel)
SETMS(<n>): The spindle with the number <n> is the master spindle
(may differ from the initial setting:
MD20090 $MC_SPIND_DEF_MASTER_SPIND).
The master spindle must be defined for the following functions:
• G95: Revolutional feedrate
• Programming M3, M4, M5, S, SVC, SPOS, M19, SPOSA, M40, M41 to M45, and WAITS
without entering the spindle number
The current master spindle setting can be retained via RESET / part program end and
part program start. The setting is done via the machine data:
• MD20110 $MC_RESET_MODE_MASK
• MD20112 $MC_START_MODE_MASK
M3: Clockwise spindle rotation for the master spindle
M<n>=3: Clockwise spindle rotation for spindle number <n>
M4: Counter-clockwise spindle rotation for the master spindle
M<n>=4: Counter-clockwise spindle rotation for spindle number <n>
M5: Spindle stop without orientation for the master spindle
M<n>=5: Spindle stop without orientation for spindle number <n>
S...: Spindle speed in rpm for the master spindle
S<n>=...: Spindle speed in rpm for spindle number <n>
SVC=...: Cutting rate in m/min or feet/min for the master spindle
SVC[<n>]=...: Cutting rate in m/min or feet/min for the spindle <n>
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1301
S1: Spindles
15.7 Programming
Statement Description
SPOS=...: Spindle positioning for the master spindle
SPOS[<n>]=...: Spindle positioning for spindle number <n>
The block change is only performed when the spindle is in position.
SPOSA=...: Spindle positioning for the master spindle
SPOSA[<n>]=...: Spindle positioning for spindle number <n>
The block change is executed immediately. Spindle positioning continues, regardless of
further part program processing, until the spindle has reached its position.
SPOS=DC(...): The direction of motion is retained for positioning while in motion and the position
SPOS[<n>]=DC(...): approached. When positioning from standstill, the position is approached via the
shortest path.
SPOSA=DC(...):
SPOSA[<n>]=DC(...):
SPOS=ACN(...): The position is always approached with negative direction of motion. If necessary, the
SPOS[<n>]=ACN(...): direction of motion is inverted prior to positioning.
SPOSA=ACN(...):
SPOSA[<n>]=ACN(...):
SPOS=ACP(...): The position is always approached with positive direction of motion.
SPOS[<n>]=ACP(...): If necessary, the direction of motion is inverted prior to positioning.
SPOSA=ACP(...):
SPOSA[<n>]=ACP(...):
SPOS=IC(...): The travel path is specified. The direction of travel is determined from the sign in front of
SPOS[<n>]=IC(...): the travel path. If the spindle is in motion, the direction of travel is inverted as necessary
to allow traversing in the programmed direction.
SPOSA=IC(...):
If the zero mark is crossed during traversing, the spindle is automatically synchronized
SPOSA[<n>]=IC(...):
with the zero mark if no reference is available or if a new one has been requested via
an interface signal.
M19: Positioning the master spindle to the position in SD43240
M[<n>]=19: Positioning spindle number <n> to the position in SD43240
The block change is only performed when the spindle is in position.
Bring spindle to standstill and activate position control, select zero parameter set,
activate axis mode
M70: for the master spindle
M<n>=70: for spindle number <n>
Spindle position control ON
SPCON: for the master spindle
SPCON(<n>): for spindle number <n>
SPCON(<n>,<m>): for spindle numbers <n> and <m>
Spindle position control OFF, activate speed control mode
PCOF: for the master spindle
SPCOF(<n>): for spindle number <n>
SPCOF(<n>,<m>): for spindle numbers <n> and <m>
FPRAON(S<n>): Revolutional feedrate for spindle <n> ON, derived from the master spindle
FPRAON(S<n>,S<m>): Revolutional feedrate for spindle <n> ON, derived from spindle <m>
The revolutional feedrate value must be specified with FA[S<m>].
FPRAOF(S<n>): Revolutional feedrate for spindle <n> OFF
Basic Functions
1302 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
S1: Spindles
15.7 Programming
Statement Description
C30 G90 G1 F3600 Rotary axis C (spindle in axis mode) travels to the position 30 degrees at a speed of
3600 degrees/min = 10 rpm
Programmable minimum spindle speed limitation
G25 S...: for the master spindle
G25 S<n>: for spindle number <n>
Programmable maximum spindle speed limitation
G26 S...: for the master spindle
G26 S<n>: for spindle number <n>
Programmable maximum spindle speed limitation with G96, G961, G97
LIMS=...: for the master spindle
LIMS[<n>]=...: for spindle number <n>
VELOLIM[<spindle>]=...: Programmable limiting of the configured gear stage dependent maximum speed
Using machine data (MD30455 $MA_MISC_FUNCTION_MASK, bit 6), when
programming in the part program, it can be set as to whether VELOLIM is effective
independent of whether used as spindle or axis (bit 6 = 1) - or is able to be programmed
separately for each operating mode (bit 6 = 0). If they are to be separately effective,
then the selection is made using the name when programming:
• Spindle name S<n> for spindle operating modes
• Axis name, e.g. "C", for axis operation
The correction value refers to:
• Spindles in axis operation (if MD30455 Bit 6 = 0):
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1303
S1: Spindles
15.7 Programming
Statement Description
SPI(<n>): With SPI(<n>) a spindle number is converted into the data type AXIS according to
machine data
MD35000 $MA_SPIND_ASSIGN_TO_MACHAX[ ]
.
SPI is used if axis functions are to be programmed with the spindle.
The following commands are possible with SPI:
• Frame commands:
– CTRANS()
– CFINE()
– CMIRROR()
– CSCALE()
• Velocity and acceleration values for following spindles:
– FA[SPI(<n>)]
– ACC[SPI(<n>)]
– OVRA[SPI(<n>)]
• System variables:
– $P_PFRAME[SPI(<n>),TR]=<value>
– $P_PFRAME=
CSCALE(X,<scale>,Y,<scale>,SPI(<n>),<scale>)
– $P_PFRAME=CMIRROR(S<n>,Y,Z)
– $P_UBFR=CTRANS(A,10) : CFINE (19,0.1)
For further explanations about the programming of SPI, see:
References:
Programming Manual, Work Preparation.
M40: Automatic gear stage selection for the master spindle
M<n>=40: Automatic gear stage selection for spindle number <n>
M41 to M45: Select gear stage 1 to 5 for the master spindle
M<n>=41 to M<n>=45: Select gear stage 1 to 5 for spindle number <n>.
Note
M functions M3, M4, M5, and M70 are not output in DB21, ... DBB194 and DBB202 if a
spindle is configured in a channel. These M functions are offered as extended M functions in
DB21, ... DBB68 ff. and in the relevant axis DBs, DB31, ... DBB86 ff.
References
More detailed explanations for programming the spindle can be found in:
● Programming Manual, Fundamentals
Basic Functions
1304 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
S1: Spindles
15.7 Programming
References
For further explanations regarding the programming of the spindle as well as spindle
movements from synchronized actions, refer to:
● Programming Manual, Job Planning
● Function Manual, Synchronized Actions
15.7.3 Programming spindle controls via PLC with FC18 - only 840D sl
When the PLC specifies the direction of rotation and speed using FC18, the NCK can
determine and select a gear step to match the speed. This is equivalent to the M40
functionality when programming via the part program.
The correct start code must be set when FC18 is called in a PLC user program, in order to
activate gear step selection.
References
More detailed explanations regarding the programming of spindle controls by PLC with FC18
can be found in:
● Function Manual, Basic Functions, Basic PLC Program (P3)
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1305
S1: Spindles
15.7 Programming
Note
The function is only available when using SINUMERIK Operate!
Functionality
Spindles can be started and stopped outside a part program that is being executed via the
internal DBB30 spindle interface:
● DB31, … DBX30.0 (spindle stop)
● DB31, … DBX30.1 (spindle start, clockwise)
● DB31, … DBX30.2 (spindle start, counter-clockwise)
● DB31, ... DBX30.3 (select gear stage)
Supplementary signal to the signal "spindle start, clockwise/counter-clockwise";
determines the gear stage that matches the speed analog to M40 in the part program.
● DB31, … DBX30.4 (spindle positioning start)
In order to start a spindle job, the channel handling the spindle must be in the acceptance
state. A spindle job is always started on the Low-High edge of an internal DBB30 signal.
Generally, the internal DBB30 start signals do not have any meaning in the static state and
do not prevent the spindle being programmed by FC18, synchronized actions, the part
program or JOG traversing (e.g. when the STOP signal is statically at "1").
Requirements
In order that spindle jobs are accepted via the DBB30 spindle interface, the following
conditions must be fulfilled (acceptance state):
● The channel state must be in the "interrupted" or "reset" mode:
– DB21, ... DBX35.6 = 1 (channel state "interrupted")
– DB21, ... DBX35.7 = 1 (channel state "reset")
● The program state must be in the "interrupted" or "canceled" mode:
– DB21, ... DBX35.3 = 1 (program state "interrupted")
– DB21, ... DBX35.4 = 1 (program state "interrupted")
These states will occur on RESET and in JOG mode.
Basic Functions
1306 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
S1: Spindles
15.7 Programming
At the start time, the spindle concerned must meet the following requirements:
● It must be in the state "Channel axis" or "Neutral axis" and must not be moved by means
of the JOG keys.
● When the spindle is specified, no positioning may be carried out by FC18 or synchronized
actions.
Note
Spindle job outside the acceptance range
Low-high edges outside the acceptance range will be ignored. No alarm message is output
by the NCK. It can be conceivable that the acceptance range will be indicated to the operator
by a user-side PLC application.
Spindle jobs outside the acceptance range can also be carried out using FC18 or ASUB.
Multi-channel operation
In the case of multi-channel operation, the spindle started by the PLC becomes active in the
channel that handles the spindle at the appropriate moment.
The channel can be determined on the PLC side by reading the NC/PLC interface signals:
DB31, ... DBX68.0-68.3 (NC axis/spindle in channel A to D)
Spindle definitions
The spindle settings are retained after a change in mode (e.g. from JOG to AUTOMATIC).
The spindle definitions are applied to the part program at the start of the program and can be
modified again using part program operations.
Using the following settings in the machine data:
MD35035 $MA_SPIND_FUNCTION_MASK (spindle functions),
certain spindle definitions (speed or cutting speed, feedrate type) can be taken from the part
program, synchronized action and FC18 and entered in the corresponding setting data:
Bit 4 = 1 The programmed speed S... including speed setpoints via FC18 and synchronized
actions are accepted in the following setting data:
SD43200 $SA_SPIND_S (speed for spindle start via PLC interface)
Programmed S values that are not programmed speed values are not accepted in the
SD. These include, for example:
• S value at constant cutting speed (G96, G961)
• S value for rotation-related dwell time (G4)
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1307
S1: Spindles
15.7 Programming
Bit 8 = 1 The programmed cutting speed S... including setpoints via FC18 and synchronized
actions are accepted in the following setting data:
SD43202 $SA_SPIND_CONSTCUT_S (cutting speed for spindle start via PLC
interface)
Programmed S values that are not programmed cutting speed values are not
accepted in the SD. These include, for example:
• S value outside the constant cutting speed (G96, G961, G962)
• S value for rotation-related dwell time (G4)
Bit 10 = 1 For the master spindle, the value of the 15th G group (feedrate type) is accepted in
the following setting data SD43206 $SA_SPIND_SPEED_TYPE.
SD43206 $SA_SPIND_SPEED_TYPE (spindle speed type for spindle start via PLC
interface)
For all other spindles, the value in SD43206 remains unchanged.
Speed default
Speed defaults from part program, FC18 or synchronized actions are written to the following
setting data from all the usual sources:
SD43200 $SA_SPIND_S (speed for spindle start via PLC interface)
The setting data can be written to as follows:
● Through speed programming
● Through direct programming in the part program
● Through HMI software
Note
The setting data is written immediately and asynchronously to part-program execution.
Basic Functions
1308 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
S1: Spindles
15.7 Programming
For G70, G71 and when writing from an external (HMI), the setting in the machine data:
MD10240 $MN_SCALING_SYSTEM_IS_METRIC
determines the interpretation of the written values.
For further explanations regarding the measuring system (metric/inch) see Section "G2:
Velocities, setpoint / actual value systems, closed-loop control (Page 307)".
Definition via FC18
If the constant cutting speed is defined via FC18, the setting of bit 6 in byte 2 in the "Signals
to concurring positioning axes" area determines how the speed value (bytes 8 ... 11) is
interpreted.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1309
S1: Spindles
15.7 Programming
93, 94, 95, 97 and 971: The master spindle is started with the speed from SD43200.
96 and 961: The speed of the master spindle is obtained from the
specified cutting velocity (SD43202) and the radius of the
transverse axis.
Basic Functions
1310 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
S1: Spindles
15.7 Programming
>0: The machine axis number of the rotary axis/spindle from which the revolutional feedrate
shall be derived.
-1: The revolutional feedrate is derived from the master spindle of the channel in which the
axis/spindle is active in each case.
0: Function is deselected.
FPRAON (S2)
Revolutional feedrate for spindle S2 ON, derived from the master spindle
FPRAON (S2, A)
Revolutional feedrate for spindle S2 ON, derived from axis A.
The revolutional feedrate value must be specified with FA[Sn].
FPRAOF (S2)
Revolutional feedrate for spindle S2 OFF.
SPI(n)
It is also possible to program SPI(n) instead of SPI(Sn).
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1311
S1: Spindles
15.8 Spindle monitoring
6SHHG
0D[LPXPHQFRGHUOLPLWIUHTXHQF\
0'0$B(1&B)5(4B/,0,7
0DFKLQHGHSHQGHQWPD[VSLQGOHVSHHG
0'0$B63,1'B9(/2B/,0,7
3URFHVVUHODWHGPD[VSLQGOHVSHHG
6'6$B63,1'B86(5B9(/2B/,0,7
0D[LPXPVSLQGOHVSHHGIRUFXUUHQWJHDUVWDJHQ
0'0$B*($5B67(3B0$;B9(/2B/,0,7>Q@
0'0$B*($5B67(3B3&B0$;B9(/2B/,0,7>Q@
3URJUDPPDEOHVSLQGOHVSHHGOLPLW*
6'6$B63,1'B0$;B9(/2B*
3URJUDPPDEOHVSLQGOHVSHHGOLPLW/,06*
6'6$B63,1'B0$;B9(/2B/,06
3URJUDPPDEOHPLQLPXPVSLQGOHVSHHG*
6'6$B63,1'B0,1B9(/2B*
0LQVSLQGOHVSHHGRIWKHFXUUHQWJHDUVWDJHQ
0'0$B*($5B67(3B0,1B9(/2B/,0,7>Q@
0D[YHORFLW\VSHHG$[LVVSLQGOHVWRSSHG
0'0$B67$1'67,//B9(/2B72/
167$[LVVSLQGOHVWDWLRQDU\QQPLQ
6SHHGUDQJHRIWKHVSLQGOHRUWKHVSLQGOHFKXFN
6SHHGUDQJHRIFXUUHQWJHDUVWDJH
6SHHGUDQJHRIFXUUHQWJHDUVWDJH
OLPLWHGE\*DQG*
6SHHGUDQJHRIFXUUHQWJHDUVWDJH
ZLWKFRQVWDQWFXWWLQJUDWH*DQG*
1675HIHUHQFHGV\QFKURQL]HG
Basic Functions
1312 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
S1: Spindles
15.8 Spindle monitoring
Function
The "axis/spindle stationary" state is reached if a setpoint is no longer generated and the
spindle actual speed falls below the configured threshold value for "axis/spindle stationary":
MD36060 $MA_STANDSTILL_VELO_TOL (max. velocity/speed for "axis/spindle stationary")
If the spindle has come to a standstill, the following NC/PLC interface signal is set:
DB31, ... DBX61.4 (axis/spindle stationary)
Effectiveness
Monitoring for spindle stop is effective in all spindle modes and in axis mode.
Function
"Spindle in setpoint range" spindle monitoring checks whether:
● The programmed spindle speed is reached.
● The spindle is at a standstill:
DB31, ... DBX61.4 (axis/spindle stationary) = 1
● The spindle is still in the acceleration or deceleration phase.
In the spindle mode, open-loop control mode, the setpoint speed is compared with the actual
speed. If the actual speed deviates by more than the spindle tolerance that can be entered
via MD (refer below) then:
● The following axial NC/PLC interface signal is set to "0":
DB31, ... DBX83.5 (spindle in setpoint range) = 0
● The next machining block is not enabled (depending on the setting in
MD35500 $MA_SPIND_ON_SPEED_AT_IPO_START, see "Axis/spindle stationary
(Page 1313)").
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1313
S1: Spindles
15.8 Spindle monitoring
Speed change
Path control only takes place at the start of the traverse block and only if a speed change
has been programmed. If the speed tolerance range is exited, e.g. due to an overload, the
path movement is not automatically brought to a standstill.
Minimum speed
The minimum speed of the gear stage of a spindle is configured in the machine data:
MD35140 $MA_GEAR_STEP_MIN_VELO_LIMIT[<n>]
The speed setpoints, generated taking into account the override, do not fall below the
minimum speed.
If an S value is programmed, which is less than the minimum speed, the setpoint speed is
increased to the minimum speed and the following NC/PLC interface signal is set:
DB31, ... DBX83.2 (speed setpoint increased)
Basic Functions
1314 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
S1: Spindles
15.8 Spindle monitoring
The minimum gear stage speed is effective only in speed mode and can only be undershot
by:
● Spindle override 0%
● M5
● S0
● DB31, ... DBX4.3 (spindle stop)
● DB31, ... DBX2.1 (withdraw controller enable)
● DB21, ... DBX7.7 (reset)
● DB31, ... DBX2.2 (delete distance-to-go / spindle reset)
● DB31, ... DBX18.5 (oscillation speed)
● DB21, ... DBX7.4 (NC stop axes plus spindles)
● DB31, ... DBX1.3 (axis/spindle disable)
● DB31, ... DBX16.7 (delete S value)
Maximum speed
The maximum speed of the gear stage of a spindle is configured in machine data:
MD35130 $MA_GEAR_STEP_MAX_VELO_LIMIT[<n>]
The speed setpoints, generated taking into account the override, are limited to this speed.
The following NC/PLC interface signal is set in the case that the speed is limited:
DB31, ... DBX83.1 (speed setpoint limited)
Function
The limit or increase of the spindle speed is signaled by the output of the following NC/PLC
interface signals:
● DB31, ... DBX83.1 (setpoint speed limited)
● DB31, ... DBX83.2 (setpoint speed increased)
To diagnose the effective/limiting spindle parameters, one can have read access to the most
important parameters of spindle motion via system variables. The system variables are
indexed with the spindle number and they return only values that are relevant to the speed
control and spindle position modes.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1315
S1: Spindles
15.8 Spindle monitoring
*) The text of the numerical value should be taken from from the description of the system variables.
Boundary conditions
The values delivered by the system variables depend on the spindle mode:
● Speed control mode:
All system variables deliver current values.
● Positioning mode:
The system variables $AC_SMAXVELO, $AC_SMAXACC and $AC_SPIND_STATE
deliver valid values. The system variables $AC_SMINVELO and $AC_SMINVELO_INFO
deliver the data that becomes effective on changing to the speed control mode.
● Axis mode (e.g. if the spindle is used by a transformation TRANSMIT, TRACYL,... or
follows a path motion as a special axis):
The system variable $AC_SPIND_STATE can also be used in the axis mode. Separate
system variables are available in the axis mode for dynamic data:
$AA_VMAXM, $AA_VMAXB and $AA_VLFCT.
The following control response is obtained for a type SERUPRO block search:
● The system variable $AC_SMAXVELO / $AC_SMAXACC delivers the maximum
representable speed / acceleration.
● $AC_SMAXVELO_INFO and $AC_SMAXACC_INFO deliver the VALUE "0" (no limitation
is active).
● $AC_SMINVELO and $AC_SMINVELO_INFO deliver data as in case of normal part
program processing.
● $AC_SPIND_STATE returns the states as they are set for SERUPRO.
Basic Functions
1316 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
S1: Spindles
15.8 Spindle monitoring
Example
Example of the visualization of the content of the system variables for Spindle 1. The
variables are written to the R parameters cyclically. These can be displayed on HMI in the R
Parameters area.
Program code
N05 IDS=1 WHENEVER TRUE DO $R10=$AC_SMAXVELO[1]
N10 IDS=2 WHENEVER TRUE DO $R11=$AC_SMAXVELO_INFO[1]
N15 IDS=3 WHENEVER TRUE DO $R12=$AC_SMINVELO[1]
N20 IDS=4 WHENEVER TRUE DO $R13=$AC_SMINVELO_INFO[1]
N25 IDS=5 WHENEVER TRUE DO $R14=$AC_SPIND_STATE[1]
See also
Spindle in setpoint range (Page 1313)
Note
Machine manufacturer
It is recommended that the reduction of the maximum spindle speed in machine data
MD35100 only be performed when the spindle is stationary. This is particularly important for
spindles that are active after NC reset (see machine data description of MD35040
SPIND_ACTIVE_AFTER_RESET). Otherwise alarm 22100 may be output.
References
• Manufacturer documentation: List Manual, "Detailed Machine Data Description"
• User documentation: Diagnostics Manual
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1317
S1: Spindles
15.8 Spindle monitoring
Responses to violation
If the actual speed of the spindle exceeds the parameterized maximum spindle speed by
more than the tolerance value (MD35150 $MA_SPIND_DES_VELO_TOL), this results in the
following responses on the NC side:
● DB31, ... DBX83.0 = 1 (speed limit exceeded)
● Alarm 22100 "Chuck speed exceeded" is displayed
● All axes and spindles of the channel are stopped
CAUTION
Limit violation
The maximum encoder frequency limit of the actual spindle position encoder is monitored
by the control (the limit can be exceeded). It is the responsibility of the machine tool
manufacturer to ensure that the configuration of the spindle motor, gearbox, measuring
gearbox, encoder and machine data prevents the maximum speed of the actual spindle
position encoder being exceeded.
Basic Functions
1318 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
S1: Spindles
15.8 Spindle monitoring
Special features
If the following functions are active, the maximum encoder frequency cannot be exceeded:
● Spindle positioning mode, axis mode
● Thread cutting (G33, G34, G35)
● Tapping without compensating chuck G331, G332 (does not apply to G63)
● Revolutional feedrate (G95)
● Constant cutting rate (G96, G961, G97, G971)
● SPCON
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1319
S1: Spindles
15.8 Spindle monitoring
6SLQGOHVSHHG
3RVLWLRQVHWSRLQW
3RVLWLRQ
([DFWVWRSOLPLWILQH
([DFWVWRSOLPLWFRDUVH
Basic Functions
1320 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
S1: Spindles
15.8 Spindle monitoring
DB31, ... DBX60.7 and DB31, ... DBX60.6 (position reached with exact stop coarse / fine)
The two limit values defined by machine data:
MD36000 $MA_STOP_LIMIT_COARSE (Exact stop limit coarse)
and
MD36010 $MA_STOP_LIMIT_FINE (Exact stop limit fine)
are output to the PLC using NC/PLC IS:
DB31, ... DBX60.7 (Position reached with exact stop coarse)
and
DB31, ... DBX60.6 (Position reached with exact stop fine).
15.8.9 M40: Automatic gear stage selection for speeds outside the configured
switching thresholds
Function
When M40 is active, an automatic gear stage selection is also made if the programmed
spindle speed S… lies outside the configured switching thresholds.
In this case, a distinction is made between the following cases:
● Programmed speed too high
The programmed speed is higher than the configured maximum speed of the numerically
largest gear stage:
S... > MD35110 $MA_GEAR_STEP_MAX_VELO[<n>]
In this case, the highest gear stage is selected (according to MD35090
$MA_NUM_GEAR_STEPS).
● Programmed speed too low
The programmed spindle speed is less than the configured minimum speed of the first
gear stage:
S... < MD35120 $MA_GEAR_STEP_MIN_VELO[1]
In this case, the first gear stage is selected.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1321
S1: Spindles
15.8 Spindle monitoring
● Programmed speed = 0
When programming speed 0 (S0) the behavior depends on the configuration of the
minimum speed of the first gear stage MD35120 $MA_GEAR_STEP_MIN_VELO[1]:
– If MD35120 $MA_GEAR_STEP_MIN_VELO[1] = 0 is configured, then when
programming S0, the first gear stage is selected.
– If MD35120 $MA_GEAR_STEP_MIN_VELO[1] > 0 is configured, when programming
S0 no gear stage change is performed and the last gear stage remains active. This
means that it remains possible to stop the spindle with S0 (instead of M5) without
initiating a gear stage change.
Effectiveness
Selecting the highest gear stage or the first gear stage for automatic gear stage selection
(M40) is active when programming spindle speeds S… using the part program, in
synchronized actions or when entering via PLC FC18.
For speed programming from the part program for tapping with G331, the behavior is also
supported for the second data set to select the gear stage (precondition:
MD35010 $MA_GEAR_STEP_CHANGE_ENABLE, bit 5 = 1).
Boundary conditions
Enabling the gear stage change
The precondition for the function is that the gear stage change is generally enabled via
machine data:
MD35010 $MA_GEAR_STEP_CHANGE_ENABLE (assign parameters to the gear stage
change)
MD35090 $MA_NUM_GEAR_STEPS (number of gear stages set up)
Example
Automatic gear stage selection M40 is the initial setting after NC reset.
Part program:
Basic Functions
1322 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
S1: Spindles
15.9 Spindle with SMI 24 (Weiss spindle)
Requirement
● The spindle is connected to the drive via Sensor Module SMI 24 using DRIVE-CLiQ.
● Drive telegram 139 is configured for the spindle.
Note
Drive telegram 139
In principle, a spindle with Sensor Module SMI 24 can also be operated with another
drive telegram. However, sensor data is only transferred to the control using drive
telegram 139.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1323
S1: Spindles
15.9 Spindle with SMI 24 (Weiss spindle)
Note
Spindle with sensor module SMI 24 and axis container
A spindle with sensor module SMI 24 and drive telegram 139 for the transmission of sensor
data to the control must not be part of an axis container whose axes are distributed over
several NCUs via an NCU link.
Basic Functions
1324 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
S1: Spindles
15.9 Spindle with SMI 24 (Weiss spindle)
Note
The subsequently described evaluation of sensor S1 to generate the state value for the
clamped state and limiting the spindle speed are only realized if the following state values
are displayed in drive parameter r5000:
• r5000.0 == 1: Sensors available
• r5000.1 == 1: Sensor S1 (clamped state) available
• r5000.10 == 1: State values are generated, speed limits p5043 active
See also Section "Sensor data (Page 1324)", paragraph: "System data: sensor data"
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1325
S1: Spindles
15.9 Spindle with SMI 24 (Weiss spindle)
State value
To simplify the evaluation, the clamped state in the system data is also available as state
value 0 - 11.
A voltage range corresponds to a certain clamped state. The voltage ranges can be set
using drive parameter p5041[0...5].
A voltage tolerance can also be set for the voltage ranges using drive parameter p5040.
Note
The voltage range ± voltage tolerance must not overlap.
Speed limits
For the clamped states with state values 3 - 10, speed limit values can be specified using
drive parameter p5043[0...6]. In the other clamped states (state values 1, 2 and 11), a limit
value of 0 [rpm] permanently applies.
In the various clamped states, the controller limits the spindle speed to the applicable limit.
Note
Changing the speed limits
A change of the speed limits in drive parameter p5043[0...6] is only effective in the controller
(limitation of the spindle speed to the new speed limit) after:
• Power-on reset or when the controller is switched-off/switched-on
• Deselection of the "Parking" state for the spindle (see Section "Deactivating all monitoring
functions: "Parking" (Page 113)")
Basic Functions
1326 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
S1: Spindles
15.9 Spindle with SMI 24 (Weiss spindle)
1) The state value can be read into the controller using the following system data:
• System variable: $VA_MOT_CLAMPING_STATE[<axis>]
• NC/PLC interface: DB31, ... DBW134
• OPI variables: vaMotClampingState
• Drive parameters: r5001
2) p5041[0...5]: Voltage threshold values, p5040: Voltage threshold values tolerance
3) Speed limit permanently set: 0 [rpm]
P5042:Transition time
The following times can be set in drive parameter p5042 for the clamped state identification:
● p5042[0]: Stabilization time for "clamped with tool"
The clamped state "clamped with tool" must be present in the spindle motor for at least
the set stabilization time before the state is signaled to the controller.
● p5042[1]: Maximum time for clamping
The transition from the "released" state to the "clamped with tool" or "clamped without
tool" state may take – as a maximum – the set time.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1327
S1: Spindles
15.10 Supplementary conditions
15.11 Examples
Example
To illustrate the contents of the new block search variables:
Assumptions about automatic gear step selection (M40):
Basic Functions
1328 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
S1: Spindles
15.12 Data lists
* f (PlanAxPosPCS): The speed depends on the current position of the transverse axis in the
workpiece coordinate system.
** ($P_SEARCH_SPOS and $P_SEARCH_SPOSMODE are programmed)
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1329
S1: Spindles
15.12 Data lists
Basic Functions
1330 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
S1: Spindles
15.12 Data lists
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1331
S1: Spindles
15.12 Data lists
15.12.3 signals
Basic Functions
1332 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
S1: Spindles
15.12 Data lists
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1333
S1: Spindles
15.12 Data lists
Basic Functions
1334 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
V1: Feedrates 16
16.1 Brief description
Types of feedrate
The feedrate determines the machining speed (axis or path velocity) and is observed in
every type of interpolation, even where allowance is made for tool offsets on the contour or
on the tool center point path (depending on G functions).
The following types of feedrate allow optimum adaptation to the various technological
applications (turning, milling, drilling, etc.):
● Rapid traverse feedrate (G0)
● Inverse-time feedrate (G93)
● Linear feedrate (G94)
● Revolutional feedrate (G95)
● Constant cutting rate (G96, G961)
● Constant speed (G97, G971)
● Feedrate for thread cutting (G33, G34, G35)
● Feedrate for tapping without compensating chuck (G331, G332)
● Feedrate for tapping with compensating chuck (G63)
● Feedrate for chamfer/rounding FRC, FRCM
● Non-modal feedrate FB
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1335
V1: Feedrates
16.2 Path feedrate F
Feedrate control
The programmed feedrate can be changed during the machining or for test purposes to
enable adjustment to the changed technological conditions.
● Via the machine control panel
● Via the operator panel front
● Via the PLC
● Per program command
Path feedrate F
The path feedrate represents the geometrical total of the speed components in the
participating axes. It is therefore generated from the individual motions of the interpolating
axes.
The default uses the axial speeds of the geometry axes which have been programmed. The
FGROUP command can be used to include other geometry and/or synchronized axes in the
calculation of the path feedrate.
The path feedrate F determines the machining speed and is observed in every type of
interpolation even where allowance is made for tool offsets. The value programmed under
the address F remains in a program until a new F value or a new type of feedrate is
programmed.
Basic Functions
1336 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
V1: Feedrates
16.2 Path feedrate F
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1337
V1: Feedrates
16.2 Path feedrate F
Low-resolution encoders
When using low-resolution encoders, more continuous path or axis motions can be achieved
with smoothed actual values. The larger the time constant, the better the smoothing of the
actual values, and the longer the overtravel.
MD34990 $MA_ENC_ACTVAL_SMOOTH_TIME[<axis>] (smoothing time constant for actual
values)
Smoothed actual values are used for:
● Thread cutting (G33, G34, G35)
● Feedrate per revolution ((G95, G96, G97, FPRAON)
● Display of speed, actual position and velocity
Effectiveness
The feedrate types G93, G94, G95 are active for the G functions of group 1 (except G0) in
the automatic modes.
G94 or G95 can be used for traversing in JOG mode.
References:
Function Manual, Extended Functions; Manual and Handwheel Travel (H1)
Y
)
V
Note
G93 may not be used when G41/G42 is active. If the block length varies greatly from block
to block, a new F value should be programmed in each block for G93.
Basic Functions
1338 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
V1: Feedrates
16.2 Path feedrate F
9 Q )
Note
The programmed F value is deleted when the system switches between the feedrate types
G93, G94 and G95.
Tooth feedrate
Primarily for milling operations, the tooth feedrate FZ... (feed distance per tooth), which is
more commonly used in practice, can be programmed instead of the revolutional feedrate
F...:
The controller uses the $TC_DPNT (number of teeth per revolution) tool parameter
associated with the active tool offset data record to calculate the effective revolutional
feedrate for each traversing block from the programmed tooth feedrate.
) )= 7&B'317
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1339
V1: Feedrates
16.2 Path feedrate F
Basic Functions
1340 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
V1: Feedrates
16.2 Path feedrate F
6 6SHHG
Q
U
n: Spindle speed
SSpeed: Programmed cutting rate
π Circle constant
r: Radius (distance, center of rotation to TCP)
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1341
V1: Feedrates
16.2 Path feedrate F
Diameter programming and reference axis for several transverse axes in one channel:
One or more transverse axes are permitted and can be activated simultaneously or
separately:
● Programming and displaying in the user interface in the diameter
● Assignment of the specified reference axis with SCC[<axis>] for a constant cutting rate
G96, G961, G962
For more information, see Description of Functions "P1: Transverse axes (Page 797)".
Example
SG96 = 230 m/min
● Where r = 0.2 m → n = 183.12 rpm
● Where r = 0.1 m → n = 366.24 rpm
⇒ The smaller the workpiece diameter, the higher the speed.
For G96, G961 or G962, a geometry axis must be defined as the transverse axis.
The transverse axis, whose position affects the speed of the mater spindle, is defined using
channel-specific machine data:
MD20100 $MC_DIAMETER_AX_DEF (geometry axis with transverse axis function )
The function G96, G961 or G962 requires that the machine zero and the workpiece zero of
the transverse axis are in the turning center of the spindle.
Basic Functions
1342 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
V1: Feedrates
16.2 Path feedrate F
Note
G96, G961 is only active during workpiece machining (G1, G2, G3, spline interpolation, etc.,
where feedrate F is active).
The response of the spindle speed for active G96, G961 and G0 blocks can be defined in the
channel-specific machine data:
MD20750 ALLOW_G0_IN_G96 (G0 logic for G96, G961)
When constant cutting rate G96, G961 is selected, no gear stage change can take place.
The spindle speed override switch acts on the spindle speed calculated.
A DRF offset in the transverse axis does not affect the spindle speed setpoint calculation.
At the start of machining (after G0) and after NC stop, G60, G09, ... the path start waits for
"nAct= nSet".
The interface signals "nAct = nSet" and "Set speed limited" are not modified by internal
speed settings.
When the speed falls below the minimum speed or if the signal "Axis/spindle stationary" is
recognized, "nAct =nSet" is reset.
A path operation which has started (G64, rounding), is not interrupted.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1343
V1: Feedrates
16.2 Path feedrate F
Note
The speed limits changed with G25/G26/LIMS in the part program are taken into the setting
data and therefore remain saved after the end of program.
However, if the speed limits changed with G25/G26/LIMS are no longer to apply after the
end of program, the following definitions must be inserted in the GUD block of the machine
manufacturer:
REDEF $SA_SPIND_MIN_VELO_G25 PRLOC
REDEF $SA_SPIND_MAX_VELO_G26 PRLOC
REDEF $SA_SPIND_MAX_VELO_LIMS PRLOC
Alarms
Constant cutting rate G96, G961, G962
● If no F value is programmed, alarm 10860 "No feedrate programmed" is output. The
alarm is not generated with G0 blocks.
● Alarm 14800 "Programmed path velocity smaller than or equal to zero" is output while
programming a negative path velocity.
● If, with an active G96, G961 or G962, no transverse axis is defined in the machine data:
MD20100 $MC_DIAMETER_AX_DEF (geometry axis with transverse axis function),
alarm 10870 "No transverse axis defined" is output.
Basic Functions
1344 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
V1: Feedrates
16.2 Path feedrate F
● If a negative maximum spindle speed is programmed with the LIMS program command
when G96, G961 are active, alarm 14820 "Negative maximum spindle speed
programmed for G96, G961" is output.
● If no constant cutting rate is programmed when G96, G961 is selected for the first time,
alarm 10900 "No S value programmed for constant cutting rate" is output.
16.2.3 Feedrate for thread cutting (G33, G34, G35, G335, G336)
G33
The function G33 can be used to machine threads with constant pitch of the following type:
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1345
V1: Feedrates
16.2 Path feedrate F
16.2.3.2 Programmable run-in and run-out path for G33, G34 and G35
Function
The run-in and run-out path of the thread can be specified with the DITS and DITE statements.
The thread axis is accelerated or braked within the specified path.
1 1
Basic Functions
1346 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
V1: Feedrates
16.2 Path feedrate F
Note
DITE acts at the end of the thread as a rounding clearance. This achieves a smooth change
in the axis motion.
Effects
The programmed run-in and run-out path only increases the rate of acceleration on the path.
If one of the two paths is set larger than the thread axis needs with active acceleration, the
thread axis is accelerated or decelerated with maximum acceleration.
Note
The axis can be overloaded if the specified path is too short.
Activation
The DITS and DITE statements are always active for thread cutting.
Example
Note
Only paths, and not positions, are programmed with DITS and DITE.
The programmed run-in/run-out path is handled according to the current dimension setting
(inches, metric).
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1347
V1: Feedrates
16.2 Path feedrate F
<value> Meaning
0 > <value> ≥ -1 The feed axis is accelerated with the acceleration according to the current
programming BRISK/SOFT
<Value> = 0 The feed axis is accelerated in steps (BRISK).
<Value> > 0 The maximum thread run-up or deceleration distance is specified.
Note
Too short a distance can result in an acceleration overload of the axis.
With reset / program end, the setting data is reset to the values -1, -1.
MD10710 $MN_PROG_SD_RESET_SAVE_TAB can be used to specify that the value of the
setting data written with DITS and DITE can be saved retentively at reset / program end and
therefore retained after power on.
16.2.3.3 Linear increasing/decreasing thread pitch change with G34 and G35
Function
The thread pitch increase (G34) defines the numerical increase in the pitch value. A larger
pitch results in a larger distance between the threads on the workpieces. The velocity of the
thread axis therefore increases with assumed constant spindle speed.
The opposite therefore applies for the decrease in thread pitch (G35).
The following definitions are made for the thread pitch change:
● G34: Increase in thread pitch corresponds to progressive change
● G35: Decrease in thread pitch corresponds to degressive change
Basic Functions
1348 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
V1: Feedrates
16.2 Path feedrate F
Both G34 and G35 functions imply the functionality of G33 and also provide the option of
programming an absolute pitch change value for the thread under F. If the start and end
pitch of a thread is known, the thread pitch change can be determined using the following
equation:
_NH ದND _
)
O*
The absolute value of F must be applied to G34 or G35 depending on the required pitch
increase of decrease.
When the thread length lG, pitch change F and initial pitch ka are known, the pitch increase at
the end of block ke can be determined as follows by modifying the formula:
● For G34 (increasing pitch):
NH N D ) O *
NH N D )
O *
Note
If the formula results in a negative root expression, the thread cannot be machined!
In this case, the NC signals alarm 10605 or alarm 22275.
Application
The G34 and G35 functions can be used to produce self-shearing threads.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1349
V1: Feedrates
16.2 Path feedrate F
Example
Thread cutting G33 with decreasing thread pitch G35
Basic Functions
1350 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
V1: Feedrates
16.2 Path feedrate F
Function
The "Fast retraction for thread cutting (G33)" function can be used to interrupt thread cutting
without causing irreparable damage in the following circumstances:
● NC stop (NC/PLC interface signal)
● Alarms that implicitly trigger NC stop
● Switching of a rapid input
References
Programming Manual, Job Planning; Section "Fast retraction from the contour"
The retraction motion can be programmed via:
● Retraction path and retraction direction (relative)
● Retraction position (absolute)
Note
Tapping
The "Fast retraction" function cannot be used with tapping (G331/G332).
Programming
Syntax
Enable fast retraction, retraction motion via retraction path and retraction direction:
G33 ... LFON DILF=<value> LFTXT/LFWP ALF=<value>
Enable fast retraction, retraction motion via retraction position:
POLF[<axis name>]=<value> LFPOS
POLFMASK/POLFMLIN(<axis 1 name>,<axis 2 name>, etc.)
G33 ... LFON
Disable fast retraction for thread cutting:
LFOF
Meaning
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1351
V1: Feedrates
16.2 Path feedrate F
LFTXT
The retraction direction is controlled in conjunction with ALF with G functions
LFWP:
LFTXT and LFWP.
LFTXT: The plane in which the retraction motion is executed is calculated
from the path tangent and the tool direction (default setting).
LFWP: The plane in which the retraction motion is executed is the active
working plane.
ALF= : The direction is programmed in discrete degree increments with ALF in the
plane of the retraction motion.
With LFTXT, retraction in the tool direction is defined for ALF=1.
With LFWP the direction in the working plane is derived from the following
assignment:
• G17 (X/Y plane)
ALF=1 ; Retraction in the X direction
ALF=3 ; Retraction in the Y direction
• G18 (Z/X plane)
ALF=1 ; Retraction in the Z direction
; Retraction in the X direction
ALF=3
• G19 (Y/Z plane)
ALF=1 ; Retraction in the Y direction
ALF=3 ; Retraction in the Z direction
References:
Programming options with ALF are also described in "Traverse direction for
fast retraction from the contour" in the Programming Manual, Job Planning.
LFPOS: Retraction of the axis declared with POLFMASK or POLFMLIN to the absolute axis
position programmed with POLF.
POLFMASK: Release of axes (<axis 1 name>,<axis 1 name>, etc.) for independent
retraction to absolute position.
POLFMLIN: Release of axes for retraction to absolute position in linear relation
Note:
Depending on the dynamic response of all the axes involved, the linear
relation cannot always be established before the lift position is reached.
POLF[]: Define absolute retraction position for the geometry axis or machine axis in
the index
Effectiveness: Modal
=<value>: In the case of geometry axes, the assigned value is
interpreted as a position in the workpiece coordinate
system. In the case of machine axes, it is interpreted as a
position in the machine coordinate system.
The values assigned can also be programmed as
incremental dimensions:
=IC<value>
<axis name>: Name of a geometry axis or machine axis
Basic Functions
1352 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
V1: Feedrates
16.2 Path feedrate F
Note
LFON or LFOF can always be programmed, but the evaluation is performed exclusively during
thread cutting (G33).
Note
POLF with POLFMASK/POLFMLIN are not restricted to thread cutting applications.
;
5HWUDFWLRQFRPSOHWHG
WKUHDGFXWWLQJVWRSSHG
$[LVVWDQGVWLOO
',/)
Example
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1353
V1: Feedrates
16.2 Path feedrate F
Function
A thread can be tapped without compensating chuck with the functions G331 (tapping) and
G332 (tapping retraction).
Requirement
The technical requirement for tapping without compensating chuck is a position-controlled
spindle with position measuring system.
Basic Functions
1354 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
V1: Feedrates
16.2 Path feedrate F
Override
The revolutional feedrate in G331 and G332 can be influenced by an override.
Depending on the configuration, the override affects either the spindle speed or the path
feedrate:
MD12090 $MN_OVR_FUNCTION_MASK
Note
The following overrides are not effective in G331 and G332:
• Programmable path feedrate override OVR
• Rapid traverse override
References
For further information on G331/G332, see Programming Manual Fundamentals.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1355
V1: Feedrates
16.3 Feedrate for positioning axes (FA)
Function
G63 is a subfunction for tapping threads using a tap with compensating chuck. An encoder
(position encoder) is not required.
References
For more information on G63, see Programming Manual Fundamentals.
Function
The velocity of a positioning axis is programmed with axis-specific feedrate FA.
FA is modal.
The feedrate is always G94.
Note
The maximum axis velocity (MD32000 $MA_MAX_AX_VELO) is not exceeded.
Programming
No more than five axis-specific feedrates can be programmed in each part program block.
Syntax:
FA[<positioning axis>] = <feedrate value>
Basic Functions
1356 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
V1: Feedrates
16.4 Feedrate control
Default setting
If no axial feedrate FA is programmed, the axial default setting is applied:
MD32060 $MA_POS_AX_VELO (initial setting for positioning axis velocity)
Output to PLC
The feedrate value can be output to the the PLC:
● To the channel-specific NC/PLC interface via:
DB21, ... DBB158 - DBB193
● To the axis-specific NC/PLC interface via:
DB31, ... DBB78 - DBB81
The output time is specified with the machine data:
MD22240 $MC_AUXFU_F_SYNC_TYPE (output time of F functions)
The output is suppressed in the default setting (MD22240 = 3), because drops in velocity
can occur through the output of F functions to the NC/PLC interface in continuous-path
mode.
For more information, see Description of Functions "H2: Auxiliary function outputs to PLC
(Page 369)".
Reset behavior
The behavior after the end of program or NC reset is specified by the machine data:
MD22410 $MC_F_VALUES_ACTIVE_AFTER_RESET (F function is active even after reset)
Value Meaning
0 The default values are effective after NC reset.
1 The last programmed FA values are effective after NC reset.
Function
The "Feed disable" or "Feed/spindle stop" brings the axes to a standstill with adherence to
the braking characteristics and the path contour (exception: G33 block).
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1357
V1: Feedrates
16.4 Feedrate control
Axis/spindle disable
With active "Axis/spindle disable":
DB31, ... DBX1.3 = 1
The axial PLC interlocks "No controller enable" and "Feed stop" have no effect.
However, the axial and channel-specific override are effective.
Basic Functions
1358 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
V1: Feedrates
16.4 Feedrate control
"Spindle stop"
The NC/PLC interface signal:
DB31, ... DBX4.3 (spindle stop)
stops the respective spindle.
Function
With the "Feedrate override via the machine control panel", the user can locally increase or
decrease the path feedrate at the machine as a percentage with immediate effect. To
achieve this, the programmed feedrates are multiplied with the override values available at
the NC/PLC interface.
The feedrate can be changed axis-specifically for positioning axes.
The "Spindle override" can be used to change the spindle speed and the cutting rate (G96,
G961).
With a feedrate change, the axial acceleration and velocity limits are maintained. There are
no contour errors along the path.
The feedrate override can be changed separately for path and position axes.
The overrides influence the programmed values or the limits (e.g. G26, LIMS for spindle
speed).
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1359
V1: Feedrates
16.4 Feedrate control
With Gray coding, the override factors corresponding to the switch position must be entered
in the following machine data:
MD12030 $MN_OVR_FACTOR_FEEDRATE [<n>] (evaluation of the path feedrate override
switch)
MD12050 $MN_OVR_FACTOR_RAPID_TRA [<n>] (evaluation of the rapid traverse override
switch)
An active feedrate override has an effect on all path axes that are assigned to the current
channel. An active rapid traverse override has an effect on all the axes that are traversed
with rapid traverse and that are assigned to the current channel.
Basic Functions
1360 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
V1: Feedrates
16.4 Feedrate control
With Gray coding, the override factors corresponding to the switch position must be entered
in the following machine data:
MD12010 $MN_OVR_ FACTOR_AX_ SPEED [<n>] (evaluation of the axis feedrate override
switch)
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1361
V1: Feedrates
16.4 Feedrate control
Spindle override
One enable signal and one byte for the spindle override factor are available in the NC/PLC
interface for each spindle.
DB31, ... DBX1.7 (override effective)
DB31, ... DBB19 (spindle override)
The override factor can be specified from the PLC either in the binary or gray-coded format.
The format is communicated to the NC via the following machine data:
MD12060 $MN_OVR_SPIND_IS_GRAY_CODE (spindle override switch gray-coded)
The following permanent assignment applies to binary code:
With Gray coding, the override factors corresponding to the switch position must be entered
in the following machine data:
MD12070 $MN_OVR_FACTOR_SPIND_SPEED [<n>] (evaluation of the spindle override
switch)
Basic Functions
1362 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
V1: Feedrates
16.4 Feedrate control
Override active
For overrides that have been enabled, the specified override values entered via the machine
control panel become immediately active in all operating modes and machine functions.
Override inactive
An override factor of 100% is internally effective if an override is not activated. The override
factor at the NC/PLC interface is not evaluated.
An exception is the zero setting for a binary interface and the 1st switch setting for a gray-
coded interface. In these cases, the override factors entered at the NC/PLC interface are
evaluated. For a binary interface, the override factor is always 0%. For a gray-coded
interface, the value entered in machine data for the 1st switch position value is output as
override value. It should be populated with 0.
Function
The "Programmable feedrate override" function can be used to change the velocity level of
path and positioning axes via the part program.
Programming
Syntax Meaning
OVR=<value> Feedrate change for path feedrate F
OVRA[<axis>=<value> Feedrate change for positioning feedrate FA
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1363
V1: Feedrates
16.4 Feedrate control
Effectiveness
The NC/PLC interface signals DB21, ... DBB6 (rapid traverse or feedrate override active)
and DB31, ... DBX1.7 (axis-specific override active) do not refer to the programmable
feedrate override. The programmable feedrate override remains active when these signals
are deactivated.
The effective override is calculated from the product of the "Programmable feedrate
override" and the "Feedrate override on machine control panel (Page 1359)".
The default setting for the "Programmable feedrate override" is 100%.
The default setting is effective:
● If no feedrate override is programmed or
● After reset if the machine data:
MD22410 $MC_F_VALUES_ACTIVE_AFTER_RESET (F function is active even after
reset)
is not set.
Note
OVR is not effective with G33, G34, G35.
Function
The dry run feedrate is used when testing part programs without machining the workpiece in
order to allow the program or program sections to execute with an increased path feedrate,
for example.
Activation
The dry run feedrate can be selected in the automatic modes and activated from the PLC or
the operator panel front.
When activated from the operator panel front, the interface signal:
DB21, ... DBX24.6 (dry run feedrate selected)
is set and transferred from the basic PLC program to the interface signal:
DB21, ... DBX0.6 (activate dry run feedrate).
When selected on the PLC, the interface signal DB21, ... DBX0.6 (activate dry run feedrate)
must be set from the PLC user program.
Basic Functions
1364 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
V1: Feedrates
16.4 Feedrate control
Effectiveness
As long as the "Activate dry run feedrate" interface signal is set, instead of the programmed
feedrate, the feedrate value set via SD42100 DRY_RUN_FEED is effective in the way
specified via SD42101 $SC_DRY_RUN_FEED_MODE (see parameterization):
The dry run feedrate is always interpreted as linear feedrate (G94).
Parameterization
Value Meaning
0 The dry run feedrate may only be switched on and off at the end of the block (default
setting).
1 The dry run feedrate can also be activated during the program processing (in the part
program block).
Notice:
Activation during processing triggers an internal reorganization operation on the controller
which causes the axes to be stopped for a short time. This can affect the surface finish of
the workpiece being machined.
2 The dry run feedrate can be activated/deactivated at any time without the axes being
stopped. The function only takes effect with a block "later" in the program run.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1365
V1: Feedrates
16.4 Feedrate control
Value Meaning
0 The programmed feedrate is compared to the dry run feedrate in SD42100 and then
traversing is performed with the higher of the two feedrates (default setting).
1 The programmed feedrate is compared to the dry run feedrate in SD42100 and then
traversing is performed with the lower of the two feedrates.
2 The dry run feedrate entered in SD42100 takes effect directly, irrespective of the
programmed velocity.
3 -9 Reserved
10 As for configuration 0, except for thread cutting (G33, G34, G35) and tapping (G331,
G332, G63). These functions are executed as programmed.
11 As for configuration 1, except for thread cutting (G33, G34, G35) and tapping (G331,
G332, G63). These functions are executed as programmed.
12 As for configuration 2, except for thread cutting (G33, G34, G35) and tapping (G331,
G332, G63). These functions are executed as programmed.
Function
The function "Multiple feedrate values in one block" can be used to activate six different
feedrate values of an NC block, a dwell time or a retraction motion-synchronously,
depending on the external digital and/or analog inputs.
When the input for the sparking out time or retraction path is activated, the distance-to-go for
the path axes or the particular single axis is deleted and the dwell time or retraction is
started.
The retraction is started within an IPO cycle.
Basic Functions
1366 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
V1: Feedrates
16.4 Feedrate control
Signals
The input signals are combined in one input byte for the function. A fixed functional
assignment applies within the byte.
Table 16- 1 Input byte for the "Multiple feedrates in one block" function
Bit
7 6 5 4 3 2 1 0
Input no. I7 I6 I5 I4 I3 I2 I1 I0
Feedrate address F7 F6 F5 F4 F3 F2 ST SR
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1367
V1: Feedrates
16.4 Feedrate control
Hardware assignment
The input byte for the "Multiple feedrate values in one block" function can be assigned a
maximum of two digital input bytes or comparator input bytes of the NCK I/O:
MD21220 $MC_MULTFEED_ASSIGN_FASTIN (assignment of the input bytes of the NCK
I/O for "Multiple feedrate values in one block"), bit 0 ... 15
The input bits can also be inverted:
MD21220 $MC_MULTFEED_ASSIGN_FASTIN, bit 16 ... 31
%\WH %\WH
0' 0'
0&B08/7)(('B$66,*1B)$67,1 ,QYHUVLRQPDVN ,QYHUVLRQPDVN 0&B08/7)(('B$66,*1B)$67,1
%LW %LW
%LW %LW
,QSXWELW
,QSXWE\WHIRU
VHYHUDOIHHGUDWHYDOXHVLQ
RQHEORFN
Figure 16-2 Signal assignment for the "Multiple feedrate values in one block" function
The assignment of the digital input bytes and parameterization of the comparators are
described in:
References:
Function Manual, Extended Functions; Digital and Analog NCK I/O (A4)
Programming
Path motion
The path feedrate is programmed under the address F and remains valid until an input signal
is present. This value acts modally.
F2=... to F7=... can be used in addition to the path feedrate to program up to six further
feedrates in the block. The numerical expansion indicates the bit number of the input that
activates the feedrate when changed:
Basic Functions
1368 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
V1: Feedrates
16.4 Feedrate control
Example:
F7=1000
;7 corresponds to input bit 7
The programmed values act non-modally. The path feedrate programmed under F applies in
the next block.
Dwell (sparking out time) and retraction path are programmed under separate addresses in
the block:
ST=...
Dwell time (for grinding sparking out time)
SR=...
Retraction path
These addresses apply non-modally.
Axial motion
The axial feedrates are programmed under address FA and remain valid until an input signal
is present. They act modally.
FMA[2,<axis>]=... to FMA[7,<axis>]=... can be used to program up to six further feedrates
per axis in the block.
The first expression in square brackets indicates the bit number of the input that activates
the feedrate when changed. The second expression indicates the axis to which the feedrate
applies.
Example:
The values programmed under FMA act non-modally. The feedrate programmed under FA
applies to the next block.
Dwell (sparking out time) and retraction path can also be defined for a single axis:
STA[<axis>]=...
Axial dwell time (sparking out time)
SRA[<axis>]=...
Axial retraction path
The expression in square brackets indicates the axis for which the sparking out time and
retraction path apply.
Examples:
STA[X]=2.5 ; The sparking out time for the X axis is 2.5 seconds.
SRA[X]=3.5 ; The retraction path for the X axis is 3.5 (unit e.g. mm).
These addresses apply non-modally.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1369
V1: Feedrates
16.4 Feedrate control
Note
Retraction path
The unit for the retraction path refers to the current valid unit of measurement (mm or inch).
The reverse stroke is always made in the opposite direction to the current motion. SR/SRA
always programs the value for the reverse stroke. No sign is programmed.
Note
POS instead of POSA
If feedrates, sparking out time (dwell time) or return path are programmed for an axis on
account of an external input, this axis must not be programmed as POSA axis (positioning
axis over multiple blocks) in this block.
Note
Status query
It is also possible to poll the status of an input for synchronous commands of various axes.
Note
LookAhead
Look Ahead is also active for multiple feedrates in one block. In this way, the current
feedrate can be restricted by the Look Ahead value.
Application
The "Multiple feedrate values in one block" function is used primarily for grinding, but is not
restricted to it.
Typical applications are, for example:
● Analog or digital calipers
Depending on whether the external inputs are analog or digital, various feedrate values, a
dwell time and a retraction path can be activated. The limit values are defined via the
setting data.
● Switching from infeed to working feedrate via proximity switch
Basic Functions
1370 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
V1: Feedrates
16.4 Feedrate control
Example
Internal grinding of a conical ring, where the actual diameter is determined using calipers
and, depending on the limits, the feedrate value required for roughing, finishing or fine
finishing is activated. The position of the calipers also provides the end position. Thus, the
block end criterion is determined not only by the programmed axis position of the infeed axis
but also by the calipers.
&DOLSHUV
5LQJ
*ULQGLQJGLVF
5HWUDFWLRQ
6SDUNLQJRXWWLPH
)HHGUDWHILQHILQLVKLQJ
)HHGUDWHILQLVKLQJ
)HHGUDWHURXJKLQJ
)HHGUDWHDLUJULQGLQJ
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1371
V1: Feedrates
16.4 Feedrate control
Function
The "Fixed feedrate values" function can be used to activate fixed feedrates (max. four)
defined via the machine data instead of the programmed feedrate or the configured JOG
velocities.
The function is available in AUTOMATIC and JOG mode.
Parameterization
The setting of the fixed feedrates is performed:
● For linear axes with the machine data:
MD12202 $MN_PERMANENT_FEED[<n>]
● For rotary axes with the machine data:
MD12204 $MN_PERMANENT_ROT_AX_FEED[<n>]
where <n> = 0, 1, 2, 3 (for fixed feedrate 1, 2, 3, 4)
Note
The fixed feedrates are always linear feedrate values. Switchover to linear feedrate is
conducted internally even in case of revolutional feedrate.
Activation
The fixed feedrates are activated via NC/PLC interface signals:
● In AUTOMATIC mode for path/geometry axes using the channel-specific interface
signals:
DB21, ... DBX29.0 (activate fixed feedrate 1)
DB21, ... DBX29.1 (activate fixed feedrate 2)
DB21, ... DBX29.2 (activate fixed feedrate 3)
DB21, ... DBX29.3 (activate fixed feedrate 4)
Basic Functions
1372 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
V1: Feedrates
16.4 Feedrate control
● In JOG mode for machine axes using the axis-specific interface signals:
DB31, ... DBX3.2 (activate fixed feedrate 1)
DB31, ... DBX3.3 (activate fixed feedrate 2)
DB31, ... DBX3.4 (activate fixed feedrate 3)
DB31, ... DBX3.5 (activate fixed feedrate 4)
Supplementary conditions
Effectiveness
The function "Fixed feedrate values" is not active:
● For spindles
● For positioning axes
● When tapping
Override = 0
The traversing behavior for override = 0 depends on the setting in machine data:
MD12200 $MN_RUN_OVERRIDE_0
DRF offset
The DRF offset cannot be activated for a selected fixed feedrate.
Function
To permit flexible definition of the feedrate characteristic, the feedrate programming
according to DIN 66025 has been extended by linear and cubic characteristics.
The cubic profiles can be programmed directly or as an interpolating spline.
Programming
You can program the following feedrate profiles:
● FNORM
Behavior in accordance with DIN 66025 (default setting).
An F-value programmed in the block is applied over the entire path of the block, and is
subsequently regarded as a fixed modal value.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1373
V1: Feedrates
16.4 Feedrate control
● FLIN
An F value programmed in the block is traversed linearly over the path from the current
value at the beginning of the block to the end of the block, and is subsequently regarded
as modal value.
● FCUB
The non-modal programmed F values (relative to the end of the block) are connected by
a spline. The spline starts and ends tangentially to the previous or following feedrate
setting. If the F address is missing in one block, then the last programmed F value is
used.
● FPO
The F address [syntax: F=FPO(...,...,...)] designates the characteristic of the feedrate
via a polynomial from the current value to the end of the block in which it was
programmed. The end value is treated as modal from there onwards.
Parameterization
If FLIN and FCUB are used in connection with compression COMPON, a tolerance can be
defined for the path feedrate:
MD20172 $MC_COMPRESS_VELO_TOL (max. permissible deviation of the path feedrate
with compression)
Supplementary conditions
FLIN/FCUB
The path velocity profile programmed with FLIN or FCUB is not active together with
revolutional feedrate for G95 as well as with constant cutting rate with G96/G961 and
G97/G971.
References
For further information on the programmable feedrate characteristics, see Programming
Manual, Job Planning.
Function
The feedrate for chamfer/rounding can be programmed via NC addresses.
Basic Functions
1374 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
V1: Feedrates
16.4 Feedrate control
Programming
Syntax:
... FRC/FRCM=<value>
Meaning:
Note
FRC is only effective if a chamfer/rounding is programmed in the block or if RNDM has been
activated.
FRC overwrites the F or FRCM value in the current block.
The feedrate programmed under FRC must be greater than zero.
FRCM=0 activates the feedrate programmed under F for chamfering/rounding.
Parameterization
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1375
V1: Feedrates
16.4 Feedrate control
Supplementary conditions
FLIN/FCUB
Feedrate interpolation FLIN and FCUB is not possible for chamfer/rounding.
G0
FRC/FRCM is not active when a chamfer is traversed with G0. The programming is possible
in accordance with the F value without error message.
Example
Example 1: MD20201 bit 0 = 0; take feedrate from following block (default setting!)
Example 2: MD20201 bit 0 = 1; take feedrate from previous block (recommended setting!)
Basic Functions
1376 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
V1: Feedrates
16.4 Feedrate control
Function
The "Non-modal feedrate" function can be used to define a separate feedrate for a single
part program block. After this block, the previous modal path feedrate is active again.
Programming
Syntax:
... FB=<value>
Meaning:
Note
The feedrate programmed under FB must be greater than zero.
If no traversing motion is programmed in the block (e.g. computation block), the FB has no
effect.
If no explicit feed for chamfering/rounding is programmed, then the value of FB also applies
for any contour element chamfering/rounding in this block.
Simultaneous programming of FB and FD (handwheel travel with feedrate override) or F
(modal path feedrate) is not possible.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1377
V1: Feedrates
16.4 Feedrate control
Single axes
Single axes can be programmed in the part program, in synchronized actions and via the
PLC:
Dynamic response
The dynamic response of an axis is influenced by:
● MD32060 $MA_POS_AX_VELO (positioning axis velocity)
The effective positioning axis velocity can be changed:
– Part program / synchronized action: Axial feedrate FA or percentage feedrate override
OVRA
– PLC: Specification of FRate or overwriting the axial override
● MD32300 $MA_MAX_AX_ACCEL (maximum axis acceleration)
The effective maximum axis acceleration can be changed:
– Part program indirectly: Writing the machine data with subsequent NewConfig
– Part program directly: Percentage acceleration override ACC
– Synchronized actions indirectly: Writing the machine data and initiating an ASUB for
the activation of NewConfig
– Synchronized actions directly: Percentage acceleration override ACC (cannot be preset
by the PLC).
Via the PLC, the same options apply as in synchronized actions.
● Part program commands: BRISKA, SOFTA, DRIVEA, JERKA
Cannot be programmed in synchronized actions (only indirectly via ASUB).
Cannot be specified by the PLC (only indirectly via ASUB).
Basic Functions
1378 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
V1: Feedrates
16.4 Feedrate control
Note
Dynamic response changes
Dynamic response changes made in the part program do not affect command or PLC axis
motion. Dynamic response changes made in synchronized actions have no effect on
traversing motion programmed in the part program.
Feedforward control
The type of feedforward control and the path axes that should be traversed with feedforward
control can be directly programmed in the part program using FFWON/FFWOF. In
synchronized actions and from the PLC, programming is only possible indirectly via an
ASUB.
Syntax:
ACC[<axis>]=<value>
Meaning:
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1379
V1: Feedrates
16.4 Feedrate control
Note
The acceleration override programmed with ACC can be read using the system variable
$AA_ACC. However, $AA_ACC is read in the part program at a different time than when
reading in a synchronized action.
The system variables $AA_ACC only contain the value programmed in the part program with
ACC if, in the meantime, the acceleration override was not changed by programming ACC in a
synchronized action. The same applies for the reverse situation.
Examples:
Basic Functions
1380 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
V1: Feedrates
16.4 Feedrate control
The most recently programmed value is kept after the end of program or NC reset.
The effective end-of-motion criterion can be read using the axis-specific system variable
$AA_MOTEND.
Note
Depending on whether the system variable $AA_MOTEND is read in the part program or
synchronized action, it contains the value for the NC axes or the main run axes.
Example:
Part program:
N80 G01 POS[X]=100 FA[X]=1000 ACC[X]=90 COARSEA[X]
Synchronized action:
N100 EVERY $A_IN[1] DO POS[X]=50 FA[X]=2000 ACC[X]=140 IPOENDA[X]
References:
For further information on block changes and end-of-motion criteria for FINEA, COARSEA
and IPOENDA, see:
Function Manual, Extended Functions; Positioning Axes (P2), Section: Block change
Syntax
SCPARA[<axis>] = <parameter set number>
Meaning
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1381
V1: Feedrates
16.4 Feedrate control
Note
The activation of the parameter set specified using SCPARA can be suppressed from the
PLC user program:
DB31,… DBX9.3 = 1 (parameter set specification disabled by SCPARA)
In this case, no message is displayed.
The number of the active parameter set can be read using the system variable $AA_SCPAR.
Supplementary conditions
Power On
After POWER ON, the following initial settings are made:
● Percentage acceleration override for all single-axis interpolations: 100%
● End-of-motion criterion for all single-axis interpolations: FINEA
● Servo parameter set: 1
Mode change
When the operating mode is changed from AUTOMATIC to JOG, the programmed dynamic
response changes remain valid.
Reset
With reset, the last programmed value remains for the part program specifications. The
settings for main-run interpolations do not change.
Block search
The last end-of-motion criterion programmed for an axis is collected and output in an action
block. The last block with a programmed end-of-motion criterion that was processed in the
search run serves as a container for all programmed end-of-motion criteria for all axes.
Basic Functions
1382 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
V1: Feedrates
16.5 Supplementary conditions
Unit of measurement
The valid unit of measurement of the feedrates depends on the set measuring system and
the entered axis type:
MD10240 $MN_SCALING_SYSTEM_IS_METRIC (basic system of the control metric/inch)
MD30300 $MA_IS_ROT_AX (rotary or linear axis)
Spindle positioning
With active G95, G96, G961, G97, G971, G33, G34, G35 spindle positioning should not be
performed, because the derived path feedrate following spindle positioning = 0. If the
programmed axis position has not then been reached, the block cannot be completed.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1383
V1: Feedrates
16.6 Data lists
Basic Functions
1384 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
V1: Feedrates
16.6 Data lists
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1385
V1: Feedrates
16.6 Data lists
16.6.3 Signals
Basic Functions
1386 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
V1: Feedrates
16.6 Data lists
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1387
V1: Feedrates
16.6 Data lists
Basic Functions
1388 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
W1: Tool offset 17
17.1 Brief description
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1389
W1: Tool offset
17.1 Brief description
Note
Please refer to the following documentation for further information on tools and tool
compensations and a full technical description of the general and specific programming
features for tool compensation (TLC and TRC):
References:
Programming Manual, Fundamentals
Basic Functions
1390 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
W1: Tool offset
17.1 Brief description
G461/G462
In order to enable the solid machining of inside corners in certain situations with the
activation and deactivation of tool radius compensation, commands G461 und G462 have been
introduced and the approach/retraction strategy has thus been extended for tool radius
compensation.
● G461
If no intersection is possible between the last TRC block and a previous block, the
controller calculates an intersection by extending the offset curve of this block with a
circle whose center point coincides with the end point of the noncorrected block, and
whose radius is equal to the tool radius.
● G462
If no intersection is possible between the last TRC block and a previous block, the
controller calculates an intersection by inserting a straight line at the end point of the last
block with tool radius compensation (the block is extended by its end tangent).
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1391
W1: Tool offset
17.2 Tool
17.2 Tool
17.2.1 General
Select tool
A tool is selected in the program with the T function.
Whether the new tool will be loaded immediately by means of the T function depends on the
setting in the machine data:
$MC_TOOL_CHANGE_MODE (new tool compensation with M function) determines whether
the new tool is loaded immediately on execution of the T function.
Value range of T
The T function accepts the following whole numbers:
● From T0 (no tool)
● To T32000 (tool number 32000).
Basic Functions
1392 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
W1: Tool offset
17.2 Tool
7
'
'
'
'
Figure 17-1 Example of a tool T... with 9 cutting edges (D1 to D9)
D function
The tool cutting edge is programmed with D1 (edge 1) to D9 (edge 9). The tool cutting edge
always refers to the currently active tool. An active tool cutting edge (D1 to D9) without an
active tool (T0) is inactive. Tool cutting edge D0 deselects all tool compensations of the active
tool.
Value Meaning
=0 No automatic cutting edge selection in accordance with M06
<>0 Number of the cutting edge, which is selected in accordance with M06
= -1 The cutting edge number of the old tool is retained and is also selected for the new tool, in
accordance with M06.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1393
W1: Tool offset
17.2 Tool
Tools
The TO memory consists of tools numbered T1 to T32000.
Each tool can be set up via TOA files or individually, using the "New tool" soft key.
Compensation values not required must be assigned the value zero. (this is the default
setting when the offset memory is created): The individual values in the offset memory (tool
parameters) can be read and written from the program using system variables.
Note
The tools (T1 to T32000) do not have to be stored in ascending order or contiguously in the
tool compensation memory, and the first tool does not have to be assigned number T1.
Basic Functions
1394 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
W1: Tool offset
17.2 Tool
7 7
7 7
7 7
7 7
' '
' '
' '
' '
D No.
The D no. is sufficient for calculating the tool compensations (can be set via MD).
'
'
'Q
2IIVHWYDOXH
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1395
W1: Tool offset
17.2 Tool
Programming
The above compensation block is to be calculated in the NC.
Part program call:
...
Dn
MD20096
Whether also with tool management not activated, the address extension of T and M is to be
interpreted as spindle number, can be set through the machine data:
MD20096 $MC_T_M_ADDRESS_EXT_IS_SPINO (spindle number as address extension).
The same rules then apply to the reference between the D number and T number as when
the "Tool management" function is active.
Basic Functions
1396 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
W1: Tool offset
17.2 Tool
Example
The example below shows the effect of MD20096.
Two spindles are considered. Spindle 1 is the master spindle. M6 was defined as the tool
change signal.
T1 = 5
M1 = 6
T2 = 50
M2 = 6
D4
Note
Previously, when tool management was not activated, each tool change command
(programmed with T or M) caused the tool compensation to be recalculated in the path.
The address extension is not defined further by this operation. The significance of the
extension is defined by the user (in the PLC user program).
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1397
W1: Tool offset
17.2 Tool
"Relative" D numbers
In the NCK, it is possible to manage the D numbers as "relative" D numbers for the tool
compensation data sets. The corresponding D numbers are assigned to each T number. The
maximum number of D numbers was previously limited to 9.
Functions
Expansions to functions when assigning D numbers:
● The maximum permitted D numbers are defined via the machine data:
MD18105 $MN_MM_MAX_CUTTING_EDGE_NO (max. value of the D numbers (DRAM))
The default value is 9, in order to maintain compatibility with existing applications.
● The number of cuts (or the offset data sets) for each tool can be defined via the machine
data:
MD18106 $MN_MM_MAX_CUTTING_EDGE_PERTOOL (max. number of the D numbers
per tool (DRAM))
This allows you to customize the number of cutting edges to be configured for each tool
to the actual number of real cutting edges for monitoring purposes.
● It is also possible to rename D numbers in the NCK and thus to allocate any D numbers
to the cutting edges.
Note
In addition to relative D number allocation, the D numbers can also be assigned as "flat"
or "absolute" D numbers (1-32000) without a reference to a T number (within the "Flat D
number structure" function).
Basic Functions
1398 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
W1: Tool offset
17.2 Tool
Note
The compensation values $TC_DP1 to $TC_DP25 of the active tool compensation can be
read with system variable $P_AD[n], where n=1 to 25. The CE cutting edge number of the
active compensation is returned with n=26.
Commands
When the maximum cutting edge number:
MD18105 $MN_MM_MAX_CUTTING_EDGE_NO (Max. value of the D numbers (DRAM))
is greater than the maximum number of cutting edges per tool:
MD18106 $MN_MM_MAX_CUTTING_EDGE_PERTOOL (Max. number of D numbers per
tool (DRAM))
the following commands are available:
Command Meaning
CHKDNO Checks the uniqueness of the available D numbers.
The D numbers of all tools defined within a TO unit may not occur more than once.
No allowance is made for replacement tools.
GETDNO Determines the D number for the cutting edge of a tool.
If no D number matching the input parameters exists, d=0.
If the D number is invalid, a value greater than 32000 is returned.
SETDNO Sets or changes the D number of the CE cutting edge of tool T.
If there is no data block for the specified parameter, the value FALSE is returned.
Syntax errors generate an alarm. The D number cannot be set explicitly to 0.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1399
W1: Tool offset
17.2 Tool
Command Meaning
GETACTTD Determines the associated T number for an absolute D number.
There is not check for uniqueness. If several D numbers within a TO unit are the
same, the T number of the first tool found in the search is returned.
This command is not suitable for use with "flat" D numbers, because the value 1 is
always returned in this case (no T numbers in database).
DZERO Marks all D numbers of the TO unit as invalid.
This command is used for support during retooling.
Compensation data sets tagged with this command are no longer verified by the
CHKDNO language command. These data sets can be accessed again by setting the
D number once more with SETDNO.
Note
If the maximum cutting edge number is smaller than the maximum number of cutting edges
per tool (MD18105 < MD18106), the language commands described do not affect the
system.
This relation is preset in the NCK as standard, in order to maintain compatibility with existing
applications.
The individual commands are described in detail in:
References:
Programming Manual, Fundamentals
Activation
In order to work with unique D numbers and, therefore, with the defined language
commands, it must be possible to name D numbers freely for the tools.
The following conditions must be fulfilled for this purpose:
● MD18105 > MD18106
● The 'flat D number' function is not activated.
MD18102 $MN_MM_TYPE_OF_CUTTING_EDGE (type of D number programming
(SRAM)).
Examples
MD18105 $MN_MM_MAX_CUTTING_EDGE_NO = 1 (max. value of the D numbers
(DRAM))
A maximum of one compensation can be defined per tool (with D number = 1).
Note
When the "Flat D numbers" function is active, only one D compensation can be defined in
the TO unit.
Basic Functions
1400 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
W1: Tool offset
17.2 Tool
CHKDNO The FALSE state is returned when the above constellation is checked
because D=30 has been entered twice.
CHKDNO (2, 3, 30) The FALSE state is returned when the specified D number 30 is
checked because D=30 has been entered twice.
CHKDNO (2, 3, 100) The TRUE state indicates that D=100 has been entered just once.
CHKDNO (1, 3) The TRUE state is returned although there is a conflict between the
D=30 of the third tool and D=30 of the second tool.
Programming examples
Renaming a D number
The D number of cutting edge CE = 3 is to be renamed from 2 to 17. The following
specifications apply:
● Internal T number T = 1
● D number = 2
● Tool with one cutting edge with:
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1401
W1: Tool offset
17.2 Tool
You assign the current D number of cutting edge 3 to a variable (DNoOld) and define the
variable DNoNew for the new D number:
Program code
def int DNoOld, DNoNew = 17
DNoOld = GETDNO( 1, 3 )
SETDNO( 1, 3, DNoNew )
Note
If a further cutting edge has been defined for the tool, e.g. $TC_DPCE[ 1, 2 ] = 1 ; = CE, the
D-number 2 of the cutting edge 1 cannot have the same name as the D-number of the
cutting edge 3 i.e.: SETDNO( 1, 1, 17) returns the status = FALSE as return value.
Program code
DZERO
If one of the compensations is now activated (e.g. with T3 D100), an alarm is generated,
because D100 is not currently defined.
Basic Functions
1402 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
W1: Tool offset
17.2 Tool
Note
In the event of a power failure, the DZERO command can leave the NCK in an undefined state
with reference to the D numbers. If this happens, repeat the DZERO command when the power
is restored.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1403
W1: Tool offset
17.2 Tool
MD22550
If a tool preparation has been programmed in the part program and the NCK detects an error
(e.g., the data set for the programmed T number does not exist in the NCK), the user can
assess the error situation and perform appropriate tasks, in order to subsequently resume
machining.
The tool change may be programmed independently, depending on the machine data:
MD22550 $MC_TOOL_CHANGE_MODE (new tool compensation with M function).
MD22550 $MC_TOOL_CHANGE_MODE = 0
MD22550 $MC_TOOL_CHANGE_MODE = 1
Note
The "tool not in magazine" problem cannot be detected since the NCK did not have
access to any magazine information during tool compensation.
Basic Functions
1404 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
W1: Tool offset
17.2 Tool
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1405
W1: Tool offset
17.2 Tool
The following occurs when this part of the program is executed again:
If necessary, the original point of the T call can be corrected after the end of the program. If
the tool change logic on the machine cannot process this, the program must be aborted and
the point of the error corrected.
If only one data set is missing, it is transferred to the NCK, Txx is programmed in "Overstore"
and the program is subsequently resumed.
As in the case of "missing D number", the required parameter (T number) can be accessed
by the user for "missing T number" via the appropriate alarm (17191).
Note
In order to enable program correction, it stops immediately at the faulty Txx block.
The program text operation is also stopped when machine data:
MD22562 $MC_TOOL_CHANGE_ERROR_MODE Bit0=1 (response on errors in tool
change).
MD20360
The effect of the tool parameters on the transverse axis in connection with diameter
programming can be controlled selectively with the machine data:
MD20360 $MC_TOOL_PARAMETER_DEF_MASK (definition of tool parameters).
Details are described with the mentioned MD
Basic Functions
1406 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
W1: Tool offset
17.3 Flat D number structure
Define the DRF offset in the transverse axis as a diameter offset with the machine data:
MD20360 $MC_TOOL_PARAMETER_DEF_MASK bit 9 = 1 (definition of tool parameters)
Deselecting an axial DRF compensation (DRFOF) also deletes an existing tool compensation
(handwheel override in tool direction).
Note
For further information about superimposed movements with the handwheel, please refer to:
References:
Function Manual, Extended Functions; Manual and Handwheel Travel (H1)
Programming Manual, Fundamentals
(The Programming Manual describes the complete technical program options in order to
deselect the DRF offset axis-specifically.)
17.3.1 General
Activation
Which type of D number management is valid may be set via the machine data:
MD18102 $MN_MM_TYPE_OF_CUTTING_EDGE (type of D number programming).
Value Significance
0 As previously = default setting
1 Flat D number structure with absolute direct D programming
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1407
W1: Tool offset
17.3 Flat D number structure
Programming
Tool compensations can be programmed with system variables $TC_DP1 to $TC_DP25.
The contents have the same meaning as before.
The syntax changes: no T number is specified.
● "Flat D number" function active:
$TC_DPx[d] = value ;where x=parameter no., d=D number
i.e., data with this syntax can only be loaded to the NCK if the "Flat D number" function is
activated.
● "Flat D number" function inactive:
$TC_DPx[t][d] = value ;where t=T number, d=D number
A D number can only be assigned once for each tool, i.e., each D number stands for exactly
one compensation data block.
A new data block is stored in the NCK memory when a D number that does not exist is
created for the first time.
The maximum number of D or offset data blocks (max. 600) is set via the machine data:
MD18100 $MN_MM_NUM_CUTTING_EDGES_IN_TOA (tool compensations in TO area).
Data backup
Data backup is carried out in the same format, i.e., a backup file created with the "Flat D
number" function cannot be loaded on the NCK of a control that has not activated the
function.
This also applies in reverse for transfer.
D range
1 - 99 999 999
Basic Functions
1408 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
W1: Tool offset
17.3 Flat D number structure
MD18102 = 1
If MD18102 $MN_MM_TYPE_OF_CUTTING_EDGE = 1, then D compensation is activated
without reference to a certain tool.
D0 still contains the previous significance, "Deselection of active compensation in NCK".
Address extension of D
It is not possible to extend the address of D. Only one active compensation data block is
possible for the tool path at a given time.
Programming
Programming in the part program is carried out as before. Only the value range of the
programmed D number is increased.
Example 1:
MD parameterization Meaning
MD22550 $MC_TOOL_CHANGE_MODE =0 Tool change with programming of T.
MD18102 $MN_MM_TYPE_OF_CUTTING_EDGE =1 D number programming without
reference to a certain tool.
MD20270 $MC_CUTTING_EDGE_DEFAULT = -1 D compensation remains unchanged
if tool is changed.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1409
W1: Tool offset
17.3 Flat D number structure
Example 2:
MD22550 = 0
Note
The tool change and the assignment of a D compensation to an actual tool are the
responsibility of the NC program and of the PLC program, if applicable.
Tool MDs
The following machine data affect the way tools and cutting edges (D numbers) work in the
NCK:
Basic Functions
1410 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
W1: Tool offset
17.3 Flat D number structure
17.3.5 Programming M6
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1411
W1: Tool offset
17.3 Flat D number structure
Example
Two spindles are defined, spindle 1 and spindle 2, and the following applies:
MD20110
To have the active tool and the tool compensation included as follows, can be defined via the
machine data:
MD20110 $MC_RESET_MODE_MASK, Bit 3 (Definition of control default settings after
RESET/TP end).
Value Significance
Bit 3 =1 From the last test program to finish in test mode
=0 From the last program to finish before activation of the program test
Prerequisite
The bits 0 and 6 must be set by the machine data:
MD20110 $MC_RESET_MODE_MASK, Bit 3 (Definition of control default settings after
RESET/TP end).
Tool management
NCK active tool management works on the basis of the following assumptions:
1. Tools are managed in magazines.
2. Cutting edges are monitored; limits reached cause the tool to be disabled.
3. Idea of the sister tools: Tools are programmed for selection only on the basis of their
name. NCK then selects the concrete tool according to the strategy.
Note
For SINUMERIK 828D, this function is only available as an option!
This means that it only makes sense to employ tool management when specific tools have
been defined and these are to be utilized by the NCK.
Basic Functions
1412 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
W1: Tool offset
17.4 Tool cutting edge
Flat D number
Flat D number means that tool management is carried out outside the NCK and there is no
reference made to T numbers.
Note
Activation of both of the functions "Flat D number structure" and "Tool management" is
monitored. If both are activated at the same time, "Tool management" takes priority.
17.4.1 General
Tool parameter
The geometrical description, the technological description and the tool type are mapped to
tool parameters for each tool cutting edge.
The following tool parameters are available for the relevant tool types:
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1413
W1: Tool offset
17.4 Tool cutting edge
Technology
24 Undercut angle only for turning tools
25 Reserved*
* "Reserved" means that this tool parameter is not used and is reserved for expansions.
Basic Functions
1414 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
W1: Tool offset
17.4 Tool cutting edge
3D-face milling
Milling cutter types 111, 120, 121, 130, 155, 156 and 157 are given special treatment for 3D-
face milling by evaluating tool parameters (1 -23).
References
For more information about various tool types, see:
● Functions Manual - Basic Functions; Tool Offset (W1), Chapter "Tool type (tool
parameters)"
● Programming Manual Fundamentals; Chapter: "Tool compensations" > "List of tool types"
● Functions Manual - Special Functions; 3D-tool radius compensation (W5)
Description
The tool type (3digit number) defines the tool in question. The selection of this tool type
determines further components such as geometry, wear and tool base dimensions in
advance.
Conditions
The following is applicable to the "Tool type" parameter:
● The tool type must be specified for each tool cutting edge.
● Only the values specified can be used for the tool type.
● Tool type "0" (zero) means that no valid tool has been defined.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1415
W1: Tool offset
17.4 Tool cutting edge
7DEOHRIWKHPRVWLPSRUWDQWDYDLODEOHWRROSDUDPHWHUVRQO\WKHWRROW\SHLVQHFHVVDU\
73*
73*
73*
73*
73*
7RROSDUDPHWHU7&B'3
$OORFDWLRQE\1&.
$GDSEDVHGLPHQVLRQದ
ದ$QJOHRILQFOLQHGZKHHO
3URWUXVLRQದOHQJWK
ದPD[SHULSKHUDOVSHHG
*URRYHZLGWKದUDGLXV
ದ0LQFXUUZKHHOZLGWK
ದ/HQJWK
ದ/HQJWK
&XWWLQJHGJHSRVLWLRQ
*HRPHWU\ದOHQJWK
*HRPHWU\ದUDGLXV
:HDUದOHQJWK
ದ0LQZKHHOUDGLXV
:HDUದUDGLXV
8QGHUFXWDQJOH
ದPD[VSHHG
OHQJWK
7RROW\SH
0LOOLQJWRROVDQGGULOOLQJWRROVDOORWKHUV
0LOOLQJWRRODFFRUGLQJWR&/'$7$
[ [ [ [ [ [ [
%DOOHQGPLOO [ [ [ [ [ [ [
(QGPLOO [ [ [ [ [ [ [
(QGPLOOZLWKFRUQHUURXQGLQJ [ [ [ [ [ [ [ [
$QJOHKHDGFXWWHU [ [ [ [ [ [ [
$QJOHKHDGPLOOZLWKFRUQHUURXQGLQJ [ [ [ [ [ [ [ [
)DFLQJFXWWHU [ [ [ [ [ [ [
7KUHDGFXWWHU [ [ [ [ [ [ [
6LGHPLOO [ [ [ [ [ [ [
%HYHOFXWWHU [ [ [ [ [ [ [
7ZLVWGULOO [ [ [ [ [ [
6ROLGGULOO [ [ [ [ [ [
%RULQJEDU [ [ [ [ [ [
&HQWHUGULOO [ [ [ [ [ [
&RXQWHUVLQN [ [ [ [ [ [
&RXQWHUERUH [ [ [ [ [ [
7DSUHJXODUWKUHDG [ [ [ [ [ [
7DSILQHWKUHDG [ [ [ [ [ [
:KLWZRUWKWKUHDGWDS [ [ [ [ [ [
5HDPHU [ [ [ [ [ [
*ULQGLQJWRROVDQGWXUQLQJWRROVದ
6XUIDFHJULQGLQJZKHHO [ [ [ [ [ [ [ [ [ [
6XUIDFHJULQGLQJZKHHOZLWKPRQLWRULQJ [ [ [ [ [ [ [ [ [ [ [ [ [
6DPHDVEXWZRWRROEDVHGLPHQVLRQIRU68*
[ [ [ [ [ [ [ [ [ [ [ [
)DFLQJZKHHO [ [ [ [ [ [ [ [ [
)DFLQJZKHHOZLWKPRQLWRULQJ [ [ [ [ [ [ [ [ [ [ [ [
6DPHDVEXWZRWRROEDVHGLPHQVLRQIRU68*
[ [ [ [ [ [ [ [ [ [ [
'UHVVHU [ [ [ [ [ [ [ [
5RXJKLQJWRRO [ [ [ [ [ [ [ [ [
)LQLVKLQJWRRO [ [ [ [ [ [ [ [ [
3OXQJHFXWWHU [ [ [ [ [ [ [ [ [
3DUWLQJWRRO [ [ [ [ [ [ [ [ [
7KUHDGLQJWRRO [ [ [ [ [ [ [ [ [
%XWWRQWRRObbIRUPLQJWRRO722/0$1 [ [ [ [ [ [ [ [ [
6SHFLDOWRROV
6ORWWLQJVDZ [ [ [ [ [ [ [ [ [
&/'$7$
FXWWHUORFDWLRQGDWD ಧ &XWWHUORFDWLRQGDWDLQDFFRUGDQFHZLWK',1
%O68*
ಧ *ULQGLQJZKHHOSHULSKHUDOVSHHG
Basic Functions
1416 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
W1: Tool offset
17.4 Tool cutting edge
Note
The tool type has no significance in the turning tool groups.
Nonlisted numbers are also permitted, in particular with grinding tools (400-499).
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1417
W1: Tool offset
17.4 Tool cutting edge
/
7RRODGDSWHUUHIHUHQFH /
SRLQW
G /
EN /
The width of the saw blade is accounted for with tool radius compensation (G40 to G42 as
follows:
Comman Significance
d
G40 No saw blade compensation
G41 Saw blade compensation left
G42 Saw blade compensation right
Description
The cutting edge position describes the position of the tool tip P in relation to the cutting
edge center point S. It is entered in tool parameter 2.
The cutting edge position is required together with the cutting edge radius (tool parameter 8)
for the calculation of the tool radius compensation for turning tools (tool type 5xx).
Basic Functions
1418 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
W1: Tool offset
17.4 Tool cutting edge
6
5
/HQJWK
/HQJWK )7RROKROGHUUHIHUHQFHSRLQW
5&XWWLQJHGJHUDGLXVWRROUDGLXV
6&XWWLQJHGJHFHQWHUSRLQW
= 37RROWLS
6 =
Figure 17-5 Tool parameter 2 (P2): Machining behind the turning center
6
=
3
3 6
3 3 3 3 3 3 3 3 3
;
Figure 17-6 Tool parameter 2 (P2): Machining in front of the turning center
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1419
W1: Tool offset
17.4 Tool cutting edge
= = = = =
; ; ; ; ;
Figure 17-7 Tool parameter 2 (P2): Cutting edge position for vertical boring and turning mills
Description
The lengths of the tools are required for the geometry tool length compensation. They are
input as tool lengths 1 to 3 in the tool parameters 3 to 5. The following length specifications
must be entered as a minimum for each tool type:
Example Twist drill (tool type 200) with tool length (tool parameter 3)
Basic Functions
1420 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
W1: Tool offset
17.4 Tool cutting edge
) WRROKROGHUUHIHUHQFHSRLQW
/HQJWKWRROSDUDPHWHU
Note
All three tool parameters 3 to 5 (tool length 1 to 3) are always calculated in the three
geometry axes, irrespective of the tool type.
If more tool lengths are input in the tool parameters 3 to 5 for a tool type than is required as
the minimum, then these extra tool lengths are settled in the geometry axes without any
alarm.
References
For information about entering tool dimensions (lengths) in tool parameters 3 to 5 (tool
lengths 1 to 3) and how these are calculated in the three geometry axes, please refer to
→ Operating Manual.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1421
W1: Tool offset
17.4 Tool cutting edge
Meaning
The shape of the tool is defined using the tool parameters 6 to 11. The data is required for
the geometry tool radius compensation.
In most cases, only tool parameter 6 (tool radius 1) is used.
Basic Functions
1422 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
W1: Tool offset
17.4 Tool cutting edge
3D face milling
Tool parameters 6 to 11 are required for tool description of 3D face milling.
U K
KWRROOHQJWK H
7RRO3IOHQJWK I
7RRO3HOHQJWK
7RRO3GUDGLXV
7RRO3UUDGLXV D
7RRO3DDQJOH
7RRO3EDQJOH
G
References
Please refer to the following documentation for information about entering tool shapes
(radius for tool radius compensation) in tool parameters 6 to 11 and how these are
calculated by geometry tool radius compensation in the three geometry axes:
● Programming Manual, Fundamentals; Section: "Tool compensations" > "2½ D tool
compensation"
● Functions Manual - Special Functions; 3D tool radius compensation (W5)
For 3D face milling, please refer to:
● Programming Manual, Job Planning; Section: "Transformations" > "Three, Four and Five
axis Transformation (TRAORI)"
Description
While geometry tool length compensation (tool parameters 3 to 5) is used to define the size
of the tool, wear tool length compensation can be used to correct the change in the active
tool size.
The active tool dimensions can change due to:
● Differences between the tool fixture on the tool measurement machine and the tool fixture
on the machine tool
● Tool wear caused during service life by machining
● Definition of the finishing allowances
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1423
W1: Tool offset
17.4 Tool cutting edge
Description
While geometry tool radius compensation (tool parameters 6 to 11) is used to define the
shape of the tool, wear tool radius compensation can be used to correct the change in the
active tool shape.
The active tool dimensions can change due to:
● Tool wear caused during service life by machining
● Definition of the finishing allowances
Description
Tool base dimension/adapter dimension can be used when the reference point of the
toolholder (tool size) differs from the reference point of the toolholder.
This is the case when:
Basic Functions
1424 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
W1: Tool offset
17.4 Tool cutting edge
● The tool and the tool adapter are measured separately but are installed on the machine in
one unit (the tool size and adapter size are entered separately in a cutting edge).
● The tool is used in a second tool fixture located in another position (e.g. vertical and
horizontal spindle).
● The tool fixtures of a tool turret are located at different positions.
;
=
0LOOLQJPDFKLQH < 7XUQLQJPDFKLQH
=
; /HQJWK
7RROEDVH
GLPHQVLRQ )
OHQJWK /HQJWK
7XUQLQJFHQWHU
7RROEDVH
7RROEDVH GLPHQVLRQ
GLPHQVLRQ OHQJWK 7RROEDVH
OHQJWK ) GLPHQVLRQ
5DGLXV OHQJWK
)
)
/HQJWK /HQJWK
)7RROKROGHUUHIHUHQFHSRLQWV /HQJWK
)
7RROKROGHUUHIHUHQFHSRLQWV
References
Please refer to the following documentation for more information about base-
dimension/adapter-dimension tool length compensation:
● Programming Manual, Fundamentals
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1425
W1: Tool offset
17.4 Tool cutting edge
Meaning
Certain turning cycles, in which traversing motions with tool clearance are generated,
monitor the tool clearance angle of the active tool for possible contour violations.
Value range
The angle (0 to 90° with no leading sign) is entered in tool parameter 24 as the tool
clearance angle.
VWFRQWRXUWREHPDFKLQHG QGFRQWRXUWREHPDFKLQHG
LVQRWYLRODWHG FRXOGEHYLRODWHG
7RROFOHDUDQFH
; 7RROFOHDUDQFH
DQJOH
DQJOH
Figure 17-9 Tool clearance angle of the turning tool during relief cutting
7RROFOHDUDQFH
DQJOHIRU
7RROFOHDUDQFH IDFHPDFKLQLQJ
DQJOHIRU
; ORQJLWXGLQDO
PDFKLQLQJ
Figure 17-10 Tool clearance angle for longitudinal and face machining
Basic Functions
1426 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
W1: Tool offset
17.4 Tool cutting edge
Note
If a tool clearance angle (tool parameter 24) of zero is entered, relief cutting is not monitored
in the turning cycles.
References
Please refer to the following documentation for a detailed description of the tool clearance
angle:
● Programming Manual Cycles
Note
The subject is irrelevant with respect to face milling as only defined tool types without
relevant cutting edge position are permitted for this operation anyway. (A tool with a type,
which has not been explicitly approved, is treated as a ball end mill with the specified
radius. A cutting edge position parameter is ignored).
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1427
W1: Tool offset
17.5 Tool radius compensation 2D (TRC)
17.5.1 General
Note
For tool radius compensation (TRC) see:
References:
Programming Manual Fundamentals
Only the Programming Guide contains a complete technical description of the tool radius
compensation (TRC) and its special aspects.
Why TRC?
The contour (geometry) of the workpiece programmed in the part program should be
independent of the tools used in production. This makes it necessary to draw the values for
the tool length and tool radius from a current offset memory. Tool radius compensation can
be used to calculate the equidistant path to the programmed contour from the current tool
radius.
7RRO
:RUNSLHFH
FRQWRXU
3DWKRIWKHWRROFHQWHUSRLQW
DWHTXDOGLVWDQFHWRWKH
FRQWRXUHTXLGLVWDQWSDWK
Basic Functions
1428 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
W1: Tool offset
17.5 Tool radius compensation 2D (TRC)
Direction of compensation
TRC calculates a path, which is equidistant to the programmed contour. Compensation can
be performed on the left- or righthand side of the programmed contour in the direction of
motion.
Command Significance
G41 TRC on the lefthand side of the contour in the direction of motion
G42 TRC on the righthand side of the contour in the direction of motion
G40 Deselection of TRC
Intermediate blocks
In general, only program blocks with positions on geometry axes in the current plane are
programmed when TRC is active. However, dummy blocks can still also be programmed
with active TRC. Dummy blocks are program blocks, which do not contain any positions on a
geometry axis in the current plane:
● Positions on the infeed axis
● Auxiliary functions,
● etc.
The maximum number of dummy blocks can be defined in the machine data:
MD20250 $MC_CUTCOM_MAXNUM_DUMMY_BLOCKS (Max no. of dummy blocks with no
traversing movements for TRC).
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1429
W1: Tool offset
17.5 Tool radius compensation 2D (TRC)
Command Significance
NORM Normal setting at start point/end point (initial setting)
KONT Follow contour at start point/end point
KONTC Approach/retraction with constant curvature
KONTT Approach/retraction with constant tangent
Basic Functions
1430 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
W1: Tool offset
17.5 Tool radius compensation 2D (TRC)
&RQWRXU VWUDLJKWOLQH
3
%HKLQG
FRQWRXU 5 7RROUDGLXV
,QIURQWRI
FRQWRXU 3
*FRUUHFWHG
3
([DPSOHRIVHOHFWLQJ75&ZLWK1250 ([DPSOHRIVHOHFWLQJ75&ZLWK.217
EHKLQGWKHFRQWRXU EHKLQGWKHFRQWRXUDQG*
3 3
3
&RQWRXUYLRODWLRQ &RQWRXU2.
* *
3 5
5 5
3
3
3
Figure 17-12 Example for selecting TRC with KONT or NORM in front of and behind the contour
● KONT and G450/G451 (corner behavior at outer corners) has a general effect and determines
the approach and retraction behavior with TRC.
● When tool radius compensation is deselected, the retraction behavior is determined by
the NORM/KONT instructions.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1431
W1: Tool offset
17.5 Tool radius compensation 2D (TRC)
Supplementary conditions
The approach and retraction blocks are polynomials in the following two variants. Therefore,
they are only available for control variants, which support polynomial interpolation.
● KONTT
With KONTT, approach and retraction to/from the contour is with a constant tangent. The
curvature at the block transition is not usually constant.
● KONTC
With KONTC, not only the tangent but also the curvature is constant at the transition, with
the result that a jump in acceleration can no longer occur on activation/deactivation.
Although KONTC includes the KONTT property, the constant tangent version KONTT is available
on its own, because the constant curvature required by KONTC can produce undesired
contours.
Axes
The continuity condition is observed in all three axes. It is thus possible to program a
simultaneous path component perpendicular to the compensation plane for
approach/retraction.
Only linear blocks are permitted for the original approach and retraction blocks with
KONTT/KONTC. These programmed linear blocks are replaced in the control by the
corresponding polynomial curves.
Exception
KONTT and KONTC are not available in 3D variants of tool radius compensation (CUT3DC,
CUT3DCC, CUT3DF).
If they are programmed, the control switches internally to NORM without an error message.
Basic Functions
1432 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
W1: Tool offset
17.5 Tool radius compensation 2D (TRC)
Explanation:
In this example, a full circle with a radius of 70 mm is machined in the X/Y plane. Since the
tool has a radius of 10 mm, the resulting tool center point path describes a circle with a
radius of 60 mm. The start/end points are at X0 Y0 Z60, with the result that a movement
takes place in the Z direction at the same time as the approach/retraction movement in the
compensation plane.
1
1
1
Figure 17-13 Approach and retraction with constant curvature during inside machining of a full circle:
Projection in the X-Y plane.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1433
W1: Tool offset
17.5 Tool radius compensation 2D (TRC)
Figure 17-14 Approach and retraction with constant curvature during inside machining of a full circle:
3D representation.
Basic Functions
1434 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
W1: Tool offset
17.5 Tool radius compensation 2D (TRC)
.2177
.217&
Note
The figure shows that a straight line bordering on the contour quadrant, e.g. to X20 Y-20,
would be violated with KONTC on retraction/approach to X0, Y0.
17.5.4.1 Function
Description
The SAR (Smooth Approach and Retraction) function is used to achieve a tangential
approach to the start point of a contour, regardless of the position of the start point.
The approach behavior can be varied and adapted to special needs using a range of
additional parameters.
The two functions, smooth approach and smooth retraction, are largely symmetrical. The
following section is, therefore, restricted to a detailed description of approach; special
reference is made to differences affecting retraction.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1435
W1: Tool offset
17.5 Tool radius compensation 2D (TRC)
Sub-movements
There are maximum 4 sub-movements in case of soft retraction and approach with the
following positions:
● Start point of the movement P0
● Intermediate points P1, P2 and P3
● End point P4
Points P0, P3 and P4 are always defined. Intermediate points P1 and P2 can be omitted,
according to the parameters defined and the geometrical conditions.
On retraction, the points are traversed in the reverse direction, i.e. starting at P4 and ending
at P0.
17.5.4.2 Parameters
The response of the smooth approach and retraction function is determined by up to 9
parameters:
3 3
3ZKHQDSSURDFKLQJ 3ZKHQDSSURDFKLQJ 3ZKHQDSSURDFKLQJ
ZLWKDVWUDLJKWOLQH ZLWKDTXDGUDQW ZLWKDVHPLFLUFOH
* * *
3
7RRO 7RROFHQWHUSRLQW 7RROFHQWHUSDWK 7RROFHQWHUSDWK
SDWK 7RRO 7RRO
',65 ',65
3 &RQWRXU 3 &RQWRXU 3 &RQWRXU
',65
Figure 17-16 Approach behavior depending on G147 to G347 and DISR (with simultaneous activation of
tool radius compensation)
Basic Functions
1436 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
W1: Tool offset
17.5 Tool radius compensation 2D (TRC)
Defining the approach and retraction direction using active tool radius compensation.
((G140 is the initial setting.)
With positive tool radius:
– G41 active → approach from left
– G42 active → approach from right
If no tool radius compensation is active (G40), the response is identical to G143. In this
case, an alarm is not output. If the radius of the active tool is 0, the approach and
retraction side is determined as if the tool radius were positive.
● G141:
Automatic determination of the approach direction, i.e., the contour is approached from
the side where the start point is located, relative to the tangent at the start point of the
following block (P4).
Note
The tangent at the end point of the preceding block is used accordingly on retraction. If
the end point is not programmed explicitly on retraction, i.e., if it is to be determined
implicitly, G143 is not permitted on retraction, since there is a mutual dependency between
the approach side and the position of the end point. If G143 is programmed in this case, an
alarm is output. The same applies if, when G140 is active, an automatic switchover to G143
takes place as a result of an inactive tool radius compensation.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1437
W1: Tool offset
17.5 Tool radius compensation 2D (TRC)
Modal G code (G340, G341), which defines the subdivision of the movement into individual blocks
from the start point to the end point
3 3 3 3
,QIHHGPRYHPHQW
6WUDLJKWOLQH 6WUDLJKWOLQH
FLUFOHRUKHOL[ RUFLUFOH
33 3
',6&/ 3 ',6&/ 3 3
* *
0DFKLQLQJSODQH
Note
Active, rotating frames are included in all cases where the position of the active plane G17 -
G19 (circle plane, helix axis, infeed movements perpendicular to the active plane) is relevant.
DISR
DISRSpecifies the length of a straight approach line or the radius of an approach arc.
Retraction/approach with straight lines
On approach/retraction along a straight line, DISR specifies the distance from the cutter edge
to the start point of the contour, i.e., the length of the straight line with active TRC is
calculated as the total of the tool radius and the programmed value of DISR.
Basic Functions
1438 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
W1: Tool offset
17.5 Tool radius compensation 2D (TRC)
An alarm is displayed:
● If DISR is negative and the amount is greater than the tool radius (the length of the
resulting approach line is less than or equal to zero).
Retraction/approach with circles
Approach/retraction with circles
DISR indicates always the radius of the tool center point
path. If tool radius compensation is activated, a circle is generated internally, the radius of
which is dimensioned such that the tool center path is derived, in this case also, from the
programmed radius.
An alarm is output on approach and retraction with circles:
● If the radius of the circle generated internally is zero or negative
● If DISR is not programmed
● If the radius value ≤ 0.
DISCL
DISCLspecifies the distance from point P2 from the machining plane.
If the position of point P2 is to be specified by an absolute reference on the axis
perpendicular to the circle plane, the value must be programmed in the form DISCL = AC(
....).
If DISCL is not programmed, points P1, P2 and P3 are identical with G340 and the approach
contour is mapped from P1 to P4.
The system checks that the point defined by DISCL lies between P1 and P3, i.e., in all
movements, which have a component perpendicular to the machining plane (e.g., infeed
movements, approach movements from P3 to P4), this component must have the same
leading sign. It is not permitted to change direction. An alarm is output if this condition is
violated.
On detection of a direction reversal, a tolerance is permitted that is defined by the machine
data:
MD20204 $MC_WAB_CLEARANCE_TOLERANCE (direction reversal on SAR).
However, if P2 is outside the range defined by P1 and P3 and the deviation is less than or
equal to this tolerance, it is assumed that P2 is in the plane defined by P1 and/or P3.
Example:
An approach is made with G17 starting at position Z=20 of point P1. The SAR plane defined
by P3 is at Z=0. The point defined by DISCL must, therefore, lie between these two points.
MD20204=0.010. If P2 is between 20.000 and 20.010 or between 0 and -0.010, it is assumed
that the value 20.0 or 0.0 is programmed. The alarm is output if the Z position of P2 is greater
than 20.010 or less than -0.010.
Depending on the relative position of start point P0 and end point P4 with reference to the
machining plane, the infeed movements are performed in the negative (normal for approach)
or positive (normal for retraction) direction, i.e., with G17 it is possible for the Z component of
end point P4 to be greater than that of start point P0.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1439
W1: Tool offset
17.5 Tool radius compensation 2D (TRC)
Programming the end point P4 (or P0 for retraction) generally with X... Y... Z...
Possible ways of programming the end point P4for approach
End point P4 can be programmed in the actual SAR block.
P4 can be determined by the end point of the next traversing block.
Further blocks (dummy blocks) can be inserted between the SAR block and the next
traversing block without moving the geometry axes.
The end point is deemed to have been programmed in the actual SAR block for approach if
at least one geometry axis is programmed on the machining plane (X or Y with G17). If only
the position of the axis perpendicular to the machining plane (Z with G17) is programmed in
the SAR block, this component is taken from the SAR block, but the position in the plane is
taken from the following block. In this case, an alarm is output if the axis perpendicular to the
machining plane is also programmed in the following block.
Example:
0DFKLQLQJXSWRWKLV
SRLQWZLWK*WKHQZLWK
< *)
=
]
=
;
&RQWRXU
3
',65
or:
N30 G41 G147 DISCL=3 DISR=13 F1000
N40 G1 X40 Y-10 Z0
Basic Functions
1440 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
W1: Tool offset
17.5 Tool radius compensation 2D (TRC)
)ROORZLQJEORFNZLWKRXWRIIVHW
3
7RROFHQWHUSDWK 3
7RRO
6$5EORFN
**
3
&RQWRXUSUHFHGLQJEORFN
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1441
W1: Tool offset
17.5 Tool radius compensation 2D (TRC)
If FAD is not programmed, this part of the contour is traversed at the velocity, which is active
modally from the preceding block, in the event that no F command defining the velocity is
programmed in the SAR block.
Programmed response:
<
;
=
*
3 3
*
3 )
3
3 ) ) ;
Basic Functions
1442 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
W1: Tool offset
17.5 Tool radius compensation 2D (TRC)
Programming feed F
This feed value is effective from point P3 (or from point P2, if FAD is not programmed). If no F
command is programmed in the SAR block, the speed of the preceding block is valid. The
velocity defined by FAD is not used for following blocks.
17.5.4.3 Velocities
Velocities at approach
In both approach diagrams below, it is assumed that no new velocity is programmed in the
block following the SAR block. If this is not the case, the new velocity comes into effect after
point P4.
3 3 33 3
1RYHORFLW\SURJUDPPHG
2QO\)SURJUDPPHG
2QO\)$'SURJUDPPHG
)DQG)$'SURJUDPPHG
5DSLGWUDYHUVHLI*LVDFWLYHRWKHUZLVHZLWKWKHROGRUQHZ)FRPPDQG
9HORFLW\RISUHFHGLQJEORFNROG)FRPPDQG
,QIHHGYHORFLW\SURJUDPPHGZLWK)$'
1HZPRGDOYHORFLW\SURJUDPPHGZLWK)
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1443
W1: Tool offset
17.5 Tool radius compensation 2D (TRC)
3 3 3 3 3
1RYHORFLW\SURJUDPPHG
2QO\)SURJUDPPHG
2QO\)$'SURJUDPPHG
)DQG)$'SURJUDPPHG
5DSLGWUDYHUVHLI*LVDFWLYHRWKHUZLVHZLWKWKHROGRUQHZ)FRPPDQG
9HORFLW\RISUHFHGLQJEORFNROG)FRPPDQG
,QIHHGYHORFLW\SURJUDPPHGZLWK)$'
1HZPRGDOYHORFLW\SURJUDPPHGZLWK)
Velocities at retraction
During retraction, the rolls of the modally active feedrate from the previous block and the
programmed feedrate value in the SAR block are interchanged, i.e., the actual retraction
contour (straight line, circle, helix) is traversed with the old feedrate value and a new velocity
programmed with the F word applies from point P2 up to P0.
If even retraction is active and FAD is programmed, the path from P3 to P2 is traversed with
FAD, otherwise it is traversed with the old velocity. The last F command programmed in a
preceding block always applies for the path from P4 to P2. G0 has no effect in these blocks.
Traversing from P2 to P0 takes place with the F command programmed in the SAR block or,
if no F command is programmed, with the modal F command from a preceding block. This
applies on the condition that G0 is not active.
If rapid traverse is to be used on retraction in the blocks from P2 to P0, G0 must be activated
before the SAR block or in the SAR block itself. If an additional F command is programmed
in the actual SAR blocks, it is then ineffective. However, it remains modally active for
following blocks.
Basic Functions
1444 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
W1: Tool offset
17.5 Tool radius compensation 2D (TRC)
3 3 3 3 3
1RYHORFLW\SURJUDPPHG
2QO\)SURJUDPPHG
2QO\)$'SURJUDPPHG
)DQG)$'SURJUDPPHG
5DSLGWUDYHUVHLI*LVDFWLYHRWKHUZLVHZLWKWKHROGRUQHZ)FRPPDQG
9HORFLW\RISUHFHGLQJEORFNROG)FRPPDQG
5HWUDFWLRQYHORFLW\SURJUDPPHGZLWK)$'
1HZPRGDOYHORFLW\SURJUDPPHGZLWK)
Changing the WCS between the SAR block and the read operation has no effect on the
position values.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1445
W1: Tool offset
17.5 Tool radius compensation 2D (TRC)
Supplementary conditions
● Any further NC commands (e.g. auxiliary function outputs, synchronous axis movements,
positioning axis movements, etc.) can be programmed in an SAR block.
These are executed in the first subblock on approach and in the last subblock on
retraction.
● If the end point P4 is not taken from the SAR block but from a subsequent traversing
block, the actual SAR contour (straight line, quadrant or semicircle) is traversed in this
block.
The last subblock of the original SAR block does not then contain traversing information
for geometry axes. It is always output, however, because further actions (e.g. single
axes) may have to be executed in this block.
● At least two blocks must always be taken into consideration:
– The SAR block itself
– The block, which defines the approach or retraction direction
Further blocks can be programmed between these two blocks.
The number of possible dummy blocks is limited with the machine data:
MD20202 $MC_WAB_MAXNUM_DUMMY_BLOCKS (maximum number of blocks with no
traversing motions with SAR).
● If tool radius compensation is activated simultaneously in an approach block the first
linear block of the SAR contour is the block in which activation takes place.
The complete contour generated by the SAR function is treated by tool radius
compensation as if it has been programmed explicitly (collision detection, calculation of
intersection, approach behavior NORM/KONT).
● The direction of the infeed motion and the position of the circle plane or the helix axis are
defined exclusively by the active plane (G17 - G19) - rotated with an active frame where
appropriate.
● On approach, a preprocessor stop must not be inserted between the SAR block and the
following block which defines the direction of the tangent.
Whether programmed explicitly or inserted automatically by the control, a preprocessor
stop results, in this case, in an alarm.
Basic Functions
1446 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
W1: Tool offset
17.5 Tool radius compensation 2D (TRC)
17.5.4.6 Examples
Example 1
The following conditions must be true:
● Smooth approach is activated in block N20
● X=40 (end point); Y=0; Z=0
● Approach movement performed with quadrant (G247)
● Approach direction not programmed, G140 is valid, i.e. because TRC is active (G42) and
compensation value is positive (10), the contour is approached from the right
● Approach circle generated internally (SAR contour) has radius 20, so that the radius of
the tool center path is equal to the programmed value DISR=10
● Because of G341, the approach movement takes place with a circle in the plane, resulting
in a start point at (20, -20, 0)
● Because DISCL=5, point P2 is at position (20, -20, 5) and, because of Z30, point P1 is in
N10 at (20, -20, 30)
<
6$5FRQWRXU
;
7RRO
7RROFHQWHUSDWK
,QIHHG
PRYHPHQWLQ=
Part program:
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1447
W1: Tool offset
17.5 Tool radius compensation 2D (TRC)
Example 2
The following conditions must be true for approach:
● Smooth approach is activated in block N20
● Approach movement performed with quadrant (G247)
● Approach direction not programmed, G140 is valid, i.e. because TRC is active (G41), the
contour is approached from the left
● Contour offset OFFN=5 (N10)
● Current tool radius=10, and so the effective compensation radius for TRC=15; the radius
of the SAR contour is thus equal to 25, with the result that the radius of the tool center
path is equal to DISR=10
● The end point of the circle is obtained from N30, since only the Z position is programmed
in N20
● Infeed motion
– From Z20 to Z7 (DISCL=AC(7)) with rapid traverse
– Then on to Z0 with FAD=200
– Approach circle in X-Y-plane and following blocks with F1500
(In order that this velocity becomes effective in the following blocks, the active G-code
G0 in N30 must be overwritten with G1. Otherwise, the contour would continue to be
machined with G0.)
The following conditions must be true for retraction:
● Smooth retraction is activated in block N60
● Retraction movement performed with quadrant (G248) and helix (G340)
● FAD not programmed, since irrelevant for G340
● Z=2 in the start point; Z=8 in the end point, since DISCL=6
Basic Functions
1448 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
W1: Tool offset
17.5 Tool radius compensation 2D (TRC)
● When DISR=5, the radius of SAR contour=20; that of the tool center point path=5
● After the circle block, the retraction movement leads from Z8 to Z20 and the movement is
parallel to the XY plane up to the end point at X70 Y0
< 7RROFHQWHUSDWK
7RRO
6HPLFLUFOH +HOL[
3DSS
3UHW
3DSS ;
&RQWRXU 3UHW
3DSS 3UHW
Part program:
Note
The contour generated in this way is modified by tool radius compensation, which is
activated in the SAR approach block and deactivated in the SAR retraction block.
The tool radius compensation allows for an effective radius of 15, which is the sum of the
tool radius (10) and the contour offset (5). The resulting radius of the tool center path in the
approach block is therefore 10, and 5 in the retraction block.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1449
W1: Tool offset
17.5 Tool radius compensation 2D (TRC)
G40 instruction
TRC is deselected with the G40 instruction.
G450/G451
The G functions G450/G451 can be used to control the response with discontinuous block
transitions at outside corners:
Command Meaning
G450 Discontinuous block transitions with transition circle
G451 Discontinuous block transitions with intersection of equidistant paths
Basic Functions
1450 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
W1: Tool offset
17.5 Tool radius compensation 2D (TRC)
3URJUDPPLQJ*WUDQVLWLRQFLUFOH 3URJUDPPLQJ*LQWHUVHFWLRQ
2XWVLGHFRUQHU 2XWVLGHFRUQHU
7UDQVLWLRQFLUFOH
UDGLXV WRROUDGLXV
,QWHUVHFWLRQ
Figure 17-23 Example of a 90 degree outside corner with G450 and G451
DISC
The G450 transition circle does not produce sharp outside contour corners because the path
of the tool center point through the transition circle is controlled so that the cutting edge
stops at the outside corner (programmed position). When sharp outside corners are to be
machined with G450, the DISC instruction can be used to program an overshoot. Thus, the
transition circle becomes a conic and the tool cutting edge retracts from the outside corner.
The range of values of the DISC instruction is 0 to 100, in increments of 1.
Value Meaning
DISC = 0 Overshoot disabled, transition circle active
DISC = 100 Overshoot large enough to theoretically produce a response similar to
intersection (G451).
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1451
W1: Tool offset
17.5 Tool radius compensation 2D (TRC)
The programmable maximum value for DISC can be set via the machine data:
MD20220 $MC_CUTCOM_MAX_DISC (max. value for DISC).
Values greater than 50 are generally not advisable with DISC.
&RQLFVHFWLRQ
&LUFOH
&RQWRXUDQJOH
65
',6&
',6&
&RQWRXUDQJOH
5UDGLXV 6WUDYHUVHRYHUVKRRW >GHJUHHV@
65VFDOHGRYHUVKRRWZLWKUHIHUHQFHWRWKHWRROUDGLXV
Basic Functions
1452 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
W1: Tool offset
17.5 Tool radius compensation 2D (TRC)
G451 (intersection)
If G function G451 is active, the position (intersection) resulting from the path lines (straight
line, circle or helix only) located at a distance of the tool radius to the programmed contour
(center-point path of the tool), is approached. Spines and polynomials are never extended.
/RQJLGOHSDWKV
&RQWRXUDQJOH
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1453
W1: Tool offset
17.5 Tool radius compensation 2D (TRC)
%HORZFRQWRXUDQJOH
0'0&B&87&20B&859(B,16(57B/,0,7
QRWDWUDQVLWLRQFLUFOHEXWDQLQWHUVHFWLRQ
&RQWRXUDQJOH
Basic Functions
1454 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
W1: Tool offset
17.5 Tool radius compensation 2D (TRC)
Intersection
If two consecutive blocks form an inside corner, an attempt is made to find a point at which
the two equidistant paths intersect. If an intersection is found, the programmed contour is
shortened to the intersection (first block shortened at end, second block shortened at
beginning).
6KRUWHQHG
FRQWRXU
No intersection
In certain cases, no intersection is found between two consecutive blocks for inside corners
(see figure below).
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1455
W1: Tool offset
17.5 Tool radius compensation 2D (TRC)
1 6
1
1
Figure 17-29 If there is no intersection between N30 and block N40, the intersection between block N30
and block N50 is calculated.
Multiple intersections
It can be the case with inside corners that predictive contour calculation finds multiple
intersections of the equidistant paths in several consecutive blocks. In these cases, the last
intersection is always used as the valid intersection:
6
,QWHUVHFWLRQV
6DQG6DUH
6 6 QRWDSSURDFKHG
Figure 17-30 Example: Inside corner with TRC without contour violation (predicting 3 blocks)
For further information, see also Section "Collision detection and bottleneck detection
(Page 1457)", "Collision monitoring".
Basic Functions
1456 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
W1: Tool offset
17.5 Tool radius compensation 2D (TRC)
Special features
Where multiple intersections with the next block are found, the intersection nearest the start
of the next block applies.
Function
Collision detection (bottleneck detection) examines whether the equidistant paths of non-
consecutive blocks intersect. If an intersection is found, the response is the same as for
inside corners with multiple intersections: The last intersection to be found is valid.
The maximum number of blocks used for the predictive check is set via:
MD20240 $MC_CUTCOM_MAXNUM_CHECK_BLOCKS (blocks for predictive contour
calculation for TRC).
Syntax
CDON
CDOF
CDOF2
Meaning
Further information
With CDOF, an intersection is sought between two consecutive blocks. If an intersection is
found, no further blocks are examined. With outside corners, an intersection is always found
between two consecutive blocks.
Predictive examination of more than two adjacent blocks is thus possible with CDON and CDOF.
Omission of block
If an intersection is detected between two blocks which are not consecutive, none of the
motions programmed between these blocks on the compensation plane are executed. All
other motions and executable instructions (M commands, traversal of positioning axes, etc.)
contained in the omitted blocks are executed at the intersection position in the sequence in
which they are programmed in the NC program.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1457
W1: Tool offset
17.5 Tool radius compensation 2D (TRC)
Warning 10763: "The path component of the block in the compensation plane will become
zero."
If a block has been omitted because of collision detection or bottleneck detection, warning
10763 is displayed. The NC program is not interrupted.
The display of the warning can be suppressed by:
MD11410 $MN_SUPPRES_ALARM_MASK, Bit 1 = 1 (mask supporting special alarm
generation)
2IIVHWFXUYHZKHQ',6&!
FRQLFVHFWLRQ
2IIVHWFXUYHZKHQ
',6& FLUFOH
Basic Functions
1458 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
W1: Tool offset
17.5 Tool radius compensation 2D (TRC)
Supplementary conditions
A variable compensation value is permissible for all types of interpolation (including circular
and spine interpolation).
It is also permitted to change the sign (and, therefore, the compensation side).
3URJUDPPHGFRQWRXU
1
1
1
1
7RROFHQWHUSDWK
1
Calculation of intersection
When the intersections in blocks with variable compensation value are calculated, the
intersection of the offset curves (tool paths) is always calculated based on the assumption
that the compensation value is constant.
If the block with the variable compensation value is the first of the two blocks to be examined
in the direction of travel, then the compensation value at the block end is used for the
calculation; the compensation value at the block start is used otherwise.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1459
W1: Tool offset
17.5 Tool radius compensation 2D (TRC)
' 3URJUDPPHGFRQWRXU
1
7RROFHQWHUSDWK
7KHRUHWLFDOWRROFHQWHU
SRLQWSDWK
&RPSHQVDWLRQ'DW
' HQGRIEORFN1
&RPSHQVDWLRQ'DW
VWDUWRIEORFN1
1 1
Restrictions
If during machining on the inside of the circle the compensation radius becomes geater than
the programmed circle radius, then the machining is rejected with the following alarm:
Alarm 10758 "Curvature radius with variable compensation value too small"
Basic Functions
1460 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
W1: Tool offset
17.5 Tool radius compensation 2D (TRC)
Description
The "Keep tool radius compensation constant" function is used to suppress tool radius
compensation for a number of blocks, whereby a difference between the programmed and
the actual tool center path traveled set up by tool radius compensation in the previous blocks
is retained as the compensation.
It can be an advantage to use this method when several traversing blocks are required
during line milling in the reversal points, but the contours produced by the tool radius
compensation (follow strategies) are not wanted.
Activation
The "Keep tool radius compensation constant" function is activated with the G code CUTCONON
(CUTter compensation CONstant ON) and deactivated with the G code CUTCONOF (CUTter
compensation CONstant OFF).
CUTCONON and CUTCONOF form a modal G-code group.
The initial setting is CUTCONOF.
The function can be used independently of the type of tool radius compensation (21/2D, 3D
face milling, 3D circumferential milling).
Normal case
Tool radius compensation is normally active before the compensation suppression and is still
active when the compensation suppression is deactivated again.
In the last traversing block before CUTCONON, the offset point in the block end point is
approached. All following blocks, in which compensation suppression is active, are traversed
without compensation. However, they are offset by the vector from the end point of the last
offset block to its offset point. These blocks can have any type of interpolation (linear,
circular, polynomial).
The deactivation block of the compensation suppression, i.e. the block that contains
CUTCONOF, is compensated normally. It starts in the offset point of the start point. One linear
block is inserted between the end point of the previous block, i.e. the last programmed
traversing block with active CUTCONON, and this point.
Circular blocks, for which the circle plane is perpendicular to the compensation plane
(vertical circles), are treated as though they had CUTCONON programmed. This implicit
activation of compensation suppression is automatically canceled in the first traversing block
that contains a traversing motion in the compensation plane and is not such a circle. Vertical
circle in this sense can only occur during circumferential milling.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1461
W1: Tool offset
17.5 Tool radius compensation 2D (TRC)
Example:
<
&RQWRXUZLWKRXW75&
1
1
&RQWRXUZLWK75& 1
1
1
1
1 1 ;
Basic Functions
1462 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
W1: Tool offset
17.5 Tool radius compensation 2D (TRC)
Special cases
● If tool radius compensation is not active (G40), CUTCONON has no effect. No alarm is
produced. The G code remains active, however.
This is significant if tool radius compensation is to be activated in a later block with G41 or
G42.
● It is permissible to change the G code in the 7th G-code group (tool radius compensation;
G40 / G41 / G42) with CUTCONON active. A change to G40 is active immediately.
● The response after reprogramming G41 or G42 when tool radius compensation is already
active is similar to compensation suppression.
The following deviations apply:
– Only linear blocks are permissible
– A single traversing block that contains G41 or G42 is modified so that it ends at the
offset point of the start point in the following block. Thus it is not necessary to insert a
dummy block. The same applies to the last block in a sequence of traversing blocks
where each contains G41 or G42.
– The contour is always reapproached with NORM, independent of the G code of the 17th
group (approach and retraction behavior with tool compensation; NORM / KONT).
● If G41 / G42 is programmed several times in consecutive traversing blocks, all blocks are
machined as for CUTCONON, except for the last one.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1463
W1: Tool offset
17.5 Tool radius compensation 2D (TRC)
● The type of contour suppression is evaluated only in the first traversing block of a
sequence of consecutive traversing blocks.
If both CUTCONON and G41 or G42 are programmed in the first block, the response to
deactivating contour suppression is determined by CUTCONON.
Changing from G41 to G42 or vice versa makes sense in this case as a means of changing
the compensation side (left or right of the contour) when restarting.
A change of compensation side (G41/G42) can also be programmed in a later block, even if
contour suppression is active.
● Collision detection and bottleneck detection is deactivated for all blocks with active
contour suppression.
Basic Functions
1464 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
W1: Tool offset
17.5 Tool radius compensation 2D (TRC)
Function
If two curves with active tool radius compensation form an outside corner, depending on the
G code of the 18th group (corner behavior with tool compensation; G450 / G451) and
regardless of the type of curves involved (straight lines, circles, polynomials):
● Either a conic is inserted to bypass the corner
Or
● The curves involved are extrapolated to form an intersection.
If no intersection is found with G451 activated, or if the angle formed by the two curves is too
steep, switchover to insert mode is automatic.
The intersection procedure for polynomials is released with the machine data:
MD20256 $MC_CUTCOM_INTERS_POLY_ENABLE (Intersection process possible for
polynomials)
Note
If this machine data is set to inactive, a block (can be very short) is always inserted (even if
transitions are almost tangential). These short blocks always produce unwanted drops in
speed during G64 operation.
Function
In certain special geometrical situations, extended approach and retraction strategies,
compared with the previous implementation, are required in order to activate or deactivate
tool radius compensation (see figure below).
Note
The following example describes only the situation for deactivation of tool radius
compensation. The response for approach is virtually identical.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1465
W1: Tool offset
17.5 Tool radius compensation 2D (TRC)
Example
<
1
7RROUDGLXV
;
&HQWHUSRLQWSDWKZLWK
7RROUDGLXVFRPSHQVDWLRQ
3URJUDPPHG
FRQWRXU
1 1
The last block with active tool radius compensation (N20) is so short that an intersection no
longer exists between the offset curve and the preceding block (or a previous block) for the
current tool radius. An intersection between the offset curves of the following and preceding
blocks is therefore sought, i.e., between N10 and N30 in this example. The curve used for the
retraction block is not a real offset curve, but a straight line from the offset point at the end of
block N20 to the programmed end point of N30. The intersection is approached if one is found.
The colored area in the figure is not machined, although the tool used would be capable of
this.
G460
With G460, the approach/retraction strategy is the same as before.
Basic Functions
1466 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
W1: Tool offset
17.5 Tool radius compensation 2D (TRC)
G461
If no intersection is possible between the last TRC block and a preceding block, the offset
curve of this block is extended with a circle whose center point lies at the end point of the
uncorrected block and whose radius is equal to the tool radius.
<
$X[LOLDU\FXUYH
1
;
&HQWHUSRLQWSDWKZLWK
WRROUDGLXVFRPSHQVDWLRQ
3URJUDPPHG
FRQWRXU
1 1
The control attempts to cut this circle with one of the preceding blocks. If CDOF is active, the
search is terminated when an intersection is found, i.e., the system does not check for more
intersections with even earlier blocks.
If CDON is active, the search for more intersections continues after the first intersection is
found.
An intersection point, which is found in this way, is the new end point of a preceding block
and the start point of the deactivation block. The inserted circle is used exclusively to
calculate the intersection and does not produce a traversing movement.
Note
If no intersection is found, the following alarm is output:
Alarm "10751 Collision danger"
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1467
W1: Tool offset
17.5 Tool radius compensation 2D (TRC)
G462
If no intersection is possible between the last TRC block and a preceding block, a straight
line is inserted, on retraction with G462 (initial setting), at the end point of the last block with
tool radius compensation (the block is extended by its end tangent).
<
$X[LOLDU\FXUYH
1
;
1
&HQWHUSDWK
FRUUHFWHGSDWK
3URJUDPPHG
FRQWRXU
1 1
The search for the intersection is then identical to the procedure for G461.
With G462, the corner generated by N10 and N20 in the sample program is not machined to the
full extent actually possible with the tool used. However, this behavior may be necessary if
the part contour (as distinct from the programmed contour), to the left of N20 in the example,
is not permitted to be violated even with y values greater than 10 mm.
If KONT is active (travel round contour at start or end point), behavior will differ according to
whether the end point is in front of or behind the contour.
If, in this situation, the last traversing block has no intersection with a preceding block, an
intersection with the inserted contour element or with the linear section from the end point of
the circumnavigation circle to the programmed end point can result.
If the inserted contour element is a circle (G450), and it intersects with the preceding block,
this is the same as the intersection, which would be produced with NORM and G461. In general,
however, a remaining section of the circle still has to be traversed. An intersection
calculation is no longer required for the linear section of the retraction block.
Basic Functions
1468 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
W1: Tool offset
17.6 Toolholder with orientation capability
In the second case (if no intersection is found between the inserted contour element and the
preceding blocks), the intersection between the retraction straight line and a preceding block
is approached.
Therefore, when G461 or G462 is active, behavior deviating from G460 can only arise if NORM is
active or if behavior with KONT is identical to NORM due to the geometrical conditions.
Note
The approach behavior is symmetrical to the retraction behavior.
The approach/retraction behavior is determined by the state of the G command in the
approach/retraction block. The approach behavior can therefore be set independently of the
retraction behavior.
Example:
Program for using G461 during approach:
17.6.1 General
Introduction
The orientation of the tool can vary (e.g. due to retooling) for one single class of machine
tools. When the machine is operating, the orientation that has been set is permanent,
however, and cannot be changed during traversing. For this reason, kinematic orientation
transformation (3-, 4- or 5axis transformations, TRAORI) is neither necessary nor does it make
sense for such machines. However, it is necessary to take account of the changes in the tool
length components caused by changing the orientation, without having to trouble the user
with mathematics involved. The control performs these calculations.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1469
W1: Tool offset
17.6 Toolholder with orientation capability
Availability
For SINUMERIK 828D, the "toolholder with orientation capability" function is only available
for the milling versions.
Required data
The following requirements must be met if the control is to take tool compensations into
account for toolholders with orientation capability:
● Tool data (geometry, wear, etc.)
● Toolholder data (data for the geometry of the toolholder with orientation capability)
Toolholder selection
A toolholder defined in the control must be specified for the "Toolholder with orientation
capability" function. The NC program command below is used for this purpose:
TCARR = m
Assignment tool/toolholder
The tool that was active previously is assigned to the new toolholder.
From the point of view of the control, toolholder number m and tool number T can be
combined freely. In the real application, however, certain combinations can be ruled out for
machining or mechanical reasons. The control does not check whether the combinations
make sense.
Basic Functions
1470 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
W1: Tool offset
17.6 Toolholder with orientation capability
˳ &
& $
] ˳
9DULDQW 9DULDQW
[
Orientation in Z direction
The G function TOFRAME defines a frame such that the Z direction in this frame is the same as
the current tool orientation.
If no toolholder or a toolholder without change in orientation is active, then the Z direction is
in the new frame:
● The same as the old Z direction with G17.
● The same as the old Y direction with G18.
● The same as the old X direction with G19.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1471
W1: Tool offset
17.6 Toolholder with orientation capability
Frame change
The user can change the frame following selection of the tool. This does not have any effect
on the tool length compensation components.
Angles in the toolholder data:
The programmed angles of rotation stored in the toolholder data is not affected by the angle
of rotation defined by the frames. When changing from TCOFR to TCOABS, the original
(programmed) angles of rotation in the toolholder data is reactivated.
Basic Functions
1472 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
W1: Tool offset
17.6 Toolholder with orientation capability
Non-rotary toolholders
The tool orientation used internally is dependent only on the basic orientation of the tool and
the active plane (G17 - G19).
Ambiguities
With two axes, a particular tool orientation defined by the frame can generally be set with two
different rotary angle pairs. Of these two, the control selects the setting with which the rotary
angle is as close as possible to the programmed rotary angle.
Storing angles in the toolholder data
In virtually any case where ambiguities may arise, it is necessary to store the approximate
angle expected from the frame in the toolholder data.
Parameter sets
A complete parameter set for a toolholder with orientation capability consists of 33 values.
The following system variables are available:
● $TC_CARR1 to $TC_CARR33
● In addition, $TC_CARR34 to $TC_CARR65 are freely available for the user and for fine
offsets.
The significance of the individual parameters is distinguished as follows:
Machine kinematics:
$TC_CARR1 to $TC_CARR20 and $TC_CARR23
$TC_CARR18 to $TC_CARR20 define a further vector l4, which is needed to describe the
machine with extended kinematics (both tool and workpiece can be rotated).
$TC_CARR21 and $TC_CARR22 contain the channel-axis names of the rotary axes, the
positions of which can be used to determine the orientation of the toolholder with orientation
capability, if necessary.
Kinematic type:
$TC_CARR23 using letter T, P or M
The following three options are available for the kinematic type, for which both upper and
lower case text are permissible:
Any character other than the three mentioned here will result in an alarm if it is tried to
activate the toolholder with orientation capability:
Alarm "14153 Channel %1 block %2 unknown toolholder type: %3"
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1473
W1: Tool offset
17.6 Toolholder with orientation capability
Note
The system variables are available with and without active tool management.
n: Parameters 1...33
m: Number of the toolholder 1 that can be oriented...Value of the machine data:
MD18088 $MN_MM_NUM_TOOL_CARRIER (maximum number of definable
toolholders)
Basic Functions
1474 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
W1: Tool offset
17.6 Toolholder with orientation capability
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1475
W1: Tool offset
17.6 Toolholder with orientation capability
Basic Functions
1476 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
W1: Tool offset
17.6 Toolholder with orientation capability
Zero vectors
Vectors v1 and v2 can be zero. The associated angle of rotation (explicitly programmed or
calculated from the active frame) must then also be zero, since the direction of the rotating
axis is not defined. If this condition is not satisfied, an alarm is produced when the toolholder
is activated.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1477
W1: Tool offset
17.6 Toolholder with orientation capability
7RROKROGHUUHIHUHQFHSRLQW
O 5HVXOWLQJWRROOHQJWKFRPSHQVDWLRQ
7RROUHIHUHQFH
SRLQW
Y˞
O 7RROOHQJWK
ZHDU
WRROEDVHGLPHQVLRQ
O Y˞
7RRORULHQWDWLRQ
Vectors, which describe offsets in the rotary head, are positive in the direction from the tool
tip to the reference point of the toolholder.
The following kinematic type is defined for machines with a rotary tool:
$TC_CARR23 using letter T
Basic Functions
1478 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
W1: Tool offset
17.6 Toolholder with orientation capability
5HIHUHQFHSRLQWRI
O WKHWRROWDEOH
O
Y˞
O Y˞
0DFKLQHUHIHUHQFHSRLQW
Vectors, which describe offsets in the rotary table, are positive in the direction from the
machine reference point to the table.
The following kinematic type is defined for machines with a rotary workpiece:
$TC_CARR23 using letter P
Note
On machines with rotary workpiece it is generally useful if the selected machine reference
point and the reference point of the table are identical. Selecting the reference points in this
way has the advantage that the position of the workpiece zero in the initial state (i.e. with
rotary axes not turned) does not change when the rotary table is activated. The (open)
kinematic chain (see figure) is then closed.
In this special case, therefore, the following formula applies: l2 = - (l3 + l4)
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1479
W1: Tool offset
17.6 Toolholder with orientation capability
5HIHUHQFHSRLQWRIWKHWRROKROGHU
O
5HVXOWLQJWRROOHQJWKFRPSHQVDWLRQ
5HIHUHQFHSRLQWRIWKHWRRO
Y˞
5HIHUHQFHSRLQWRIWKHWRROWDEOH
7RROOHQJWK
ZHDU
O WRROEDVHGLPHQVLRQ
Y˞ O
O
7RRORULHQWDWLRQ 0DFKLQHUHIHUHQFHSRLQW
The following kinematic type is defined for machines with a rotary tool and rotary workpiece:
$TC_CARR23 using letter M (extended kinematics)
Note
On machines with extended kinematics it is generally useful, as with machines where only
the table can be rotated, for the machine reference point and the reference point of the table
to be identical. The (open) chain component to describe the table (see figure) is then closed.
In this special case, the following formula applies: l3 = - l4
Basic Functions
1480 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
W1: Tool offset
17.6 Toolholder with orientation capability
Fine offset
The offset vectors l1 to l4 and the offsets of the rotary axes v1 and v2 can be represented as
the sum of a basic value and a fine offset. The fine offset parameters assigned to the basic
values are achieved by adding a value of 40 to the index of the basic value.
Example:
The parameter $TC_CARR5 is assigned to the fine offset $TC_CARR45.
Note
For the significance of the system variables $TC_CARR41 to $TC_CARR65 available for the
fine offset see:
References:
Programming Manual, Job Planning; Tool Offsets:
Activation
The following setting adds the fine offset values to the basic values:
SD42974 $SC_TOCARR_FINE_CORRECTION = 1 (fine offset TCARR on/off)
Supplementary conditions
The amount is limited to the permissible fine offset.
The maximum permissible value is defined:
• The offsets of the two rotary axes v1 and v2: MD20190 $MC_TOCARR_FINE_LIM_ROT
Description of a rotation
A data block for describing a rotation comprises one vector v1 /v2 to describe the direction of
rotation of the rotary axis in its initial state and an angle α1/α2. The angle of rotation is
counted positively for clockwise rotation facing the direction of the rotation vector.
The two toolholder angles α1 and α2 are determined using a frame, independent of the
active plane currently selected (G17 - G19).
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1481
W1: Tool offset
17.6 Toolholder with orientation capability
The tool orientation in the initial state (both angles α1 and α2 are zero) is (as in the default
case):
● G17: Parallel to Z.
● G18: Parallel to Y.
● G19: Parallel to Z
Note
The tool reference point for the tool base dimension is defined by the reference point at the
machine.
For further information about the reference points in the working area, see Section "K2: Axis
Types, Coordinate Systems, Frames (Page 647)".
]
\
Y
$[LV
Y 7RROUHIHUHQFHSRLQW
O
O O
$[LV
7RROEDVHGLPHQVLRQ
7RROFDUULHUUHIHUHQFHSRLQW
PP
/HQJWK:HDU
5HVXOWLQJWRROOHQJWKFRPSHQVDWLRQ
Basic Functions
1482 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
W1: Tool offset
17.6 Toolholder with orientation capability
Suitable assumptions were made for the following values in the data block:
● The two rotary axes intersect at one point.
All components of l2 are therefore zero.
● The first rotary axis lies in the x/z plane, the second rotary axis is parallel to the x axis.
These conditions define the directions of v1 and v2 (the lengths are irrelevant, provided
that they are not equal to zero).
● The reference point of the toolholder lies 200 mm in the negative x direction viewed from
the intersection of the two rotary axes.
This condition defines l1 .
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1483
W1: Tool offset
17.6 Toolholder with orientation capability
Explanations
The toolholder kinematic chosen in the example is such that the two rotary axes form an
angle of 45 degrees, which means that the orientation cannot take just any value. In
concrete terms, this example does not permit the display of orientations with negative X
components.
Note
The required data cannot be determined unequivocally from the geometry of the toolholder,
i.e. the user is free to a certain extent to decide the data to be stored. Thus, for the example,
it is possible to specify only one z component for the tool base dimension up to the second
axis. In this case, l2 would no longer be zero, but would contain the components of the
distance between this point on the second axis and a further point on the first axis. The point
on the first axis can also be selected freely. Depending on the point selected, l1 must be
selected such that the reference point (which can also be selected freely) is reached.
In general: vector components that are not changed by rotation of an axis can be distributed
over any vectors "before" and "after" rotation.
Description of function
Inclined machining with 3 + 2 axes describes an extension of the concept of toolholders with
orientation capability and applies this concept to machines with a rotary table, on which the
orientation of tool and table can be changed simultaneously.
The "Inclined machining with 3 + 2 axes" function is used to machine surfaces with any
rotation with reference to the main planes X/Y (G17), Z/X (G18) and Y/Z (G19).
It is possible to produce any orientation of the tool relative to the workpiece by rotating either
the tool, the workpiece or both the tool and the workpiece.
The software automatically calculates the necessary compensating movements resulting
from the tool lengths, lever arms and the angle of the rotary axis. It is always assumed that
the required orientation is set first and not modified during a machining process such as
pocket milling on an inclined plane.
Basic Functions
1484 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
W1: Tool offset
17.6 Toolholder with orientation capability
Furthermore, the following 3 functions are described, which are required for oblique
machining:
● Position programming in the direction of the tool orientation independent of an active
frame
● Definition of a frame rotation by specifying the solid angle
● Definition of the component of rotation in tool direction in the programmed frame while
maintaining the remaining frame components
System variables
To date, the angles stored in $TC_CARR13 and $TC_CARR14 were used for the calculation
of the active tool length with TCOABS. This still applies if $TC_CARR21 and $TC_CARR22 do
not refer to rotary axes. If $TC_CARR21 or $TC_CARR22 contains a reference to a rotary
axis in the channel, the axis position of the relevant axis at the start of the current block is
used as the angle, rather than the entry in $TC_CARR13 or $TC_CARR14.
A mixed operating mode is permissible, i.e. the angles can be determined from the entry in
the system variables $TC_CARR13 or $TC_CARR14 for one axis, and from the position of a
channel axis for the other.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1485
W1: Tool offset
17.6 Toolholder with orientation capability
This makes it possible for machines, on which the axes used to set the toolholder with
orientation capability are known within the NC, to access their position directly, whereas it
was previously necessary, for example, to read system variable $AA_IM[axis] and write the
result of the read operation to $TC_CARR13/14. In particular, this removes the implicit
preprocessing stop when reading the axis positions.
MD20180
The rotary axis position is used with its programmed or calculated value, when the machine
data:
MD20180 $MC_TOCARR_ROT_ANGLE_INCR[i] = 0 (rotary axis increment of the tool carrier
that can be oriented)
If the machine data is not zero however, the position used is the nearest grid point obtained
for a suitable integer value n from the equation:
φ = $MC_TOCARR_ROT_ANGLE_OFFSET[i] + n * $MC_TOCARR_ROT_ANGLE_INCR[i]
This functionality is required if the rotary axes need to be indexed and cannot, therefore,
assume freely-defined positions (e.g. with Hirth tooth systems). System variable
$P_TCANG[i] delivers the approximated valued and system variable $P_TCDIFF[i] the
difference between the exact and the approximated value.
Basic Functions
1486 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
W1: Tool offset
17.6 Toolholder with orientation capability
2ULJLQDOSRVLWLRQRI
WKHFRRUGLQDWH
V\VWHP 2ULJLQDOSRVLWLRQRIWDEOH
= )UDPHRIIVHW
3RVLWLRQRIFRRUGLQDWHV\VWHP
=
DIWHU3$527
;
=
3RVLWLRQRIFRRUGLQDWHV\VWHP
DIWHU7&$55
;
3RVLWLRQRIWDEOHDIWHUURWDWLRQ
Example
On the machine in the figure, the rotary axis of the table is pointing in the positive Y direction.
The table is rotated by +45 degrees. PAROT defines a frame, which similarly describes a
rotation of 45 degrees about the Y axis. The coordinate system is not rotated relative to the
actual environment (marked in the figure with "Position of the coordinate system after
TCARR"), but is rotated by -45 degrees relative to the defined coordinate system (position after
PAROT). If this coordinate system is defined with ROT Y-45, for example, and if the toolholder is
then selected with active TCOFR, an angle of +45 degrees will be determined for the rotary
axis of the toolholder.
Rotary table
With rotary tables (kinematic types P and M), activation with TCARR similarly does not lead to
an immediate rotation of the coordinate system (see figure), i.e. even though the zero point
of the coordinate system is offset relative to the machine, while remaining fixed relative to
the zero point of the workpiece, the orientation remains unchanged in space.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1487
W1: Tool offset
17.6 Toolholder with orientation capability
The basic frame identified by following machine data is then no longer required for the zero
offset:
MD20184 $MC_TOCARR_BASE_FRAME_NUMBER (number of the basic frames for taking
the table offset)
Rotations
Depending on the machining task, it is necessary to take into account not only a zero offset
(whether as frame or as tool length) when using a rotary toolholder or table, but also a
rotation. However, the activation of a toolholder with orientation capability never leads
directly to a rotation of the coordinate system.
TOROT
If only the tool can be rotated, a frame whose Z axis points in the direction of the tool can be
defined with TOFRAME or TOROT.
PAROT
If the coordinate system needs to be fixed relative to the workpiece, i.e. not only offset
relative to the original position but also rotated according to the rotation of the table, then
PAROT can be used to activate such a rotation in a similar manner to the situation with a rotary
tool.
With PAROT, the translations, scalings and mirrorings in the active frame are retained, but the
rotation component is rotated by the rotation component of a toolholder with orientation
capability corresponding to the table.
PAROT and TOROT take into account the overall change in orientation in cases where the table
or the tool are oriented with two rotary axes. With mixed kinematics only the corresponding
component caused by a rotary axis is considered. It is thus possible, for example, when
using TOROT, to rotate a workpiece such that an oblique plane lies parallel to the XY plane
fixed in space, whereby rotation of the tool must be taken into account in machining where
any holes to be drilled, for example, are not perpendicular to this plane.
Language command PAROT is not rejected if no toolholder with orientation capability is active.
This causes no changes in the programmed frame.
Note
For further information about the TCARR and TOROT as well as PAROT functions with regard to
channel-specific system frames, see Section "K2: Axis Types, Coordinate Systems, Frames
(Page 647)".
Basic Functions
1488 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
W1: Tool offset
17.6 Toolholder with orientation capability
Creating a toolholder
The number of available toolholder data sets in the NCK is defined with machine data:
MD18088 $MN_MM_NUM_TOOL_CARRIER (maximum number of definable tool carriers)
1. The value is calculated as follows:
MD18088 = "Number of TO units" * "Number of toolholder data sets of a TO unit"
MD18088/"number of TO units" is permanently allocated to each TO unit.
Note
For further explanations on the definition and assignment of a TO unit by machine data:
MD28085 $MC_MM_LINK_TOA_UNIT (assignment of a TO unit to a channel (SRAM))
References:
Function Manual, Extended Functions; Memory Configuration (S7)
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1489
W1: Tool offset
17.6 Toolholder with orientation capability
The toolholder with orientation capability is set so that the tool points in the X direction.
● TCOFRY
The toolholder with orientation capability is set so that the tool points in the Y direction.
The effect of TCOFR is such that, when machining on an inclined surface, tool compensations
are considered implicitly as if the tool were standing vertically on the surface.
Note
The tool orientation is not bound strictly to the frame orientation. When a frame is active and
G code TCOABS is active, you can select a tool, whereby the orientation of the tool is
independent of the orientation of the active frame.
Following tool selection, you can change the frame, which does not affect the components of
tool length compensation. It is then no longer certain that the tool is positioned perpendicular
to the machining plane. You should therefore first check that the intended tool orientation is
maintained on an inclined surface.
When TCOFR, etc., is active, the tool orientation used in the tool length calculation is always
determined from the active frame each time the toolholder is changed.
Basic Functions
1490 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
W1: Tool offset
17.6 Toolholder with orientation capability
Group change
Changing the G code from group 42 (TCOABS, TCOFR, etc.) causes recalculation of the tool
length components.
The (programmed) angles of rotation stored in the toolholder data are not affected, with the
result that the angles originally stored in the toolholder data are reactivated on a change
from TCOFR to TCOABS.
Read rotary angle (α1 or α2):
The angles currently used to calculate the orientation can be read via system variable
$P_TCANG[n] where n = 1 or n = 2.
If two permissible solutions (i.e. a second valid pair of angles) are available for a particular
orientation, the values can be accessed with $P_TCANG[3] or $P_TCANG[4]. The number of
valid solutions 0 to 2 can be read with $P_TCSOL.
Tool radius compensation with CUT2D or CUT3DFS:
The current tool orientation is included in the tool radius compensation if either CUT2D or
CUT3DFS is active in G-code group 22 (tool compensation type).
For nonrotating toolholders, the behavior depends solely on the active plane of G code group
6 (G17 - G19) and is, therefore, identical to the previous behavior.
All other tool compensation types:
The behavior for all other tool compensation types is unchanged.
For CUT2DF and CUT3DFF in particular, the compensation plane used for TRC is determined
from the active frame, independent of the current tool orientation. Allowance is made for the
active plane (G17 - G19) and the behavior is, therefore, the same as before.
The two remaining G codes of group 22, CUT3DC and CUT3DF, are not affected by the
toolholder functionality because the tool orientation information in these cases is made
available by the active kinematic transformation.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1491
W1: Tool offset
17.6 Toolholder with orientation capability
Example
The control first calculates an angle of 10 degrees for one axis. The specified angle is 750
degrees. 720 degrees (= 2 * 360 degrees) are then added to the initial angle, resulting in a
final angle of 730 degrees.
Limit values
Limit angles (software limits) can be specified for each rotary axis in the system variable set
($TC_CARR30 to $TC_CARR33) used to describe the toolholder with orientation capability.
These limits are not evaluated if both the minimum and maximum value is zero.
If at least one of the two limits is not equal to zero, the system checks whether the previously
calculated solution is within the permissible limits. If this is not the case, an initial attempt is
made to reach a valid setting by adding or subtracting multiples of 360 degrees to or from
the invalid axis position. If this is impossible and two different solutions exist, the first solution
is discarded and the second solution is used. The second solution is treated the same as the
first with reference to the axis limits.
If the first solution is discarded and the second used instead, the contents of $P_TCANG[1/2]
and $P_TCANG[3/4] are swapped, hence the solution actually used is also stored in
$P_TCANG[1/2] in this case.
The axis limits are monitored even if the axis angle is specified instead of being calculated.
This is the case if TCOABS is active when a toolholder with orientation capability is activated.
Basic Functions
1492 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
W1: Tool offset
17.6 Toolholder with orientation capability
17.6.6 Programming
The parameters of a tool holder m can, as far as the toolholder data set is already defined,
read with:
value = $TC_CARRn[m] (Value must be a REAL variable)
The toolholder data set number must lie in the range, which is defined by the machine data:
MD18088 $MN_MM_NUM_TOOL_CARRIER (Total number of toolholder data sets that can
be defined)
This number of toolholder data sets, divided by the number of active channels, can be
defined for a channel.
Exception:
If settings, which deviate from the standard, are selected via the machine data:
MD28085 $MC_MM_LINK_TOA_UNIT (Assignment of TO unit to a channel).
Activation
A toolholder becomes active when both a toolholder and a tool have been activated. The
selection of the toolholder alone has no effect. The effect of selecting a toolholder depends
on the G code TCOABS / TCOFR (modal G-code group for toolholders).
Changing the G code in the TCOABS / TCOFR group causes recalculation of the tool length
components when the toolholder is active. With TCOABS, the values stored in the toolholder
data for both angles of rotation α1 and α2 are used to determine the tool orientation.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1493
W1: Tool offset
17.6 Toolholder with orientation capability
With TCOFR, the two angles are determined from the current frame. The values stored in the
toolholder data are not changed, however. These are also used to resolve the ambiguity that
can result when the angle of rotation is calculated from one frame. Here, the angle that
deviates least from the programmed angle is selected from the various possible angles.
Note
For more explanations on the programming of tool compensations with toolholder kinematic
and for the system variables see:
References:
Programming Manual, Job Planning
Full orientation
For a given data set that describes a certain kinematic, all the conceivable special
orientations can only be displayed when the following conditions are satisfied:
● The two vectors v1 and v2 that describe the rotary axes must also be defined (i.e. both
vectors must not be equal to zero).
● The two vectors v1 and v2 must be perpendicular to each other.
● The tool orientation must be perpendicular to the second rotary axis.
Non-defined orientation
If these conditions are not satisfied and an orientation that cannot be achieved by an active
frame is requested with TCOFR, an alarm is output.
Vector/angle of rotation dependencies
If vector v1 or v2, which describes the direction of a rotary axis, is set to zero, the associated
angle of rotation α1 or α2 must also be set to zero. Otherwise, an alarm is produced. The
alarm is not output until the toolholder is activated, i.e. when the toolholder is changed.
Tool fine compensation combined with orientation
Tool fine compensations and toolholders cannot be combined. The activation of tool fine
compensation when a toolholder is active, and vice versa the activation of the toolholder
when tool fine compensation is active, produces an alarm.
Basic Functions
1494 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
W1: Tool offset
17.6 Toolholder with orientation capability
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1495
W1: Tool offset
17.6 Toolholder with orientation capability
Toolholder kinematics
The following supplementary conditions must be met for toolholder kinematics:
● Tool orientation in initial state, both angles α1 and α2 zero, as per default setting, even if:
– G17 parallel to Z
– G18 Parallel to Y
– G19 parallel to Z
● A permissible position in terms of the axis limits must be achievable.
● For any possible orientation to be set, the two rotary axes must be perpendicular to each
other.
For machines, on which the table is rotated by both axes, the tool orientation must also
be perpendicular to the first rotary axis.
For machines with mixed kinematics, the tool orientation must be perpendicular to the
axis which rotates the tool, i.e. also the first rotary axis.
The following applies to orientations specified in a frame:
● The orientation specified in a frame must be achievable with the defined toolholder
kinematics, otherwise an alarm is output.
This situation can occur if the two rotary axes required to define the kinematics are not
perpendicular to each other.
This applies if fewer than two rotary axes are defined and is the case:
– With kinematic type T with rotary tool, if the tool axis, which defines the tool direction,
is not perpendicular to the second axis.
– With kinematic types M and P with rotary workpiece, if the tool axis, which defines the
tool direction, is not perpendicular to the first axis.
● Rotary axes, which require a frame with a defined tool orientation in order to reach a
specific position, are only determined unambiguously in the case of one rotary axis. Two
general solutions exist for two rotary axes.
● In all cases where ambiguities may arise, it is particularly important that the approximate
angles expected from the frame are stored in the tool data, and that the rotary axes are in
the vicinity of the expected positions.
Basic Functions
1496 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
W1: Tool offset
17.7 Cutting edge data modification for tools that can be rotated
17.7 Cutting edge data modification for tools that can be rotated
17.7.1 Function
Using the function "cutting data modification for rotatable tools", the changed geometrical
relationships, that are obtained relative to the workpiece being machined when rotating tools
(predominantly turning tools, but also drilling and milling tools) can be taken into account.
ˠ
˟
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1497
W1: Tool offset
17.7 Cutting edge data modification for tools that can be rotated
17.7.3 Cutting edge position, cut direction and angle for rotary tools
Turning tools
Turning tools means the following tools whose tool type ($TC_DP1) has values in the range
of 500 to 599. Grinding tools (tool types 400 to 499) are equivalent to turning tools.
Tools are treated independently of tool type such as turning tools if:
SD42950 $SC_TOOL_LENGTH_TYPE = 2
/HQJWKRIFXWWLQJHGJH &XWGLUHFWLRQ
;
=
Figure 17-44 Cutting edge position and cut direction for turning tools
The values 1 to 4 characterize the cases in which both cutting edges lie in the same
quadrant; the values 5 to 8 characterize the cases in which both cutting edges lie in
neighboring quadrants or there is a coordinate axis between the two cutting edges. The
cutting edge position is stored in the tool parameter $TC_DP2.
A cut direction can be defined for each turning tool. It is stored in the tool parameter
$TC_DP11. It has values between 1 and 4, and it characterizes a positive or negative
direction of the coordinate axes:
Value: Meaning:
1 Ordinate -
2 Ordinate +
3 Abscissa -
4 Abscissa +
Basic Functions
1498 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
W1: Tool offset
17.7 Cutting edge data modification for tools that can be rotated
Two different cut directions can be assigned to each cutting edge position:
; 3ODWHDQJOH rKROGHUDQJOHIUHHDQJOH
+ROGHUDQJOH7&B'3
)UHHDQJOH7&B'3
&XWGLUHFWLRQ =
Figure 17-45 Angle and cut direction for a turning tool with cutting edge position 3
The cut direction specifies the reference direction of the holder angle. The clearance angle is
the angle measured between the inverse cut direction and the adjacent cutting edge
(positive). Holder angle and clearance angle are stored in the tool parameters $TC_DP10 or
$TC_DP24.
Note
Cut direction and tool angle are relevant only in the cutting edge positions 1 to 8.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1499
W1: Tool offset
17.7 Cutting edge data modification for tools that can be rotated
Tool orientation
Unlike milling tools, turning tools are not rotation-symmetric. This means that normally 3
degrees of freedom or three rotary axes are required to describe the tool orientation. The
concrete kinematics therefore, is independent of the machine only to the extent the desired
orientation can be set. If necessary, the third degree of freedom can be substituted by a
rotation of the tool coordinate system.
Note
The division of the orientation into one component created by the toolholder with orientation
capability and a second componnet achieved via a rotation of the coordinate system is the
responsibility of the application. The control does not provide any further functionality in this
regard.
Basic Functions
1500 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
W1: Tool offset
17.7 Cutting edge data modification for tools that can be rotated
Depending on the rotation, the cut direction is modified in such a way that the resulting
clearance angle remains less than 90°. If the original cut direction and the original cutting
edge position do not match, then the cut direction is not modified during rotation of the tool
(see Section "Cutting edge position, cut direction and angle for rotary tools (Page 1498)").
The angle of rotation in the plane, as it was determined from the toolholder with orientation
capability, is available in the system variable $P_CUTMOD_ANG or $AC_CUTMOD_ANG.
This angle is the original angle without any final rounding to multiples of 45° or 90°.
Limit cases
If, for a turning tool, the cutting edge position, cut direction , clearance and holder angles
have valid values so that all cutting edge positions (1 to 8) are possible through suitable
rotations in the plane, then the cutting edge positions 1 to 4 are preferred to cutting edge
positions 5 to 8 in the cases in which one of the cutting edges (main or secondary cutting
edge) is away from the coordinate axis by less than half the input increment ((0.0005° for an
input specification of 3 decimal digits).
The following is applicable in all other cases (milling tools or turning tools without valid
cutting edge parameters) in which rotation is possible only in 90° steps: If the amount of the
rotation angle is smaller than 45° + 0.5 input increments (corresponds to 45.0005° for an
input specification of three decimal places), the cutting edge position and cut direction are
not changed, i.e. these cases are treated as rotations that are smaller than 45°. Rotations,
the amount of which deviates from 180° by less than 45° + 0.5 input increments are treated
identically as rotations in the range of 135° to 225°.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1501
W1: Tool offset
17.7 Cutting edge data modification for tools that can be rotated
QHZFXWWLQJHGJHUHIHUHQFHSRLQW
6/
6/
FXWWLQJHGJHUHIHUHQFHSRLQW
6/
ROGFXWWLQJUHIHUHQFHSRLQW
Figure 17-46 Cutting edge reference point and cutting edge position (SL) for tool rotation
A tool with the cutting edge position 3, the clearance angle 22.5° and holder angle 112.5° is
rotated. For rotations up to 22.5°, the cutting edge position is maintained, the position of the
cutting edge reference point relative to the tool however, is compensated in such a way that
the relative position of both points are maintained in the machining plane. For bigger
rotations (up to 67.5°), the cutting edge position changes to value 8.
Note
As the cutting edge reference point is defined by the tool length vector, modifying the cutting
edge reference point changes the effective tool length.
Basic Functions
1502 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
W1: Tool offset
17.7 Cutting edge data modification for tools that can be rotated
Any specified cutting edge position for tools that are not milling and tapping tools or turning
tools according to the mentioned definitions, is not evaluated.
The cutting edge position of the tapping and milling tools is stored in tool parameter
$TC_DP2 as in the case of turning tools. Based on the definition of the cutting edge position
for turning tools, this parameter can assume the values 5 to 8. Here, the cutting edge
position specifies the orientation (the direction of the rotation axis) of the tool:
Example
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1503
W1: Tool offset
17.7 Cutting edge data modification for tools that can be rotated
Reaction to errors
Different fault conditions can occur during the activation of the "Cutting edge data
modification for rotary tools" function (via explicit call with CUTMOD or through a tool selection).
For each of these possible fault conditions, one can define whether the error is to trigger an
alarm output, whether such an alarm is only to be displayed (warning), or whether
additionally the interpretation of the part program must be cancelled. The setting is done via
the following machine data:
MD20125 $MC_CUTMOD_ERR
Two bits of the machine data are assigned to each fault condition:
Basic Functions
1504 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
W1: Tool offset
17.7 Cutting edge data modification for tools that can be rotated
Response to POWER ON
The "cutting edge data modification for rotary tools" function (CUTMOD) is initialized
automatically during POWER ON with the value stored in machine data:
MD20127 $MC_CUTMOD_INIT
If the value of this machine data is "-2", CUTMOD is set to the value that is set in machine
data:
MD20126 $MC_TOOL_CARRIER_RESET_VALUE (Active toolholder at RESET)
17.7.8 Programming
The "Cutting edge data modification for rotary tools" function is activated with the CUTMOD
command.
Syntax
CUTMOD=<value>
Meaning
CUTMOD
Command to switch-in the function "cutting data modification for tools that can
be rotated"
<value>
The following values can be assigned to the CUTMOD command:
0 The function is deactivated.
The values supplied from system variables $P_AD... are the same as
the corresponding tool parameters.
>0 The function is activated if a toolholder that can be orientated with the
specified number is active, i.e. the activation is linked to a specific
toolholder that can be orientated.
The values supplied from system variables $P_AD... may be modified
with respect to the corresponding tool parameters depending on the
active rotation.
The deactivation of the designated toolholder that can be orientated
temporarily deactivates the function; the activation of another toolholder
that can be orientated permanently deactivates it. This is the reason
that in the first case, the function is re-activated when again selecting
the same toolholder that can be orientated; in the second case, a new
selection is required - even if at a subsequent time, the toolholder that
can be orientated is re-activated with the specified number.
The function is not influenced by a reset.
-1 The function is always activated if a toolholder that can be orientated is
active.
When changing the toolholder or when de-selecting it and a subsequent
new selection, CUTMOD does not have to be set again.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1505
W1: Tool offset
17.7 Cutting edge data modification for tools that can be rotated
Note
SD42984 $SC_CUTDIRMOD
The function that can be activated using the CUTMOD command replaces the function that can
be activated using the setting data SD42984 $SC_CUTDIRMOD. However, this function
remains available unchanged, because it doesn't make sense to use both functions in
parallel, it can only be activated if CUTMOD is equal to zero.
Basic Functions
1506 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
W1: Tool offset
17.7 Cutting edge data modification for tools that can be rotated
System variables
The following system variables are available:
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1507
W1: Tool offset
17.7 Cutting edge data modification for tools that can be rotated
Note
The data is always modified with respect to the corresponding tool parameters ($TC_DP2[...,
...] etc.) if the function "cutting data modification for rotatable tools" was activated using the
command CUTMOD and a toolholder that can be orientated, which causes a rotation, is
activated.
17.7.9 Example
The following example refers to a tool with tool nose position 3 and a toolholder that can be
orientated, which can rotate the tool around the B axis.
The numerical values in the comments specify the end of block positions in the machine
coordinates (MCS) in the sequence X, Y, Z.
Basic Functions
1508 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
W1: Tool offset
17.7 Cutting edge data modification for tools that can be rotated
N190 $TC_CARR13[2]=30
N200 TCARR=2
N210 X0 Y0 Z0 ; 10.892 0.000 -5.134
N220 G42 Z–10 ; 8.696 0.000 –17.330
N230 Z–20 ; 8.696 0.000 –21.330
N240 X10 ; 12.696 0.000 –21.330
N250 G40 X20 Z0 ; 30.892 0.000 –5.134
N310 M30
Explanations:
In block N180, initially the tool is selected for CUTMOD=0 and non-rotated toolholders that can be
orientated. As all offset vectors of the toolholder that can be orientated are 0, the position
that corresponds to the tool lengths specified in $TC_DP3[1,1] and $TC_DP4[1,1] is
approached.
The toolholder that can be orientated with a rotation of 30° around the B axis is activated in
block N200. As the tool nose position is not modified due to CUTMOD=0, the old tool nose
reference point is decisive just as before. This is the reason that in block N210 the position is
approached, which keeps the old tool nose reference point at the zero (i.e. the vector (1, 12)
is rotated through 30° in the Z/X plane).
In block N260, contrary to block N200 CUTMOD=2 is effective. As a result of the rotation of the
toolholder that can be orientated, the modified tool nose position becomes 8. The
consequence of this is also the different axis positions.
The tool radius compensation (TRC) is activated in blocks N220 and/or N270. The different
tool nose positions in both program sections has no effect on the end positions of the blocks
in which the TRC is active; the corresponding positions are therefore identical. The different
tool nose positions only become effective again in the deselect blocks N260 and/or N300.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1509
W1: Tool offset
17.8 Incrementally programmed compensation values
Requirements
Incremental programming with G91 is defined such that the compensation value is traversed
additively to the incrementally programmed value when a tool compensation is selected.
Applications
For applications such as scratching, it is necessary only to traverse the path programmed in
the incremental coordinates. The activated tool compensation is not traversed.
Sequence
Selection of a tool compensation with incremental programming
● Scratch workpiece with tool tip.
● Save the actual position in the basic frame (set actual value) after reducing it by the tool
compensation.
● Traverse incrementally from the zero position.
Activation
It is possible to set whether a changed tool length is traversed with FRAME and incremental
programming of an axis, or whether only the programmed path is traversed with the setting
data:
SD42442 $SC_TOOL_OFFSET_INCR_PROG (tool length compensations)
Basic Functions
1510 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
W1: Tool offset
17.8 Incrementally programmed compensation values
Supplementary condition
If the behavior is set such that the offset remains active even after the end of the program
and RESET
MD20110 $MC_RESET_MODE_MASK, bit6=1 (specification of the controller initial setting
after reset / TP end)
and if an incremental path is programmed in the first part program block, the compensation
is always traversed additively to the programmed path.
Note
With this configuration, part programs must always begin with absolute programming.
Typical application
On machines with toolholders with orientation capability, traversing should take place in the
tool direction (typically, when drilling) without activating a frame (e.g., using TOFRAME or
TOROT), on which one of the axes points in the direction of the tool.
This is also true of machines on which a frame defining the oblique plane is active during
oblique machining operations, but the tool cannot be set exactly perpendicular because an
indexed toolholder (Hirth tooth system) is restricting the setting of the tool orientation.
In these cases it is then necessary - contrary to the motion actually requested perpendicular
to the plane - to drill in the tool direction, as the drill would otherwise not be guided in the
direction of its longitudinal axis, which, among other things, would lead to breaking of the
drill.
MOVT
The end point of such a motion is programmed with MOVT= .... The programmed value is
effective incrementally in the tool direction as standard. The positive direction is defined from
the tool tip to the toolholder. The content of MOVT is thus generally negative for the infeed
motion (when drilling), and positive for the retraction motion. This corresponds to the
situation with normal paraxial machining, e.g., with G91Z ....
If the motion is programmed in the form MOVT=AC( ...), MOVT functions absolutely. In this
case a plane is defined, which runs through the current zero point, and whose surface
normal vector is parallel to the tool orientation. MOVT then gives the position relative to this
plane:
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1511
W1: Tool offset
17.8 Incrementally programmed compensation values
7RRO =
$X[LOLDU\SODQH
Figure 17-48 Definition of the position for absolute programming of a motion in tool direction
The reference to this auxiliary plane serves only to calculate the end position. Active frames
are not affected by this internal calculation.
Instead of MOVT= ... it is also possible to write MOVT=IC( ...) if it is to be plainly visible that
MOVT is to function incrementally. There is no functional difference between the two forms.
Supplementary conditions
The following supplementary conditions apply to programming with MOVT:
● It is independent of the existence of a toolholder with orientation capability. The direction
of the motion is dependent on the active plane. It runs in the direction of the vertical axes,
i.e., with G17 in Z direction, with G18 in Y direction and with G19 in X direction. This applies
both where no toolholder with orientation capability is active and for the case of a
toolholder with orientation capability without rotary tool or with a rotary tool in its basic
setting.
● MOVT acts similarly for active orientation transformation (345axis transformation).
● If in a block with MOVT the tool orientation is changed simultaneously (e.g., active 5axis
transformation by means of simultaneous interpolation of the rotary axes), the orientation
at the start of the block is decisive for the direction of movement of MOVT. The path of the
tool tip (TCP - Tool Center Point) is not affected by the change in orientation.
● Linear or spline interpolation (G0, G1, ASPLINE, BSPLINE, CSPLINE) must be active.
Otherwise, an alarm is produced. If a spline interpolation is active, the resultant path is
generally not a straight line, since the end point determined by MOVT is treated as if it had
been programmed explicitly with X, Y, Z.
● A block with MOVT must not contain any programming of geometry axes (alarm 14157).
Basic Functions
1512 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
W1: Tool offset
17.9 Basic tool orientation
Application
Normally, the orientation assigned to the tool itself depends exclusively on the active
machining plane. For example, the tool orientation is parallel to Z with G17, parallel to Y with
G18 and parallel to X with G19.
Different tool orientations can only be programmed by activating a 5axis transformation. The
following system variables have been introduced in order to assign a separate orientation to
each tool cutting edge:
MD18114
The system variables for describing the tool orientation are only available if machine data is
not equal to zero:
MD18114 $MN_MM_ENABLE_TOOL_ORIENT (assign orientation to tool cutting)
MD18114 $MN_MM_ENABLE_TOOL_ORIENT
Value = 1 Only system variable $TC_DPV[t, d] is available.
Value = 2 All four system variables are available.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1513
W1: Tool offset
17.9 Basic tool orientation
$TC_DPV[1, 1] = 0
$TC_DPV3[1, 1] = 1.0
$TC_DPV4[1, 1] = 0.0
$TC_DPV5[1, 1] = 1.0
In this example, the basic orientation points in the direction of the bisector in the L1L3 plane,
i.e., the basic orientation in the bisector for a milling tool and active plane G17 lies in the Z/X
plane.
The active tool orientation is unchanged in these cases and is equivalent to the original
settings in $TC_DPVx[t, d].
The basic orientation is always the direction perpendicular to the plane in which tool radius
compensation is performed. With turning tools, in particular, the tool orientation generally
coincides with the longitudinal tool axis.
The setting data specified below are effective only if the basic orientation of the tool is
defined by an entry in at least one of the system variables $TC_DPVx[t, d].
They have no effect if the tool orientation is only determined by the plane selection G17 - G19
and is compatible with previous behavior.
The plane of the basic orientation for a cutting edge is treated either like a milling tool or like
a turning tool, irrespective of the entry in $TC_DP1, if the following setting data is not equal
to zero:
SD42950 $SC_TOOL_LENGTH_TYPE (allocation of the tool length components
independent of tool type)
Basic Functions
1514 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
W1: Tool offset
17.9 Basic tool orientation
Plane change
A change of plane causes a change in orientation.
The following rotations are initiated:
These rotations are the same as those that have to be performed in order to interchange the
components of the tool length vector on a change of plane.
The basic orientation is also rotated when an adapter transformation is active.
If the following setting data is not equal to zero, the tool orientation is not rotated on a
change of plane:
SD42940 $SC_TOOL_LENGTH_CONST (change of tool length components on change of
planes).
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1515
W1: Tool offset
17.9 Basic tool orientation
* Turning tools in this context are any tools whose tool type ($TC_DP1[t, d]) is between 400 and
599. All other tool types refer to milling tools.
** If all three values $TC_DPV3[t, d], $TC_DPV4[t, d], $TC_DPV5[t, d] are equal to zero in this
case, the tool orientation is determined by the active machining plane (default).
V Stands for a positive value in the corresponding system variables.
Example:
For milling tools:
$TC_DPV[t, d] = 2 is equal to:
$TC_DPV3[t, d] = 0, $TC_DPV4[t, d] = 0, $TC_DPV5[t, d] = V.
Supplementary conditions
If the "Scratch" function is used in the RESET state, the following must be noted with respect
to the initial setting:
● The wear components are evaluated depending on the initial settings of the G-code
groups TOWSTD, TOWMCS and TOWWCS.
● If a value other than the initial setting is needed to ensure correct calculation, scratching
may be performed only in the STOP state.
Note
"Special handling of tool compensations" pays particular attention to tool compensations
with evaluation of sign for tool length with wear and temperature fluctuations.
The following are taken into account:
• Tool type
• Transformations for tool components
• Assignment of tool length components to geometry axes independently of tool type
Basic Functions
1516 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
W1: Tool offset
17.10 Special handling of tool compensations
SD42900- 42960
Setting data SD42900 - SD42940 can be used to make the following settings with reference
to tool compensation:
● Sign of the tool length
● Sign of the wear
● Behavior of the wear components when mirroring geometry axes
● Behavior of the wear components when changing the machining plane via setting data
● Allocation of the tool length components independent of actual tool type
● Transformation of wear components into a suitable coordinate system for controlling the
effective tool length
Note
In the following description, the wear includes the total values of the following
components:
• Wear values: $TC_DP12 to $TC_DP20
• Sum offset, consisting of:
– Wear values: $SCPX3 to $SCPX11
– Setup values: $ECPX3 to $ECPX11
You will find detailed information about sum and tool offsets in:
References:
Function Manual Tool Management
Programming Manual. Fundamentals; Tool Offsets
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1517
W1: Tool offset
17.10 Special handling of tool compensations
Activation
Tool length mirroring is activated via the setting data:
SD42900 $SC_MIRROR_TOOL_LENGTH <> 0 (TRUE) (Sign change tool length when
mirroring)
Function
The following components are mirrored by inverting the sign:
● Tool lengths: $TC_DP3, $TC_DP4, $TC_DP5
● Tool base dimensions: $TC_DP21, $TC_DP22, $TC_DP23
Mirroring is performed for all tool base dimensions whose associated axes are mirrored.
Wear values are not mirrored.
; ;
'
= =
0 : : 0
0DFKLQLQJVLWXDWLRQ 0DFKLQLQJVLWXDWLRQ
'LVZRUNLQJLQ:&6 'LVZRUNLQJLQ:&6
Basic Functions
1518 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
W1: Tool offset
17.10 Special handling of tool compensations
Activation
Wear length mirroring is activated by:
SD42920 $SC_WEAR_SIGN_CUTPOS <> 0 (TRUE) (Sign of wear for tools with cutting
edge systems)
Function
In the case of tool types without a relevant cutting edge position, the wear length is not
mirrored.
Note
The mirroring (sign inversion) in one or more components can cancel itself through a
simultaneous activation of the functions:
Tool length-mirroring (SD42900 <> 0)
And:
Tool length-mirroring (SD42920 <> 0)
SD42930 $SC_WEAR_SIGN
Setting data not equal to zero:
Inverts the sign of all wear dimensions. This affects both the tool length and other variables
such as tool radius, rounding radius, etc.
Entering a positive wear dimension makes the tool "shorter" and "thinner".
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1519
W1: Tool offset
17.10 Special handling of tool compensations
The same applies in the event that the resulting tool length is modified due to a change in
the mirroring status of an axis. The tool must be selected again after the mirror command, in
order to activate the modified tool-length components.
Plane change
The assignment of tool length components (length, wear and tool base dimension) to
geometry axes does not change when the machining plane is changed (G17–G19).
Assignment of tools
The assignment of tool length components to geometry axes for turning and grinding tools
(tool types 400 to 599) is generated from the value of the following setting data in
accordance with the following table:
SD42940 $SC_TOOL_LENGTH_CONST (change of tool length components on change of
planes).
Basic Functions
1520 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
W1: Tool offset
17.10 Special handling of tool compensations
*) Each value not equal to 0 and not equal to one of the six listed values is evaluated as value 18.
The following table shows the assignment of tool length components to geometry axes for all
other tools (tool types < 400 or > 599):
*) Each value not equal to 0 and not equal to one of the six listed values is evaluated as value 17.
Note
For representation in tables, it is assumed that geometry axes 1 to 3 are named X, Y, Z. The
axis order and not the axis name determines the assignment between a compensation and
an axis.
Three tool length components can be arranged on the six different types above.
Characteristics
Definition of the assignment between tool length components (length, wear and tool base
dimension) and geometry axes independent of tool type.
Setting data not equal to zero: (the default definition is applied)
A distinction is made between turning and grinding tools (tool types 400 to 599) and other
tools (milling tools).
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1521
W1: Tool offset
17.10 Special handling of tool compensations
Note
When toolholders with orientation capability are used, it is common to define all tools for a
non-mirrored basic system, even those, which are only used for mirrored machining. When
machining with mirrored axes, the toolholder is then rotated such that the actual position of
the tool is described correctly. All tool-length components then automatically act in the
correct direction, dispensing with the need for control of individual component evaluation via
setting data, depending on the mirroring status of individual axes.
The use of toolholders with orientation capability is also practical if the physical
characteristics of the machine type prevents tools, which are permanently installed with
different orientations, from being rotated. Tool dimensioning can then be performed uniformly
in a basic orientation, where the dimensions relevant for machining are calculated according
to the rotations of a virtual toolholder.
Basic Functions
1522 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
W1: Tool offset
17.10 Special handling of tool compensations
Activation
The temperature compensation in the tool direction is activated by setting the following
machine data to a value not equal to zero.
MD20390 $MC_TOOL_TEMP_COMP_ON (activation of temperature compensation for tool
length)
In addition, bit 2 must be set for each affected channel axis in the machine data:
MD32750 $MA_TEMP_COMP_TYPE [<axis index>] (temperature compensation type)
This can be more than three axes in cases where more than three channel axes in
succession can be temporarily assigned to geometry axes as a result of geometry axis
replacement of transformation switchover. If this bit is not set for a particular channel axis,
the compensation value cannot be applied in the axis. This does not have any effect on other
axes. In this case, an alarm is not output.
Applicability
The temperature compensation in the tool direction is only effective with generic 5-axis
transformations with:
● Transformation type 24
Two axes rotate the tool
● Transformation type 56
One axis rotates the tool, the other axis rotates the workpiece without temperature
compensation
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1523
W1: Tool offset
17.10 Special handling of tool compensations
Note
Temperature compensation can be activated with all other types of transformation. It is
not affected by a change in tool orientation. The axes move as if no orientation
transformation with temperature compensation were active.
Limit values
The compensation values are restricted to the maximum values by the machine data:
MD20392 $MC_TOOL_TEMP_COMP_LIMIT[0...2] (maximum temperature compensation for
tool length)
The limit value default setting is 1 mm. If a temperature compensation value higher than this
limit is specified, it will be limited without an alarm.
SD42960
The three temperature compensation values together form a compensation vector and are
contained in setting data:
SD42960 $SC_TOOL_TEMP_COMP[0...2] (temperature compensation with reference to
tools)
The setting data is user-defined, e.g. using synchronized actions or from the PLC. The
compensation values can, therefore, also be used for other compensation purposes.
In the initial state or when orientation transformation is deactivated, all three compensation
values apply in the direction of the three geometry axes (in the typical order X, Y, Z). The
assignment of components to geometry axes is independent of the tool type (turning, milling
or grinding tools) and the selected machining plane G17 to G19. Changes to the setting data
values take effect immediately.
Basic Functions
1524 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
W1: Tool offset
17.10 Special handling of tool compensations
Note
While transformations with rotating linear axes take changes in the tool vector (length) into
account, they ignore its change in orientation, which can be effected by a toolholder with
orientation capability.
Examples
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1525
W1: Tool offset
17.10 Special handling of tool compensations
Basic Functions
1526 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
W1: Tool offset
17.10 Special handling of tool compensations
With the exception of block N40, temperature compensation always acts in the original
directions, as the tool is pointing in the basic orientation direction. This applies particularly in
block N50. The tool is actually still pointing in the direction of the X axis because the B axis is
still at 90 degrees. However, because the transformation is already deactivated, the applied
orientation is parallel to the Z axis again.
Additional references
For more details on "Temperature compensation" see:
References:
Function Manual Extended Functions; Compensations (K3)
For information on "Generic 5-axis transformations" see:
References:
Function Manual, Special Functions; 3- to 5-Axis Transformation (F2)
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1527
W1: Tool offset
17.11 Sum offsets and setup offsets
17.11.1 General
Sum offsets
Sum offsets can be treated as programmable process compensations during machining and
are composed of all the error sizes (including the wear), which cause the workpiece to
deviate from the specified dimensions.
Sum offsets are a generalized type of wear. They are part of the cutting edge data. The
parameters of the sum offset refer to the geometrical data of a cutting edge.
The compensation data of a sum offset are addressed by a DL number (DL: location-
dependent; compensations with reference to the location of use).
In contrast, the wear values of a D number describe the physical wear of the cutting edge,
i.e., in special situations, the sum offset can match the wear of the cutting edge.
Sum offsets are intended for general use, i.e., with active or inactive tool management or
with the flat D number function.
Machine data are used to classify the sum offsets into:
● Sum offset fine
● Sum offset coarse (setup offset)
Setup offset
The setup offset is the compensation to be entered by the setup engineer before machining.
These values are stored separately in the NCK. The operator subsequently only has access
to the "sum offset fine" via HMI.
The "sum offset fine" and "sum offset coarse" are added internally in the NCK. This value is
referred to below as the sum offset.
Note
The function is enabled via the machine data setting:
MD18080 $MN_MM_TOOL_MANAGEMENT_MASK, Bit 8=1 (Gradual memory reservation
for tool management).
If kinematic transformations (e.g., 5axis transformations) are active, the tool length is
calculated first after allowing for the various wear components. ´The total tool length is then
used in the transformation. Unlike the case of a toolholder with orientation capability, the
wear values are thus always included in the transformation irrespective of the G code of
group 56.
Basic Functions
1528 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
W1: Tool offset
17.11 Sum offsets and setup offsets
Sum offsets
Several sum offsets (DL numbers) can be defined per D number. This allows you to
determine, for example, workpiecelocationdependent compensation values and assign them
to a cutting edge. Sum offsets have the same effect as wear, i.e., they are added to the
compensation values of the D number. The data are permanently assigned to a D number.
Attitudes
You can define the following settings in machine data:
● Activate sum offset
● Define maximum quantity of DL data sets to be created in NCK memory
● Define maximum quantity of DL numbers to be assigned to a D number
● Define whether the sum offsets (fine/coarse) are to be saved during data backup
● Define the sum offset to be activated, if:
– A new cutting edge compensation is activated
– An operator panel front RESET is performed
– An operator panel front START is performed
– The end of the program has been reached
The name is oriented to the logic of the corresponding machine data for tools and cutting
edges.
The "setup offset" and "sum offset fine" can be read and written via system variables and
corresponding OPI services.
Note
When tool management is active, a machine data can be used to define whether the sum
offset of a tool activated during a programmed tool change remains unchanged or is set to
zero.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1529
W1: Tool offset
17.11 Sum offsets and setup offsets
Technology
Basic Functions
1530 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
W1: Tool offset
17.11 Sum offsets and setup offsets
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1531
W1: Tool offset
17.11 Sum offsets and setup offsets
Supplementary conditions
The maximum number of DL data sets of a cutting edge and the total number of sum offsets
in the NCK are defined by machine data. The default value is zero, i.e., no sum offsets can
be programmed.
Activate the "monitoring function" to monitor a tool for wear or for "sum offset".
The additional sum/setup data sets use additional buffered memory. 8 bytes are required per
parameter.
A sum-offset data set requires: 8 bytes * 9 parameters = 72 bytes
A setup data set requires an equal amount of memory. A certain number of bytes is also
required for internal administration data.
17.11.3 Activation
Function
The function must be activated via the machine data:
MD18108 $MN_MM_NUM_SUMCORR (sum offsets in TO area).
System variables $TC_ECPx and $TC_SCPx and setup and sum offsets ("fine") defined via
the OPI interface can be activated in the part program.
This is done by programming the language command DL="number".
When a new D number is activated, either a new DL number is programmed, or the DL
number defined via the following machine data becomes active:
MD20272 $MC_SUMCORR_DEFAULT (basic setting of the additive offset without a
program)
DL programming
The sum offset is always programmed relative to the active D number with the command:
DL = "n"
The sum offset "n" is added to the wear of the active D number.
Note
If you use "setup offset" and "sum offset fine", both compensations are combined and added
to the tool wear.
Basic Functions
1532 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
W1: Tool offset
17.11 Sum offsets and setup offsets
Note
DL0 is not allowed. If compensation is deselected (D0 and T0), the sum offset also becomes
ineffective.
Programming a sum offset that does not exist triggers an alarm, similar to programming a D
compensation that does not exist.
Thus, only the defined wear remains part of the compensation (defined in system variables
$TC_DP12 to $TC_DP20).
Programming a sum offset when a D compensation is active (also applies to deselection)
has the same effect on the path as programming a D command. An active radius
compensation will, therefore, lose its reference to adjacent blocks.
Configuration
MD18112 $MN_MM_KIND_OF_SUMCORR, bit 4=0: (Properties of sum offset in the TO
area) default setting:
Only one set of sum offsets exists per DL number.
We refer in general to the sum offset.
This describes the data represented by $TC_SCPx.
6XPRIIVHW
7&B6&3>W@
7&B6&3>W@
'RIIVHW
6XPRIIVHW
7&B'3>W@ 7&B6&3>W@
7&B'3>W@ 7&B6&3>W@
7&B'3>W@
7&B'3>W@
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1533
W1: Tool offset
17.11 Sum offsets and setup offsets
Tool T = t is active. With the data in the figure, the following is programmed:
6HWXSRIIVHW 6XPRIIVHW
ILQH
7&B(&3>W@ 7&B6&3>W@
7&B(&3>W@ 7&B6&3>W@
'RIIVHW
7&B'3>W@ 6HWXSRIIVHW 6XPRIIVHW
ILQH
7&B'3>W@
7&B(&3>W@ 7&B6&3>W@
7&B'3>W@
7&B(&3>W@ 7&B6&3>W@
7&B'3>W@
7&B'3&(>W@
Figure 17-51 MD18112 $MN_MM_KIND_OF_SUMCORR, bit 4 = 1 "setup offsets" + "sum offsets fine"
Tool T = t is active. With the data in the figure, the following is programmed:
Basic Functions
1534 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
W1: Tool offset
17.11 Sum offsets and setup offsets
The above statements also apply to the setup offsets (if the NCK is configured with this
option), i.e.,
When working with setup offsets, "sum offsets fine" are written with the $TC_SCPx system
variables.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1535
W1: Tool offset
17.11 Sum offsets and setup offsets
When working with setup offsets, "sum offsets fine" are written with the $TC_SCPx system
variables.
Note
When working with setup offsets, the data set for the setup offset is created when a data set
is created for "sum offset fine", if a data set did not already exist for [t, d].
Note
When working with setup offsets, the data set for the "sum offset fine" is created when a data
set is created for setup offsets, if a data set did not already exist for [t, d].
status = DELDL( t, d ) ; Deletes all sum offsets for cutting edge d on tool
t.
; t, d are optional parameters.
If d is not specified, all sum offsets of all cutting edges of tool t are deleted.
If d and t are not specified, all sum offsets for the cutting edges on all tools of the TO unit are
deleted (for the channel, in which the command is programmed).
When working with setup offsets, the DELDL command deletes both the setup offset and the
"sum offsets fine" of the specified cutting edge(s).
Note
The memory used for the data sets is released after deletion.
The deleted sum offsets can subsequently no longer be activated or programmed.
Basic Functions
1536 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
W1: Tool offset
17.11 Sum offsets and setup offsets
Sum offsets and setup offsets on active tools cannot be deleted (similar to the deletion of D
compensations or tool data).
The "status" return value indicates the result of the deletion command:
Data backup
The data are saved during a general tool-data backup (as a component of the D number
data sets).
It is advisable to save the sum offsets, in order to allow the current status to be restored in
the event of an acute problem. Machine data settings can be made to exclude sum offsets
from a data backup (settings can be made separately for "setup offsets" and "sum offsets
fine").
Note
Sum offsets behave in the same way as D compensations with reference to block search
and REPOS. The behavior on Reset and PowerOn can be defined by machine data.
If the setting of the following machine data indicates that the last active tool compensation
number (D) is to be activated after PowerOn, the last active DL number is then no longer
active:
MD20110 $MC_RESET_MODE_MASK (definition of initial control system settings after
RESET/TP-End)
17.11.4 Examples
Example 1
That no compensation and no sum offset will come into effect must be defined during tool
change via the machine data:
● MD20270 $MC_CUTTING_EDGE_DEFAULT=0 (Basic setting of tool cutting edge without
programming)
● MD20272 $MC_SUMCORR_DEFAULT=0 (default setting sum offset without program).
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1537
W1: Tool offset
17.11 Sum offsets and setup offsets
Example 2
During tool change it has to be defined that offset D2 and sum offset DL=1 are activated via
the machine data:
MD20270 $MC_CUTTING_EDGE_DEFAULT=2 (Basic setting of tool cutting edge without
programming)
MD20272 $MC_SUMCORR_DEFAULT=1 (default setting sum offset without program)
17.11.5.1 Taking the compensation values into account location-specifically and workpiece-
specifically
Basic Functions
1538 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
W1: Tool offset
17.11 Sum offsets and setup offsets
Note
The tool base dimension and adapter dimension can only be applied as alternatives.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1539
W1: Tool offset
17.11 Sum offsets and setup offsets
The resulting tool orientation always remains parallel to one of the three axis directions X, Y
or Z and exclusively depends on the active machining plane G17-G19, since it has not yet
been possible to assign the tool an orientation.
In particular, compensations, which affect the tool length calculation, should be entered in
the coordinates used for measurement.
These workpiece-specific compensations can be achieved more simply using the G-code
group 56 with the three values TOWSTD, TOWMCS and TOWWCS and the setting data:
SD42935 $SC_WEAR_TRANSFORM (transformation of tool components)
Basic Functions
1540 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
W1: Tool offset
17.11 Sum offsets and setup offsets
SD42935
Which of the wear components:
● Wear ($TC_DP12 - $TC_DP14)
● Setup offsets or sum offsets coarse ($TC_ECPx3 - $TC_ECPx5)
● Sum offsets fine ($TC_SCPx3 - $TC_SCPx5)
are to be transformed in the transformations:
● Adapter transformation
● Toolholder with orientation capability
are to be or not to be transformed, can be defined via the setting data:
SD42935 $SC_WEAR_TRANSFORM (transformation of wear values)
With the setting data in its initial state, all wear values are transformed.
The setting data is considered in the following functions:
● Wear values in the machine coordinate system
Part program instruction: TOWMCS
● Wear values in the workpiece coordinate system
Part program instruction: TOWWCS
$GDSWHUGLPHQVLRQ 7RROOHQJWK
7RROEDVH
GLPHQVLRQ
6XPRIIVHWILQH
6HWXSRIIVHWRU
VXPRIIVHWFRDUVH
:HDU
6'6&B:($5B75$162)250
%LW 758(
%LW 758(
%LW 758(
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1541
W1: Tool offset
17.11 Sum offsets and setup offsets
Programming
G-code group 56 can be used to define the following values:
Syntax Corrections
TOWSTD Initial setting value for offsets in tool length
TOWMCS Wear values in the machine coordinate system (MCS)
TOWWCS Wear values in the workpiece coordinate system (WCS)
TOWBCS Wear values in the basic coordinate system (BCS)
TOWTCS Wear values in the TCS (Tool Coordinate System) at the toolholder (tool carrier
reference point T)
TOWKCS Wear values in tool coordinate system for kinematic transformation (KCS) of tool
head
The calculated tool length or a tool length component can be represented and read out in
one of these coordinate systems using the GETTCOR function (predefined subprogram).
For further explanations, see Section "Read tool lengths, tool length components
(Page 1552)".
Basic Functions
1542 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
W1: Tool offset
17.11 Sum offsets and setup offsets
=
0&6
;
=
. .LQHPDWLFWUDQVIRUPDWLRQ
.&6 WRROFRPSRQHQW
;
7RROFDUULHU
7 WRROFRPSRQHQW
;
; =
= ;
:&6
%&6
7&6
3
7RRO
.LQHPDWLFWUDQVIRUPDWLRQ
ZRUNSLHFHWDEOHRUSDUWFRPSRQHQW
TOWSTD
Initial setting (default behavior):
● The wear values are added to the other tool length components.
The resulting total tool length is then used in further calculations.
In the case of an active toolholder with orientation capability:
● The wear values are subjected to the appropriate rotation.
TOWMCS
Wear data in the MCS (machine coordinate system):
In the case of an active rotation by means of a toolholder with orientation capability:
● The toolholder only rotates the vector of the resultant tool length. Wear is ignored.
Then the tool length vector rotated in this way and the wear are added. The wear is not
subjected to the rotation.
If no toolholder with orientation capability is active or this does not result in a rotation, TOWMCS
and TOWSTD are identical.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1543
W1: Tool offset
17.11 Sum offsets and setup offsets
Linear transformation
The tool length can be uniquely defined in the MCS only if the MCS is generated by linear
transformation from the BCS.
This would be the case when:
● No kinematic transformation is active
● Or orientation transformations (3-axis, 4-axis and 5-axis transformations) are active
TOWWCS
Wear values in WCS (workpiece coordinate system):
● If a toolholder with orientation capability is active, the tool vector is calculated as for
TOWMCS, without taking the wear into account.
TOWBCS
Wear values in BCS (basic coordinate system):
● If a toolholder with orientation capability is active, the tool vector is calculated as for
TOWMCS, without taking the wear into account.
Basic Functions
1544 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
W1: Tool offset
17.11 Sum offsets and setup offsets
TOWTCS
Wear values in TCS (tool coordinate system):
● If a toolholder with orientation capability is active, the tool vector is calculated as for
TOWMCS, without taking the wear into account.
TOWKCS
The wear value specifications for the kinematic transformation are interpreted in the
associated TCS (Tool Coordinate System).
The wear vector is converted to the machine coordinate system by way of the tool coordinate
system of the kinematic transformation and added to the tool vector.
SD42920 $SC_WEAR_SIGN_CUTPOS X X —
SD42930 $SC_WEAR_SIGN X — —
SD42940 $SC_TOOL_LENGTH_CONST X X X
SD42950 $SC_TOOL_LENGTH_TYPE X X X
Note
Wear components which are subjected to an active rotation by an adapter transformation or
a toolholder with orientation capability are referred to as non-transformed wear components.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1545
W1: Tool offset
17.12 Working with tool environments
Special features
If TOWMCS or TOWWCS is active, the following setting data does not affect the non-transformed
wear components:
SD42920 $SC_WEAR_SIGN_CUTPOS (Sign of wear for tools with cutting edge systems)
The following setting data also does not affect the non-transformed wear components in
case of TOWWCS:
SD42910 $SC_MIRROR_TOOL_WEAR (Sign change tool wear when mirroring)
In this case, a possibly active mirroring is already contained in the frame, which is referred to
for evaluating the wear components.
On a plane change, the assignment between the non-transformed wear components and the
geometry axes is retained, i.e. these are not interchanged as with other length components.
The assignment of components depends on the active plane for tool selection.
Example
Let's assume a milling tool is used where only the wear value $TC_DP12 assigned to length
L1 is not equal to zero.
If G17 is active, this length is effective in the direction of the Z axis.
This measure always acts in the Z-direction also upon a plane change after the tool
selection, when TOWMCS or TOWWCS are active and the bit 1 is set in the setting data:
SD42935 $SC_WEAR_TRANSFORM (transformations for tool components)
If, for example, G18 is active on tool selection, the component is always effective in the Y
direction instead.
17.12.1 General
Functions
The current states of tool data can be processed using the functions below, which are
generally available:
● Save
● Deletion
● Read
● Modify
A further function can be used to determine information about the assignment of the tool
lengths of the active tool to the abscissa, ordinate and applicate.
Basic Functions
1546 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
W1: Tool offset
17.12 Working with tool environments
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1547
W1: Tool offset
17.12 Working with tool environments
Note
Resulting length of toolholders with orientation capability and transformations:
Both toolholders with orientation capability and transformations can use system variables or
machine data, which act as additional tool length components, and which can be subjected
partially or completely to the rotations performed. The resulting additional tool length
components must also be stored when TOOLENV is called, because they represent part of the
environment, in which the tool is used.
Adapter transformation:
The adapter transformation is a property of the tool adapter and thus of the complete tool. It
is, therefore, not part of a tool environment, which can be applied to another tool.
By saving the complete data necessary to determine the overall tool length, it is possible to
calculate the effective length of the tool at a later point in time, even if the tool is no longer
active or if the conditions of the environment (e.g., G codes or setting data) have changed.
Similarly, the effective length of different tool can be calculated assuming that it would be
used under the same conditions as the tool, for which the status was saved.
TOOLENV function
Saving a tool environment
The TOOLENV function is a predefined subprogram. It must, therefore, be programmed in a
separate block.
Syntax:
Status = TOOLENV(_NAME)
Value/parameter:
Status INT
0: Function OK
-1: No memory reserved for tool environments:
MD18116 $MN_MM_NUM_TOOL_ENV = 0 (number of tool environments in TO
area).
i.e. the "tool environments" functionality is not available.
-2: No more free memory locations for tool environments available.
-3: Null string illegal as name of a tool environment.
-4: No parameter (name) specified.
Basic Functions
1548 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
W1: Tool offset
17.12 Working with tool environments
_NAME STRING
DELTOOLENV function
This function can be used to delete sets of data used to describe tool environments. Deletion
means that the set of data stored under a particular name can no longer be accessed (an
access attempt triggers an alarm).
The DELTOOLENV function is a predefined subprogram.
It must, therefore, be programmed in a separate block.
Syntax:
There are two call formats:
Status = DELTOOLENV()
Status = DELTOOLENV(_NAME)
Value/parameter:
Status INT
0: Function OK
-1: No memory reserved for tool environments:
MD18116 $MN_MM_NUM_TOOL_ENV = 0 (number of tool environments in TO
area).
i.e. the "tool environments" functionality is not available.
-2: A tool environment with the specified name does not exist.
_NAME STRING
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1549
W1: Tool offset
17.12 Working with tool environments
$P_TOOLENVN
This system variable returns the number of available data sets for describing tool
environments. (Data sets defined by TOOLENV and not yet deleted.)
The value range is from 0 to machine data:
MD18116 $MN_MM_NUM_TOOL_ENV (number of tool environments in TO area).
This system variable can be accessed even if no tool environments are possible (MD18116
= 0). In this case, the return value is 0.
Syntax:
_N = $P_TOOLENVN
Data type:
_N INT
$P_TOOLENV
This system variable returns the number of the nth data set for describing a tool
environment.
The assignment of numbers to data sets is not fixed, but can be changed as a result of
deleting or creating data sets. The data sets are numbered internally. The range is from 1 to
$P_TOOLENVN.
Syntax:
_NAME = $P_TOOLENV[i]
Data type:
_NAME STRING
Basic Functions
1550 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
W1: Tool offset
17.12 Working with tool environments
GETTENV function
The GETTENV function is used to read the T, D and DL numbers stored in a tool environment.
The GETTENV function is a predefined subprogram. It must, therefore, be programmed in a
separate block.
Syntax:
Status = GETTENV(_NAME, _TDDL)
Value/parameter:
Status INT
0: Function OK
-1: No memory reserved for tool environments:
MD18116 $MN_MM_NUM_TOOL_ENV = 0 (number of tool environments in TO
area).
i.e. the "tool environments" functionality is not available.
-2: A tool environment with the name specified in _NAME does not exist.
_NAME STRING
Name of the tool environment, from which the T, D and DL numbers can be read
_TDDL[3] INT
It is possible to omit the first parameter in the GETTENV function call (e.g., GETTENV(, _TDDL))
or to pass a null string as the first parameter (e.g., GETTENV("", _TDDL)). In both of these two
special cases, the T, D and DL numbers of the active tool are returned in _TDDL.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1551
W1: Tool offset
17.12 Working with tool environments
GETTCOR function
The GETTCOR function is used to read out tool lengths or tool length components.
The parameters can be used to specify, which components are considered, and the
conditions, under which the tool is used.
The GETTCOR function is a predefined subprogram. It must, therefore, be programmed in a
separate block.
Syntax:
Status = GETTCOR(_LEN, _COMP, _STAT, _T, _D, _DL)
All parameters can be omitted with the exception of the first parameter (_LEN).
Value/parameter:
Status INT
0: Function OK
-1: No memory reserved for tool environments:
MD18116 $MN_MM_NUM_TOOL_ENV = 0 (number of tool environments in TO
area).
i.e. the "tool environments" functionality is not available.
-2: A tool environment with the name specified in _STAT does not exist.
-3: Invalid string in parameter _COMP.
Causes of this error can be invalid characters or characters programmed twice.
-4: Invalid T number
-5: Invalid D number
-6: Invalid DL number
-7: Attempt to access non-existent memory module
-8: Attempt to access a non-existent option (programmable tool orientation, tool
management).
-9: The _COMP string contains a colon (identifier for the specification of a coordinate
system), but it is not followed by a valid character denoting the coordinate system.
_LEN[11] REAL
Result vector
The vector components are arranged in the following order:
Tool type (LEN[0])
Length of cutting edge (LEN[1])
Abscissa (LEN[2])
Ordinate (LEN[3])
Basic Functions
1552 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
W1: Tool offset
17.12 Working with tool environments
Applicate (LEN[4])
Tool radius (LEN[5])
The coordinate system defined in _COMP and _STAT is used as the reference
coordinate system for the length components. If no coordinate system is defined in
_COMP, the tool lengths are represented in the machine coordinate system.
The assignment of the abscissa, ordinate and applicate to the geometry axes depends on
the active plane in the tool environment, i.e. with G17, the abscissa is parallel to X, with
G18 it is parallel to Z, etc.
Components LEN[6] to LEN[10] contain the additional parameters, which can be used to
specify the geometry description of a tool (e.g. $TC_DP7 to $TC_DP11 for the geometry
and the corresponding components for wear or sum and setup offsets).
These 5 additional elements and the tool radius are only defined for components E, G, S,
and W. Their evaluation does not depend on _STAT. The corresponding values in LEN[5]
to LEN[10] can thus only be not equal to zero if at least one of the four specified
components is involved in the tool length calculation. The remaining components do not
influence the result. The dimensions refer to the control's basic system (inch or metric).
_COMP STRING
This string consists of two substrings, which are separated from one another by a colon.
The individual characters (letters) of the first substring identify the tool length components
to be taken into account when calculating the tool length.
The second substring identifies the coordinate system, in which the tool length is to be
output. It consists of only one single relevant character.
The order of the characters in the strings, and their notation (upper or lower case), is
arbitrary. Any number of blanks or white spaces can be inserted between the characters.
The letters in the substrings cannot be programmed twice. The meanings in the first
substring are as follows:
-: (Minus symbol, only allowed as first character): The complete tool length is
calculated, minus the components specified in the next string.
C: Adapter or tool base dimension (whichever of the two alternative components is
active for the tool in use)
E: Setup offsets
G: Geometry
K: Kinematic transformation (is only evaluated for generic 3, 4 and 5-axis
transformation)
S: Sum offsets
T: Toolholder with orientation capability
W: Wear
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1553
W1: Tool offset
17.12 Working with tool environments
If the first substring is empty (except for white spaces), the complete tool length is
calculated allowing for all components. This applies even if the _COMP parameter is not
specified.
An optional programmable colon must be followed by a single character specifying the
coordinate system, in which the tool length components are to be evaluated. If no
coordinate system is specified, the evaluation is performed in the MCS (machine
coordinate system). If any rotations are to be taken into account, they are specified in the
tool environment defined in _STAT.
The characters have the following significance:
B: Basic coordinate system (BCS)
K: Tool coordinate system of kinematic transformation (KCS)
M: Machine coordinate system (MCS)
T: Tool coordinate system (TCS)
W: Workpiece coordinate system (WCS)
_STAT STRING
_T INT
Note
If _STAT is not specified, the current status is used as the tool environment. Since _T = 0
refers to the T number saved in the tool environment, the active tool is used in that
environment, i.e. parameters _T = 0 and _T = -1 have the same meaning in this special case.
_D INT
Cutting edge of the tool. If this parameter is not specified, or if its value is 0, the D number
used is based on the source of the T number. If the T number from the tool environment
is used, the D number of the tool environment is also read, otherwise the D number of the
currently active tool is read.
Basic Functions
1554 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
W1: Tool offset
17.12 Working with tool environments
_DL INT
Number of the local compensation. If this parameter is not specified, the DL number used
is based on the source of the T number. If the T number from the tool environment is
used, the D number of the tool environment is also read, otherwise the D number of the
currently active tool is read.
Any rotations and component exchanges initiated by the adapter transformation, toolholder
with orientation capability and kinematic transformation, are part of the tool environment.
They are thus always performed, even if the corresponding length component is not
supposed to be included. If this is undesirable, tool environments must be defined, in which
the corresponding transformations are not active. In many cases (i.e. any time a
transformation or toolholder with orientation capability is not used on a machine), the data
sets stored for the tool environments automatically fulfill these conditions, with the result that
the user does not need to make special provision.
MD20360 $MC_TOOL_PARAMETER_DEF_MASK
The two least significant bits of this machine data specify how the wear (bit 0) and tool length
(bit 1) are to be evaluated if a diameter axis is used for turning and grinding tools.
If the bits are set, the associated entry is weighted with the factor 0.5. This weighting is
reflected in the tool length returned by GETTCOR.
Example:
MD20360 $MC_TOOL_PARAMETER_DEF_MASK = 3 (definition of tool parameters).
MD20100 $MC_DIAMETER_AX_DEF="X" (Geometry axis with face axis funtion)
X is diameter axis (standard turning machine configuration):
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1555
W1: Tool offset
17.12 Working with tool environments
Type Vectors
M l1 and l2
T l1, l2 and l3
P Tool length is not influenced by the toolholder with orientation capability.
In generic 5-axis transformation, the following machine data are included in the tool length
calculation for transformer types 24 and 56:
Basic Functions
1556 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
W1: Tool offset
17.12 Working with tool environments
GETTCOR examples
GETTCOR(_LEN): Calculates the tool length of the currently active tool in the machine
coordinate system allowing for all components.
GETTCOR(_LEN; "CGW : Calculates the tool length for the active tool, consisting of the adapter
W" ): or tool base dimension, geometry and wear. Further components,
such as toolholder with orientation capability or kinematic
transformation, are not considered. The workpiece coordinate system
is used for the output.
GETTCOR(_LEN, "-K :B" ): Calculates the complete tool length of the active tool without allowing
for the length components of an active kinematic transformation.
Output in the basic coordinate system.
GETTCOR(_LEN, ":M", Calculates the complete tool length in the machine coordinate system
"Testenv1",,3): for the tool stored in the tool environment named "Testenv1". The
calculation is performed for cutting edge number D3, regardless of the
cutting edge number stored.
Compatibility
The GETTCOR function is used in conjunction with the TOOLENV and SETTCOR functions to replace
parts of the functionality, which were previously implemented externally in the measuring
cycles.
Only some of the parameters, which actually determine the effective tool length, were
implemented in the measuring cycles. The above functions can be configured to reproduce
the behavior of the measuring cycles in relation to the tool length calculation.
SETTCOR function
The SETTCOR function is used to change tool components taking into account all general
conditions that can be involved when evaluating the individual components.
The SETTCOR function is a predefined subprogram. It must, therefore, be programmed in a
separate block.
Note
Regarding the terminology: If in the following, in conjunction with the tool length, tool
components are involved, then the components considered from a vectorial perspective are
meant, which make up the complete tool length, e.g. geometry or wear. Such a component
comprises three individual values (L1, L2, L3), which are called coordinate values in the
following.
The tool component "geometry" therefore comprises three coordinate values $TC_DP3 to
$TC_DP5.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1557
W1: Tool offset
17.12 Working with tool environments
Syntax:
Status = SETTCOR(_CORVAL, _COMP, _CORCOMP, _CORMODE, _GEOAX, _STAT,
_T, _D, _DL)
With the exception of the first two parameters (_CORVAL and _COMP) all of the
parameters can also be omitted.
Value/parameter:
Status INT
0: Function OK
-1: No memory reserved for tool environments:
MD18116 $MN_MM_NUM_TOOL_ENV = 0 (number of tool environments in TO
area).
i.e. the "tool environments" functionality is not available.
-2: A tool environment with the name specified in _STAT does not exist.
-3: Invalid string in parameter _COMP.
Causes of this error can be invalid characters or characters programmed twice.
-4: Invalid T number.
-5: Invalid D number.
-6: Invalid DL number.
-7: Attempt to access a non-existent memory module.
-8: Attempt to access a non-existent option (programmable tool orientation, tool
management).
-9: Illegal numerical value for the _CORCOMP parameter.
-10: Illegal numerical value for the _CORMODE parameter.
-11: The contents of the _COMP and _CORRCOMP parameters are contradictory.
-12: The contents of the _COMP and _CORRMODE parameters are contradictory.
-13: The content of the _GEOAX parameter does not designate a geometry axis.
-14: Write attempt to a non-existent setup offset.
Basic Functions
1558 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
W1: Tool offset
17.12 Working with tool environments
If only one tool component is to be corrected (i.e. no vectorial correction, see parameter
_CORMODE), the correction value is always in _CORVAL[0], independent of the axis on
which it acts. The contents of the other two components are then not evaluated.
If _CORVAL or a component of _CORVAL refers to the transverse axis, then the data is
evaluated as radius dimension. This means that a tool is e.g. "longer" by the specified
dimension; this correspondingly results in a change to the workpiece diameter that is
twice as large.
The dimensions refer to the basic system (inch or metric) of the control system.
_COMP STRING
String that comprises either one or two characters. The first or only character for the 1st
component (Val1) and the second character for the 2nd component (Val2), which are
processed according to the subsequent parameters _CORCOMP and _CORMODE.
The notation of the characters in the string (upper or lower case) is arbitrary. Any number
of spaces or tabs (white spaces) can be inserted.
The individual meanings are as follows:
C: Adapter or tool base dimension (whichever of the two alternative components is
active for the tool in use)
E: Setup offsets
G: Geometry
S: Sum offsets
W: Wear
_CORCOMP INT
This parameter specifies the component(s) of the two data sets that are to be described.
If this parameter is not specified then its value is 0.
Meaning of the numerical values:
0: The offset value _CORVAL[0] refers to the geometry axis transferred in
parameter _GEOAX in the workpiece coordinate system, i.e. the offset value
must be calculated in the designated tool components so that, taking account
all the parameters that can influence the tool length calculation, as a result, a
change of the total tool length by the specified value in the specified axis
direction is obtained.
This change should be achieved by the correction of the component specified
in _COMP and the symbolic algorithm specified in _CORMODE (see the
following parameters). The resulting correction can therefore have an effect on
all three axis components.
1: Like 0, however, vectorial. The content of vector _CORVAL refers to abscissa,
ordinate, applicate in the workpiece coordinate system (WCS).
The subsequent parameter _GEOAX is not evaluated.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1559
W1: Tool offset
17.12 Working with tool environments
_CORMODE INT
This parameter specifies the type of write operation to be executed.
If this parameter is not specified then its value is 0.
Meaning of the ones location:
0:Val1new = _CORVAL
1:Val1new = Val1old + _CORVAL
2:Val1new = _CORVAL
Val2new = 0
Basic Functions
1560 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
W1: Tool offset
17.12 Working with tool environments
_T INT
Internal T number of the tool. If this parameter is not specified or if its value is 0, then the
tool stored in _STAT is used. If the value of this parameter is -1, the T number of the
active tool is used. It is also possible to explicitly specify the number of the active tool.
Note
If _STAT is not specified, the actual status is used as the tool environment. Since _T = 0
refers to the T number saved in the tool environment, the active tool is used in this
environment, i.e. parameters _T = 0 and _T = -1 have the same meaning in this special case.
_D INT
Cutting edge of the tool. If this parameter is not specified, or if its value is 0, the D number
used is based on the source of the T number. If the T number from the tool environment
is used, the D number of the tool environment is also read, otherwise the D number of the
currently active tool is read.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1561
W1: Tool offset
17.12 Working with tool environments
_DL INT
Number of the offset dependent on the location. If this parameter is not specified, the DL
number used is based on the source of the T number. If the T number from the tool
environment is used, the D number of the tool environment is also read, otherwise the D
number of the currently active tool is read. If T, D and DL specify a tool without location-
dependent offsets, no additive or setting-up offsets may be specified in parameter
_COMP (error code in "Status").
Not all possible combinations of the three parameters _COMP, _CORCOMP and
_CORMODE are sensible. For example, algorithm 3 in _CORCOMP requires that two
characters are specified in _COMP. If an invalid parameter combination is specified, then a
corresponding error code is returned in the status.
Note
Calculating the tool length depending on machine data MD20360
The two least significant bits of this machine data specify how the wear (bit 0) and tool length
(bit 1) are to be evaluated if a diameter axis is used for turning and grinding tools. If the
appropriate bits are set, then for the tool length calculation, a factor of 0.5 is applied to the
associated entry. The correction using SETTCOR is executed so that the total effective tool
length change is equal to the value transferred in _CORVAL.
The correction of the components, whose length is evaluated with a factor of 0.5 due to the
following machine data for the length calculation, must be realized using twice the
transferred value:
MD20360 $MC_TOOL_PARAMETER_DEF_MASK (definition of tool parameters)
Example 1
_CORCOMP is 0, therefore, the coordinate value of the geometry component acting in the Z
direction must be replaced by the offset value 0.333. The resulting total tool length is thus L1
= 0.333 + 1.000 = 1.333
Basic Functions
1562 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
W1: Tool offset
17.13 Tool lengths L1, L2, L3 assignment: LENTOAX
Example 2
_CORCOMP is 1, therefore, an offset value of 0.333 acting in the Z direction is added to the
wear value of 1.0.
Therefore, the resulting total tool length is L1 = 10.0 + 1.333 = 11.333.
LENTOAX function
The "LENTOAX" function provides information about the assignment of tool lengths L1, L2
and L3 of the active tool to the abscissa, ordinate and applicate. The assignment of abscissa,
ordinate and applicate to the geometry axes is affected by frames and the active plane (G17 -
G19).
Syntax:
Status = LENTOAX(_AXIND, _MATRIX, _COORD)
The first two parameters must always be programmed; the last parameter can be omitted.
Value/parameter:
Status INT
0: Function OK, information in _AXIND sufficient for description (all tool length
components are parallel to the geometry axes).
1: Function is OK, however, the content of _MATRIX must be evaluated for a correct
description (the tool length components are not parallel to the geometry axes).
-1: Invalid string in parameter _COORD.
-2: No tool active.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1563
W1: Tool offset
17.13 Tool lengths L1, L2, L3 assignment: LENTOAX
_AXIND[3] INT
array
Indices 0 to 2 are assigned to the abscissa (0), ordinate (1) and applicate (2) (e.g.
_AXIND[0] contains the number of the tool length components, which are effective in the
direction of the abscissa).
The content has the following significance:
0: Assignment exists (axis does not exist)
1 to 3: Number of the length effective in the corresponding coordinate axis. The sign
or is negative if the tool length component is pointing in the negative coordinate
-1 to -3: direction.
_MATRIX[3][3] REAL
array
Matrix which represents the vector of the tool lengths (L1=1, L2=1, L3=1) to the vector of
the coordinate axes (abscissa, ordinate, applicate), i.e. the tool length components are
assigned to the columns in the order L1, L2, L3 and the axes are assigned to the lines in
the order abscissa, ordinate, applicate.
All elements are always valid in the matrix, even if the geometry axis belonging to the
coordinate axis is not available, i.e. if the corresponding entry in _AXIND is 0.
_COORD STRING
Further explanations
If the tool length components are parallel to the geometry axes, the axis indices assigned to
length components L1 to L3 are returned in the _AXIND array.
If a tool length component points in the negative axis direction, the associated axis index
contains a minus sign. In this case, the return value (status) is 0. If an axis does not exist,
the associated return value is 0. The assignment can also be read from the _MATRIX
parameter. Six of the nine matrix elements are then zero, and three elements contain the
value +1 or -1.
Basic Functions
1564 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
W1: Tool offset
17.13 Tool lengths L1, L2, L3 assignment: LENTOAX
Note
In the TCS, all tool length components are always parallel or antiparallel to the axes.
The components can only be antiparallel when mirroring is active and the following setting
data is activated:
SD42900 $SC_MIRROR_TOOL_LENGTH (sign change tool length when mirroring)
If not all length components are parallel or antiparallel to the geometry axes, the index of the
axis, which contains the largest part of a tool length component, is returned in _AXIND. In
this case (if the function does not return an error for a different reason), the return value is 1.
The mapping of tool length components L1 to L3 onto geometry axes 1 to 3 is then described
completely by the contents of the 3rd parameter _MATRIX.
The _COORD parameter can be used to specify, which coordinate system is to be used for
the geometry axes. If the _COORD parameter is not specified (notation LENTOAX(_AXIND,
_MATRIX)), the WCS is used (default).
Example:
Standard situation: milling tool with G17
L1 applies in Z (applicate), L2 applies in Y (ordinate), L3 applies in X (abscissa).
Function call in the form:
Status = LENTOAX(_AXIND, _MATRIX, "WCS")
The result parameter _AXIND contains the values:
_AXIND[0] = 3
_AXIND[1] = 2
_AXIND[2] = 1
Or, in short: ( 3, 2, 1)
In this case, the associated matrix _MATRIX is:
B0$75,;
A change from G17 to G18 or G19 does not alter the result, because the assignment of the
length components to the geometry axes changes in the same way as the assignment of the
abscissa, ordinate and applicate.
A frame rotation of Z through 60 degrees is now programmed with G17 active, e.g. rot Z60.
The direction of the applicate (Z direction) remains unchanged; the main component of L2
now lies in the direction of the new X axis; the main component of L1 now lies in the direction
of the negative Y axis. The return axis is thus 1, and _AXIND contains the values (2, -3, 1).
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1565
W1: Tool offset
17.14 Supplementary conditions
Note
For further information to the above mentioned coordinate systems, please refer to:
References:
Programming Manual, Job Planning; Tool Offsets:
Grinding tools
Grinding tools (tool types 400-499) cannot be defined using the simple tool management
structure (flat D numbers).
Block search
T number output to PLC triggers a synchronization process in the NCK: with absolute,
indirect D programming, the PLC returns the D values via NC/PLC interfaces. The NCK
waits until the output of a T number is followed by a response from the PLC: "I have written
the D number". With block search without calculation, this process of synchronization must
be deactivated until the first valid T number has been output again. That means that the NCK
must not wait on D programming.
Note
At what point the auxiliary functions can be output to PLC after block search is complete, can
be controlled with the machine data:
$MC_AUXFU_AT_BLOCK_SEARCH_END (auxiliary function output after block search)
Automatic on end or on NC start.
Basic Functions
1566 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
W1: Tool offset
17.15 Examples
REORG
The (only) writable variable $A_MONIFACT, which is defined here, is stored by main-run
data. Since the write process takes place synchronously to the main run, no special
measures are required for Reorg.
SD42935
Which of the wear components are to be transformed and which are not to be transformed in
conjunction with the functions TOWMCS and TOWWCS can be defined via the setting data:
SD42935 $SC_WEAR_TRANSFORM (transformation of wear values)
17.15 Examples
Requirement
The following example uses a toolholder, which is described fully by a rotation about the Y
axis. It is therefore sufficient to enter only one value to define the rotary axis (block N20).
Blocks N50 to N70 describe an end mill with radius 5 mm and length 20 mm.
Block N90 defines a rotation of 37 degrees about the Y axis.
Block N120 activates the tool radius compensation and all settings are made to describe the
compensation in the following blocks with a rotation of 37 degrees about the Y axis.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1567
W1: Tool offset
17.15 Examples
N100
N110 X0 Y0 Z0 F10000
N120 G42 CUT2DF TCOFR TCARR = 1 T1 D1 X10
N130 X40
N140 Y40
N150 X0
N160 Y0
N170 M30
N10 TRAORI()
N20 X0 X0 Z0 B45 F2000 ; Setting the tool orientation
N30 MOVT=-10 ; Infeed movement 10 mm in tool
direction
; (under 45 degrees in the Y-Z plane)
N40 MOVT=AC(20) ; Retraction in tool direction at
distance of
; 20 mm from the zero point
N10 $TC_DP1[1,1]=120
N20 $TC_DP3[1,1]= 13 ; Tool length 13 mm
; Definition of toolholder 1:
Basic Functions
1568 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
W1: Tool offset
17.15 Examples
The definition of the toolholder with orientation capability is given in full. The components
which contain the value 0 need not actually be given, as they are preset to zero in any case.
The toolholder is activated in N270.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1569
W1: Tool offset
17.15 Examples
As $TC_CARR21 and $TC_CARR22 refer to the machine axes A and B and TCOABS is active,
the values in $TC_CARR13 and $TC_CARR14 are ignored, i.e. the axis position A0 B45 is
used for the rotation.
The rotation of the 4th offset vector (length 15 mm in Z direction) around the B axis causes
an offsetting of the zero point by X10.607 [= 15 * sin(45)] and Z-4.393 [= -15 * (1. - cos(45))].
This zero offset is taken into account by an automatically written basic or system frame so
that the position X10.607 Y10.000 Z8.607 is approached. In the Z direction the tool selection
leads to an additional offset of 13 mm; the Y component is not affected by the table rotation.
N280 defines a rotation in accordance with the rotation of the table of the toolholder with
orientation capability. The new X direction thus points in the direction of the bisecting line in
the 4th quadrant, the new Z axis in the direction of the bisecting line in the 1st quadrant.
The zero point is approached in N290, i.e. the machine position X10.607 Y0 Z-4.393, since
the position of the zero point is not changed by the rotation.
N300 traverses in Y to the position Y33.000, since G18 is active and the Y component is not
affected by the active frame. The X and Z positions remain unchanged.
The position X17.678 Y0 Z1.536 is approached in N310.
N320 changes only the Z position to the value -8.464 as a result of the MOVT command. As
only the table can be rotated, the tool orientation remains unchanged parallel to the machine
Z direction, even if the Z direction of the active frame is rotated by 45 degrees.
N330 deletes the basic or system frame; thus the frame definition from N280 is undone.
In N340, TCOFR specifies that the toolholder with orientation capability is to be aligned
according to the active frame. Since a rotation is no longer active in N330 due to the PAROTOF
command, the initial state is applied. The frame offset becomes zero.
N350 thus approaches the position X10 X10 Z0 (= Z-13 + tool length). Note: Through the
simultaneous programming of both rotary axes A and B the actual position of the toolholder
with orientation capability is made to match that used in N340. The position approached by
the three linear axes is dependent on this position, however.
In N360, solid angles are used to define a plane whose intersecting lines in the XZ and in the
YZ plane each form an angle of +45 degrees or -45 degrees with the X or Y axis. The plane
defined in such a way therefore has the following position: the surface normal points towards
the solid diagonals.
N370traverses to the position X20 Y0 Z0 in the new coordinate system. Since the tool is
deselected with D0 at the same time, there is no longer an additional offset in Z. Since the
new X axis lies in the old XZ plane, this block reaches the machine position X14.142 Y0 Z-
14.142.
N380 only traverses on the Y axis in the rotated coordinate system. This leads to a motion of
all three machine axes. The machine position is X5.977 Y16.330 Z-22.307.
N390 approaches a point on the new Z axis. Relative to the machine axes this is thus on the
solid diagonal. All three axes thus reach the position 11.547.
Basic Functions
1570 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
W1: Tool offset
17.15 Examples
N10 $TC_DP1[1,1]=120
N20 $TC_DP3[1,1]=10
N30 $TC_DPV [1,1] = 0
N40 $TC_DPV3[1,1] = 1
N50 $TC_DPV4[1,1] = 0
N60 $TC_DPV5[1,1] = 1
N70 g17 f1000 x0 y0 z0 t1 d1
N80 movt=10
N80 m30
Description of example:
In N10 to N60, a milling tool is defined with length L1=10 (N20). The basic orientation is in the
bisector of the XZ plane N40 to N60.
In N70, the tool is activated and the zero position is approached. As a result of the tool length
the machine positions X0 Y0 Z10 are thus obtained in this block.
In N80 an incremental traversing motion is performed from 10 into tool direction. The resulting
axis positions are thus X7.071 Y0 Z17.071.
; D corr. D=1
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1571
W1: Tool offset
17.15 Examples
; Magazine data
N110 $TC_MAP1[1]=3 ; Magazine type: Revolver
N120 $TC_MAP2[1]="Revolver" ; Magazine name
N130 $TC_MAP3[1]=17 ; Status of magazine
N140 $TC_MAP6[1]=1 ; Dimension - line
N150 $TC_MAP7[1]=2 ; Dimension - column -> 2 positions
N160 $TC_MPP1[1,1]=1 ; Location type
N170 $TC_MPP2[1,1]=9 ; Location types
N180 $TC_MPP4[1,1]=2 ; Location state
N190 $TC_MPP7[1,1]=1 ; Bring adapter into position
N200 $TC_MPP6[1,1]=1 ; T number "MillingTool"
N210 $TC_MAP1[9999]=7 ; Magazine type: buffer
N220 $TC_MAP2[9999]="buffer" ; Magazine name
N230 $TC_MAP3[9999]=17 ; Status of magazine
N240 $TC_MAP6[9999]=1 ; Dimension - line
N250 $TC_MAP7[9999]=1 ; Dimension - column -> 1 position
N260 $TC_MPP1[9999.1]=2 ; Location type
N270 $TC_MPP2[9999.1]=9 ; Location types
N280 $TC_MPP4[9999.1]=2 ; Location state
N290 $TC_MPP5[9999,1]=1 ; Spindle no. 1
N300 $TC_MDP2[1,1]=0 ; Distance from spindle to mag. 1
; Definition of toolholder 1
N310 $TC_CARR10[1] = 1 ; Component of 2nd rotary axis in X
direction
N320 $TC_CARR14[1] = 45 ; Angle of rotation of 2nd axis
N330 $TC_CARR23[1] = "T" ; Tool mode
N340 Stopre
N350 $SC_WEAR_TRANSFORM = 'B101'
N360 T0 D0 DL=0
N370 ROT X30
N380 G90 G1 G17 F10000 X0 Y0 Z0
N390 T="MillingTool" X0 Y0 Z0 TOWSTD ; X 0.000 Y11.110 Z 0.001
N400 T="MillingTool" X0 Y0 Z0 TOWMCS ; X 0.000 Y10.100 Z 1.011
N410 T="MillingTool" X0 Y0 Z0 TOWWCS ; X 0.000 Y 9.595 Z 0.876
N420 TCARR=1 X0 Y0 Z0 ; X 0.000 Y 6.636 Z 8.017
N430 G18 X0 Y0 Z0 ; X10.100 Y-0.504 Z 0.876
N440 m30
Basic Functions
1572 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
W1: Tool offset
17.15 Examples
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1573
W1: Tool offset
17.15 Examples
Example 3
Example 4
_CORCOMP is 3, therefore, the wear value and compensation value are added to the
geometry component and the wear component is deleted. The resulting total tool length is
thus L1 = 11.333 + 0.0 = 11.333.
Example 5
Basic Functions
1574 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
W1: Tool offset
17.15 Examples
N60 t1 d1 g17 g0
N70 r1 = settcor(_CORVAL, "GW", 0, 3, 0)
N80 t1 d1 x0 y0 z0 ;==> MCS position X0.333 Y0.000
Z11.000
N90 M30
_CORCOMP is 3, as in the previous example, but the compensation is now effective on the
geometry axis with index 0 (X axis). The tool components L3 are assigned to this geometry
axis due to G17 with a milling tool. Calling SETTCOR thus does not affect tool parameters
$TC_DP3 and $TC_DP12. Instead, the compensation value is entered in $TC_DP5.
Example 6
The tool is a turning tool. A frame rotation is activated in N80, causing the basic coordinate
system (BCS) to be rotated in relation to the workpiece coordinate system (WCS). In the
WCS, the compensation value (N70) acts on the geometry axis with index 1, i.e., on the X
axis because G18 is active. Since "_CORRMODE = 3", the tool wear in the direction of the X
axis of the WCS must become zero once N100 has been executed. The contents of the
relevant tool parameters at the end of the program are thus:
The total wear including _CORVAL is mapped onto the X' direction in the WCS. This
produces point P2. The coordinates of this point (measured in X/Y coordinates) are entered
in the geometry component of the tool. The difference vector P2 - P1 remains in the wear.
The wear thus no longer has a component in the direction of _CORVAL.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1575
W1: Tool offset
17.15 Examples
; 3
;
3
3
:HDU/ /
*HRPHWU\/ /
=
If the sample program is continued after N110 with the following instructions:
The remaining wear is included completely in the geometry because the compensation is
now effective in the Z' axis (parameter _GEOAX is 0). Since the new compensation value is
0, the total tool length and thus the position approached in N140 may not change. If
_CORVAL were not equal to 0 in N120, a new total tool length and thus a new position in
N140 would result, however, the wear component of the tool length would always be zero,
i.e., the total tool length is subsequently always contained in the geometry component of the
tool.
The same result as that achieved by calling the SETTCOR function with the _CORCOMP = 0
parameter twice can also be reached by calling _CORRCOMP = 1 (vectorial compensation)
just once:
Basic Functions
1576 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
W1: Tool offset
17.15 Examples
N90 t1 d1 g18 g0
N100 r1 = settcor(_CORVAL, "GW", 1, 3, 1)
N110 t1 d1 x0 y0 z0 ; ==> MCS position X24.330 Y0.000
Z17.500
N120 M30
In this case, all wear components of the tool are set to zero immediately after the first call of
SETTCOR in N100.
Example 7
Example 8
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1577
W1: Tool offset
17.15 Examples
N130 rot y 30
N140 t1 d1 g18 g0
N150 r1 = settcor(_CORVAL, "W", 1, 1)
N160 t1 d1 x0 y0 z0 ; ==> MCS position X7.990 Y25.000
Z31.160
;
;
5HVXOWLQJZHDUFRPSRQHQW
*HRPHWU\
/ /
3
3
B&259$/<
;
=
3 =
:HDU/ /
QHJDWLYHHYDOXDWLRQ 2ULJLQDOWRROOHQJWK
The geometry component of the tool remains unchanged due to _CORMODE = 1. The
compensation vector defined in the WCS (rotation about y axis) must be included in the wear
component such that the total tool length in the figure refers to point P2. Therefore, the
resulting wear component of the tool is given in relation to the distance between points P1
and P2.
However, since the wear is evaluated negatively, due to setting data SD42930, the
compensation determined in this way has to be entered in the compensation memory with a
negative sign. The contents of the relevant tool parameters at the end of the program are
thus:
Basic Functions
1578 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
W1: Tool offset
17.15 Examples
The effect of setting data SD42930 on the L3 component in the Y direction can be
recognized without the additional complication caused by the frame rotation.
Example 9:
2 (tool length must be valued in the diameter axis with the factor 0.5) is the value of machine
data:
MD20360 $MC_TOOL_PARAMETER_DEF_MASK (definition of tool parameters).
X is diameter axis:
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1579
W1: Tool offset
17.16 Data lists
Basic Functions
1580 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
W1: Tool offset
17.16 Data lists
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1581
W1: Tool offset
17.16 Data lists
17.16.3 Signals
Basic Functions
1582 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
Z1: NC/PLC interface signals 18
18.1 Various interface signals and functions (A2)
DB10
DBX56.4 - DBX56.7 Key-operated switch positions 0 to 3
Edge evaluation: No Signal(s) updated: Cyclic
Significance of signal Depending on the key-operated switch position, access to certain elements in the NCK can be
enabled or disabled.
• Key-operated switch position 0 represents the lowest access rights
• Key-operated switch position 3 represents the highest access rights
The NC/PLC interface signals of key-operated switch positions 1 to 3 can either be directly
specified from the key-operated switch on the machine control panel or from the PLC user
program.
It is only permissible to set one bit. If several bits are set simultaneously, the control internally
activates switch position 3.
Key-operated switch position DBX56.7 DBX56.6 DBX56.5 DBX56.4
0 0 0 0 1
1 0 0 1 0
2 0 1 0 0
3 1 0 0 0
Corresponding to ... Machine data for protection levels: MD11612, MD51044 - MD51064, MD51070 - MD51073,
MD51199 - MD51211, MD51215 - MD51225, MD51235
Disabling using a password
DB10
DBX103.0 Remote diagnosis active
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or Remote diagnosis (optional) is active, i.e. the control is operated via an external PC.
edge change 0 → 1
Signal state 0 or Remote diagnosis is not active.
edge change 1 → 0
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1583
Z1: NC/PLC interface signals
18.1 Various interface signals and functions (A2)
DB10
DBX103.5 AT box ready
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or The AT box for expansion modules is ready.
edge change 0 → 1
Signal state 0 or The AT box is not ready. An expansion module conforming to the AT specification has either no
edge change 1 → 0 functionality or restricted functionality.
DB10
DBX103.6 HMI temperature limit
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or The environment conditions of the limit value are in the permitted tolerance range of 5 to 55° C.
edge change 0 → 1
Signal state 0 or The temperature range was either exceeded, or the temperature fell below the limit.
edge change 1 → 0 The temperature monitor has responded and the PCU is disabled.
DB10
DBX103.7 HMI battery alarm
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or The battery monitor has responded. Power failure can cause the loss of recently changed data and
edge change 0 → 1 a correct device configuration. An appropriate alarm is issued. The buffer battery should be
checked. An insufficient battery voltage also affects the current time on the user interface.
Signal state 0 or No HMI battery alarm is present.
edge change 1 → 0
Additional references Operator Components Manual (PCU)
DB10
DBX104.7 NCK CPU ready
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 The NCK CPU is ready and registers itself cyclically with the PLC.
After a correct initial start and the first complete OB1 cycle (initial setting cycle) the PLC and NCK
continuously exchange sign-of-life signals.
The PLC basic program sets the interface signal "NCK CPU Ready" to 1.
Basic Functions
1584 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
Z1: NC/PLC interface signals
18.1 Various interface signals and functions (A2)
DB10
DBX104.7 NCK CPU ready
Signal state 0 The NCK CPU is not ready.
If a sign-of-life is not received from the NCK, the PLC/NCK interface is neutralized by the PLC
basic program and the interface signal "NCK CPU Ready" is set to 0.
The following measures are introduced by the PLC basic program:
• Status signals from NCK to PLC (user interface) are deleted (cleared)
• Change signals for help functions are deleted
• Cyclic processing of the user interface PLC to NCK is terminated.
Additional references • Diagnostics Manual
• Function Manual Basic Functions; Basic PLC Program
DB10
DBX108.3 SINUMERIK Operate at OPI ready
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 SINUMERIK Operate is ready and cyclically logs on with the NCK.
Signal state 0 SINUMERIK Operate is not ready.
Additional references Diagnostics Manual
DB10
DBX108.5 Drives in cyclic operation
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 For all machine axes of the NC, the corresponding drives are in the cyclic operation, i.e. they
cyclically exchange PROFIdrive telegrams with the NC.
Signal state 0 For at least one machine axis of the NC, the corresponding drive is not in cyclic operation, i.e. it is
not cyclically exchanging PROFIdrive telegrams with the NC.
DB10
DBX108.6 Drive ready
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 For all machine axes of the NC, the corresponding drives are ready:
DB31, ... DBX93.5 == 1 (DRIVE ready)
Signal state 0 For at least one machine axis of the NC, the corresponding drive is not ready:
DB31, ... DBX93.5 == 0 (DRIVE ready)
Corresponding to ... DB31, ... DBX93.5 (DRIVE ready)
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1585
Z1: NC/PLC interface signals
18.1 Various interface signals and functions (A2)
DB10
DBX108.7 NC ready
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 The control system is ready.
This interface signal is an image of the relay contact "NC Ready".
This signal is set if:
• Relay contact "NC Ready" is closed
• All the voltages in the controller have been established
• The controller is in the cyclic mode
Signal state 0 The controller is not ready. The relay contact "NC Ready" is open.
The following faults will cause NC Ready to be canceled:
• Undervoltage and overvoltage monitoring function has responded
• Individual components are not ready (NCK CPU Ready)
• NCK CPU watchdog
If the signal "NC Ready" goes to 0 the following measures are introduced by the controller if they
are still possible:
• The controller enable signals are withdrawn (this stops the drives)
• The following measures are introduced by the PLC basic program:
– Status signals from NCK to PLC (user interface) are deleted (cleared)
– Change signals for help functions are deleted
– Cyclic processing of the PLC to NCK user interface is terminated
For further information see References!
The controller is not ready again until after POWER ON.
Corresponding to ... Relay contact "NC Ready"
Additional references • Diagnostics Manual
• Function Manual Basic Functions; Basic PLC Program
DB10
DBX109.0 NCK alarm is active
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 At least one NCK alarm is present.
This is a group signal for the interface signals of all existing channels:
DB21, ... DBX36.6 (channel-specific NCK alarm is active)
Signal state 0 No NCK alarm is active.
Corresponding to ... DB21, ... DBX36.6 (channel-specific NCK alarm is active)
DB21, ... DBX36.7 (NCK alarm with processing stop present)
Additional references Diagnostics Manual
Basic Functions
1586 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
Z1: NC/PLC interface signals
18.1 Various interface signals and functions (A2)
DB10
DBX109.5 NCU heat sink temperature alarm
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 In the NCU, the limit values of the heat sink temperature was exceeded.
The heat sink temperature has been activated and a steady operation of the operator panel is no
longer guaranteed.
Signal state 0 The heat sink monitoring function of the NCU has not responded.
DB10
DBX109.6 Air temperature alarm
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 The ambient temperature or fan monitoring function has responded.
This may be due to the following causes:
• The temperature monitoring has identified an ambient temperature that is too high (approx. 60
°C). Alarm 2110 "NCK temperature alarm" is output.
• The speed monitoring of the 24 VDC fan used to cool the module has responded. Alarm 2120
"NCK fan alarm" is output.
Measures: Replace the fan and/or ensure that additional ventilation is provided.
When a temperature or fan error responds, a relay contact (terminal 5.1, 5.2 or 5.1, 5.3) in the
infeed/regenerative feedback unit is activated which can be evaluated by the customer.
Signal state 0 Neither the temperature monitoring nor the fan monitoring has responded.
Application Appropriate measures can be initiated by the PLC user program if the temperature or fan
example(s) monitoring is activated.
Corresponding to ... When a temperature or fan error responds, a relay contact (terminal 5.1, 5.2 or 5.1, 5.3) in the
infeed/regenerative feedback unit is activated. This can be evaluated.
Additional references Diagnostics Manual
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1587
Z1: NC/PLC interface signals
18.1 Various interface signals and functions (A2)
DB10
DBX109.7 NCK battery alarm
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 The NCK battery voltage monitoring function has responded.
This may be due to the following causes:
• The battery voltage is within the pre-warning limit range (approx. 2.7 to 2.9 V). Alarm 2100
"NCK battery warning threshold reached" has been triggered.
Effects: A supply voltage failure - e.g. when the controller is switched off - would result in the
loss of battery-buffered data (e.g. part program memory, variables, machine data ...).
Alarm 2102 "NCK battery alarm" is output; NC ready and mode group ready are not issued.
Effects: Some of the battery-buffered data may already have been lost!
DB19
DBX0.0 Screen bright
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or The screen blanking is disabled.
edge change 0 → 1
Signal state 0 or The screen blanking remains in effect.
edge change 1 → 0
Corresponding to ... DB19 DBX0.1 (darken screen)
Basic Functions
1588 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
Z1: NC/PLC interface signals
18.1 Various interface signals and functions (A2)
DB19
DBX0.1 Darken screen
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or The screen is darkened by the PLC user program.
edge change 0 → 1 The automatic screen brightening/darkening is therefore ineffective:
i.e. the screen does not brighten up automatically on actuating the keyboard.
Signal state 0 or The screen is controlled by the PLC user program "bright".
edge change 1 → 0 In this signal state, the screen brightening/darkening setting can be derived by the control via the
keyboard automatically.
The screen is darkened if no key is pressed for a period defined via the following machine data on
the keyboard:
MD9006 $MM_DISPLAY_BLACK_TIME (time to darken the screen)
The screen is brightened the next time a key on the operator panel front is pressed.
Application Screen saver
example(s)
Special cases, Notice:
errors, .... The keyboard of the operator panel front continues to be effective if the interface signal:
DB19 DBX0.1 (darken screen) = 1
We therefore recommend that this is disabled using the interface signal:
DB19 DBX0.2 (key disable)
Corresponding to ... DB19 DBX0.2 (key disable)
MD9006 $MM_DISPLAY_BLACK_TIME (time to darken the screen)
DB19
DBX0.2 Key disable
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or The keyboard is disabled for the user.
edge change 0 → 1
Signal state 0 or The keyboard is enabled for the user.
edge change 1 → 0
Application If the screen is darkened with the interface signal: DB19 DBX0.1 (darken screen), the keyboard
example(s) should be actuated simultaneously with the interface signal: DB19 DBX0.2 (key disable) to avoid
an unintended operation.
Corresponding to ... DB19 DBX0.1 (darken screen)
DB19
DBX0.3 Clear cancel alarms
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or Clear error key on the machine control panel is pressed.
edge change 0 → 1 All cancel alarms of the NCKs and the control panel are then acknowledged. The PLC application
acknowledges the PLC alarms itself.
Power On and Reset alarms remain active on the NCK until the cause of the error has been
removed.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1589
Z1: NC/PLC interface signals
18.1 Various interface signals and functions (A2)
DB19
DBX0.3 Clear cancel alarms
Signal state 0 or Clear error key on the machine control panel is not pressed.
edge change 1 → 0
Functionality Only valid for HMI Advanced.
Corresponding to ... DB19 DBX20.3 (cancel alarm cleared)
DB19
DBX0.4 Clear recall alarms
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or Clear error key on the machine control panel is pressed.
edge change 0 → 1 All cancel alarms of the NCKs and the control panel are then acknowledged. The PLC application
acknowledges the PLC alarms itself. POWER On and Reset alarms remain active on the NCK until
the cause of the error has been removed.
Signal state 0 or Clear error key on the machine control panel is not pressed.
edge change 1 → 0
Application Applies to HMI Advanced only
example(s)
Corresponding to ... DB19 DBX20.4 (recall alarm cleared)
DB19
DBX0.7 Actual values in WCS, 0 = MCS
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or The PLC selects the display of actual values in the workpiece coordinate system (WCS). This
edge change 0 → 1 means that when the machine area is selected, the WCS display is activated; i.e. the machine and
the supplementary axes as well as their actual positions and distances-to-go are displayed in the
WCS in the "Position" window.
The interface signal is only evaluated when it enters the basic machine screen; this means that the
operator, within the machine area, can toggle as required between the particular coordinate
systems using the softkeys "actual values MCS" and "actual values WCS".
Signal state 0 or This means that when the machine area is selected the coordinate system previously selected
edge change 1 → 0 (WCS or MCS) is reactivated and displayed.
Application Using the interface signal:DB19, DBX0.7 (actual value in WCS) = 1 each time that the machine
example(s) area is re-selected, the workpiece coordinate system display frequently required by the operator
(WCS), is selected.
Corresponding to ... DB19 DBX20.7 (changeover MCS/WCS)
Additional references Operation Guide HMI (corresponding to the used software)
DB19
DBB6 Analog spindle 1, utilization in percent
Edge evaluation: No Signal(s) updated: Cyclically
Basic Functions
1590 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
Z1: NC/PLC interface signals
18.1 Various interface signals and functions (A2)
DB19
DBB7 Analog spindle 2, utilization in percent
Edge evaluation: No Signal(s) updated: Cyclically
DB19
DBB8 Channel number of the machine control panel to HMI
Edge evaluation: No Signal(s) updated: Cyclically
DB19
DBB10 PLC hard keys (value range 1 ...255, 0 is the initial state)
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or Program area selection active
edge change 0 → 1
Signal state 0 or Program area selection inactive
edge change 1 → 0
DB19
DBX13.5 Unload part program
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or Unload active
edge change 0 → 1
Signal state 0 or Unload inactive
edge change 1 → 0
Application A file transfer can be initiated using the hard disk.
example(s)
DB19
DBX13.6 Load part program
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or Load active
edge change 0 → 1
Signal state 0 or Load inactive
edge change 1 → 0
Application A file transfer can be initiated using the hard disk.
example(s)
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1591
Z1: NC/PLC interface signals
18.1 Various interface signals and functions (A2)
DB19
DBX13.7 Part program selection
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or Selection active
edge change 0 → 1
Signal state 0 or Selection inactive
edge change 1 → 0
Application A file transfer can be initiated using the hard disk.
example(s)
DB19
DBX14.0 - DBX14.6 PLC index
Edge evaluation: No Signal(s) updated: Cyclically
Description This byte for control of the RS-232-C describes the PLC index for the standard control file that
specifies the axis, channel or TO number.
Application Dependent on:
example(s) DB19 DBX14.7=0 → Act. FS: PLC index that specifies axis, channel or TO No.
DB19 DBX14.7=1 → Pas. FS: PLC index for the user control file
DB19
DBX14.7 Active or passive file system
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or Passive file system
edge change 0 → 1
Signal state 0 or Active file system
edge change 1 → 0
DB19
DBB15 PLC line offset
Edge evaluation: No Signal(s) updated: Cyclically
Description This byte to control the RS-232-C interface defines the line of the standard or user control file in
which the control file to be transferred is specified.
Application Dependent on:
example(s) DB19 DBX14.7=0 → Act. FS: PLC line offset in a standard control file
DB19 DBX14.7=1 → Pas. FS: PLC line offset in a user control file
Basic Functions
1592 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
Z1: NC/PLC interface signals
18.1 Various interface signals and functions (A2)
DB19
DBX16.0 - DBX16.6 PLC index for the user control file
Edge evaluation: No Signal(s) updated: Cyclically
Description This byte for controlling file transfer via hard disk defines the index for the control file (job list).
Application Dependent on:
example(s) DB19 DBX14.7=0 → Act. FS: PLC index for the standard control file
DB19 DBX14.7=1 → Pas. FS: PLC index for the user control file
DB19
DBX16.7 Active or passive file system
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or Passive file system
edge change 0 → 1
Signal state 0 or Active file system
edge change 1 → 0
Application with HMI Advanced always 1
example(s)
DB19
DBB17 PLC line offset in the user control file
Edge evaluation: No Signal(s) updated: Cyclically
Description This byte for controlling file transfer via the hard disk defines the line of the user control file in which
the control file to be transferred is located.
Application Dependent on:
example(s) DB19 DBX14.7=0 → Act. FS: PLC line offset in a standard control file
DB19 DBX14.7=1 → Pas. FS: PLC line offset in a user control file
DB19
DBX44.0 Mode change disable
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or Mode change disable active
edge change 0 → 1
Signal state 0 or Mode change disable active
edge change 1 → 0
DB19
DBX45.0 FC9 Out: Active
Edge evaluation: No Signal(s) updated: Cyclically
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1593
Z1: NC/PLC interface signals
18.1 Various interface signals and functions (A2)
DB19
DBX45.1 FC9 Out: Done
Edge evaluation: No Signal(s) updated: Cyclically
DB19
DBX45.2 FC9 Out: Error
Edge evaluation: No Signal(s) updated: Cyclically
DB19
DBX45.3 FC9 Out: StartError
Edge evaluation: No Signal(s) updated: Cyclically
DB19
DBX20.1 Screen dark
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 The screen is darkened.
Signal state 0 The screen is not darkened.
Application Using this IS, the PLC can identify whether the screen was switched dark using the interface
example(s) signal:
DB19, DBX0.1 (darken screen)
or using the machine data:
MD9006 $MM_DISPLAY_BLACK_TIME (screen blanking time)
.
Corresponding to ... MD9006 $MM_DISPLAY_BLACK_TIME (screen blanking time)
DB19
DBX20.3 Cancel alarm deleted
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 Cancel alarm deleted active
Signal state 0 Cancel alarm deleted inactive
Note: The signal is not reset automatically, it must be set by the user via the PLC user program.
Application Applies only to HMI Advanced
example(s)
Basic Functions
1594 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
Z1: NC/PLC interface signals
18.1 Various interface signals and functions (A2)
DB19
DBX20.4 Recall alarm deleted
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 Recall alarm deleted inactive
Signal state 0 Recall alarm deleted inactive
Note: The signal is not reset automatically, it must be set by the user via the PLC user program.
Application Applies only to HMI Advanced
example(s)
DB19
DBX20.6 Simulation active
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 On entry to simulation = 1
DB19
DBX20.7 Switch over MCS/WCS
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 The coordinate system is switched over from workpiece coordinate system (WCS) to machine
coordinate system (MCS) or from MCS to WCS.
After it has been set, the signal is active for one PLC cycle.
Signal state 0 No effect
Application The interface signal:
example(s) DB19, DBX20.7 (switch over MCS/WCS)
must be transferred to the interface signal:
DB19, DBX0.7 (actual value in WCS)
in order that the switchover becomes effective.
Corresponding to ... DB19, DBX0.7 (actual value in WCS)
DB19
DBB22 Displayed channel number from HMI
Edge evaluation: No Signal(s) updated: Cyclically
DB19
DBB24 Actual image number of the JobShop interface
Edge evaluation: No Signal(s) updated: Cyclically
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1595
Z1: NC/PLC interface signals
18.1 Various interface signals and functions (A2)
DB19
DBX26.1 OK Part program handling status)
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 Transfer correctly completed
Signal state 0 Transfer completed with error
Additional references Commissioning Manual, SINUMERIK Operate (IM9), Section "PLC functions" > "Program
selection"
Corresponding to ... DB19.DBB13 (program selection: Requirement)
DB19.DBB16 (program selection: Control file index)
DB19.DBB17 (program selection: Program list index)
DB19.DBB27 (program selection: Error handling)
DB19
DBX26.2 Error (part program handling status)
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 Transfer completed with error
Signal state 0 Transfer correctly completed
Additional references Commissioning Manual, SINUMERIK Operate (IM9), Section "PLC functions" > "Program
selection"
Corresponding to ... DB19.DBB13 (program selection: Requirement)
DB19.DBB16 (program selection: Control file index)
DB19.DBB17 (program selection: Program list index)
DB19.DBB27 (program selection: Error handling)
DB19
DBX26.3 Active (part program handling status)
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 Job in progress
Signal state 0 No job in progress
Additional references Commissioning Manual, SINUMERIK Operate (IM9), Section "PLC functions" > "Program
selection"
Corresponding to ... DB19.DBB13 (program selection: Requirement)
DB19.DBB16 (program selection: Control file index)
DB19.DBB17 (program selection: Program list index)
DB19.DBB27 (program selection: Error handling)
Basic Functions
1596 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
Z1: NC/PLC interface signals
18.1 Various interface signals and functions (A2)
DB19
DBX26.5 Unload (part program handling status)
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 Unload active
Signal state 0 Unload inactive
Additional references Commissioning Manual, SINUMERIK Operate (IM9), Section "PLC functions" > "Program
selection"
Corresponding to ... DB19.DBB13 (program selection: Requirement)
DB19.DBB16 (program selection: Control file index)
DB19.DBB17 (program selection: Program list index)
DB19.DBB27 (program selection: Error handling)
DB19
DBX26.6 Load (part program handling status)
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 Load active
Signal state 0 Load inactive
Additional references Commissioning Manual, SINUMERIK Operate (IM9), Section "PLC functions" > "Program
selection"
Corresponding to ... DB19.DBB13 (program selection: Requirement)
DB19.DBB16 (program selection: Control file index)
DB19.DBB17 (program selection: Program list index)
DB19.DBB27 (program selection: Error handling)
DB19
DBX26.7 Select (part program handling status)
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 Selection active
Signal state 0 Selection inactive
Additional references Commissioning Manual, SINUMERIK Operate (IM9), Section "PLC functions" > "Program
selection"
Corresponding to ... DB19.DBB13 (program selection: Requirement)
DB19.DBB16 (program selection: Control file index)
DB19.DBB17 (program selection: Program list index)
DB19.DBB27 (program selection: Error handling)
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1597
Z1: NC/PLC interface signals
18.1 Various interface signals and functions (A2)
DB19
DBB27 Error program handling
Edge evaluation: No Signal(s) updated: Cyclically
Description Error codes: aaa
Value Meaning
0 No error
1 Invalid number for the control file (value in DB19.DBB16 < 127 or invalid)
3 Control file "plc_proglist_main.ppl" not found (value in DB19.DBB16 invalid)
4 Invalid index in control file (incorrect value in DB19.DBB17)
5 Job list in the selected workpiece could not be opened
6 Error in job list. (Job list Interpreter returns error)
7 Job list Interpreter returns empty job list
Additional references Commissioning Manual, SINUMERIK Operate (IM9), Section "PLC functions" > "Program
selection"
Corresponding to ... DB19.DBB13 (program selection: Requirement)
DB19.DBB16 (program selection: Control file index)
DB19.DBB17 (program selection: Program list index)
DB19.DBB26 (program selection: Acknowledgement)
DB21, ...
DBX6.2 Delete distance-to-go (channel-specific)
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or Delete distance-to-go (channel-specific):
edge change 0 → 1 IS "Delete distance-to-go (channel-specific)" for path axes is only active in AUTOMATIC mode.
The rising edge of the interface signal is only effective for the axes involved in the geometry
grouping. These are also stopped with a ramp stop and their distance-to-go deleted (setpoint -
actual value difference). Any remaining following error is still corrected. The next program block is
then started.
IS "Delete distance-to-go (channel-specific)" is therefore ignored by positioning axes.
Remark:
IS "Delete distance-to-go" does not influence the running dwell time in a program block with dwell
time.
Signal state 0 or No effect
edge change 1 → 0
Signal irrelevant for Positioning axes
...
Application To terminate motion because of an external signal (e.g. measuring probe)
example(s)
Basic Functions
1598 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
Z1: NC/PLC interface signals
18.1 Various interface signals and functions (A2)
DB21, ...
DBX6.2 Delete distance-to-go (channel-specific)
Special cases, Delete distance-to-go (channel-specific)
errors, .... When the axes have been stopped with IS "Delete distance-to-go" the next program block is
prepared with the new positions. After a "Delete distance-to-go", geometry axes thus follow a
different contour to the one originally defined in the part program.
If G90 is programmed in the block after "Delete distance-to-go" it is at least possible to approach the
programmed absolute position. On the other hand, with G91, the position originally defined in the
part program is no longer reached in the following block.
Corresponding to ... DB31, ... DBX2.2 (delete distance-to-go (axis-specific))
DB21, ...
DBX36.6 Channel-specific NCK alarm is active
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or At least one NCK alarm is present for this channel.
edge change 0 → 1 Thus the following group interface signal is also set:
DB10 DBX109.0 (NCK alarm is present)
The PLC user program can interrogate whether processing for the channel in question has been
interrupted because of an NCK channel:
DB21, ... DBX36.7 (NCK alarm with processing stop present).
Signal state 0 or No NCK alarm is active for this channel.
edge change 1 → 0
Corresponding to ... DB21, ... DBX36.7 (NCK alarm with processing stop pending)
DB10 DBX109.0 (NCK alarm pending)
Additional references Diagnostics guide
DB21, ...
DBX36.7 NCK alarm with processing stop present
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or At least one NCK alarm - which is causing a processing stop of the part program running in this
edge change 0 → 1 channel - is active.
Signal state 0 or There is no alarm active in this channel that is causing a processing stop.
edge change 1 → 0
Application With this alarm a program interruption because of an NCK alarm can be recognized immediately by
example(s) the PLC user program and the necessary steps introduced.
Corresponding to ... DB21, ... DBX36.6 (channel-specific NCK alarm pending)
Additional references Diagnostics guide
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1599
Z1: NC/PLC interface signals
18.1 Various interface signals and functions (A2)
DB31, ...
DBX1.0 Drive test travel enable
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 Traversing motions of the axis are enabled for the drive test.
Feedback signal of the safety handshake at the start of the NC function generator.
The NC has requested the traversing enable for the axis at the start of the function generator with
the following interface signal:
DB31, ... DBX61.0 = 1 (drive test travel request)
The PLC user program sets the current interface signal as feedback signal to the NC that the axis
can be traversed:
DB31, ... DBX1.0 = 1 (drive test travel enable)
Only the PLC can decide on the traversing enable of an axis.
Signal state 0 Traversing motions of the axis are disabled for the drive test.
Additional references Commissioning Manual IBN CNC: NCK, PLC, Drive
DB31, ...
DBX1.3 Axis/spindle disable
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 Axis
No setpoints are output to the position controller. The traversing motion of the axis is disabled.
However, the axis is still in closed-loop position control and any remaining following error is
compensated.
If the axis is traversed, the position setpoint and velocity setpoint are displayed as actual position
and actual velocity on the user interface. No setpoints are transferred to the drive, the machine axis
therefore does not traverse. With RESET, the display of the actual value is set to the actual value
of the machine axis.
Travel commands are output to the NC/PLC interface.
If the interface signal is set for a traversing axis, this is stopped in compliance with the acceleration
characteristic and an alarm is displayed.
Spindle
No speed setpoints are output to the speed controller in open-loop control mode.
No position partial setpoints are output to the position controller in positioning mode.
The traversing motion of the spindle is disabled. The speed setpoint is displayed as the actual
speed value on the user interface.
If the interface signal is set for a traversing spindle, this is stopped in compliance with the
acceleration characteristic and an alarm is displayed.
Basic Functions
1600 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
Z1: NC/PLC interface signals
18.1 Various interface signals and functions (A2)
DB31, ...
DBX1.3 Axis/spindle disable
Signal state 0 The reset of the interface signal does not take effect until the axis/spindle is stationary, i.e. an
interpolation setpoint is no longer present.
Axis
Position setpoints are transferred to the position controller cyclically.
If the interface signal was set, traversing can be performed as normal immediately after the reset of
the axis.
Spindle
Speed setpoints are transferred to the speed controller cyclically.
If the interface signal was set, the effective spindle disable can only be canceled after the reset
through RESET or M2 and a program restart.
3RVLWLRQ
VHWSRLQWIURP LVHW
WKHLQWHUSRODWRU 3RVLWLRQ 6SHHG &XUUHQW (QFRGHU
0RWRU
B FRQWUROOHU B FRQWUROOHU FRQWUROOHU
LDFW
QDFW
$[LVLQKLELW
DFWLYH
$FWXDOSRVLWLRQYDOXH
Application Prevention of traversing motions of the axis or spindle when running-in and testing a new part
example(s) program.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1601
Z1: NC/PLC interface signals
18.1 Various interface signals and functions (A2)
DB31, ...
DBX1.3 Axis/spindle disable
Special cases, If the interface signal is set, the following interface signals have no effect with regard to the braking
errors, .... of the axis/spindle:
• DB31, ... DBX2.1 (controller enable)
• DB2 ... (feed/spindle stop)
• DB31, ... DBX12.0-12.1 (hardware limit switch)
The axis/spindle can still be switched to the "hold" or "follow up" state
(see DB31, ... DBX1.4 (follow-up mode)).
Notes
• The output of setpoints on the drive is disabled with the interface signal.
• A brief pulse can bring a traversing axis to a standstill. The axis will not move again in this
block, but only when the next block is reached.
• Re-synchronization takes place automatically on the next traversing command for this axis, i.e.
the axis traverses the remaining distance-to-go.
Example:
N10 G0 X0 Y0
N30 Y100
N40 X200
Regarding N20: At position X20, the interface signal "Axis disable" is briefly set. The X axis is
braked to standstill.
Regarding N40: The X axis traverses from the last position (approx. 20 mm) to the programmed
position 200 mm.
Effects of the interface signal for spindle or axis couplings:
LS/LA1) FS/FA1) Coupl.2) Effect
0 0 Off Setpoints of axes are output
0 1 Off No setpoint output for FS/FA
1 0 Off No setpoint output for LS/LA
1 1 Off No setpoint output for FS/FA and LS/LA
0 0 On Setpoints of axes are output
0 1 On Disable not effective for FS/FA
1 0 On Disable also effective for FS/FA
1 1 On No setpoint output for FS/FA and LS/LA
1) Status of the interface signal; LS/LA: Leading spindle/axis; FS/FA: Following spindle/axis
2) Status of the coupling between leading and following spindle/axis
Corresponding to ... DB21, ... DBX33.7 (program test active)
Additional references Behavior in synchronous mode:
Function Manual, Extended Functions; Synchronous Spindle (S3)
Basic Functions
1602 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
Z1: NC/PLC interface signals
18.1 Various interface signals and functions (A2)
DB31, ...
DBX1.4 Follow-up mode
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 Follow-up mode is active.
• The position setpoint is continuously tracked: Position setpoint = actual position value.
• Feedback signal for the active follow-up mode:
DB31, ... DBX61.3 = 1 (follow-up active)
• Zero speed and clamping monitoring are not active.
• When the closed-loop control system is reactivated, a control-internal repositioning operation is
performed (REPOSA: linear approach with all axes) to the last programmed position if a part
program is active.
Signal state 0 Follow-up mode is not active.
When "controller enable" is removed the previous position setpoint is kept in the control.
If the axis/spindle is moved out of position during this time a following error occurs between the
position setpoint and the actual position value. This position difference is reduced to zero
immediately by issuing "controller enable" so that the previous setpoint position is restored. Then,
all the other axis motions start from the setpoint position valid before "controller enable" was
removed.
When the position control is switched on again the axis may make a speed setpoint jump.
Zero speed and clamping monitoring are active.
To switch off the zero speed monitoring, the following interface signal should be set when clamping
an axis:
DB31, ... DBX2.3 = 1 (clamping operation running).
In the "hold" state, the interface signal:
DB31, ... DBX61.3 (follow-up active)
is set to a 0 signal.
Special cases, If the controller enable is canceled in the control because of faults, the "hold" state should be
errors, .... activated for the axis before the NC Start after the queued alarms have been successfully deleted,
and the accompanying controller enable set: DB31, ... DBX1.4 = 0 (follow-up mode).
Otherwise, for an NC Start and active follow-up mode, the traversing distance of the previous NC
block would not be executed due to the internal delete distance-to-go.
Notice:
During the transition from the "follow-up" state to the "hold" state or when the controller enable is
set in position control, delete distance-to-go is activated in the control. As a consequence, for
example, a block in which only this axis is traversed is terminated directly.
Corresponding to ... DB31, ... DBX2.1 (controller enable)
DB31, ... DBX2.3 (clamping in progress)
DB31, ... DBX61.3 (follow-up active)
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1603
Z1: NC/PLC interface signals
18.1 Various interface signals and functions (A2)
DB31, ...
DBX1.5 - DBX1.6 Position measuring system 1 (PMS1) / Position measuring system 2 (PMS2)
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 The position measuring system is enabled
Signal state 0 The position measuring system is disabled
Signal state overview PMS1 PMS2 Effect
1 0 Position measuring system 1 is active:
• Position measuring system 1 is used for position control.
• If position measuring system 2 is also available (MD30200 $MA_NUM_ENCS
== 2), its actual position value is also acquired.
0 1 Position measuring system 2 is active:
• Position measuring system 2 is used for position control.
• If position measuring system 1 is also available (MD30200 $MA_NUM_ENCS
== 2), its actual position value is also acquired.
1 1 • Position measuring system 1 is used for position control.
• If position measuring system 2 is also available (MD30200 $MA_NUM_ENCS
== 2), its actual position value is also acquired.
0 0 Position measuring systems 1 and 2 are inactive:
• There is no actual value acquisition.
• The monitoring of the position measuring system has been deactivated.
• The following interface signals are reset:
– DB31, ... DBX60.4/5 == 0 (referenced/synchronized)
– DB31, ... DBX61.5 (position controller active)
– DB31, ... DBX61.6 (speed controller active)
– DB31, ... DBX61.7 (current controller active)
After parking has been completed, the axis must be referenced again.
Notes
• If the interface signal of the active position measuring system is reset for a traversing axis, the
axis is stopped with a ramp stop without the controller enable being canceled internally.
• If a speed-controlled spindle does not have a position measuring system, the "Controller
enable" interface signal must be set:
DB31, ... DBX2.1 == 1 (controller enable)
Basic Functions
1604 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
Z1: NC/PLC interface signals
18.1 Various interface signals and functions (A2)
DB31, ...
DBX1.5 - DBX1.6 Position measuring system 1 (PMS1) / Position measuring system 2 (PMS2)
Application 1. Switching over from position measuring system 1 to positioning measuring system 2 (and vice
example(s) versa).
If the axis was referenced in both position measuring systems and the limit frequency of the
used measured value encoder has not been exceeded in the meantime, i.e.
DB31, ... DBX60.4 and 60.5 == 1 (referenced/synchronized 1 and 2) , a new reference point
approach is not required after the switchover.
On switchover, the current difference between position measuring system 1 and 2 is traversed
immediately.
A tolerance band in which the deviation between the two actual values may lie at the switchover
can be specified with the following machine data:
MD36500 $MA_ENC_CHANGE_TOL (maximum tolerance for position actual value switchover)
If the actual value difference is greater than the tolerance, there is no switchover and alarm
25100 "Measuring system switchover not possible" is displayed.
2. Parking axis (i.e. no position measuring system is active):
The position measuring system monitoring is switched off when the measured value encoder is
removed.
3. Switch off position measuring system:
When position measuring system 1 or 2 is switched off, the associated interface signal:
DB31, ... DBX60.4/60.5 (referenced/synchronized 1/2)
is reset.
4. Reference point approach:
Reference point approach of the axis is executed with the selected position measuring system.
Every position measuring system must be separately referenced.
Special cases, If the state "parking axis" is active, the following interface signal is ignored at NC Start for this axis:
errors, .... DB31, ... DBX60.4/60.5 (referenced/synchronized 1/2).
Corresponding to ... DB31, ... DBX60.4/.5 (referenced/synchronized 1/2)
DB31, ... DBX61.6 (speed controller active)
DB31, ... DBX2.1 (controller enable)
MD36500 $MA_ENC_CHANGE_TOL (max. tolerance on actual position value switchover)
MD30200 $MA_NUM_ENCS (number of encoders)
Additional references Function Manual, Basic Functions; Velocities, Setpoint / Actual Value Systems, Closed-Loop
Control (G2)
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1605
Z1: NC/PLC interface signals
18.1 Various interface signals and functions (A2)
DB31, ...
DBX2.1 Controller enable
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 Controller is enabled.
The position control loop is closed and the axis/spindle is in closed-loop control.
Feedback:
DB31, ... DBX61.5 = 1 (position controller active)
If the axis/spindle was referenced before resetting the interface signal, the axis/spindle does not
have to be re-referenced after the interface signal is set again. Supplementary condition: The limit
frequency of the active measuring system must not be exceeded in the meantime.
Note
If the axis/spindle was moved from its position during the time in which the controller enable was
not set, the behavior when the controller enable is set depends on the interface signal "follow-up
mode":
• DB31, ... DBX1.4 == 1 (follow-up mode)
The position control is implemented on the current position
• DB31, ... DBX1.4 == 0 (follow-up mode)
The position control is made on the last position before the reset the controller enable
Signal state 0 Controller is not enabled.
The behavior when the "controller enable" is removed depends on whether the axis/spindle is
stationary or traversing at this time:
• Axis/spindle stationary:
– The position control loop of the axis is opened.
– For DB31, ... DBX1.4 == 1 (follow-up mode) ⇒ position setpoint = actual position value
– The controller enable on the drive is reset
– The following interface signals are reset:
DB31, ... DBX61.5 = 0 (position controller active)
Basic Functions
1606 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
Z1: NC/PLC interface signals
18.1 Various interface signals and functions (A2)
DB31, ...
DBX2.1 Controller enable
Application Mechanical clamping of an axis
example(s) If the axis is positioned at the clamping position, the clamping is closed. The controller enable is
then reset. Otherwise, the position controller would constantly work against the clamping, if the axis
was moved mechanically from its specified position during the clamping operation.
When the clamping is removed, the controller enable is set first and then the mechanical clamping
is released.
Special cases, Travel request for an axis/spindle without controller enable:
errors, ....
• The axis/spindle is not traversed
• The travel command is output to the interface
• As long as the travel request is present, the axis/spindle is traversed immediately when the
controller enable is set.
A reset of the controller enable for a moving geometry axis always leads to a contour violation.
Corresponding to ... DB31, ... DBX61.3 (follow-up active)
DB31, ... DBX1.4 (follow-up mode)
DB31, ... DBX61.5 (position controller active)
DB31, ... DBX61.6 (speed controller active)
DB31, ... DBX61.7 (current controller active)
MD36620 $MA_SERVO_DISABLE_DELAY_TIME (OFF delay of the controller enable)
MD36610 $MA_AX_EMERGENCY_STOP_TIME (braking ramp time when errors occur)
DB31, ...
DBX2.2 Delete distance-to-go (axis-specific) / spindle reset
Edge evaluation: Yes Signal(s) updated: Cyclically
Edge change Delete distance-to-go (axis-specific) is requested.
0→1 The behavior varies depending on the operating mode:
• JOG mode:
If the interface signal is set for one axis (edge change 0 → 1), this axis is stopped with ramp stop
and its distance-to-go deleted (setpoint - actual value difference).
Any remaining following error is still corrected.
• Operating modes AUTOMATIC and MDI:
The rising edge of the interface signals only influences the axes which are not in the geometry
grouping. They are stopped with ramp stop and their distance-to-go deleted (setpoint - actual
value difference). The next program block can then be started. IS "delete distance-to-go axial" is
therefore ignored by geometry axes.
Remark: "Delete distance-to-go" does not influence the running dwell time in a part program block
with dwell time.
Edge change No effect
1→0
Application To terminate motion because of an external signal (e.g. measuring probe)
example(s)
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1607
Z1: NC/PLC interface signals
18.1 Various interface signals and functions (A2)
DB31, ...
DBX2.2 Delete distance-to-go (axis-specific) / spindle reset
Special cases, "Delete distance-to-go (axis-specific)"
errors, .... After the axes have been stopped with "Delete distance-to-go" the next program block is prepared
with the new positions. The axes thus follow a different contour to the one originally defined in the
part program after a "Delete distance-to-go".
If G90 is programmed in the block after "Delete distance-to-go" it is at least possible to approach the
programmed absolute position. On the other hand, with G91, the position originally defined in the
part program is no longer reached in the following block.
Corresponding to ... DB21, ... DBX6.2 (delete distance-to-go, channel-specific)
Additional references Function Manual, Basic Functions; Spindles (S1)
DB31, ...
DBX9.0 - DBX9.2 Position controller parameter set selection A, B, C
Edge evaluation: No Signal(s) updated: On request
Meaning Six different position controller parameter sets can be selected with the interface signals A, B, and
C. The following assignment applies:
Parameter set C B A
1 0 0 0
2 0 0 1
3 0 1 0
4 0 1 1
5 1 0 0
6 1 0 1
6 1 1 0
6 1 1 1
Signal irrelevant for MD35590 $MA_PARAMSET_CHANGE_ENABLE = 0
...
Corresponding to ... DB31, ...DBX69.0, .1, ..2 (feedback: Active position controller parameter set)
Additional references Commissioning Manual IBN CNC: NCK, PLC, Drive, Section "Commissioning NCK" >
Edge evaluation: No Signal(s) updated: On request
DB31, ...
DBX9.3 Parameter set switchover commands from NC disabled
Edge evaluation: No Signal(s) updated: On request
Signal state 1 The parameter set switchover is disabled.
Signal state 0 The parameter set switchover is enabled.
Corresponding to ... DB31, ... DBX9.0, .1, .2
Basic Functions
1608 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
Z1: NC/PLC interface signals
18.1 Various interface signals and functions (A2)
DB31, ...
DBX20.1 Ramp-function generator disable
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 A rapid stop with speed setpoint 0 is requested for the drive. The drive is stopped without a ramp
function (regenerative braking).
Feedback for the triggering of the rapid stop in the drive is via:
DB31, ... DBX92.1 == 1 (ramp-function generator disable active)
Signal state 0 No rapid stop with speed setpoint 0 is requested for the drive.
Corresponding to ... DB31, ... DBX92.1 (ramp-function generator disable active)
Remark A PROFIDrive telegram compatible with the "SIMODRIVE 611 universal" interface mode must be
set in the drive.
See drive parameters: p0922 and p2038
Additional references NC: Commissioning Manual IBN CNC: NCK, PLC, Drive
Drive: SINAMICS S120/S150 List Manual
DB31, ...
DBX21.0 - DBX21.2 Drive parameter set selection A, B, C
Edge evaluation: No Signal(s) updated: Cyclically
Meaning Eight different drive parameter sets can be selected with the interface signals A, B, and C. The
following assignment applies:
Parameter set C B A
1 0 0 0
2 0 0 1
3 0 1 0
4 0 1 1
5 1 0 0
6 1 0 1
7 1 1 0
8 1 1 1
Application Drive parameter switchover can be used for the following:
example(s)
• Changing the gear stage
• Changing the measuring circuit
Special cases, In principle it is possible to switch over drive parameter sets at any time. However, as torque jumps
errors, .... can occur when switching over speed controller parameters and motor speed normalization,
parameters should only be switched over in stationary states, especially axis standstill.
Corresponding to ... DB31, ... DBX93.0, .1, .2 (feedback: Active drive parameter set)
Additional references Commissioning Manual IBN CNC: NCK, PLC, Drive
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1609
Z1: NC/PLC interface signals
18.1 Various interface signals and functions (A2)
DB31, ...
DBX21.3 - DBX21.4 Motor selection A, B
Edge evaluation: No Signal(s) updated: Cyclically
Meaning Switchover between four different motors or motor operating modes is possible with the interface
signals A, B. The following assignment applies:
Motor selection Application B A
Motor 1 Operating mode 1 0 0
Motor 2 Operating mode 2 0 1
Motor 3 Operating mode 3 1 0
Motor 4 Operating mode 4 1 1
As soon as the request to switch over to a new motor or operating mode is detected in the drive,
the pulse enable is removed.
Application For example, it is possible to switch between operating mode 1 (star operation) and operating mode
example(s) 2 (delta operation) for a main spindle drive (MSD) via the motor selection.
Special cases, Notice
errors, .... Before a new selection, the following interface signal must be reset:
DB31, ... DBX21.5 = 0 (motor being selected)
Corresponding to ... DB31, ... DBX93.3 and .4 (feedback: Active motor)
DB31, ... DBX21.5 (motor being selected)
Additional references Commissioning Manual IBN CNC: NCK, PLC, Drive
DB31, ...
DBX21.5 Motor being selected
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 The necessary electrical (e.g. contactor changeover for star-delta changeover) and/or mechanical
changeovers are complete. The axis can be traversed again. The pulses are then enabled by the
drive.
Notice
The interface signal must be reset before a new motor selection via DB31, ... DBX21.3 and .4.
Signal state 0 The necessary electrical (e.g. contactor changeover for star-delta changeover) and/or mechanical
changeovers are not complete. The axis must not traverse. The pulses are not enabled by the
drive.
Corresponding to ... DB31, ... DBX93.3 and 4 (active motor)
DB31, ... DBX21.3 and 4 (motor selection A, B)
Additional references Commissioning Manual IBN CNC: NCK, PLC, Drive
Basic Functions
1610 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
Z1: NC/PLC interface signals
18.1 Various interface signals and functions (A2)
DB31, ...
DBX21.6 Integrator disable, speed controller
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 The integrator (I component) of the speed controller is disabled or is to be disabled (P instead of PI
behavior).
Note:
If the speed controller integrator disable is activated, compensation operations might take place in
certain applications (e.g. if the integrator was already holding a load while stationary).
The drive acknowledges the integrator disable to the PLC using the interface signal:
DB31, ... DBX93.6 (speed controller integrator disabled).
Signal state 0 The integrator (I component) of the speed controller is enabled (PI behavior).
Corresponding to ... DB31, ... DBX93.6 (feedback: The speed controller integrator is disabled)
Additional references Commissioning Manual IBN CNC: NCK, PLC, Drive
DB31, ...
DBX21.7 Pulse enable
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 The pulses are enabled for the drive.
The pulse enable is only performed in the drive when the drive signals readiness:
DB31, ... DBX93.5 == 1 (feedback: Drive ready)
Signal state 0 The pulses are disabled for the drive.
Application Signal relevant to safety
example(s)
Special cases, If the pulse enable is removed during motion (e.g. emergency stop), the axis/spindle is no longer
errors, .... braked under control. The axis coasts to standstill.
Corresponding to ... DB31, ... DBX93.5 (feedback: Drive ready)
DB31, ... DBX93.7 (feedback: Pulses are enabled)
Additional references Commissioning Manual IBN CNC: NCK, PLC, Drive
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1611
Z1: NC/PLC interface signals
18.1 Various interface signals and functions (A2)
Note
SINAMICS S120: Message word (MELDW)
The message word (MELDW) is only contained in PROFIdrive telegrams compatible with
SIMODRIVE 611U, for example, telegrams 102, 103, 105, 106, 110, 111, 116, 118, 125,
126, 136, 138, 139
References:
SINAMICS List Manual, Function Diagrams 2419 and 2420
SINAMICS S120: Status word 1/2 (ZSW1/2)
The status words ZSW1 or ZSW2 only refer to SIMODRIVE 611U compatible PROFIdrive
telegrams in the following (SIMODRIVE 611U interface mode, p2038 = 1)
DB31, ...
DBX61.0 Drive test travel request
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 The control signals that all of the traversing conditions for the drives are fulfilled.
Requirements for this are:
• The mechanical brake of the axis involved was previously released and all other axis traversing
conditions are fulfilled.
With:
DB31, ... DBX61.0 (drive test, travel request) = 1 signal
the appropriate axes can be moved.
• The axis disable:
DB31, ... DBX1.3 (axis/spindle disable) = 1 signal
is not active.
Signal state 0 The control signals that the axes cannot be moved.
Axes cannot be moved when:
• DB31, ... DBX61.0 (drive test, travel request) = 0 signal
• Faults are present in the control
This means that the requirements specified above are not fulfilled.
Further references Commissioning Manual IBN CNC: NCK, PLC, Drive
Basic Functions
1612 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
Z1: NC/PLC interface signals
18.1 Various interface signals and functions (A2)
DB31, ...
DBX61.3 Follow-up active (feedback)
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 The control signals that the follow-up mode for the axis/spindle is not active.
Requirements for this are:
• The controller enable for the drive has been withdrawn (either by the PLC with "controller enable
" = 0 signal or inside the control for faults; refer to the references)
• Follow-up operation is selected (either by the PLC with IS "follow-up operation" = 1 signal or in
the control, e.g. when withdrawing the controller enable from an axis that is moving)
The position setpoint continually tracks the actual value while the follow-up mode is active.
Zero speed and clamping monitoring are not active.
Signal state 0 The control signals that follow-up mode for the axis/spindle is not active.
Zero speed and clamping monitoring are active.
This means that the requirements specified above are not fulfilled.
In the "hold" state, the interface signal:
DB31, ... DBX61.3 (follow-up active)
is 0.
Special cases, Notice:
errors, .... A delete distance-to-go is triggered internally in the control on transition from "Follow up" to "Hold"
(IS "Follow-up mode" = 0) or in the closed-loop control mode (IS "Controller enable" = 1).
Corresponding to ... DB31, ... DBX2.1 (controller enable)
DB31, ... DBX1.4 (follow-up mode)
Additional references Diagnostics Manual
DB31, ...
DBX61.4 Axis/spindle stationary (n < nmin) (status)
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 The current speed of the axis or the actual number of rotations of the spindle lies below the limit
given by the machine data:
MD36060 $MA_STANDSTILL_VELO_TOL
(maximum velocity/speed for signal "Axis/spindle stationary").
Signal state 0 The current velocity of the axis or the actual spindle speed is greater than the value specified in the
MD (standstill range).
If a travel command is present, e.g. for a spindle, then the signal is always = 0 - even if the actual
speed lies below that specified in MD36060.
If the interface signal:
DB31, ... DBX61.4 (axis/spindle stationary)
is signaled and there is no closed-loop position control active for the spindle, then at the MMC, an
actual speed of zero is displayed and with the system variable $AA_S[n] zero is read.
Application Enable signal for opening a protective device (e.g. open door).
example(s) The workpiece chuck or the tool clamping device is only opened when the spindle is stationary.
The oscillation mode can be switched-on during gear stage change after the spindle has been
braked down to standstill.
The tool clamping device must have been closed before the spindle can be accelerated.
Corresponding to ... MD36060 $MA_STANDSTILL_VELO_TOL
(maximum velocity/speed for signal "Axis/spindle stationary")
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1613
Z1: NC/PLC interface signals
18.1 Various interface signals and functions (A2)
DB31, ...
DBX61.5 Position controller active (status)
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 The control signals that the position controller for the axis or spindle is closed.
Signal state 0 The control signals that the position controller for the axis or spindle is open.
If "controller enable" is canceled because of a fault or from the PLC user program the position
controller is opened and therefore the interface signal
DB31, ... DBX61.5 (position controller active)
is set to 0.
Spindle without position control: Signal "Position controller active" is always "0".
See References for other effects.
Application If the position control is active the axis/spindle is kept in position by the position controller.
example(s) Any brakes or clamps can thus be opened.
The interface signal:
DB31, ... DBX61.5 (position controller active)
can be used as feedback signal for the interface signal:
DB31, ... DBX2.1 (controller enable).
The holding brake of a vertical axis must be activated as soon as the position control is no longer
active.
If a spindle has been technically designed/dimensioned for the purpose, in the part program, it can
be changed-over into the closed-loop position controlled mode as spindle or as axis (with SPCON or
M70).
In these cases, the interface signal "position controller active" is set.
Special cases, Special case for simulation axes (MD30350 $MA_SIMU_AX_VDI_OUTPUT = "1"):
errors, .... The IS "position controller active" is also set for simulation axes as soon as MD = "1".
Corresponding to ... DB31, ... DBX2.1 (controller enable)
DB31, ... DBX1.4 (follow-up mode)
DB31, ... DBX1.5 and 1.6 (position measuring system 1 and 2)
Additional references Diagnostics Manual
DB31, ...
DBX61.6 Speed controller active (status)
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 The control signals that the speed controller is closed for the axis or spindle.
Signal state 0 The control signals that the speed controller is open for the axis or spindle.
The speed controller output is cleared.
Application If the spindle is not under position control, the interface signal can be used as a feedback for the
example(s) interface signal DB31, ... DBX2.1 (controller enable).
Special cases, The interface signal is also set for simulation axes:
errors, .... Simulation axis: MD30350 $MA_SIMU_AX_VDI_OUTPUT == 1
Corresponding to ... DB31, ... DBX61.5 (position controller active)
Basic Functions
1614 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
Z1: NC/PLC interface signals
18.1 Various interface signals and functions (A2)
DB31, ...
DBX61.7 Current controller active (status)
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 The current controller for the axis/spindle is active.
Signal state 0 The current controller for the axis/spindle is not active.
The current controller output, including the injection variables on the control voltage, is cleared.
Corresponding to ... DB31, ... DBX61.5 (position controller active)
DB31, ... DBX61.6 (speed controller active)
DB31, ...
DBX69.0 - DBX69.2 Active position controller parameter set A, B, C (feedback)
Edge evaluation: No Signal(s) updated: After switchover
Meaning The active position controller parameter sets are displayed with the interface signals A, B and C.
The following assignment applies:
Parameter set C B A
1 0 0 0
2 0 0 1
3 0 1 0
4 0 1 1
5 1 0 0
6 1 0 1
6 1 1 0
6 1 1 1
Signal irrelevant for MD35590 $MA_PARAMSET_CHANGE_ENABLE == 0
... If the switchover of the position controller parameter set is switched off, the first parameter set is
always active.
Corresponding to ... DB31, ...DBX9.0 - DBX9.2 (position controller parameter set selection A, B, C)
DB31, ...
DBX76.0 Lubrication pulse
Edge evaluation: Yes Signal(s) updated: Cyclically
Edge change As soon as the axis/spindle has moved through the traversing distance set in machine data:
0→1 MD33050 $MA_LUBRICATION_DIST (traversing distance for lubrication from the PLC),
or the interface signal is inverted.
1→0 Note:
The distance measurement is restarted each time that the control runs up.
Application The lubrication pump for the axis/spindle can be activated with the "Lubrication pulse" interface
example(s) signal. Machine bed lubrication therefore depends on the distance traveled.
Corresponding to ... MD33050 $MA_LUBRICATION_DIST (lubrication pulse distance)
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1615
Z1: NC/PLC interface signals
18.1 Various interface signals and functions (A2)
DB31, ...
DBX92.1 Ramp-function generator disable active (feedback)
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 Ramp function generator fast stop is active for the drive.
Signal state 0 Ramp function generator fast stop is not active for the drive.
Application Position controller bypassing of the ramp function generator.
example(s)
Corresponding to ... DB31, ... DBX20.1 (ramp-function generator fast stop)
Remark In the SINAMICS a protocol can be set that runs in what is known as the 611U compatibility mode.
Additional references Commissioning Manual IBN CNC: NCK, PLC, Drive
DB31, ...
DBX92.4 Drive-autonomous motion active
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 A drive-autonomous motion is active.
The axis traverses due to setpoints created by drive-internal functions. The drive still responds to
control signals of the NC, e.g. controller enable. Setpoint specifications of the NC are ignored.
Signal state 0 A drive-autonomous motion is not active.
Application Internal drive functions:
example(s)
• Rotor or pole position identification
• Function generator
Remark DBX92.4 = 1 IF MELDW.11 == 1 (controller enable) AND ZSW1.2 == 0 (operation enabled)
Additional references SINAMICS S120 Function Manual;
Pole position identification: Section "Servo control" > "Pole position identification"
Function generator: Section "Servo control" > "Optimization of the current and speed controller"
DB31, ...
DBX93.0 - DBX93.2 Active drive parameter set A, B, C (feedback)
Edge evaluation: No Signal(s) updated: Cyclically
Meaning The active drive parameter set is displayed with the interface signals A, B and C. The following
assignment applies:
Parameter set C B A
1 0 0 0
2 0 0 1
3 0 1 0
4 0 1 1
5 1 0 0
6 1 0 1
7 1 1 0
8 1 1 1
Basic Functions
1616 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
Z1: NC/PLC interface signals
18.1 Various interface signals and functions (A2)
DB31, ...
DBX93.0 - DBX93.2 Active drive parameter set A, B, C (feedback)
Corresponding to ... DB31, ... DBX21.0 - DBX21.2 (drive parameter set selection)
Additional references Commissioning Manual IBN CNC: NCK, PLC, Drive
DB31, ...
DBX93.3 - DBX93.4 Active motor A, B (feedback)
Edge evaluation: No Signal(s) updated: Cyclically
Meaning Feedback signal from drive indicating which motor selection is active.
The active motor or motor operating mode is displayed with the interface signals A, B. The following
assignment applies:
Motor selection Meaning B A
Motor 1 Star operation active 0 0
Motor 2 Delta operation active 0 1
Motor 3 Reserved 1 0
Motor 4 Reserved 1 1
Corresponding to ... DB31, ... DBX21.3 and .4 (motor selection)
DB31, ... DBX21.5 (motor being selected)
Additional references Commissioning Manual IBN CNC: NCK, PLC, Drive
DB31, ...
DBX93.5 Drive ready
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 The drive is ready.
Signal state 0 The drive is not ready.
If the signal is reset in operation, the drive is stopped (pulse inhibit or fast stop). When powering-up,
the pulses are still inhibited (canceled) In addition, the following NC/PLC interface signals are reset:
DB10, DBX108.6 = 0 (drive ready)
DB31, ... DBX61.7 = 0 (current controller active)
DB31, ... DBX61.6 = 0 (speed controller active)
Remark DB31, ... DBX93.5 = MELDW.12
Corresponding to ... SINUMERIK
DB10, DBX108.6 (drive ready)
DB31, ... DBX61.7 (current controller active)
DB31, ... DBX61.6 (speed controller active)
Additional references SINAMICS S120/S150 List Manual
Commissioning Manual IBN CNC: NCK, PLC, Drive
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1617
Z1: NC/PLC interface signals
18.1 Various interface signals and functions (A2)
DB31, ...
DBX93.6 Speed controller integrator disabled (feedback)
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 The requested shutdown of the speed controller integrator is active in the drive. The speed
controller has been switched over from the PI to P control response.
Signal state 0 The integrator of the speed controller is enabled. The speed controller functions as a PI controller.
Corresponding to ... DB31, ... DBX21.6 (integrator disable, n-controller)
Additional references Commissioning Manual IBN CNC: NCK, PLC, Drive
DB31, ...
DBX93.7 Pulses enabled (feedback)
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 The pulses of the assigned drive are enabled for the axis/spindle.
Signal state 0 The pulses of the assigned drive are not enabled.
If the pulses on the assigned drive are deleted, the following interface signals are reset:
• DB31, ... DBX61.7 (current controller active)
• DB31, ... DBX61.6 (speed controller active)
• DB31, ... DBX61.5 (position controller active)
Remark DB31, ... DBX93.7 = MELDW.13
Corresponding to ... DB31, ... DBX21.7 (pulse enable)
Additional references Commissioning Manual IBN CNC: NCK, PLC, Drive
DB31, ...
DBX94.0 Motor temperature prewarning
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 The motor temperature has exceeded the warning threshold (p0604) configured in the drive.
Note
If the motor temperature remains too high for longer than the parameterized time (p0606), a fault is
output, the drive is stopped and the pulse enable removed.
If the motor temperature falls below the warning threshold (p0604) again before the time has
expired (p0606), the interface signal is reset.
Signal state 0 The motor temperature is below the warning threshold (p0604).
Remark The current motor temperature is displayed on the user interface at:
Operating area "Diagnostics" > "Service display: Axis/spindle"
Corresponding to ... DB31, ... DBX94.1 (heat sink temperature prewarning)
Additional references See DB31, ... DBX94.1 (heat sink temperature prewarning)
Basic Functions
1618 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
Z1: NC/PLC interface signals
18.1 Various interface signals and functions (A2)
DB31, ...
DBX94.1 Heat sink temperature prewarning
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 The heat sink temperature of the power semiconductors has exceeded the parameterized warning
threshold (p0294).
Note
The parameterized reaction (p0290) is performed in the drive. If the temperature violation remains,
a fault is output after approx. 20 s, the drive is stopped and the pulse enable removed.
Signal state 0 The drive module heat sink temperature monitoring has not responded, i.e. the temperature is
below the warning threshold.
Remark The interface signals DB31, ... DBX94.0 and .1 are derived from the following signals of the cyclic
drive telegram:
• Case 1: Temperature warning in the message word
– DB31, ... DBX94.0 ≙ MELDW, bit 6 (no motor overtemperature warning)
– DB31, ... DBX94.1 ≙ MELDW, bit 7 (no thermal overload in power unit warning)
• Case 2: Warning of warning class B (interface mode "SIMODRIVE 611U", p2038 = 1)
DB31, ... DBX94.0 == 1 and DBX94.1 == 1, if the following applies:
Cyclic drive telegram, ZSW1: Bit 11 == 0 and 12 == 1 (warning class B)
The interface signals are derived from the warning of warning class B if there is no specific
information from the message word.
An alarm is displayed. Alarm number = 200.000 + alarm value (r2124)
Additional references • S120 Commissioning Manual, Section "Commissioning" > "Temperature sensors for SINAMICS
components"
• S120 Function Manual, Section "Monitoring and protective functions"
• S120 List Manual
– MELDW, bit 6 ≙ BO: r2135.14 → function diagram: 2548, 8016
– MELDW, bit 7 ≙ BO: r2135.15 → function diagram: 2548, 2452, 2456, 8016
• SINUMERIK Diagnostics Manual
DB31, ...
DBX94.2 Run-up completed
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 The actual speed value has reached the speed tolerance band specified via p2164 after a new
speed setpoint specification and has not left the band for the duration of p2166.
Any subsequent speed fluctuations, also outside the tolerance band, e.g. due to load changes, will
not affect the interface signal.
Signal state 0 The run-up procedure is still active after the speed setpoint has been changed.
Corresponding to ... DB31, ... DBX94.6 ("nact = nset")
DB31, ... DBX94.3 ("|MD| = Mdx")
Additional references • SINUMERIK Commissioning Manual IBN CNC: NCK, PLC, Drive
• SIMATIC S120 List Manual
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1619
Z1: NC/PLC interface signals
18.1 Various interface signals and functions (A2)
DB31, ...
DBX94.3 |Md| < Mdx
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 The current torque utilization is below the torque utilization threshold (torque threshold 2, p2194).
The run-up procedure is completed, the drive is in the steady state and the torque setpoint |Md|
drive does not exceed the threshold torque Mdx.
The torque threshold characteristic is speed-dependent.
During the run-up, DB31, ... DBX94.3 (|Md|< Mdx) == 1. The interface signal is not updated until the
run-up has been completed (DB31, ... DBX94.2 == 1) and the signal interlocking time for the
threshold torque has expired.
Signal state 0 The torque setpoint |Md| is larger than the threshold torque Mdx.
A motor overload can be determined via the interface signal. An appropriate response can then be
initiated in the PLC user program.
Remark DB31, ... DBX94.3 = MELDW.1
Additional references • SINUMERIK Commissioning Manual IBN CNC: NCK, PLC, Drive
• SIMATIC S120 List Manual
DB31, ...
DBX94.4 |nact| < nmin
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 The actual speed value nact is less than nmin (speed threshold value 3, p2161).
Signal state 0 The actual speed value is greater than the threshold minimum speed nmin.
Remark DB31, ... DBX94.4 = MELDW.2
Additional references Commissioning Manual IBN CNC: NCK, PLC, Drive
DB31, ...
DBX94.5 |nact| < nx
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 The actual speed value nact is less than nx (speed threshold value 2, p2155).
Signal state 0 The actual speed value nact is greater than the threshold speed nx.
Remark DB31, ... DBX94.5 = MELDW.3
Additional references Commissioning Manual IBN CNC: NCK, PLC, Drive
DB31, ...
DBX94.6 nact = nset
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 The actual speed value is at least the parameterized time (switch-on delay n_act = n_set, p2167)
within the tolerance band around the speed setpoint (speed threshold value 4, p2163).
Basic Functions
1620 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
Z1: NC/PLC interface signals
18.2 Axis monitoring, protection zones (A3)
DB31, ...
DBX94.6 nact = nset
Signal state 0 The actual speed value is outside the tolerance band around the speed setpoint (speed threshold
value 4, p2163).
Additional references Commissioning Manual IBN CNC: NCK, PLC, Drive
DB31, ...
DBX94.7 Variable signaling function
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 The parameterized drive variable has exceeded the specified threshold value, including hysteresis.
Signal state 0 The parameterized drive variable has fallen below the specified threshold value, including
hysteresis.
Remark Using the "Variable signaling" function, BICO interconnections and parameters which have the
attribute traceable can be monitored in the drive.
DB31, ... DBX94.7 = MELDW.5
Additional references SINAMICS S120 Function Manual, Section "Servo control" > "Variable signaling function"
DB31, ...
DBX95.7 Warning of warning class C is pending
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 The drive signals that a warning of warning class C is pending.
Signal state 0 The drive signals that no warning of warning class C is pending.
Remark In the drive, a warning is the response to a detected potential or expected fault condition that does
not cause the drive to switch off and does not have to be acknowledged.
Additional references SINAMICS S120 List Manual, Section "Faults and alarms"
DB21, ...
DBX1.1 Enable protection zones
Edge evaluation: Yes Signal(s) updated: Cyclically
Signal state 1 or When a positive edge of this signal appears, a protection zone is enabled and the active alarm
edge change cleared. Then, motion can start in the same protection zone. As a result of the start of motion, the
0→1 protection zone is enabled, the IS "machine or channel-specific protection zone violated" is set, and
the axis starts to move.
The enabling signal is canceled if motion is started that does not lead into the enabled protection
zone.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1621
Z1: NC/PLC interface signals
18.2 Axis monitoring, protection zones (A3)
DB21, ...
DBX1.1 Enable protection zones
Signal state 0 or No effect
edge change
1→0
Application This allows protection zones to be released:
example(s)
• If the current position is within a protection zone (alarm 2 present)
• If motion is to be started towards the protection zone limit
(alarm 1 or 2 present)
DB21, ...
DBX8.0 - DBX9.1 Activate machine-specific protection zone 1 ( ...10)
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or The pre-activated, machine-related protection zone 1 ( ...10) is activated by the PLC user program.
edge change The protection zone is immediately activated.
0→1
Only protection zones that have been pre-activated in the part program can be activated.
Signal state 0 or The pre-activated, machine-related protection zone 1 ( ...10) is de-activated by the PLC user
edge change program.
1→0 The protection zone is immediately de-activated.
Only protection zones that have been activated via the PLC and have been pre-activated in the NC
part program can be de-activated.
Application Before a sensor, for example, is moved into the working range, the relevant machine-related
example(s) protection zone can be activated.
DB21, ...
DBX10.0 - DBX11.1 Activate channel-specific protection zone 1 ( ...10)
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or The preactivated, channel-specific protection zone 1 ( ...10) is activated by the PLC user program.
edge change The protection zone is immediately activated.
0→1
Only protection zones that have been pre-activated in the part program can be activated.
Signal state 0 or The pre-activated, channel-specific protection zone 1 ( ...10) is de-activated by the PLC user
edge change program.
1→0 The protection zone is immediately de-activated.
Only protection zones that have been activated via the PLC and have been pre-activated in the NC
part program can be de-activated.
Application Before a synchronous spindle, for example, is moved into the working range, the relevant machine-
example(s) related protection zone can be activated.
Basic Functions
1622 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
Z1: NC/PLC interface signals
18.2 Axis monitoring, protection zones (A3)
DB21, ...
DBX272.0 – Machine-related protection zone 1 ( ...10) pre-activated
DBX273.1
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or The machine-related protection zone 1 ( ...10) is preactivated in the current block.
edge change (Pre-activated in the part program).
0→1 The protection zone can therefore be activated or de-activated in the PLC user program using the
interface signal:
DB21, ... DBX8.0 - DBX9.1 (machine-related protection zone 1 (...10))
Signal state 0 or The machine-related protection zone 1 ( ...10) is deactivated in the current block.
edge change (De-activated in the part program).
1→0 The protection zone can therefore not be activated or de-activated in the PLC user program using
the interface signal:
DB21, ... DBX8.0 to DBX9.1 (activate machine-related protection zone 1 (...10))
Corresponding DB21, ... DBX8.0 - DBX9.1 (activate machine-related protection zone 1 (...10))
to ....
DB21, ...
DBX274.0 – Channel-specific protection zone 1 (...10) pre-activated
DBX275.1
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or The channel-specific protection zone 1 ( ...10) is preactivated in the current block.
edge change (Pre-activated in the part program).
0→1 The protection zone can therefore be activated or de-activated in the PLC user program using the
interface signal:
DB21, ... DBX10.0 - DBX11.1 channel-specific protection zone 1 (...10))
Signal state 0 or The channel-specific protection zone 1 ( ...10) is deactivated in the current block.
edge change (De-activated in the part program.)
1→0 The protection zone can therefore not be activated or de-activated in the PLC user program using
the interface signal:
DB21, ... DBX10.0 - DBX11.1 (channel-specific protection zone 1 (...10))
Corresponding DB21, ... DBX10.0 - DBX11.1 (activate channel-specific protection zone 1 (...10))
to ....
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1623
Z1: NC/PLC interface signals
18.2 Axis monitoring, protection zones (A3)
DB21, ...
DBX276.0 – Machine-related protection zone 1 (...10) violated
DBX277.1
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or The activated, machine-related protection zone 1 ( ...10) is violated in the current block or in the
edge change current JOG movement.
0→1 The pre-activated, machine-related protection zone 1 ( ...10) would be violated in the current block
if it would be activated by the PLC.
Signal state 0 The activated, machine-related protection zone 1 (...10) is not violated in the current block.
or edge change The pre-activated, machine-related protection zone 1 (...10) would not be violated in the current
1→0 block if it would be activated by the PLC.
Application Before parts are moved into the working zone - this IS can be used to check as to whether the tool
example(s) or workpiece is located in the machine-related protection zone of the part to be moved in.
DB21, ...
DBX278.0 - Channel-specific protection zone 1 (...10) violated
DBX279.1
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or The activated, channel-specific protection zone 1 ( ...10) is violated in the current block.
edge change The pre-activated, channel-specific protection zone 1 ( ...10) would be violated in the current block
0→1 if it would be activated by the PLC.
Signal state 0 or The activated, channel-specific protection zone 1 ( ...10) is not violated in the current block.
edge change The pre-activated, channel-specific protection zone 1 (...10) would not be violated in the current
1→0 block if it would be activated by the PLC.
Application Before parts are moved into the working zone - this IS can be used to check whether the tool or
example(s) workpiece is located in the channel-specific protection zone of the part to be moved in.
DB31, ...
DBX2.3 Clamping in progress
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or Clamping in progress.
edge change The clamping monitoring function is activated.
0→1
Signal state 0 or Clamping completed.
edge change The clamping monitoring function is replaced by the standstill (zero speed) monitoring.
1→0
Corresponding to ... MD36050 $MA_CLAMP_POS_TOL (clamping tolerance)
Basic Functions
1624 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
Z1: NC/PLC interface signals
18.2 Axis monitoring, protection zones (A3)
DB31, ...
DBX3.6 Velocity/spindle speed limitation
Edge evaluation: no Signal(s) updated: Cyclically
Signal state 1 or The NCK limits the velocity/spindle speed to the limit value set in the machine data:
edge change MD35160 $MA_SPIND_EXTERN_VELO_LIMIT
0→1
Signal state 0 or No limitation active.
edge change
1→0
Corresponding to ... MD35100 $MA_SPIND_VELO_LIMIT (max. spindle speed)
SD43220 $SA_SPIND_MAX_VELO_G26 (programmable upper spindle speed limitation for G26)
SD43230 $SA_SPIND_MAX_VELO_LIMS (spindle speed limitation for G96/G961/G97)
DB31, ...
DBX12.0 - DBX12.1 Hardware limit switches plus and minus
Edge evaluation: no Signal(s) updated: Cyclically
Signal state 1 or A switch can be mounted at each end of the travel range of a machine axis which will cause a
edge change signal "hardware limit switch plus or minus" to be signaled to the NC via the PLC if it is actuated.
0→1 If the signal is recognized as set, alarm 021614 "hardware limit switch + or -" is output and the axis
is decelerated immediately.
The braking/deceleration type is defined using the machine data:
MD36600 $MA_BRAKE_MODE_CHOICE (braking behavior at the hardware limit switch)
If the controller enable is withdrawn at the same time as the "hardware limit switch" signal, then the
axis responds as described in Chapter A2 ("various interface signals").
Signal state 0 or Normal condition - a hardware limit switch has not been actuated.
edge change
1→0
Corresponding to ... MD36600 $MA_BRAKE_MODE_CHOICE (deceleration behavior when the hardware limit switch
responds)
DB31, ...
DBX12.2 - DBX12.3 2nd software limit switch plus or minus
Edge evaluation: no Signal(s) updated: Cyclically
Signal state 1 or 2nd software limit switch for the plus and minus directions is effective.
edge change 1st software limit switch for the plus and minus directions is not effective.
0→1
In addition to the 1st software limit switches (plus and minus), the 2nd software limit switches (plus
and minus) can be activated using these interface signals.
The position is defined using machine data:
MD36130 $MA_POS_LIMIT_PLUS2 (2nd software limit switch plus)
and
MD36120 $MA_POS_LIMIT_MINUS2 (2nd software limit switch minus)
.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1625
Z1: NC/PLC interface signals
18.3 Continuous-path mode, exact stop and LookAhead (B1)
DB31, ...
DBX12.2 - DBX12.3 2nd software limit switch plus or minus
Signal state 0 or 1st software limit switch for the plus and minus directions is effective.
edge change 2nd software limit switch for the plus and minus directions is not effective.
1→0
Corresponding to ... MD36110 $MA_POS_LIMIT_PLUS (1st software limit switch plus)
MD36130 $MA_POS_LIMIT_PLUS2 (2nd software limit switch plus)
MD36100 $MA_POS_LIMIT_MINUS (1st software limit switch minus)
MD36120 $MA_POS_LIMIT_MINUS2 (2nd software limit switch minus)
DB31, ...
DBX60.2 - DBX60.3 Encoder limit frequency exceeded 1
Encoder limit frequency exceeded 2
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or The limit frequency set in the machine data:
edge change MD36300 $MA_ENC_FREQ_LIMIT (encoder limit frequency)
0→1 has been exceeded.
The reference point for the position measuring system involved has been lost (IS:
Referenced/synchronized has a signal state 0). Closed-loop position control is no longer possible.
Spindles continue to run with closed-loop speed control. Axes are stopped with a fast stop (with
open-circuit position control loop) along a speed setpoint ramp.
Signal state 0 or The limit frequency set in machine data:
edge change MD36300 $MA_ENC_FREQ_LIMIT
1→0 is no longer exceeded.
For the edge change 1 → 0, the encoder frequency must have fallen below the value of machine
data:
MD36302 $MA_ENC_FREQ_LIMIT_LOW (encoder limit frequency for encoder resynchronization)
DB21, ...
DBX36.3 All axes stationary
Edge evaluation: no Signal(s) updated: cyclic
Signal state 1 or All axes assigned to the channel are stationary with interpolator end.
edge change No other traversing movements are active.
0→1
Basic Functions
1626 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
Z1: NC/PLC interface signals
18.3 Continuous-path mode, exact stop and LookAhead (B1)
DB31, ...
DBX60.6 Position reached with exact stop coarse
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or The axis is in the appropriate exact stop and no interpolator is active for the axis and:
edge change
• The control is in the reset state (reset key or end of program).
0→1
• The axis was last programmed as a positioning axis or positioning spindle (initial setting of
supplementary axis: Positioning axis).
• The path motion was terminated with NC stop.
• The spindle is in the closed-loop positioncontrolled mode (SPCON/SPOS instruction) and is
stationary.
• The axis is switched from closed-loop speedcontrolled to closed-loop positioncontrolled mode
with IS "position measuring system".
Signal state 0 or The axis is not in the appropriate exact stop or the interpolator is active for the axis or:
edge change
• The path motion was terminated with NC stop.
1→0
• The spindle is in the closed-loop speedcontrolled mode (SPCOF/SPOSA instruction).
• The "followup" mode is active for the axis.
• The "parking" mode is active for the axis.
• The axis is switched from closed-loop positioncontrolled to closed-loop speedcontrolled mode
with IS "position measuring system".
Signal irrelevant for Rotary axes that are programmed as rounding axes.
...
Corresponding to ... MD36000 $MA_STOP_LIMIT_COARSE (exact stop coarse)
DB31, ...
DBX60.7 Position reached with exact stop fine
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or Refer to DB31, ... DBX60.6 (position reached with exact stop coarse).
edge change
0→1
Signal state 0 or Refer to DB31, ... DBX60.6 (position reached with exact stop coarse).
edge change
1→0
Signal irrelevant for Rotary axes that are programmed as rounding axes.
...
Corresponding to ... MD36010 $MA_STOP_LIMIT_FINE (exact stop fine)
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1627
Z1: NC/PLC interface signals
18.4 Travel to fixed stop (F1)
DB31, ...
DBX1.1 Acknowledge fixed stop reached
Edge evaluation: no Signal(s) updated: cyclic
Signal state 1 or Significance after the fixed stop has been reached:
edge change DB31, ... DBX62.5 (fixed stop reached) = 1
0→1 → The axis presses against the fixed stop with the clamping torque:
→ The fixed stop monitoring window is activated.
→ A block change is executed.
Signal state 0 Significance after the fixed stop has been reached:
DB31, ... DBX62.5 (fixed stop reached) = 1
→ The axis presses against the fixed stop with the clamping torque.
→ The fixed stop monitoring window is activated.
→ A block change is not executed and the channel message
"Wait: Auxiliary function acknowledgment missing" is displayed.
Edge change Meaning after the fixed stop has been reached:
1→0 IS "Fixed stop reached" DB31, ... DBX62.5 = 1
→ The function is aborted, the alarm "20094 axis %1 Function aborted" is output.
Significance when de-selecting the function FXS=0 via the part program:
→ The torque limiting and the monitoring of the fixed stop monitoring window are canceled.
IS irrelevant MD37060 $MA_FIXED_STOP_ACKN_MASK
for ... (monitoring PLC acknowledgments for travel to fixed stop)
= 0 or 1
Corresponding to .... MD37060 $MA_FIXED_STOP_ACKN_MASK
(monitoring PLC acknowledgments for travel to fixed stop)
DB31, ... DBX62.5 (fixed stop reached)
DB31, ...
DBX1.2 Sensor for fixed stop
Edge evaluation: no Signal(s) updated: cyclic
Signal state 1 or Fixed stop is reached.
edge change
0→1
Signal state 0 or Fixed stop is not reached.
edge change
1→0
Corresponding to .... The signal is only active if:
MD37040 $MA_FIXED_STOP_BY_SENSOR = 1
Basic Functions
1628 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
Z1: NC/PLC interface signals
18.4 Travel to fixed stop (F1)
DB31, ...
DBX3.1 Enable travel to fixed stop
Edge evaluation: no Signal(s) updated: cyclic
Signal state 1 or Meaning when FXS function is selected using the part program
edge change (IS "Activate travel to fixed stop" = 1):
0→1 → Travel to fixed stop is enabled and the axis traverses from the start position at the programmed
velocity to the programmed target position.
Signal state 0 Meaning when FXS function is selected using the part program
(IS "Activate travel to fixed stop" = 1):
→ Travel to fixed stop is inhibited.
→ The axis is stationary at the start position with reduced torque.
→ The channel message "wait": Auxiliary function acknowledgment missing" is displayed.
Edge change Meaning before the fixed stop has been reached
1→0 (IS "fixed stop reached" = 0):
→ Travel to fixed stop is aborted.
→ The alarm "20094: Axis%1 Function aborted" is displayed.
Meaning after the fixed stop has been reached
IS "fixed stop reached" = 1):
→ The torque limiting and monitoring of the fixed stop monitoring window are canceled.
Deselection: DB31, ...DBX1.1 (acknowledge fixed stop reached)
IS irrelevant MD37060 $MA_FIXED_STOP_ACKN_MASK
for ... (monitoring PLC acknowledgments for travel to fixed stop)
= 0 or 2
Corresponding to .... MD37060 $MA_FIXED_STOP_ACKN_MASK
(monitoring PLC acknowledgments for travel to fixed stop)
DB31, ... DBX62.4 (activate travel to fixed stop)
DB31, ...
DBX62.4 Activate travel to fixed stop
Edge evaluation: no Signal(s) updated: cyclic
Signal state 1 or The "Travel to fixed stop" function is active.
edge change This signal is used for analog drives in order, for example, to activate the current or torque limitation
0→1 parameterized in the actuator.
Signal state 0 or The "Travel to fixed stop function" is not active.
edge change
1→0
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1629
Z1: NC/PLC interface signals
18.5 Help function output to PLC (H2)
DB31, ...
DBX62.5 Fixed stop reached
Edge evaluation: no Signal(s) updated: cyclic
Signal state 1 or The fixed stop was reached after selecting the FXS function.
edge change This signal is used by analog drives, e.g. to switch the actuator from speedcontrolled to current or
0→1 torquecontrolled mode so that a programmable clamping torque can be set.
Signal state 0 or The fixed stop has still not been reached after selecting the FXS function.
edge change
1→0
DB21, ...
DBX30.5 Activate associated M01
Edge evaluation: no Signal(s) updated:
Signal state 1 or PLC signals the NCK that the associated M01 (help function) should be activated.
edge change
0→1
Signal state 0 or De-activate the associated M01 (help function).
edge change
1→0
Corresponding to .... DB21, ... DBX 318.5 (associated M01 active)
DB21, ...
DBB58, M, S, T, D, H, F functions Modification
DBB60 - DBB65
Edge evaluation: No Signal(s) updated: job-controlled by NCK
Signal state 1 or One M, S, T, An D, H, or F function has been output to the interface with a new value together with
edge change the associated change signal at the beginning of an OB1 cycle.
0→1 In this case, the change signal indicates that the appropriate value is valid.
Signal state 0 or The change signals are reset by the PLC basic program at the start of the next OB1 cycle.
edge change The value of the data involved is not valid.
1→0
Basic Functions
1630 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
Z1: NC/PLC interface signals
18.5 Help function output to PLC (H2)
DB21, ...
DBX59.0 - DBX59.4 M fct. 1-5 not decoded
Edge evaluation: No Signal(s) updated: job-controlled by NCK
Signal state 1 or M function is greater than 99 (for extended address = 0) or for extended address > 0, not included
edge change in the decoding list.
0→1 This signal is available - together with the associated M change signal - for one OB1 cycle.
Cause:
• Incorrect M function programmed
• M function not configured in the decoding list of the PLC
Remedy, e.g.:
• PLC sets read-in disable
• Output of a PLC alarm
Signal state 0 or M function less than 99 (for extended address = 0) or for extended address > 0 included in the
edge change decoding list.
1→0
DB21, ...
DBB60 - DBB64, M, S, T, D, H, F functions Additional info "Quick" (fast acknowledgment)
DBB66 - DBB67
Edge evaluation: No Signal(s) updated: job-controlled by NCK
Signal state 1 or One M, S, T, An D, H, or F function has been output to the interface with a new value together with
edge change the associated change signal at the beginning of an OB1 cycle.
0→1 In this case, the additional info "Quick" indicates the quick help function.
Signal state 0 or The change signals are reset by the PLC basic program at the start of the next OB1 cycle.
edge change The value of the data involved is not valid.
1→0
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1631
Z1: NC/PLC interface signals
18.5 Help function output to PLC (H2)
DB21, ...
DBB118 T function 1
Edge evaluation: No Signal(s) updated: job-controlled by NCK
Signal state 1 or The T function programmed in an NC block is made available here
edge change as soon as the T change signal is available.
0→1 Value range of T functions: 0 to 99 999 999; integer number
The T function remains valid until it is overwritten by a new T function.
Signal state 0 or • After the PLC has ramped-up.
edge change
• All help functions are deleted before a new function is entered.
1→0
Application Control of automatic tool selection.
example(s)
Special cases, With T0, the current tool is removed from the tool holder but not replaced by a new tool (default
errors, ...... configuration of the machine manufacturer).
Remark 8 decade T numbers are only available as T function 1.
DB21, ...
DBB129 D function 1
Edge evaluation: No Signal(s) updated: job-controlled by NCK
Signal state 1 or The D function programmed in an NC block is made available here
edge change as soon as the D change signal is available.
0→1 Value range of D functions: 0 to 999; integer number
The D function remains valid until it is overwritten by a new D function.
Signal state 0 or • After the PLC has ramped-up.
edge change
• All help functions are deleted before a new function is entered.
1→0
Basic Functions
1632 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
Z1: NC/PLC interface signals
18.5 Help function output to PLC (H2)
DB21, ...
DBB129 D function 1
Application Implementation of protective functions.
example(s)
Special cases, D0 is reserved for deselecting the current tool offset.
errors, ......
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1633
Z1: NC/PLC interface signals
18.5 Help function output to PLC (H2)
DB21, ...
DBB194 - DBB206 Dynamic M functions: M0 - M99
Edge evaluation: No Signal(s) updated: job-controlled by NCK
Signal state 1 or The dynamic M signal bits are set by decoded M functions.
edge change
0→1
Signal state 0 or For a general help function output, the dynamic M signal bits are acknowledged by the PLC basic
edge change program after the OB1 has been completely run-through (executed once).
1→0 For a fast help function output, after the PLC identifies the help functions, they are acknowledged in
the same OB40 cycle.
Application Spindle clockwise/counterclockwise rotation, switch coolant ON/OFF
example(s)
DB21, ...
DBX318.5 Associated M01/M00 active
Edge evaluation: No Signal(s) updated:
Signal state 1 or This bit indicates that an M00 or M01 help function is active if the appropriate associated M00 and M01
edge change (help functions) were enabled/activated beforehand.
0→1
Signal state 0 or No associated M00/M01 help functions active.
edge change
1→0
Corresponding to ... DB21, ... DBX30.5 (activate associated M01)
DB31, ...
DBD78 F auxiliary function for positioning axis
Edge evaluation: no Signal(s) updated: Jobcontrolled
The values of the F help functions for positioning axes are stored here. The axis to which each
value applies is determined by the extended address.
Basic Functions
1634 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
Z1: NC/PLC interface signals
18.6 Mode group, channel, program operation, reset response (K1)
DB31, ...
DBD86 M auxiliary function for spindle
Edge evaluation: no Signal(s) updated: Jobcontrolled
The values for the M3, M4, M5 help functions are sent to the associated interface for the addressed
spindle.
DB31, ...
DBD88 S auxiliary function for spindle
Edge evaluation: no Signal(s) updated: Jobcontrolled
The values for the S help functions are sent to the associated interface for the addressed spindle.
DB11
DBX0.0 AUTOMATIC mode
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or AUTOMATIC mode is selected by the PLC program.
edge change
0→1
Signal state 0 or AUTOMATIC mode is not selected by the PLC program.
edge change
1→0
Signal irrelevant for DB11 DBX0.4 (operating mode, changeover inhibit) = 1
...
Corresponding to ... DB11 DBX6.0 (active AUTOMATIC mode)
DB11
DBX0.1 MDA mode
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or MDA mode is selected by the PLC program.
edge change
0→1
Signal state 0 or MDA mode is not selected by the PLC program.
edge change
1→0
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1635
Z1: NC/PLC interface signals
18.6 Mode group, channel, program operation, reset response (K1)
DB11
DBX0.1 MDA mode
Signal irrelevant for DB11 DBX0.4 (operating mode, changeover inhibit) = 1
...
Corresponding to ... DB11 DBX6.1 (active MDA mode)
DB11
DBX0.2 JOG mode
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or JOG mode is selected by the PLC program.
edge change
0→1
Signal state 0 or JOG mode is not selected by the PLC program.
edge change
1→0
Signal irrelevant for DB11 DBX0.4 (operating mode, changeover inhibit) = 1
...
Corresponding to ... DB11 DBX6.2 (active JOG mode)
DB11
DBX0.4 Mode change disable
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or The currently active mode (JOG, MDA or AUTOMATIC) of the mode group cannot be changed. The
edge change machine functions that can be selected within a mode group can be changed.
0→1
Signal state 0 or The mode of the mode group can be changed.
edge change
1→0
0RGHVHOHFWLRQ
$8720$7,&
PRGH
0RGHVZLWFKRYHU
GLVDEOH
0'$RSHUDWLQJ 1&
PRGH
'%;
-2*PRGH
Basic Functions
1636 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
Z1: NC/PLC interface signals
18.6 Mode group, channel, program operation, reset response (K1)
DB11
DBX0.5 Mode group stop
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or An NC Stop is activated for all the channels of the mode group. The channel status of all the active
edge change channels changes to the channel status "interrupted". All of the channels in channel status "reset"
0→1 remain in the channel status "reset". Programs that are running at this point are immediately
interrupted (at the earliest possible point, even within a block) and the program status changes to
"stopped". All the moving axes of the mode group are decelerated according to their acceleration
characteristics without contour violation. The program can be restarted with NC Start. None of the
spindles of that mode group are affected.
Signal state 0 or Channel status and program execution are not influenced.
edge change
1→0
Special cases, All the axes of a mode group that are not triggered by a program or a program block (e.g. axes
errors, ... ... traverse because traverse keys are being pressed on the machine control panel) decelerate to rest
with mode group stop.
DB11
DBX0.6 Mode group stop axes plus spindles
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or An NC Stop is activated for all the channels of the mode group. The channel status of all of the
edge change active channels changes to the channel status "interrupted". All of the channels in channel status
0→1 "reset" remain in the channel status "reset". Programs that are running at this point are immediately
interrupted (at the earliest possible point, even within a block) and the program status changes to
"stopped". All the moving axes and spindles of the mode group are decelerated according to their
acceleration characteristics without contour violation. The program can be restarted with NC Start.
Signal state 0 or Channel status and program execution are not influenced.
edge change
1→0
Special cases, All the axes and spindles of a mode group that are not triggered by a program or a program block
errors, ...... (e.g. axes traverse because traverse keys are pressed on the machine control panel, spindles are
controlled by the PLC) decelerate to rest with "mode group stop plus spindles".
DB11
DBX0.7 Mode group reset
Edge evaluation: Yes Signal(s) updated: Cyclically
Signal state 1 or A reset is activated for all the channels of the mode group. All of the channels are then in the
edge change channel status "reset". All of the current programs are then in the program status "aborted". All
0→1 moving axes and spindles are decelerated to zero speed according to their acceleration ramp
without contour violation. The initial settings are set (e.g. for G functions). The alarms for the mode
group are cleared if they are not POWER ON alarms.
Signal state 0 or Channel status and program execution are not influenced by this signal.
edge change
1→0
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1637
Z1: NC/PLC interface signals
18.6 Mode group, channel, program operation, reset response (K1)
DB11
DBX0.7 Mode group reset
Corresponding to ... DB21, ... DBX7.7 (channel reset)
DB11 DBX6.7 (all channels in the reset status)
Special cases, An alarm that withdraws the interface signal
errors, ...... DB11 DBX6.3 (mode group ready)
ensures that all channels of the mode group are no longer in the reset status.
In order to switch to another operating mode, a mode group reset (DB11 DBX0.7) must then be
initiated.
DB11
DBX1.0 Machine function TEACH IN
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or Machine function TEACH IN is activated in JOG mode for the mode group.
edge change
0→1
Signal state 0 or Machine function TEACH IN is not activated.
edge change
1→0
Signal irrelevant for If JOG mode is not active.
...
Additional references Operating Manual HMI (corresponding to the used software)
DB11
DBX1.1 Machine function REPOS
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or Machine function REPOS is activated in JOG mode for the mode group.
edge change
0→1
Signal state 0 or Machine function REPOS is not activated.
edge change
1→0
Signal irrelevant for JOG mode is not active.
...
Application When a fault occurs when executing a part program (e.g. tool breakage), the axis is manually
example(s) moved away from the fault location in the JOG mode in order to be able to replace the tool.
The axis can then be manually returned to the exact previous position using the REPOS machine
function so that the program can be continued in the automatic mode.
Additional references Operating Manual HMI (corresponding to the used software)
Basic Functions
1638 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
Z1: NC/PLC interface signals
18.6 Mode group, channel, program operation, reset response (K1)
DB11
DBX1.2 Machine function REF
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or Machine function REF is activated in the JOG mode for the mode group.
edge change
0→1
Signal state 0 or Machine function REF is not activated.
edge change
1→0
Signal irrelevant for If JOG mode is not active.
...
Additional references See Section "R1: Referencing (Page 1173)"
DB11
DBX1.6 Single block type B
Edge evaluation: No Signal(s) updated:
Signal state 1 or Bit set and DB11 DBX1.7 not set: Response across modes
edge change
• All channels are stopped.
0→1
• All channels receive a start command.
• Channel KS stops at the end of the block.
• The channels KA receive a STOPATEND.
(comparable with DB21, ... DBX7.2 (NC Stop at the block limit).)
• All channels are stopped at a block limit (at some point in time).
(If DB11 DBX1.6 and DB11 DBX1.7 are set simultaneously, it is impossible to determine which
single block type is required. The control then assumes: No single block across mode groups).
Signal state 0 or If Bit DB11 DBX1.6 is not set and Bit DB11 DBX1.7 is set, then it is single block type A.
edge change (If DB11 DBX1.6 and DB11 DBX1.7 are not set, it is impossible to determine which single block
1→0 type is required. The control then assumes: No single block across mode groups).
Corresponding to ... Single block type A
DB11
DBX1.7 Single block type A
Edge evaluation: No Signal(s) updated:
Signal state 1 or DB11 DBX1.7 set and DB11 DBX1.6 not set: Response across modes
edge change
• All channels are stopped.
0→1
• All channels receive a start (start key).
• Channel KS stops at the end of the block (due to single-block).
• Channels KA receive a STOP command (analogous to Stop key).
• All channels are stopped. (deceleration phase of all KAs).
(If DB11 DBX1.6 and DB11 DBX1.7 are set simultaneously, it is impossible to determine which
single block type is required. The control then assumes: No single block across mode groups).
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1639
Z1: NC/PLC interface signals
18.6 Mode group, channel, program operation, reset response (K1)
DB11
DBX1.7 Single block type A
Signal state 0 or If DB11 DBX1.7 is not set and DB11 DBX1.6 is set, then it is single block type B.
edge change (If DB11 DBX1.6 and DB11 DBX1.7 are not set, it is impossible to determine which single block
1→0 type is required. The control then assumes: No single block across mode groups).
Corresponding to ... Single block type B
DB11
DBX4.0 Selected mode AUTOMATIC
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or AUTOMATIC mode is selected by HMI.
edge change
0→1
Signal state 0 or AUTOMATIC mode is not selected by HMI.
edge change
1→0
DB11
DBX4.1 Selected mode MDA
Edge evaluation: Signal(s) updated: Cyclically
Signal state 1 or MDA mode is selected by HMI.
edge change
0→1
Signal state 0 or MDA mode is not selected by HMI.
edge change
1→0
DB11
DBX4.2 Selected JOG mode
Data block Signal(s) from BAG (HMI → PLC)
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or JOG mode is selected by HMI.
edge change
0→1
Signal state 0 or JOG mode is not selected by HMI.
edge change
1→0
Basic Functions
1640 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
Z1: NC/PLC interface signals
18.6 Mode group, channel, program operation, reset response (K1)
DB11
DBX5.0 Selected machine function TEACH IN
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or The machine function TEACH IN is selected by HMI within BAG.
edge change
0→1
Signal state 0 or The machine function TEACH IN is not selected by HMI.
edge change
1→0
Additional references Operating Manual HMI (corresponding to the used software)
DB11
DBX5.1 Selected REPOS machine function
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or The machine function REPOS is selected by HMI within BAG.
edge change
0→1
Signal state 0 or The machine function REPOS is not selected by HMI.
edge change
1→0
Application When a fault occurs when executing a part program (e.g. tool breakage), the axis is manually
example(s) moved away from the fault location in the JOG mode in order to be able to replace the tool.
The axis can then be manually returned to the exact previous position using the REPOS machine
function so that the program can be continued in the automatic mode.
Additional references Operating Manual HMI (corresponding to the used software)
DB11
DBX5.2 Selected machine function REF
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or The machine function REF is selected by HMI within BAG.
edge change
0→1
Signal state 0 or The machine function REF is not selected by HMI.
edge change
1→0
Additional references See Section "R1: Referencing (Page 1173)"
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1641
Z1: NC/PLC interface signals
18.6 Mode group, channel, program operation, reset response (K1)
DB11
DBX6.0 Active mode AUTOMATIC
Data block Signal(s) from the mode group (NCK → PLC)
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or AUTOMATIC mode is active.
edge change
0→1
Signal state 0 or AUTOMATIC mode is not active.
edge change
1→0
DB11
DBX6.1 Active mode MDA
Edge evaluation: Signal(s) updated: Cyclically
Signal state 1 or MDA mode is active.
edge change
0→1
Signal state 0 or MDA mode is not active.
edge change
1→0
DB11
DBX6.2 Active JOG mode
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or JOG mode is active.
edge change
0→1
Signal state 0 or JOG mode is not active.
edge change
1→0
DB11
DBX6.3 Mode group ready
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or This signal is set after power on and all of the voltage have been established. The mode group is
edge change now ready and part programs can be executed and axes traversed in the individual channels.
0→1
Basic Functions
1642 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
Z1: NC/PLC interface signals
18.6 Mode group, channel, program operation, reset response (K1)
DB11
DBX6.3 Mode group ready
Signal state 0 or The mode group is not ready. Possible causes for this are:
edge change
• A critical axis or spindle alarm is present
1→0
• Hardware faults
• The mode group has been incorrectly configured (machine data)
If the mode group ready changes to signal state "0", then:
• The axis and spindle drives are braked down to standstill with the max. braking current.
• The signals from the PLC to the NCk are brought into an inactive state (cleared state).
Special cases, An alarm that withdraws the interface signal
errors, ...... DB11 DBX6.3 (mode group ready)
ensures that all channels of the mode group are no longer in the reset state.
In order to switch to another operating mode, a mode group reset (DB11 DBX0.7) must be made.
DB11
DBX6.7 All channels in the reset state
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or All the channels that belong to this mode group are in the "channel status reset" state (DB21, ...
edge change DBX7.7).
0→1
Signal state 0 or At least one of the channels in the mode group is not in "channel status reset" (DB21, ... DBX7.7).
edge change
1→0
Corresponding to ... DB21, ... DBX7.7 (channel state, reset)
DB11
DBX7.0 Active machine function TEACH IN
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or Machine function TEACH IN is active in the mode group.
edge change
0→1
Signal state 0 or Machine function TEACH IN is not active.
edge change
1→0
Additional references Operating Manual HMI (corresponding to the used software)
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1643
Z1: NC/PLC interface signals
18.6 Mode group, channel, program operation, reset response (K1)
DB11
DBX7.1 Active REPOS machine function
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or Machine function REPOS is active in the mode group.
edge change
0→1
Signal state 0 or Machine function REPOS is not active.
edge change
1→0
Application When a fault occurs when executing a part program (e.g. tool breakage), the axis is manually
example(s) moved away from the fault location in the JOG mode in order to be able to replace the tool.
The axis can then be manually returned to the exact previous position using the REPOS machine
function so that the program can be continued in the automatic mode.
Additional references Operating Manual HMI (corresponding to the used software)
DB11
DBX7.2 Active machine function REF
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or Machine function REF is active in the mode group.
edge change
0→1
Signal state 0 or Machine function REF is not active.
edge change
1→0
Additional references See Section "R1: Referencing (Page 1173)"
DB21, ...
DBX0.4 Activate single block
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 In AUTOMATIC and MDI modes, the operator must enable processing of each individual part
program block of the part program selected in the channel by reactivating NC Start.
Signal state 0 No effect.
Special cases, • In the case of active tool offset, intermediate blocks are inserted, when necessary. These blocks
errors, ...... must also be enabled using NC Start.
• In a series of G33 blocks, a single block is only operative if "dry run feed" is selected.
• In the case of a decoding single block, calculation blocks are not processed in the single step.
Corresponding to ... DB21, ... DBX35.3 (program status interrupted)
Basic Functions
1644 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
Z1: NC/PLC interface signals
18.6 Mode group, channel, program operation, reset response (K1)
DB21, ...
DBX0.5 Activate M01
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 Activation of program control "Conditional stop"M01 is requested.
Signal state 0 Activation of program control "Conditional stop" M01 is not requested.
Corresponding to ... DB21, ... DBX24.5 (M01 selected)
DB21, ... DBX32.5 (M0/M01 active)
DB21, ...
DBX1.6 PLC action completed
Edge evaluation: no Signal(s) updated: Cyclically
At the end of the block search, concluding action blocks are executed:
DB21, ... DBX32.3 (action block active) == 1 AND
DB21, ... DBX32.6 (last action block active) == 1
Alarm "10208 Channel <Channel Number> Issue NC Start to continue program" notifies that NC
Start must be reactivated to resume the part program starting from the target block.
If other actions are to be executed by the PLC user program prior to the NC Start (e.g. tool change),
Search mode can be parameterized as follows:
MD11450 $MN_SEARCH_RUN_MODE = 1
Output of alarm delayed until the existing signal is reset.
Signal state 1 PLC action is completed.
Signal state 0 PLC action is not yet completed.
Corresponding to ... DB21, ... DBX32.3 (action block active)
DB21, ... DBX32.6 (last action block active)
DB21, ... DBX33.4 (block search active)
DB21, ...
DBX1.7 Activate program test
Edge evaluation: no Signal(s) updated: Cyclically
Signal state 1 Activation of the program test is requested.
During the program test, all motion commands of axes (not spindles) take place under "Axis
disable."
Notice!
Due to the axis disable, the assignment of a tool magazine is not changed for the program test. The
user / machine manufacturer must utilize a suitable PLC user program to ensure that the NC-
internal tool management and the actual assignment of the tool magazine remain consistent. Refer
to the program example included in the PLC Toolbox.
Signal state 0 Activation of the program test is not requested.
Corresponding to ... DB21, ... DBX25.7 (program test selected)
DB21, ...DBX33.7 (program test active)
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1645
Z1: NC/PLC interface signals
18.6 Mode group, channel, program operation, reset response (K1)
DB21, ...
DBB2 Activate skip block
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 Skip blocks marked in the part program with a slash (/) are not processed. If there is a series of skip
blocks, the signal is only active if it is present before the first skip block of the series is decoded.
Note
The signal should be available prior to the start of the part program.
Signal state 0 Skip blocks marked in the part program with an slash (/) are processed.
Corresponding to ... DB21, ... DBX26.0 (skip block selected)
DB21, ... DBX35.2 (program status stopped)
DB21, ...
DBX6.1 Read-in disable
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 The main run does not read in any preprocessed part program blocks.
Note
The signal is only active in AUTOMATIC and MDI modes.
Signal state 0 The main run reads in preprocessed part program blocks.
Corresponding to ... DB21, ... DBX35.0 (program status running)
DB21, ...
DBX6.4 Program level abort
Edge evaluation: Yes Signal(s) updated: Cyclically
Edge change At each edge change 0 → 1 the current program level being processed (subprogram level, ASUB
0→1 level, save routine) is immediately aborted. Processing of the part program continues at the next
higher program level from the exit point.
Edge change No effect.
1→0
Special cases, The main program level cannot be aborted with this IS, only with IS "Reset".
errors, ......
DB21, ...
DBX7.0 NC Start disable
Edge evaluation: no Signal(s) updated: Cyclically
Signal state 1 The NC Start disable prevents a part program from being started with NC START signal DB21, ...
DBX7.1 (NC Start) == 1.
Basic Functions
1646 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
Z1: NC/PLC interface signals
18.6 Mode group, channel, program operation, reset response (K1)
DB21, ...
DBX7.0 NC Start disable
Special cases, The start of a part program selected in the channel by part program command START in another
errors, ...... channel (program coordination) is not prevented by the interface signal:
DB21, ... DBX7.0 (NC Start disable) == 1.
DB21, ...
DBX7.1 NC Start
Edge evaluation: Yes Signal(s) updated: Cyclically
Edge change AUTOMATIC mode: The selected NC program is started or continued, or the auxiliary functions that
0→1 were saved during the program interruption are output.
If data is transferred from the PLC to the NC during program status "Program interrupted," then this
data is immediately cleared at NC Start.
MDI:mode
The entered block information or part program blocks are released for execution.
Edge change No effect.
1→0
Corresponding to ... DB21, ... DBX7.0 (NC Start disable)
DB21, ...
DBX7.2 NC Stop at block limit
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 The current NC program is stopped after the current part program block has been completely
processed. Otherwise, as for DB21, ... DBX7.3 (NC Stop).
Signal state 0 No effect.
Corresponding to ... DB21, ... DBX7.3 (NC Stop)
DB21, ... DBX7.4 (NC Stop axes plus spindles)
DB21, ... DBX35.2 (program status stopped)
DB21, ... DBX35.6 (channel status interrupted)
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1647
Z1: NC/PLC interface signals
18.6 Mode group, channel, program operation, reset response (K1)
DB21, ...
DBX7.3 NC Stop
Edge evaluation: no Signal(s) updated: Cyclically
Signal state 1 AUTOMATIC or MDI mode:
Processing of the part program active in the channel is stopped.
The axes (not spindles) are brought to a standstill within the assigned acceleration parameters.
• Program status: Stopped
• Channel status: Interrupted
JOG mode:
In JOG mode, incompletely traversed incremental paths (INC...) are retracted at the next NC Start.
Note
The signal must be present for at least one PLC cycle (OB1).
Signal state 0 No effect.
Signal irrelevant for • Program status: Aborted
...
• Channel status: Reset
Special cases, • If data is transferred to the NCK after NC Stop (e.g. tool offset), the data is cleared at the next
errors, ...... NC Start.
Corresponding to ... DB21, ... DBX7.2 (NC Stop at block limit)
DB21, ... DBX7.4 (NC Stop axes plus spindles)
DB21, ... DBX35.2 (program status stopped)
DB21, ... DBX35.6 (channel status interrupted)
DB21, ...
DBX7.4 NC Stop axes plus spindles
Edge evaluation: no Signal(s) updated: Cyclically
See DB21, ... DBX7.3 (NC Stop).
In addition, the spindles of the channel are stopped.
DB21, ...
DBX7.7 Reset
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 The channel is reset. The initial settings are set (e.g. G functions).
The alarms for the channel are cleared if they are not POWER ON alarms.
The reset signal must be issued by the PLC (e.g. using a logic operation with the reset key on the
MCP). The signal is only evaluated by the selected channel.
The program status changes to "Aborted", and the channel status changes to "Channel status
reset".
Signal state 0 No effect.
Corresponding to ... DB11, ... DBX0.7 (mode group reset)
DB21, ... DBX35.7 (channel status reset)
Basic Functions
1648 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
Z1: NC/PLC interface signals
18.6 Mode group, channel, program operation, reset response (K1)
DB21, ...
DBX31.0 - DBX31.2 REPOS mode (A, B, C)
Edge evaluation: No Signal(s) updated: Cyclically
Meaning REPOS mode for repositioning to the contour after an interruption of the traversal block
Mode Bit 2 Bit 1 Bit 0
No REPOS mode active 0 0 0
RMB: Repositioning to start of block 0 0 1
RMI: Repositioning to interrupt point 0 1 0
RME: Repositioning to end of block 0 1 1
RMN: Repositioning to the nearest path 1 0 0
point
Corresponding to ... DB21, ...DBX25.0-2 (REPOS mode)
DB31, ... DBX10.0 (REPOS_DELAY)
DB21, ...
DBX31.4 REPOS mode change
Edge evaluation: Yes Signal(s) updated: Cyclically
Edge change REPOS mode has changed.
0→1
Edge change REPOS mode has not changed.
1→0
Corresponding to ... DB21, ... DBX31.0-2 (REPOS mode)
DB21, ... DBX319.0 (acknowledgement of REPOS mode change)
DB21, ...
DBX32.3 Action block active
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 The action block is being executed.
Signal state 0 No action block active.
Additional references Operating Manual HMI (corresponding to the used software)
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1649
Z1: NC/PLC interface signals
18.6 Mode group, channel, program operation, reset response (K1)
DB21, ...
DBX32.4 Approach block active
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 The approach block for the progress of the program with "Block search with computation on
contour" is active, as with "Block search with computation on block end point" no approach block is
created of its own. The axes are automatically positioned on the collected search position if ASUB
exits with REPOSA during "Block search with computation on contour".
Signal state 0 The search target is found during "Block search with computation on contour".
Additional references Programming Manual, Job Planning
DB21, ...
DBX32.5 M00/M01 active
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 The part program block is processed, the auxiliary functions are output, and:
• M00 is in the RAM
• M01 is in the RAM and IS "Activate M01" is active
The program status changes to "Stopped".
Signal state 0 • With DB21, ... DBX7.1 (NC Start)
• For a program abort as a result of a reset
Screen
0
Basic Functions
1650 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
Z1: NC/PLC interface signals
18.6 Mode group, channel, program operation, reset response (K1)
DB21, ...
DBX32.6 Last action block active
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 The last action block is being executed.
This means that all the action blocks on the NC side have been processed and the actions on the
PLC side (ASUB, FC) or the operator such as overstore, mode change according to JOG/REPOS
are possible. In this way the PLC, for example, can still perform a tool change before the start of
movement.
Signal state 0 The last action block is not being executed. Action blocks contain the actions collected during
"Block search with computation" such as
• Output help function H, M00, M01, M..
• Tool programming T, D, DL
• Spindle programming S-Value, M3/M4/M5/M19, SPOS
• Feed programming, F
Additional references See Section "K1: Mode group, channel, program operation, reset response (Page 451)"
DB21, ...
DBX33.4 Block search active
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 The block search function is active.
It was selected from the operator interface and started using the interface signal:
DB21, ... DBX7.1 (NC Start)
DB21, ...
DBX33.5 M02/M30 active
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 • NC block with M02 or M30 (or M17 if a subprogram was started) is completely processed; if
traversing motions are also programmed in this block, the signal is only output when the target
position is reached.
• The program was interrupted as a result of a reset, and the program status changes to
"Aborted".
• When MDI mode or machine functions REF or PRESET are selected
• According to DB10 DBX56.2 (acknowledge emergency stop)
Signal state 0 • No program end or program abort
• Status after activation of control
• Start of an NC Program
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1651
Z1: NC/PLC interface signals
18.6 Mode group, channel, program operation, reset response (K1)
DB21, ...
DBX33.5 M02/M30 active
Screen
0
Application The PLC can detect the end of program processing with this signal and react appropriately.
example(s)
Special cases, • The M02 and M30 functions have equal priority.
errors, ......
• The interface signal:
DB21, ... DBX33.5 (M02/M30 active)
is available as steady-state signal after the end of the program.
• Not suitable for automatic follow-on functions such as workpiece counting, bar feed, etc. For
these functions, M02/M30 must be written in a separate block and the word M02/M30 or the
decoded M signal used.
• Auxiliary functions that could result in a read-in operation being stopped and any S values that
are to be operative beyond M02/M30 must not be written in the last block of a program.
DB21, ...
DBX33.6 Transformation active
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 The NC command TRAORI (activate transformation) is programmed in the NC part program. This
block has been processed by the NC and the transformation is now activated.
Signal state 0 No transformation active.
Additional references Programming Manual, Job Planning
Basic Functions
1652 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
Z1: NC/PLC interface signals
18.6 Mode group, channel, program operation, reset response (K1)
DB21, ...
DBX33.7 Program test active
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 Program control program test is active. Axis disable is set internally for all axes (not spindles).
Therefore the machine axes do not move when a part program block or a part program is being
processed. The axis movements are simulated on the user interface with changing axis position
values.
The axis position values for the display are generated from the calculated setpoints.
The part program is processed in the normal way.
Signal state 0 Program control "Program test" is not active.
Corresponding to ... DB21, ... DBX1.7 (activate program test)
DB21, ... DBX25.7 (program test selected)
DB21, ...
DBX35.0 Program status running
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 The part program was started with the interface signal:
DB21, ... DBX7.1 (NC Start)
and is running.
The running program was stopped with the interface signal:
DB21, ... DBX6.1 (read-in disable)
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1653
Z1: NC/PLC interface signals
18.6 Mode group, channel, program operation, reset response (K1)
DB21, ...
DBX35.1 Program status wait
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 The running program is waiting for the program command WAIT_M or WAIT_E in an NC block. The
wait condition specified in the WAIT command for the channel or channels has not yet been fulfilled.
Signal state 0 Program status wait is not active.
Additional references Programming Manual, Fundamentals
DB21, ...
DBX35.2 Program status stopped
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 The NC part program has been stopped by:
• DB21, ... DBX7.3 (NC Stop)
• DB21, ... DBX7.4 (NC Stop axes plus spindles)
• DB21, ... DBX7.2 (NC Stop at the block limit)
• Programmed M00 or M01
or
• Single-block mode
Signal state 0 "Program status stopped" is not present.
Corresponding to ... DB21, ... DBX7.3 (NC Stop)
DB21, ... DBX7.4 (NC Stop axes plus spindles)
DB21, ... DBX7.2 (NC Stop at the block limit)
DB21, ...
DBX35.3 Program status interrupted
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 When the operating mode changes from AUTOMATIC or MDI (in stopped program status) to JOG,
the program status changes to "Interrupted". The program can be continued at the point of
interruption in AUTOMATIC or MDI mode when NC Start is issued.
Signal state 0 "Program status interrupted" not available.
Special cases, The interface signal:
errors, ...... DB21, ... DBX35.3 (program status interrupted)
indicates that the part program can continue to be processed by restarting it.
DB21, ...
DBX35.4 Program status aborted
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 The program has been selected but not started, or the current program was aborted with a reset.
Signal state 0 Program status interrupted is not active.
Corresponding to ... DB21, ... DBX7.7 (reset)
Basic Functions
1654 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
Z1: NC/PLC interface signals
18.6 Mode group, channel, program operation, reset response (K1)
DB21, ...
DBX35.5 Channel status active
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 In this channel:
• A part program is presently being executed in Automatic or MDI mode
or
• At least one axis is being traversed in JOG mode.
Signal state 0 DB21, ... DBX35.3 (channel status interrupted) or DB21, ... DB35.7 (channel status reset) is
present.
DB21, ...
DBX35.6 Channel status interrupted
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 The NC part program in AUTOMATIC or MDI mode or a traversing motion in JOG mode can be
interrupted by:
• DB21, ... DBX7.3 (NC Stop)
• DB21, ... DBX7.4 (NC Stop axes plus spindles)
• DB21, ... DBX7.2 (NC Stop at the block limit)
• Programmed M00 or M01
or
• Single-block mode
After an NC Start the part program or the interrupted traversing movement can be continued.
Signal state 0 DB21, ... DBX35.5 (channel status active) or DB21, ... DB35.7 (channel status reset) is present.
DB21, ...
DBX35.7 Channel status reset
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 The signal changes to 1 as soon as the channel goes into the reset state, i.e. no processing taking
place.
Signal state 0 The signal is set to 0 as soon as processing takes place in the channel, e.g.:
• Execution of a part program
• Block search
• TEACH IN active
• Overstore active
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1655
Z1: NC/PLC interface signals
18.6 Mode group, channel, program operation, reset response (K1)
DB21, ...
DBX36.4 Interrupt processing active
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 One or more channels in the mode group are not in the desired operating mode as the result of an
active interrupt routine.
Note: The signal is not set if an interrupt routine is running in a program mode.
Signal state 0 All channels are operating in the required mode.
Corresponding to ... MD11600 $MN_BAG_MASK
DB21, ...
DBX36.5 Channel is ready
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 A channel is ready for a part program processing of machine axes, geometry axes and positioning
axes. These are already allocated corresponding to machine configuration and the current program
status of the concerned channels.
Signal state 0 The concerned channel is not ready for a part program processing of machine axes, geometry axes
and positioning axes.
Corresponding to ... MD11600 $MN_BAG_MASK
DB21, ...
DBX37.6 Read-in disable is ignored
Edge evaluation: No Signal(s) updated:
The following machine data is used to specify that the read-in disable (DB21, ... DBX6.1) is to be
ignored:
• MD11602 $MN_ASUP_START_MASK, Bit 2 = 1 (start also permitted if read-in disable is active)
• MD20116 $MC_IGNORE_INHIBIT_ASUP (execute interrupt program in spite of read-in disable)
• MD20107 $MC_ PROG_EVENT_IGN_INHIBIT (Prog events ignore read-in disable)
Part program blocks for which read-in disable is ignored are designated as read-in disable-
inoperative.
Signal state 1 Read-in disable is active (DB21, ... DBX6.1==1) AND part program block is read-in disable-
inoperative.
Signal state 0 Read-in disable is not active (DB21, ... DBB6.1 == 0) OR
(read-in disable is active (DB21, ... DBX6.1 == 1) AND part program block is read-in disable-
operative)
Corresponding to ... DB21, ... DBX37.7 (Stop at block end is ignored during single block (SBL))
Basic Functions
1656 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
Z1: NC/PLC interface signals
18.6 Mode group, channel, program operation, reset response (K1)
DB21, ...
DBX37.7 Stop at block end is ignored during single block (SBL)
Edge evaluation: Signal(s) updated:
The following machine data and part program commands are used to specify that the stop at block
end during single block (DB21, ... DBX0.4 == 1) is to be ignored:
• MD10702 $MN_IGNORE_SINGLEBLOCK_MASK (prevent single-block stop)
• MD20117 $MC_IGNORE_SINGLEBLOCK_ASUP (execute interrupt program completely in spite
of single block)
• MD20106 $MC_PROG_EVENT_IGN_SINGLEBLOCK (Prog events ignore single block)
• SBLOF (suppress single block), SBLON (cancel single block suppression)
Part program blocks for which stop at block end during single block is ignored are designated as
single block-inoperative.
Signal state 1 Single block is active (DB21, ... DBX0.4==1) AND part program block is single block-inoperative.
Signal state 0 Single block is not active (DB21, ... DBB0.4 == 0) OR
(single block is active (DB21, ... DBX0.4 == 1) AND part program block is single block-operative)
Corresponding to ... Read-in disable is ignored. DB21, ... DBX37.6 (read-in disable is ignored)
DB21, ...
DBB208 - DBB271 Active G function of groups 1 to 60
Edge evaluation: No Signal(s) updated: Cyclically
Signal state <> 0 The G function displayed in BCD format or its mnemonic identifier is active in the G group.
Valu Meaning
e
1 1st G function of the G group
2 2nd G function of the G group
n nth G function of the G group
Signal state = 0 No G function or G group mnemonic identifier is active.
Application Bit 7 6 5 4 3 2 1 0
example(s) Value 128 64 32 16 8 4 2 1
Example:
G90 0 1 0 1 1 0 1 0
Special cases, In contrast to auxiliary functions, G functions are not output to the PLC subject to
errors, ...... acknowledgement, i.e. processing of the part program is continued immediately after the G function
output.
Additional references A complete list of the G groups and G functions can be found in:
References: Programming Manual, Fundamentals.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1657
Z1: NC/PLC interface signals
18.6 Mode group, channel, program operation, reset response (K1)
DB21, ...
DBB317.1 Workpiece setpoint reached
Edge evaluation: No Signal(s) updated: Cyclically
Signal state = 1 The number of machined workpieces (actual workpiece total) is equal to the number of workpieces
to be machined (required number of workpieces):
$AC_ACTUAL_PARTS == $AC_REQUIRED_PARTS
Signal state = 0 The number of machined workpieces (actual workpiece total) is not equal to the number of
workpieces to be machined (required number of workpieces):
$AC_ACTUAL_PARTS <> $AC_REQUIRED_PARTS
Corresponding to ... MD27880 $MC_PART_COUNTER (activation of workpiece counters)
Additional references Function Manual, Fundamentals, Section "K1: Mode group, channel, program operation, reset
response" > "Program runtime / workpiece counter" > "Workpiece counter"
DB21, ...
DBX318.0 ASUB is stopped
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 The signal is set to 1 if the control stops automatically prior to the end of the ASUB.
The IS DB21, ... DBX318.0 (ASUB is stopped) is only supplied in the case "Interrupt in a program
mode and channel status stopped".
Signal state 0 The IS DB21, ... DBX318.0 (ASUB is stopped) is set to 0 with start and reset.
Basic Functions
1658 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
Z1: NC/PLC interface signals
18.6 Mode group, channel, program operation, reset response (K1)
DB21, ...
DBX318.0 ASUB is stopped
Typical sequence of an ASUB with REPOSA:
3DWKPRWLRQRIDQ &RQWUROKDVVWRSSHG
$68%ZLWK5(326$ $68%ZLWK5(326$ DXWRPDWLFDOO\
(YHQWWKDWEULQJVWKHFRQWURO
LQWRWKHVWRSSHGVWDWXV ,6$68%VWRSSHGLV
RFFXUV VHW
([DPSOH6WRSNH\
)&EORFNVLJQDOV$68%'RQH
&RQWUROV\VWHPVWRSSHG
$68%LVWKHQVWDUWHGE\WKH
)& 3DWKRIWKHSDUWVSURJUDP
ASUB with REPOSA If the interrupt routine is ended with REPOSA, then the following sequence is typical:
is triggered in the
• NC Stop or an alarm is used to stop the part program.
status AUTOMATIC
mode stopped • The control assumes program status "Stopped".
• The PLC initiates an ASUB via block FC9.
• Before the re-approach to the contour, the control stops and goes to program state "Stopped".
IS DB21, ... DBX318.0 (ASUB is stopped) is set.
• The user presses Start. The IS DB21, ... DBX318.0 (ASUB is stopped) is reset, the re-approach
motion is started.
• At the end of the re-approach motion, the FC9 signal "ASUB done" is set and the path of the
interrupted part program is continued.
DB21, ...
DBX318.1 Block search via program test is active (SERUPRO)
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 During the processing of the part program block in context of block search (internal channel status:
"Program test"), up to the change of the target block in the main execution (Program status:
"Stopped").
Signal state 0 With the change of the target block in the main execution (internal channel status: "Program test" is
deselected; stop condition: "Search target found" is displayed).
Special cases, The block search (SERUPRO) can only be activated in AUTOMATIC mode in program status
errors, ...... "Aborted".
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1659
Z1: NC/PLC interface signals
18.6 Mode group, channel, program operation, reset response (K1)
DB21, ...
DBX319.0 Acknowledgement of the REPOS mode change
Edge evaluation: Yes Signal(s) updated: Cyclically
Edge change The interface signal detected by the NC:
0→1 DB21, ... DBX31.4 (REPOS mode change)
is acknowledged with the existing interface signal, if the requested REPOS mode:
DB21, ... DBX31.0-2 (REPOS mode)
and the delay signal:
DB31, ... DBX10.0 (REPOSDELAY)
are taken over in the NC.
The signal states refer to the current main run block
Edge change SERUPRO-ASUB stops automatically before REPOS and DB21, ... DBX31.4 (REPOS mode
1→0 change) does not affect the SERUPRO approach.
Corresponding to ... DB21, ... DBX31.4 (REPOS mode-change)
DB21, ...
DBX319.1 - Active REPOS mode (A, B, C)
DBX319.3
Edge evaluation: No Signal(s) updated: Cyclically
Meaning The active REPOS mode is displayed with the interface signals A, B and C.
Active REPOS mode C B A
0 = no REPOS mode active 0 0 0
1 = repositioning to block start point RMBBL 0 0 1
2 = repositioning to interruption point RMIBL 0 1 0
3 = repositioning to block end point RMEBL 0 1 1
4 = repositioning to nearest path point RMNBL 1 0 0
Basic Functions
1660 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
Z1: NC/PLC interface signals
18.6 Mode group, channel, program operation, reset response (K1)
DB21, ...
DBX319.1 - Active REPOS mode (A, B, C)
DBX319.3
Example of the sequence of REPOS acknowledgements in the part program and signal timing of
the acknowledgement process from the NC:
1
1 1
5(3263$7+02'(
5(32602'(('*(
5(32602'(('*($&.1
5HSRV3DWK0RGH$FNQ
W
5HSRVLWLRQLQJPRWLRQIURP5(326KDVEHHQ
6WDUWWKHSDUWSURJUDP
FRPSOHWHG7KHUHPDLQLQJEORFNVWDUWV
6WRSSDUWSURJUDP
7KHUHPDLQLQJEORFNLVFRPSOHWHG
3UHVHOHFW501%/
,QLWLDWH$68%
&RPPDQGZLWK$68%LVVWDUWHG
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1661
Z1: NC/PLC interface signals
18.6 Mode group, channel, program operation, reset response (K1)
DB21, ...
DBX319.5 Repos DEFERAL Chan
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 All axes currently controlled by this channel have either no REPOS offset or their REPOS offsets
are invalid.
Signal state 0 Miscellaneous.
Corresponding to ... DB31, ... DBX70.0 (Repos offset)
DB21, ...
DBB376 ProgEventDisplay
Edge evaluation: No Signal(s) updated: Event-driven
Note: Signal duration of at least one complete PLC cycle
All bits == 0: There is no event-driven program call active
Meaning of individual bits:
Bit Meaning
0 Part program start from channel state "Reset"
1 Part program end
2 Operator panel reset
3 Startup
4 1st start after block search
5 - 7 Reserved, currently always 0
Signal state 1 The event assigned to the bit has activated the "Event-driven program call" function.
Signal state 0 The event assigned to the bit has not activated the "Event-driven program call" function or the
event-driven user program has expired or was canceled with RESET.
DB21, ...
DBX378.0 ASUB is active
Edge evaluation: No Signal(s) updated: Event-driven
Signal state 1 One ASUB is active.
Note:
The user gets a feedback on a running ASUB through DB21, … DBX378.0 even outside FC9 block.
Signal state 0 No ASUB is active.
DB21, ...
DBX378.1 Still ASUB is active
Edge evaluation: No Signal(s) updated: Event-driven
Signal state 1 An ASUB with suppressed display updating (refer to MD20191 $MC_IGN_PROG_STATE_ASUP) is
active.
Signal state 0 No ASUB with suppressed display updating is active.
Basic Functions
1662 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
Z1: NC/PLC interface signals
18.6 Mode group, channel, program operation, reset response (K1)
DB21, ...
DBX384.0 Control program branching
Edge evaluation: No Signal(s) updated:
Signal state 1 GOTOS in the part program initiates a return to the program start. The program is then processed
again.
Signal state 0 GOTOS initiates no return. Program execution is continued with the next part program block after
GOTOS.
Corresponding to ... MD27860 $MC_PROCESSTIMER_MODE (activation of the program runtime measurement)
MD27880 $MC_PART_COUNTER (activation of workpiece counters)
DB31, ...
DBX10.0 REPOSDELAY
Edge evaluation: no Signal(s) updated: Cyclically
Signal state 1 The REPOS offset of the axis is first applied with its next programming.
Signal state 0 There is no REPOS offset.
Special cases, The signal is not relevant for path axes.
errors, ......
Corresponding to ... DB21, ... DBX31.0 - DBX31.2 (REPOS mode)
DB31, ... DBX70.2 (REPOSDELAY acknowledge)
DB31, ... DBX72.0 (REPOSDELAY)
DB31, ...
DBX70.0 REPOS offset
Edge evaluation: no Signal(s) updated: cyclic
Signal state 1 or A REPOS offset must be applied for the appropriate axis.
edge change
0→1
Signal state 0 or No REPOS offset need be applied for the appropriate axis.
edge change
1→0
Corresponds to .... DB31, ... DBX70.1 (REPOS offset valid)
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1663
Z1: NC/PLC interface signals
18.6 Mode group, channel, program operation, reset response (K1)
DB31, ...
DBX70.1 REPOS offset valid
Edge evaluation: no Signal(s) updated: cyclic
Signal state 1 or The range of validity of the REPOS offset is indicated with the value 1.
edge change The REPOS offset was calculated to be valid.
0→1
Signal state 0 or A value of zero indicates that the REPOS offset was calculated to be invalid.
edge change
1→0
Application Updating the REPOS offset in the range of validity:
example(s) Between SERUPRO end and start, the axis can be moved in JOG mode with a mode change. The
user moves the REPOS offset to the zero value.
Corresponds to .... DB31, ... DBX70.0 (REPOS offset)
DB31, ...
DBX70.2 REPOS Delay Ackn
Edge evaluation: no Signal(s) updated: cyclic
Signal state 1 or The axis was programmed within a traversing block, and the REPOS offset was applied.
edge change Note
0→1 A REPOS offset was available for the axis, and REPOSDELAY was active:
DB31, ... DBX10.0 (REPOSDELAY) == 1
This signal behaves the same as:
DB21, ... DBX319.1 - DBX319.3 (Repos Path Mode Ackn)
Signal state 0 or The value zero is used to acknowledge that the REPOS offset is not active for this axis. This signal
edge change is cancelled on activation of the remaining block.
1→0
Corresponds to .... DB31, ... DBX10.0 (REPOSDELAY)
DB31, ... DBX72.0 (REPOSDELAY)
DB31, ...
DBX72.0 REPOSDELAY
Edge evaluation: no Signal(s) updated: cyclic
Signal state 1 or After a block search, a REPOS offset is applied for this axis. However it is not applied using the
edge change approach block, but rather using the next traversing block in which the axis is programmed.
0→1
Signal state 0 or The REPOS offset for this axis is not active.
edge change
1→0
Special cases, The signal is not relevant for path axes.
errors, ......
Corresponds to .... DB21, ... DBX31.0 - DBX31.2 (REPOSPATHMODE)
DB31, ... DBX10.0 (REPOSDELAY)
DB31, ... DBX70.2 (REPOS Delay Ackn)
Basic Functions
1664 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
Z1: NC/PLC interface signals
18.7 Axis types, coordinate systems, frames (K2)
DB31, ...
DBX76.4 Path axis
Edge evaluation: no Signal(s) updated: cyclic
Signal state 1 or The axis is involved in the path (path axis).
edge change Note
0→1 In conjunction with SERUPRO in status "Target block found", the signal refers to the status of the
axis in the target block.
Signal state 0 or The axis is not involved in the path.
edge change
1→0
DB 31, ...
DBX3.0 External Zero Offset
Edge evaluation: no Signal(s) updated:
Signal state 1 or The preselected value of the external work offest of an axis is used as the new value for calculating
edge change the total work offset between the basic and the workpiece coordinate systems.
0→1
Signal state 0 or The preselected value of the external work offset of an axis is not used as the new value for
edge change calculating the total work offset between the basic and workpiece coordinate systems. The previous
1→0 value is still valid.
Signal irrelevant for $AA_ETRANS[axis] equals zero for all axes.
...
Special cases, Signal zero after ramp-up (power ON).
errors, ......
Corresponding to .... $AA_ETRANS[axis]
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1665
Z1: NC/PLC interface signals
18.8 Emergency stop (N2)
DB10
DBX56.1 Emergency stop
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or The NC is brought into the emergency stop state and the emergency stop sequence in the NC is
edge change started.
0→1
Signal state 0 or The NC is not in the emergency stop state.
edge change The emergency stop state is (still) active but can be reset using the interface signals:
1→0 DB10 DBX56.2 (acknowledge emergency stop)
and
DB11 DBX0.7 (mode group reset)
DB10
DBX56.2 Acknowledge emergency stop
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or The emergency stop state is only reset if the interface signal:
edge change DB10 DBX56.2 (acknowledge emergency stop)
0→1 is set followed by the interface signal:
DB11, ... DBX0.7 (mode group reset).
It must be noted that IS "Acknowledge emergency stop" and IS "Reset" must be set (together) for a
long enough period so that the interface signal:
DB10 DBX106.1 (emergency stop active)
was reset.
Resetting the emergency stop state has the following effects:
• The controller enable is switched in.
• Follow-up mode is canceled for all axes and position control mode resumed.
• DB31, ... DBX61.5 set (position controller active).
• DB11, ... DBX6.3 set (mode group ready).
• DB10 DBX106.1 reset (emergency stop active).
• Alarm 3000 is cleared.
• Part program processing is aborted for all channels.
Basic Functions
1666 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
Z1: NC/PLC interface signals
18.8 Emergency stop (N2)
DB10
DBX56.2 Acknowledge emergency stop
,6(PHUJHQF\VWRS
,6$FNQRZOHGJHHPHUJHQF\VWRS
,6(PHUJHQF\VWRSDFWLYH
,65HVHW
7KH,6$FNQRZOHGJHHPHUJHQF\VWRSKDVQRHIIHFW
7KH,65HVHWKDVQRHIIHFW
7KH,6$FNQRZOHGJHHPHUJHQF\VWRSDQG5HVHWUHVHW(PHUJHQF\VWRSDFWLYH
Special cases, The emergency stop state cannot be reset using the interface signal:
errors, ...... DB21, ... DBX7.7 (reset).
Corresponding to ... DB10 DBX56.1 (Emergency stop)
DB10 DBX106.1 (emergency stop active)
DB11 DBX0.7 (mode group reset)
DB10
DBX106.1 Emergency stop active
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or The NC is in the emergency stop state.
edge change
0→1
Corresponding to ... DB10 DBX56.1 (Emergency stop)
DB10 DBX56.2 (acknowledge emergency stop)
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1667
Z1: NC/PLC interface signals
18.9 PLC basic program (P3)
DB21, ...
DBX1.0 Activate referencing
Edge evaluation: Yes Signal(s) updated: Cyclically
Signal state 1 or Channel-specific referencing is started using the interface signal:
edge change DB21, ... DBX1.0 (activate referencing).
0→1
The control acknowledges a successful start using the interface signal:
DB21, ... DBX33.0 (referencing active)
With the channel-specific referencing each machine axis, which is allocated to a channel, can be
referenced (control internals are simulated by traversing keys plus/minus).
Using the axis-specific machine data:
MD34110 $MA_REFP_CYCLE_NR (axis sequence for channel-specific referencing)
can determine in which sequence the machine axes are referenced.
When all of the axes entered in REFP_CYCLE_NO have reached their reference point,
the interface signal:
DB21, ... DBX36.3 (all axes stationary)
is set.
Application If the machine axes are to be referenced in a particular sequence, there are the following
example(s) possibilities:
• The operator must observe the correct sequence when starting.
• The PLC must check the sequence when starting or define it itself.
• The channel-specific referencing function will be used.
Corresponding to ... DB21, ... DBX33.0 (activate referencing)
DB21, ... DBX36.2 (all axes with obligatory reference point are referenced)
Basic Functions
1668 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
Z1: NC/PLC interface signals
18.10 Reference point approach (R1)
DB21, ...
DBX33.0 Referencing active
Edge evaluation: Yes Signal(s) updated: Cyclically
Signal state 1 or The channel-specific referencing was started using the interface signal:
edge change DB21, ... DBX1.0 (activate referencing)
0→1 and the successful start was acknowledged using the interface signal:
DB21, ... DBX33.0 (referencing active).
DB21, ...
DBX36.2 All axes that have to be referenced are referenced
Edge evaluation: no Signal(s) updated: cyclic
Signal state 1 or All axes that must be referenced (linear axes and rotary axes) of the channel are referenced.
edge change The machine data:
0→1 MD20700 $MC_REFP_NC_START_LOCK (NC start inhibit without reference point)
is zero.
If two position measuring systems are connected to an axis, that would prevent an NC start, then
the active one must be referenced so that the axis is considered to have been referenced.
An NC Start command for parts program processing is only accepted when this signal is present.
Axes that have to be referenced are axes, if:
MD34110 $MA_REFP_CYCLE_NR _ = -1
and the axis is not in the parked position (position measuring system inactive and the controller
enable withdrawn).
Signal state 0 or One or more axes of the channel have not been referenced.
edge change
1→0
Special cases, The spindles of the channel have no effect on this interface signal.
errors, ......
Corresponding to .... DB31, ... DBX60.4 (referenced / synchronized 1)
DB31, ... DBX60.5 (referenced / synchronized 2)
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1669
Z1: NC/PLC interface signals
18.10 Reference point approach (R1)
DB31, ...
DBX2.4 - DBX2.7 Reference point value 1 to 4
Edge evaluation: no Signal(s) updated: cyclic
Signal state 1 or When the reference cam is reached, the NCK is signaled which coded reference cam is actuated.
edge change The interface signal:
0→1 DB31, ... DBX2.4 - DBX2.7 (reference point values 1 to 4)
must remain set until the reference point is reached,
or until a new coded reference cam is actuated.
If the machine axis has reached the reference point (axis stationary) then using the reference point
value pre-selected using
IS "reference point values 1 to 4" from the machine data:
MD34100 $MA_REFP_SET_POS (reference point value)
is transferred into the control as the new reference position.
Signal state 0 or No effect.
edge change
1→0
Signal irrelevant for Linear measurement systems with distancecoded reference marks
...
Application On a machine tool with large traversing distances, four coded reference cams can be distributed
example(s) over the entire distance traveled by the axis, four different reference points approached and the
time required to reach a valid referenced point reduced.
Special cases, If the machine axis has arrived at the reference point and none of the four "reference point value 1
errors, ...... to 4" interface signals has been set, the value of the reference point is automatically set to 1.
Corresponding to .... MD34100 $MA_REFP_SET_POS (reference point value)
DB31, ...
DBX12.7 Reference point approach delay
Edge evaluation: no Signal(s) updated: cyclic
Signal state 1 or The machine axis is positioned on the reference cam.
edge change
0→1
Signal state 0 or The machine axis is positioned in front of the reference cam. An appropriately long reference cam
edge change (up to the end of the traversing range) should be used to prevent the machine axis from being
1→0 located behind (after) the referencing cam.
Corresponding to .... DB31, ... DBX2.4 - DBX2.7 (reference point values 1 to 4)
Basic Functions
1670 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
Z1: NC/PLC interface signals
18.10 Reference point approach (R1)
DB31, ...
DBX60.4 Referenced/synchronized 1
Edge evaluation: Signal(s) updated:
Signal state 1 or Axes:
edge change When being referenced, if the machine axis has reached the reference point (incremental
0→1 measuring systems) or the target point (for length measuring system with distance-coded reference
marks), then the machine axis is referenced and the following interface signal is set:
DB31, ... DBX60.4 (referenced/synchronized 1)
(depending on which position measuring system is active when referencing).
Spindles:
After power-on, a spindle is synchronized the latest after one spindle revolution (360 degrees) (the
zero mark passed or the Bero responded).
Signal state 0 or The machine axis/spindle with position measuring system 1 is not referenced/synchronized.
edge change
1→0
Corresponding to ... DB31, ... DBX1.5 (position measuring system 1)
DB31, ...
DBX60.5 Referenced/synchronized 2
Edge evaluation: Signal(s) updated:
Signal state 1 or Axes:
edge change When being referenced, if the machine axis has reached the reference point (incremental
0→1 measuring systems) or the target point (for length measuring system with distance-coded reference
marks), then the machine axis is referenced and the following interface signal is set:
DB31, ... DBX60.5 (referenced/synchronized 2)
(depending on which position measuring system is active when referencing).
Spindles:
After power-on, a spindle is synchronized the latest after one spindle revolution (360 degrees) (the
zero mark passed or the Bero responded).
Signal state 0 or The machine axis/spindle with position measuring system 2 is not referenced/synchronized.
edge change Axes:
1→0 Alarm 21610 was output.
Spindles:
Encoder limit frequency exceeded.
Corresponding to ... DB31, ... DBX1.6 (position measuring system 2)
MD34102 $MA_REFP_SYNC_ENCS (measuring system calibration) = 0
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1671
Z1: NC/PLC interface signals
18.10 Reference point approach (R1)
DB31, ...
DBX71.4 POS_RESTORED 1
Edge evaluation: Signal(s) updated:
Signal state 1 or If MD34210 $MA_ENC_REFP_STATE is set to a value of 3, the last axis position buffered before
edge change switch off is restored in distance-coded, incremental measuring systems. Referencing does not take
0→1 place automatically. Position measuring system 1 is in "Position restored" state.
Signal state 0 or The machine axis/spindle with position measuring system 1 is not restored.
edge change
1→0
Corresponding to ... DB31, ... DBX60.4 (referenced / synchronized 1)
DB31, ...
DBX71.5 POS_RESTORED 2
Edge evaluation: Signal(s) updated:
Signal state 1 or If MD34210 $MA_ENC_REFP_STATE is set to a value of 3, the last axis position buffered before
edge change switch off is restored in distance-coded, incremental measuring systems. Referencing does not take
0→1 place automatically. Position measuring system 2 is in "Position restored" state.
Signal state 0 or The machine axis/spindle with position measuring system 2 is not restored.
edge change
1→0
Corresponding to ... DB31, ... DBX60.5 (referenced / synchronized 2)
Basic Functions
1672 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
Z1: NC/PLC interface signals
18.11 Spindles (S1)
DB31, ...
DBX2.2 Spindle reset/delete distancetogo
Edge evaluation: yes Signal(s) updated: cyclic
Edge change Independent of the machine data:
0→1 MD35040 $MA_SPIND_ACTIVE_AFTER_RESET
selects a spindle reset for the various spindle operating modes in the following fashion:
• Control mode:
– Spindle stops
– Program continues to run
– Spindle continues to run with subsequent M and S program commands
• Oscillating mode:
– Oscillation is interrupted
– Axes continue to run
– Program continues with the actual gearbox stage
– With the following M value and higher S value, it is possible that the IS:
DB31, ... DBX83.1 (programmed speed high)
is set.
• Positioning mode:
– Is stopped
• Axis operation:
– Is stopped
Signal state 0 or No effect.
edge change
1→0
Corresponding to ... MD35040 $MA_SPIND_ACTIVE_AFTER_RESET (own spindle reset)
DB21, ... DBX7.7 (reset)
DB31, ... DBX2.2 (delete distance to go): is a different name for the same signal
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1673
Z1: NC/PLC interface signals
18.11 Spindles (S1)
DB31, ...
DBX16.0 - DBX16.2 Actual gear stage A to C
Edge evaluation: yes Signal(s) updated: Cyclic
Signal state 1 If the new gear stage is engaged, the PLC user program sets the interface signals:
(statuscontrolled) DB31, ... DBX16.2 - DBX16.0 (actual gear stage A to C)
and
DB31, ... DBX16.3 (gear is changed over).
This signals the NCK that the correct gear stage has been successfully engaged.
The gear change is considered to have been completed (spindle oscillation mode is deselected),
the spindle accelerates in the new gear stage to the last programmed spindle speed and the next
block in the parts program can be executed.
The actual gear stage is output in coded format.
For each of the 5 gear stages, there is one set of parameters assigned as follows:
ದ 'DWDIRUD[LVPRGH
'DWDIRUVWJHDUVWDJH
'DWDIRUQGJHDUVWDJH
'DWDIRUUGJHDUVWDJH
'DWDIRUWKJHDUVWDJH
'DWDIRUWKJHDUVWDJH
Special cases, If the PLC user reports back to the NCK with a different actual gear stage than issued by the NCK
errors, ...... as the setpoint gear stage, the gear change is still considered to have been successfully completed
and the actual gear stage A to C is activated.
Corresponding to ... DB31, ... DBX82.0 - DBX82.2 (setpoint gear stage A to C)
DB31, ... DBX82.3 (change over gear stage)
DB31, ... DBX16.3 (gear is changed)
DB31, ... DBX18.5 (oscillation speed)
Parameter sets for gear stages
Basic Functions
1674 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
Z1: NC/PLC interface signals
18.11 Spindles (S1)
DB31, ...
DBX16.3 Gear is changed over
Edge evaluation: yes Signal(s) updated: Cyclic
Signal state 1 or When the new gear stage is engaged, the PLC user sets the interface signals:
edge change DB31, ... DBX16.0 - DBX16.2 (actual gear stages A to C)
0→1 and
DB31, ... DBX16.3 (gear is changed over).
This signals the NCK that the correct gear stage has been successfully engaged.
The gear stage change is complete (spindle oscillation mode is deselected), the spindle accelerates
in the new gear stage to the last programmed spindle speed and the next block in the parts
program can be executed.
The interface signal:
DB31, ... DBX82.3 (change over gear)
is reset by the NCK - the PLC user then resets the interface signal:
(gear is changed over).
DB31, ...
DBX16.4 - DBX16.5 Resynchronizing spindles 1 and 2
Edge evaluation: yes Signal(s) updated: Cyclic
Edge change The spindle should be resynchronized, as the synchronization between the position measuring
0→1 system of the spindle and the 0 degree position has been lost.
Signal state 0 or No effect.
edge change
1→0
Signal irrelevant for ... spindle modes other than the control mode.
...
Application The machine has a selector switch to changeover between a vertical and a horizontal spindle. Two
example(s) different position encoders are used (one for the vertical spindle and one for the horizontal spindle),
but only one actual value input is used on the control. When the system switches from the vertical
to the horizontal spindle, the spindle must be resynchronized.
This synchronization is triggered by the IS "re-synchronize spindle 1 or 2".
Corresponding to ... DB31, ... DBX60.4 (referenced / synchronized 1)
DB31, ... DBX60.5 (referenced / synchronized 2)
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1675
Z1: NC/PLC interface signals
18.11 Spindles (S1)
DB31, ...
DBX16.7 Delete S value
Edge evaluation: yes Signal(s) updated: Cyclic
Edge change Control mode:
0→1
• Spindle stops
• Program continues to run
• Spindle continues to run with the following S value, if M3 or M4 were active
Oscillation mode, axis mode, positioning mode:
• Signal has no effect for the corresponding function. However, if the open-loop control mode is
selected again, a new S value must be programmed.
Signal state 0 or No effect.
edge change
1→0
Application Terminating traversing motion on account of an external signal (e.g. sensing probe).
example(s)
DB31, ...
DBX17.4 - DBX17.5 Re-synchronizing spindle when positioning 1 and 2
Edge evaluation: yes Signal(s) updated: Cyclic
Signal state 1 When positioning, the spindle must be re-synchronized.
Signal state 0 or No effect.
edge change
1→0
Signal irrelevant for ... spindle modes other than the positioning mode.
...
Application The spindle has an indirect measuring system and slippage may occur between the motor and the
example(s) clamp. If the signal=1 - when positioning is started, the old reference is deleted and the zero mark is
searched for again before the end position is approached.
Corresponding to ... DB31, ... DBX60.4 (referenced / synchronized 1)
DB31, ... DBX60.5 (referenced / synchronized 2)
Basic Functions
1676 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
Z1: NC/PLC interface signals
18.11 Spindles (S1)
DB31, ...
DBX17.6 Invert M3/M4
Edge evaluation: yes Signal(s) updated: Cyclic
Signal state 1 or The direction of rotation of the spindle motor changes for the following functions:
edge change
• M3
0→1
• M4
• M5
• SPOS/M19/SPOSA from the motion; not effective for SPOS/M19/SPOSA from zero speed (stationary).
Application The machine has a selector switch to changeover between a vertical and a horizontal spindle. The
example(s) mechanical design is implemented so that for the horizontal spindle, one more gearwheel is
engaged than for the vertical spindle. The direction of rotation must therefore be changed for the
vertical spindle if the spindle is always to rotate clockwise with M3.
DB31, ...
DBX18.4 Oscillation controlled by the PLC
Edge evaluation: yes Signal(s) updated: Cyclic
Signal state 1 or If the interface signal:
edge change DB31, ... DBX18.4 (oscillation controlled by thePLC)
0→1 is not set, then automatic oscillation in the NCK is carried-out using the interface signal:
DB31, ... DBX18.5 (oscillation speed).
The two times for the directions of rotation are entered in the machine data:
MD35440 $MA_SPIND_OSCILL_TIME_CW (oscillation time for the M3 direction)
and
MD35450 $MA_SPIND_OSCILL_TIME_CCW (oscillation time for the M4 direction).
If the IS "oscillation via PLC" is set, then with the IS "oscillation speed" a speed is only output in
conjunction with the interface signals:
DB31, ... DBX18.6 - DBX18.7 (setpoint direction of rotation, counter-clockwise and clockwise).
The oscillation, i.e. the continuous change of the direction of rotation, is performed by the PLC user
program using the interface signal "setpoint direction of rotation, counter-clockwise and clockwise"
(oscillation via the PLC).
Application If the new gear stage cannot be engaged in spite of several attempts by the NCK, the system can
example(s) be switched to oscillation via PLC. Both of the times for the directions of rotation can then be
altered by the PLC user program as required. This ensures that the gear stage is reliably changed -
even with unfavorable gear wheel positions.
Corresponding to ... MD35440 $MA_SPIND_OSCILL_TIME_CW (oscillation time for the M3 direction)
MD35450 $MA_SPIND_OSCILL_TIME_CCW (oscillation time for the M4 direction)
DB31, ... DBX18.5 (oscillation speed)
DB31, ... DBX18.7 (setpoint direction of rotation, counter-clockwise)
DB31, ... DBX18.6 (setpoint direction of rotation, clockwise)
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1677
Z1: NC/PLC interface signals
18.11 Spindles (S1)
DB31, ...
DBX18.5 Oscillation enable
Edge evaluation: no Signal(s) updated: Cyclic
Signal state 1 or If the gear stage is to be changed (DB31, ... DBX82.3 (change over gear) is set), then the spindle
edge change operating mode changes to the oscillation mode.
0→1 Depending on the instant in time that the interface signal:
DB31, ... DBX18.5 (oscillation speed)
is set, the spindle decelerates down to standstill with different deceleration levels:
The IS "Oscillation speed" is set before the interface signal:
DB31, ... DBX82.3 (change over gear)
is set by the NCK.
When oscillating, the spindle is decelerated down to standstill with the deceleration:
MD35410 $MA_SPIND_OSCILL_ACCEL.
If the IS "oscillation via PLC" is set, then with the IS "oscillation speed" a speed is only output in
conjunction with the interface signals:
DB31, ... DBX18.6 - DBX18.7 (setpoint direction of rotation, counter-clockwise and clockwise).
The oscillation, i.e. the continuous change of the direction of rotation, is performed by the PLC user
program using the interface signal "setpoint direction of rotation, counter-clockwise and clockwise"
(oscillation via the PLC).
Signal state 0 or The spindle does not oscillate.
edge change
1→0
Signal irrelevant for ... All spindle modes except the oscillation mode.
...
Application The oscillation speed is used to make it easier to engage a new gear stage.
example(s)
Corresponding to ... DB31, ... DBX18.4 (oscillation controlled by the PLC)
DB31, ... DBX18.7 (setpoint direction of rotation, counter-clockwise)
DB31, ... DBX18.6 (setpoint direction of rotation, clockwise)
Basic Functions
1678 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
Z1: NC/PLC interface signals
18.11 Spindles (S1)
DB31, ...
DBX18.6 - DBX18.7 Oscillation direction of rotation counter-clockwise / oscillation direction of rotation clockwise
Edge evaluation: yes Signal(s) updated: Cyclic
Signal state 1 or If the interface signal:
edge change DB31, ... DBX18.4 (oscillation by the PLC)
0→1 is set, then the direction of rotation for the oscillation speed
can be entered using the two interface signals:
DB31, ... DBX18.6 - DBX18.7 (setpoint direction of rotation counter-clockwise and clockwise).
The times for the oscillation movement of the spindle motor are defined by setting the interface
signals "direction of rotation setpoint counter-clockwise and clockwise" for a corresponding length of
time.
Signal irrelevant for ... spindle modes other than the oscillation mode
...
Application Refer to DB31, ... DBX18.4 (oscillation controlled by the PLC)
example(s)
Special cases, If both of the interface signals are set simultaneously enabled, no oscillation speed is output.
errors, ...... If an interface signal is not set, then an oscillation speed is not output.
Corresponding to ... DB31, ... DBX18.4 (oscillation controlled by the PLC
DB31, ... DBX18.5 (oscillation speed)
DB31, ...
DBX60.0 Spindle/no axis
Edge evaluation: Yes Signal(s) updated: Cyclically
Signal state 1 or The machine axis is operated in one of the following spindle modes:
edge change
• Control mode
0→1
• Oscillation mode
• Positioning mode
• Tapping without compensating chuck
• Synchronous mode
The interface signals to the axis (DB31, ... DBB12 - DBB15) and from the axis
(DB31, ... DBB74 - DBB81) are invalid.
The interface signals to the spindle (DB31, ... DBB16 - DBB19) and from the spindle
(DB31, ... DBB82 - DBB91) are valid.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1679
Z1: NC/PLC interface signals
18.11 Spindles (S1)
DB31, ...
DBX60.0 Spindle/no axis
Signal state 0 or The machine axis is operated as an axis
edge change The interface signals to the axis (DB31, ... DBB12 - DBB15) and from the axis
1→0 (DB31, ... DBB74 - DBB81) are valid.
The interface signals to the spindle (DB31, ... DBB16 - DBB19) and from the spindle
(DB31, ... DBB82 - DBB91) are invalid.
Application If a machine axis operates alternatively as a spindle or rotary axis:
example(s)
• Turning machine: Spindle / C axis
• Milling machine: Spindle / rotary axis for rigid tapping
The currently active operating mode
can be identified from interface signal:
DB31, ... DBX60.0 (spindle/no axis).
DB31, ...
DBX82.0 - 82.2 Setpoint gear stage A to C
Edge evaluation: Yes Signal(s) updated: Cyclically
See DB31, ... DB82.3 (change gear).
Signal state 1 or The set gear stage is output in coded format:
edge change
0→1
VWJHDUVWDJH &%$
VWJHDUVWDJH
QGJHDUVWDJH
UGJHDUVWDJH
WKJHDUVWDJH
WKJHDUVWDJH
LQYDOLGYDOXH
LQYDOLGYDOXH
Signal irrelevant for ... Other spindle modes except oscillation mode
...
Corresponding to ... DB31, ... DBX82.3 (change gear)
DB31, ... DBX16.0 - DBX16.2 (actual gear stage A to C)
DB31, ... DBX16.3 (gear is changed)
Basic Functions
1680 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
Z1: NC/PLC interface signals
18.11 Spindles (S1)
DB31, ...
DBX82.3 Change gear
Edge evaluation: Yes Signal(s) updated: Cyclically
Specification of gear stage:
• Manual specification using M function M41 - M45 corresponding to gear stage 1 - 5
If set gear stage <> actual gear stage =>
DB31, ... DBX82.3 (change gear) = 1
DB31, ... DBX82.0 - DBX82.2 (set gear stage) = set gear stage
• Automatic gear stage selection depending on the progr. Spindle speed via M-function M40
at specified setpoint speed requires gear stage change =>
DB31, ... DBX82.3 (change gear) = 1
DB31, ... DBX82.0 - DBX82.2 (setpoint gear stage) = setpoint gear stage
Signal state 1 or New set gear stage was specified AND
edge change set gear stage <> actual gear stage
0→1
Special cases, Signal is not output if: Set gear stage == actual gear stage
errors, ......
Corresponding to ... DB31, ... DBX82.0 - DBX82.2 (setpoint gear stage A to C)
DB31, ... DBX16.0 - 16.2 (actual gear stage A to C)
DB31, ... DBX16.3 (gear is changed)
DB31, ...
DBX83.0 Speed limit exceeded
Edge evaluation: Yes Signal(s) updated: Cyclically
Signal state 1 or The actual speed exceeds the maximum spindle speed:
edge change MD35100 $MA_SPIND_VELO_ LIMIT
0→1 by more than the spindle speed tolerance:
MD35150 $MA_SPIND_DES_VELO_TOL
Corresponding to ... MD35150 $MA_SPIND_DES_VELO_TOL (spindle speed tolerance)
MD35100 $MA_SPIND_VELO_LIMIT (maximum spindle speed)
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1681
Z1: NC/PLC interface signals
18.11 Spindles (S1)
DB31, ...
DBX83.1 Setpoint speed limited (programmed speed too high)
Edge evaluation: Yes Signal(s) updated: Cyclically
Signal state 1 or The effective setpoint speed exceeds the actual max. limit value. The setpoint speed is limited to
edge change this limit.
0→1 Limit values:
• MD35130 $MA_GEAR_STEP_MAX_VELO_LIMIT (maximum speed of gear stage)
• MD35100 $MA_SPIND_VELO_LIMIT (maximum spindle speed)
• DB31, ... DBX3.6 (spindle speed limitation to MD35160 $MA_SPIND_EXTERN_VELO_LIMIT)
• G26 (upper spindle speed limitation)
• LIMS (speed limitation for the master spindle if G96/G961/G97 is active)
• VELOLIM: Programmed spindle speed limitation in the open-loop speed controlled mode
• Safety Integrated
Basic Functions
1682 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
Z1: NC/PLC interface signals
18.11 Spindles (S1)
DB31, ...
DBX83.2 Setpoint speed increased (programmed speed too low)
Edge evaluation: Yes Signal(s) updated: Cyclically
Signal state 1 or The effective setpoint speed is below the current min. limit value. The setpoint speed is limited to
edge change this limit.
0→1 Limit values:
• MD35120 $MA_GEAR_STEP_MIN_VELO (minimum speed for automatic gear stage selection
M40)
• MD35140 $MA_GEAR_STEP_MIN_VELO_LIMIT (minimum speed of the gear stage)
• G25 (lower spindle speed limitation)
Signal state 0 or The set speed of the spindle is outside the minimum limit value.
edge change
1→0
Application In the PLC user program, it can be identified via the interface signal that the spindle setpoint speed
example(s) has not been reached. Possible responses:
• Indicate that the status is permissible and enable path feed:
DB21, ... DBX6.0 = 0 (feed disable)
• Disable path feed or entire channel:
DB21, ... DBX6.0 = 1 (feed disable)
DB31, ... DBX83.5 (spindle in setpoint range) is processed
The interface signal indicates if the programmed set speed is unattainable. The feed can be
enabled nonetheless by means of the PLC user program.
The PLC user program can flag this state as permissible and enable the path feed, or it can disable
the path feed or the complete channel, IS:
DB31, ...
DBX83.5 Spindle in setpoint range
Edge evaluation: Yes Signal(s) updated: Cyclically
Signal state 1 or The actual speed of the spindle deviates from the set speed by less than the spindle speed
edge change tolerance:
0→1 MD35150 $MA_SPIND_DES_VELO_TOL.
Signal state 0 or The actual speed of the spindle deviates from the set speed by more than the spindle speed
edge change tolerance:
1→0 MD35150 $MA_SPIND_DES_VELO_TOL.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1683
Z1: NC/PLC interface signals
18.11 Spindles (S1)
DB31, ...
DBX83.5 Spindle in setpoint range
Application Feed enable in the channel only at the end of the acceleration phase of the spindle:
example(s) IF ( DB31, ... DBX83.5 (spindle in setpoint range) == 1 )
THEN ( DB21, ... DBX6.0 (feed disable) = 0 )
ELSE ( DB21, ... DBX6.0 (feed disable) = 1)
Note: With the feed disable, the positioning axes are also stopped.
Corresponding to ... MD35500 $MA_SPIND_ON_SPEED_AT_IPO_START
MD35500 $MA_SPIND_DES_VELO_TOL (spindle speed tolerance)
DB31, ...
DBX83.7 Actual direction of rotation clockwise
Edge evaluation: Yes Signal(s) updated: Cyclically
Interface signal is only valid if the spindle is rotating:
DB31, ... DBX61.4 (axis/spindle stationary) == 0
The actual direction of rotation is derived from the position measuring encoder.
Signal state 1 or Actual direction of rotation: Right
edge change
0→1
Signal state 0 or Actual direction of rotation: Left
edge change
1→0
Signal irrelevant for • Spindle is stationary: DB31, ... DBX61.4 (axis/spindle stationary) == 1
...
• Spindles without position measuring encoder
Corresponding to ... DB31, ... DBX61.4 (axis/spindle stationary)
DB31, ...
DBX84.3 Rigid tapping active
Edge evaluation: Yes Signal(s) updated: Cyclically
The spindle is internally switched to axis mode by the "Rigid tapping" function (G331/G332). This
results in a reaction to or updating of the spindle-specific interface signals:
• DB31, ... DBX2.2 (spindle reset)
• DB31, ... DBX16.4 - DBX16.5 (synchronize spindle)
• DB31, ... DBX17.6 (invert M3/M4)
• DB31, ... DBX83.5 (spindle in set range)
• DB31, ... DBX83.1 (programmable speed too high)
Basic Functions
1684 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
Z1: NC/PLC interface signals
18.11 Spindles (S1)
DB31, ...
DBX84.3 Rigid tapping active
Signal state 1 or • Rigid tapping active.
edge change
0→1
Application Notice!
example(s) If the following signals are set during rigid tapping, the thread will be destroyed:
• DB11, … DBX0.7 (mode group reset) = 1
• DB21, ... DBX7.7 (channel reset) = 1
• DB31, ... DBX2.1 (controller enable) = 0
• DB31, ... DBX4.3 (feed stop) = 1
DB31, ...
DBX84.5 Active spindle mode: Positioning mode
Edge evaluation: Yes Signal(s) updated: Cyclically
Signal state 1 or Positioning mode (SPOS or SPOSA) is active.
edge change
0→1
Corresponding to ... DB31, ... DBX84.7 (spindle mode control mode)
DB31, ... DBX84.6 (spindle mode oscillation mode)
DB31, ...
DBX84.6 Active spindle mode: Oscillation mode
Edge evaluation: Yes Signal(s) updated: Cyclically
Signal state 1 or Oscillation mode is active.
edge change Note: The spindle changes automatically to oscillation mode if there is a gear change.
0→1
Corresponding to ... DB31, ... DBX84.7 (spindle mode control mode)
DB31, ... DBX84.5 (spindle mode positioning mode)
DB31, ... DBX82.3 (change gear)
DB31, ...
DBX84.7 Active spindle mode: Control mode
Edge evaluation: Yes Signal(s) updated: Cyclically
Signal state 1 or The spindle is in control mode with the following functions:
edge change
• Spindle direction of rotation specification M3/M4 or spindle stop M5
0→1
• M41...M45, or automatic gear stage change M40
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1685
Z1: NC/PLC interface signals
18.11 Spindles (S1)
DB31, ...
DBX85.5 Spindle in position
Edge evaluation: Yes Signal(s) updated: Cyclically
The interface signal is processed exclusively with the function spindle positioning. This includes:
• SPOS, SPOSA and M19 in the part program
• SPOS and M19 in synchronized actions
• Spindle positioning, using FC18
• Spindle positioning via PLC interface (DB31, ... DBX30.4)
Signal state 1 or Requirement for the output of the DB31, ... DBX85.5 signal (spindle in position) is reaching the
edge change "Exact stop fine".
0→1 DB31, ... DBX60.7 (exact stop fine) = 1
Additionally, the last programmed spindle position must have been reached on the setpoint side.
If the spindle is already at the programmed position after a positioning, then signal DB31,...
DBX85.5 (spindle in position) is set.
Signal state 0 or When signal DB31, ... DBX60.7 is withdrawn (exact stop fine), then signal DB31, ... DBX85.5
edge change (spindle in position) is also always reset.
1→0
Application Spindle in position for the tool change
example(s) If the machine operator interrupts the tool change cycle (e.g. with NC stop, NC stop axis plus
spindle, mode group stop, etc.), then NC/PLC interface signal DB31, ... DBX85.5 can be used to
query that the position has been reached with which the spindle should enter the tool changer.
Corresponding to ... DB31, ... DBX60.7 (exact stop fine)
DB31, ...
DBB86 M function for spindle
Edge evaluation: Yes Signal(s) updated: Cyclically
Signal state 1 or From the NCK one of the following M functions: M3, M4, M5, M19, M70 is output to the PLC.
edge change The output is performed via: See "Corresponds to ..." below
0→1
Corresponding to ... DB31, ... DBB86 - DBB87 (M function for spindle), axis-specific
DB21, ... DBB58, DBB68 - DBB97 (M function for spindle), channel-specific
Basic Functions
1686 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
Z1: NC/PLC interface signals
18.11 Spindles (S1)
DB31, ...
DBB88 S function for spindle
Edge evaluation: Yes Signal(s) updated: Cyclically
Signal state 1 or An S function was output from the NCK to the PLC.
edge change The output occurs by means of: See "Corresponds to ..." below
0→1 The following S functions are output here:
• S.... as spindle speed in rpm (programmed value)
• S .... as constant cutting rate in m/min or ft/min
The following S functions are not output here:
• S.... as the programmed spindle speed limiting G25
• S.... as the programmed spindle speed limiting G26
• S .... as spindle speed in rpm if a spindle was not defined in the controller
• S.... as the dwell time in spindle revolutions
Corresponding to ... DB31, ... DBB88 - DBB91 (S function for spindle), axis-specific
DB21, ... DBB60, DBB98 - DBB115 (S function for spindle), channel-specific
DB31, ...
DBX132.0 Sensors available
Edge evaluation: No Signal(s) updated: Power-up
Signal state 1 The sensor required for spindles with SMI 24 is available.
Signal state 0 The sensor required for spindles with SMI 24 is not available.
Corresponding to ... DB31, … DBX132.1: Sensor S1 (clamped state) is available
DB31, … DBX132.4: Sensor S4 is available
DB31, … DBX132.5: Sensor S5 is available
DB31, ...
DBX132.1 Sensor S1 available (clamped state)
Edge evaluation: No Signal(s) updated: Power-up
Signal state 1 Sensor S1 is available.
Signal state 0 Sensor S1 is not available.
Corresponding to ... DB31, … DBW134 (status of the clamping system)
DB31, … DBW136 (analog value: clamped state)
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1687
Z1: NC/PLC interface signals
18.11 Spindles (S1)
DB31, ...
DBX132.4 Sensor S4 available (piston end position)
Edge evaluation: No Signal(s) updated: Power-up
Signal state 1 Sensor S4 is available.
Signal state 0 Sensor S4 is not available.
Corresponding to ... DB31, … DBX138.4 (Sensor S4: piston end position)
DB31, ...
DBX132.5 Sensor S5 available (angular position of the motor shaft)
Edge evaluation: No Signal(s) updated: Power-up
Signal state 1 Sensor S5 is available.
Signal state 0 Sensor S5 is not available.
Corresponding to ... DB31, … DBX138.5 (Sensor S5: angular position of the motor shaft)
DB31, ...
DBX133.2 State value is generated, speed limitation p5043 is active
Edge evaluation: No Signal(s) updated: Power-up
Signal state 1 The state value is generated and the speed limitations from drive parameter p5043 are active.
Signal state 0 The state value is not generated and the speed limitations from drive parameter p5043 are not
active.
Note When generating the state value, the analog voltage values of sensor S1 are transformed into
discrete state values of drive parameter r5001.
Corresponding to ... DB31, … DBX134 (clamped state)
Drive parameters: r5001
System variable: $VA_MOT_CLAMPING_STATE[<axis>]
OPI variables: vaMotClampingState
DB31, ...
DBW134 Status of the clamping system (sensor S1)
Edge evaluation: No Signal(s) updated: Cyclically
Depending on the position of the clamping device, sensor S1 supplies an analog voltage value. To
simplify the evaluation of the clamped state, the analog voltage of sensor module SMI 24 is
converted into a state value.
The state values correspond to certain voltage ranges. The voltage ranges can be set via: Drive
parameter p5041[0...5].
State value Clamped state
0 Sensor S1 not available or state values inactive
1 State initialization running
2 Released with signal (error state)
3 Released
4 Clamping with tool
Basic Functions
1688 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
Z1: NC/PLC interface signals
18.11 Spindles (S1)
DB31, ...
DBW134 Status of the clamping system (sensor S1)
5 Releasing with tool
6 Releasing without tool
7 Clamped with tool AND S4 == 0
8 Clamped with tool AND S4 == 1
9 Clamping without tool
10 Clamped without tool
11 Clamped with signal (error state)
Corresponding to ... DB31, … DBW136 (analog value: clamped state)
Drive parameters: p5041[0...5], p5043[0...6]
DB31, ...
DBW136 Analog measured value: Of the clamping system
Edge evaluation: No Signal(s) updated: Cyclically
Sensor S1 supplies an analog voltage value: 0 - 10 V. The analog value of the clamped state is
mapped to: 0 - 10000 increments, resolution 1 mV
Note
SIMATIC S7 input module: 0 - 27648 increments, resolution 0.36 mV
Adaptation factor if you change to a spindle with SMI 24: 2.7648
Corresponding to ... DB31, … DBW134 (clamped state)
Drive parameters: p5041[0...5], p5043[0...6]
DB31, ...
DBX138.4 Sensor S4, piston end position
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 The piston is in position, i.e. the piston is free to move
Signal state 0 The piston is not in position
Corresponding to ... DB31, … DBX132.4 (Sensor S4 available)
DB31, ...
DBX138.5 Sensor S5, angular position of the motor shaft
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 The motor shaft is in position (requirement: The spindle is stationary)
Signal state 0 The motor shaft is not aligned
Corresponding to ... DB31, … DBX132.5 (sensor S5 available)
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1689
Z1: NC/PLC interface signals
18.12 Feeds (V1)
DB21, ...
DBX0.6 Activate dry run feed
Edge evaluation: Yes Signal(s) updated: Cyclically
Signal state 1 or The dry run feedrate defined using the setting data:
edge change SD42100 $SC_DRY_RUN_FEED
0→1 is used instead of the programmed feed (for G01, G02, G03) if the dry run feedrate is greater than
that programmed.
The dry run feedrate is effective after the reset state.
This interface signal is evaluated at NC start when the channel is in the "reset" state.
The dry run feed can be activated from the PLC or operator panel.
When selected from the operator panel front, the PLC interface signal:
DB21, ... DBX24.6 (dry run feed selected)
is set and transferred from the PLC basic program to the interface signal:
DB21, ... DBX0.6 (activate dry run feed).
When selected using the PLC, the IS "activate dry run feed" should be set from the PLC user
program.
Signal state 0 or The programmed feed is used.
edge change Effective after the reset state.
1→0
Application Testing a workpiece program with an increased feedrate.
example(s)
Special cases, If the signal changes to "0" within a G33 block, the programmed feed is not activated until the end of
errors, ...... the block is reached, since an NC stop was not triggered.
Corresponding to ... DB21, ... DBX24.6 (dry run feedrate selected)
SD42100 $SC_DRY_RUN_FEED (dry run feedrate)
Basic Functions
1690 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
Z1: NC/PLC interface signals
18.12 Feeds (V1)
DB21, ...
DBB4 Feedrate override
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or The feedrate override can be defined via the PLC in binary or Gray coding.
edge change With binary coding, the feed value is interpreted in %.
0→1
0% to 200% feed changes are possible, in accordance with the binary value in the byte.
The following permanent assignment applies:
&RGH )HHGUDWHRYHUULGHIDFWRU
ฬ
ฬ
ฬ
ฬ
ฬ
7DEOH*UD\FRGLQJIRUIHHGUDWHRYHUULGH
The factors listed in the table for the feedrate override are stored in the machine data:
MD12030 $MN_OVR_FACTOR_FEEDRATE [n].
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1691
Z1: NC/PLC interface signals
18.12 Feeds (V1)
DB21, ...
DBB5 Rapid traverse override
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or The rapid traverse override can be entered via the PLC in either the binary or Gray code.
edge change For binary coding, the rapid traverse override is interpreted as a %.
0→1 0% to 100% feed changes are possible, in accordance with the binary value in the byte.
The following permanent assignment applies:
&RGH 5DSLGWUDYHUVHRYHUULGHIDFWRU
ฬ
ฬ
ฬ
ฬ
ฬ
7DEOH*UD\FRGLQJIRUUDSLGWUDYHUVHRYHUULGH
The factors listed in the table for the rapid traverse override are stored in the machine data:
MD12050 $MN_OVR_FACTOR_RAPID_TRA[n].
Basic Functions
1692 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
Z1: NC/PLC interface signals
18.12 Feeds (V1)
DB21, ...
DBX6.0 Feed disable
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or The signal is active in one channel in all operating modes.
edge change The signal disables the feed for all of the axes (geometry and synchronized) that interpolate relative
0→1 to one another as long as G33 (thread) is not active.
All axes are brought to a standstill but still maintaining the path contour. When the feed disable is
canceled (0 signal), the interrupted part program is continued.
The signal triggers a feed disable for all positioning axes. This signal brings all traversing axes to a
standstill with controlled braking (ramp stop). No alarm is output.
The position control is retained, i.e. the following error is eliminated.
If a travel request is issued for an axis with an active "Feed disable", then this is kept. The queued
travel request is executed immediately when the "Feed disable" is canceled.
If the axis is interpolating in relation to others, this also applies to these axes.
Signal state 0 or The feedrate is enabled for all axes of the channel.
edge change If a travel request ("travel command") exists for an axis or group of axes when the "feed disable" is
1→0 canceled, then this is executed immediately.
Application Stopping machining by selecting FEED OFF on the machine control panel.
example(s)
Special cases, The feed disable is inactive when G33 is active.
errors, ......
DB21, ...
DBX6.6 Rapid traverse override active
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or The rapid traverse override between 0 and a maximum of 100% entered in the PLC interface is
edge change channel-specific. The override factor is defined using the machine data:
0→1 MD12040 $MN_OVR_RAPID_IS_GRAY_CODE (rapid traverse override switch gray coded)
and
MD12050 $MN_OVR_FACTOR_RAPID_TRA [n] (evaluation of the rapid traverse override switch).
Signal state 0 or The rapid traverse override entered at the PLC interface is ignored.
edge change When the rapid traverse override is inactive, the NC always uses 100% as the internal override
1→0 factor.
Exceptions are the zero setting for a binary interface and the 1st switch setting for a Gray-coded
interface. In these cases, the override factors entered at the PLC interface are used. With a binary
interface, the override factor = 0. With a gray-coded interface, the value entered in the machine
data for the 1st switch setting is output as the override value.
Application The override value is generally selected using the rapid traverse override switch on the machine
example(s) control panel.
Using the interface signal:
DB21, ... DBX6.6 (rapid traverse override active),
the rapid traverse override switch can be enabled from the PLC user program while commissioning
a new NC program, e.g. using the key-operated switch.
Special cases, The rapid traverse override is inactive when G33, G63, G331, G332 are active.
errors, ......
Corresponding to ... DB21, ... DBB5 (rapid traverse override)
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1693
Z1: NC/PLC interface signals
18.12 Feeds (V1)
DB21, ...
DBX6.7 Feedrate override active
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or The feedrate override between 0 and a maximum of 200% entered at the PLC interface is active for
edge change the path feedrate and therefore automatically for the related axes.
0→1 In JOG mode, the feedrate override acts directly on the axes.
The override factor is entered using the machine data:
MD12020 $MN_OVR_FEED_IS_GRAY_CODE (path feedrate override factor, gray-coded)
and
MD12030 $MN_OVR_FACTOR_FEEDRATE [n] (evaluation of the path feedrate override switch)
Signal state 0 or The feedrate override entered at the PLC interface is ignored.
edge change When the feedrate override is inactive, the NC always uses 100% as the internal override factor.
1→0
Exceptions are the zero setting for a binary interface and the 1st switch setting for a Gray-coded
interface. In these cases, the override factors entered in the PLC interface are used. With a binary
interface, the override factor = 0. With a gray-coded interface, the value entered in the machine
data for the 1st switch setting is output as the override value.
Application The override value is generally selected using the feedrate override switch on the machine control
example(s) panel.
Using the interface signal:
DB21, ... DBX6.7 (feedrate override active),
the feedrate override switch can be enabled from the PLC user program while commissioning a
new NC program, e.g. using the key-operated switch.
Special cases, The feedrate override is inactive when G33, G63, G331, G332 are active.
errors, ......
Corresponding to ... DB21, ... DBB4 (feedrate override)
DB21, ...
DBX12.3, DBX16.3, Feed stop (Geometry axis 1 to 3)
DBX20.3
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or The signal is only active in JOG mode.
edge change The signal stops the feed of the geometry axis. This signal brings all traversing axes to a standstill
0→1 with controlled braking (ramp stop). No alarm is output.
The position control is retained, i.e. the following error is eliminated.
If, for a geometry axis, a travel request is issued with an active "feed stop", the request is kept. This
queued travel request is executed immediately after the "feed stop" is canceled.
Signal state 0 or The feed is enabled for the geometry axis.
edge change If, for the geometry axis, a travel request ("travel command") is active when the "feed stop" is
1→0 canceled, this is executed immediately.
Basic Functions
1694 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
Z1: NC/PLC interface signals
18.12 Feeds (V1)
DB21, ...
DBX24.6 Dry run feedrate selected
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or Dry run feedrate is selected.
edge change Instead of the programmed feedrate, the dry run feedrate entered in setting data:
0→1 SD42100 $SC_DRY_RUN_FEED
is active.
When activated from the operator panel, the dry run feed signal is automatically entered in the PLC
interface and transmitted by the PLC basic program to the PLC interface signal:
DB21, ... DBX0.6 (active dry run feed).
DB21, ...
DBX25.3 Feedrate override selected for rapid traverse
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or The feedrate override switch should also be active as rapid traverse override switch.
edge change Override values above 100% are limited to the maximum value for 100% rapid traverse override.
0→1
The interface signal:
DB21, ... DBX25.3 (feedrate override for rapid traverse selected)
is automatically entered into the PLC interface from the operator panel
and transferred from the PLC basic program to the PLC interface signal:
DB21, ... DBX6.6 (rapid traverse override active).
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1695
Z1: NC/PLC interface signals
18.12 Feeds (V1)
DB 21, ...
DBX29.0 - DBX29.3 Activate fixed feedrate 1 - 4 for path/geometry axes
Edge evaluation: No Signal(s) updated: Cyclically
Description These signals are used to select/de-select the function "fixed feed" and define which fixed feed
should be effective for path/geometry axes.
)L[HGIHHGLVGHVHOHFWHG
)L[HGIHHGLVVHOHFWHG
)L[HGIHHGLVVHOHFWHG
)L[HGIHHGLVVHOHFWHG
)L[HGIHHGLVVHOHFWHG
Basic Functions
1696 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
Z1: NC/PLC interface signals
18.12 Feeds (V1)
DB31, ...
DBB0 Feedrate override (axis-specific)
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or The axis-specific feedrate override can be defined via the PLC in binary or Gray coding. With binary coding, the
edge change feed value is interpreted in %. 0% to 200% feed changes are possible, in accordance with the binary value in
0→1 the byte.
The following permanent assignment applies:
$[LVVSHFLILFIHHGUDWH
&RGH RYHUULGHIDFWRU
ฬ
ฬ
ฬ
ฬ
ฬ
ฬ
7DEOH*UD\FRGLQJIRUD[LVVSHFLILFIHHGUDWHRYHUULGH
The factors listed in the table for the axial feedrate override
are stored in the NC-specific machine data:
MD12010 $MN_OVR_FACTOR_AX_SPEED [n]
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1697
Z1: NC/PLC interface signals
18.12 Feeds (V1)
DB31, ...
DBB0 Feedrate override (axis-specific)
Corresponding to ... DB31, ... DBX1.7 (override effective)
MD12010 $MN_OVR_FACTOR_AX_SPEED [n] (evaluation of the axis feedrate override switch)
MD12100 $MN_OVR_FACTOR_LIMIT_BIN (limit for binary coded override switch)
DB31, ...
DBX1.7 Override active
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or Feedrate override active:
edge change The axis-specific feedrate override between 0 and a maximum of 200% entered in the PLC
0→1 interface is used.
The override factor is defined using the machine data:
MD12000 $MN_OVR_AX_IS_GRAY_CODE (axis feedrate override switch gray coded)
and
MD12010 $MN_OVR_FACTOR_AX_SPEED [n] (evaluation of the axis feedrate override switch).
Spindle override active:
The spindle override - input at the PLC interface - of 0 to a maximum of 200% is taken into account.
The override factor is entered using the machine data:
MD12060 $MN_OVR_SPIND_IS_GRAY_CODE (spindle override switch, Gray coded)
and
MD12070 $MN_OVR_FACTOR_SPIND_SPEED [n] (evaluation of the spindle override switch).
Signal state 0 or The existing axis-specific feedrate override or spindle override is not active.
edge change If the feedrate override is inactive, "100%" is used as the internal override factor.
1→0
Exceptions are the zero setting for a binary interface and the 1st switch setting for a Gray-coded
interface. In these cases, the override factors entered at the PLC interface are used.
With a binary interface, the override factor = 0. With a gray-coded interface, the value entered in the
machine data for the 1st switch setting is output as the override value.
Application The override value is generally specified using the axis-specific feedrate override switch or the
example(s) spindle override switch on the machine control panel.
The "feedrate override active" signal can be used to enable the feedrate override switch from the
PLC user program, e.g. using the key-operated switch when commissioning a new NC program.
Special cases, The spindle override is always accepted with 100% in the spindle "Oscillation mode".
errors, ...... The spindle override acts on the programmed values before the limits (e.g. G26, LIMS...) intervene.
The feedrate override is ineffective for:
• Active G33
• Active G63 (the override is defined in the NC at 100%)
• Active G331, G332 (the override is defined in the NC at 100%)
The spindle override is inactive for:
• Active G63 (the override is defined in the NC at 100%)
Corresponding to ... DB31, ... DBB0 (feed/spindle override)
Basic Functions
1698 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
Z1: NC/PLC interface signals
18.12 Feeds (V1)
DB31, ...
DBX3.2 - DBX3.5 Activate fixed feedrate 1 - 4 for machine axes
Edge evaluation: No Signal(s) updated: Cyclically
Description These signals are used to select/de-select the function "fixed feed" and define which fixed feed
should be effective for machine axes.
)L[HGIHHGLVGHVHOHFWHG
)L[HGIHHGLVVHOHFWHG
)L[HGIHHGLVVHOHFWHG
)L[HGIHHGLVVHOHFWHG
)L[HGIHHGLVVHOHFWHG
DB31, ...
DBX4.3 Feed stop / spindle stop (axis-specific)
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or The signal is active in all modes.
edge change Feed stop:
0→1
The signal triggers a "feed stop" for the axis. This signal brings all traversing axes to a standstill
with controlled braking (ramp stop). No alarm is output.
The signal triggers a "feed stop" for all path axes interpolating relative to each other when the "feed
stop" is activated for any one of these path axes. In this case, all the axes are brought to a stop with
adherence to the path contour. When the "feed stop" signal is canceled, execution of the interrupted
part program is resumed.
The position control is retained, i.e. the following error is eliminated.
If a travel request is issued for an axis with an active "feed stop", this is kept. This queued travel
request is executed immediately after the "feed stop" is canceled.
If the axis is interpolating in relation to others, this also applies to these axes.
Spindle stop:
The spindle is brought to a standstill along the acceleration characteristic.
In the positioning mode, when the "Spindle stop" signal is set positioning is interrupted. The above
response applies with respect to individual axes.
Signal state 0 or Feed stop:
edge change The feedrate is enabled for the axis.
1→0
If a travel request ("travel command") is active when the "feed stop" is canceled, this is executed
immediately.
Spindle stop:
The speed is enabled for the spindle.
The spindle is accelerated to the previous speed setpoint with the acceleration characteristic or, in
positioning mode, positioning is resumed.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1699
Z1: NC/PLC interface signals
18.12 Feeds (V1)
DB31, ...
DBX4.3 Feed stop / spindle stop (axis-specific)
Application Feed stop:
example(s) The traversing motion of the machine axes is not started with "feed stop", if, for example, certain
operating states exist at the machine that do not permit the axes to be moved (e.g. a door is not
closed).
Spindle stop:
In order to change a tool
To enter help functions (M, S, H, T, D and F functions) during setup.
Special cases, Spindle stop is inactive when G331, G332 are active.
errors, ......
DB31, ...
DBB19 Spindle override
Edge evaluation: No Signal(s) updated: Cyclically
Signal state 1 or The spindle override can be defined via the PLC in binary or Gray coding.
edge change The override value determines the percentage of the programmed speed setpoint that is issued to
0→1 the spindle.
With binary coding, the override is interpreted in %. 0% to 200% feed changes are possible, in
accordance with the binary value in the byte.
The following permanent assignment applies:
&RGH 6SLQGOHRYHUULGHIDFWRU
ฬ
ฬ
ฬ
ฬ
ฬ
ฬ
Basic Functions
1700 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
Z1: NC/PLC interface signals
18.12 Feeds (V1)
DB31, ...
DBB19 Spindle override
Signal state 1 or In gray coding, the following codes are assigned to the individual switch settings:
edge change
0→1
7DEOH*UD\FRGLQJIRUVSLQGOHRYHUULGH
The factors listed in the table for spindle override are stored in the machine data:
MD12070 $MN_OVR_FACTOR_SPIND_SPEED [n]
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1701
Z1: NC/PLC interface signals
18.12 Feeds (V1)
DB31, ...
DBX62.2 Revolutional feed rate active
Edge evaluation: no Signal(s) updated: cyclic
Signal state 1 or For programming of G95 (revolutional feed rate) in JOG mode or automatic mode.
edge change
0→1
Corresponding to .... SD41100 $SN_JOG_REV_IS_ACTIVE (revolutional feed rate for JOG active)
SD42600 $SC_JOG_FEED_PER_REV_SOURCE
(in the JOG mode revolutional feed rate for geometry axes, on which the frame with rotation acts)
SD43300 $SA_ASSIGN_FEED_PER_REV_SOURCE
(revolutional feed rate for position axes/spindles)
MD32040 $MA_JOG_REV_VELO_RAPID (revolutional feed rate for JOG with rapid traverse
override)
MD32050 $MA_JOG_REV_VELO (revolutional feed rate for JOG mode)
DB31, ...
DBB78 - DBB81 F function for positioning axis
Edge evaluation: no Signal(s) updated: cyclic
Signal state 1 or The F value of a positioning axis programmed in the current block is entered in the axisspecific PLC
edge change interface signal.
0→1 The assignment between the DB number and machine axis number is established using the axis
name.
The value is retained until it is overwritten by another.
Format: Binary number in real format.
Application Modification of the programmed F value by the PLC, e.g. by overwriting the selected axisspecific
example(s) feed rate override.
Corresponding to .... MD22240 $MC_AUXFU_F_SYNC_TYPE (output time F functions)
Basic Functions
1702 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
Appendix A
A.1 List of abbreviations
A
O Output
ADI4 (Analog drive interface for 4 axes)
AC Adaptive Control
ALM Active Line Module
ARM Rotating induction motor
AS PLC
ASCII American Standard Code for Information Interchange: American coding standard for
the exchange of information
ASIC Application-Specific Integrated Circuit: User switching circuit
ASUB Asynchronous subprogram
AUXFU Auxiliary Function: Auxiliary function
STL Statement List
UP User Program
B
BA Mode
BAG Mode group
BCD Binary Coded Decimals: Decimal numbers encoded in binary code
BERO Proximity limit switch with feedback oscillator
BI Binector Input
BICO Binector Connector
BIN BINary files: Binary files
BIOS Basic Input Output System
BCS Basic Coordinate System
BO Binector Output
OPI Operator Panel Interface
C
CAD Computer-Aided Design
CAM Computer-Aided Manufacturing
CC Compile Cycle: Compile cycles
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1703
Appendix
A.1 List of abbreviations
C
CI Connector Input
CF Card Compact Flash Card
CNC Computerized Numerical Control: Computer-Supported Numerical Control
CO Connector Output
CoL Certificate of License
COM Communication
CPA Compiler Projecting Data: Configuring data of the compiler
CRT Cathode Ray Tube picture tube
CSB Central Service Board: PLC module
CU Control Unit
CP Communication Processor
CPU Central Processing Unit: Central processing unit
CR Carriage Return
CTS Clear To Send: Ready to send signal for serial data interfaces
CUTCOM Cutter radius Compensation: Tool radius compensation
D
DAC Digital-to-Analog Converter
DB Data Block (PLC)
DBB Data Block Byte (PLC)
DBD Data Block Double word (PLC)
DBW Data Block Word (PLC)
DBX Data block bit (PLC)
DDE Dynamic Data Exchange
DIN Deutsche Industrie Norm
DIO Data Input/Output: Data transfer display
DIR Directory: Directory
DLL Dynamic Link Library
DO Drive Object
DPM Dual Port Memory
DPR Dual Port RAM
DRAM Dynamic memory (non-buffered)
DRF Differential Resolver Function: Differential revolver function (handwheel)
DRIVE-CLiQ Drive Component Link with IQ
DRY Dry Run: Dry run feedrate
DSB Decoding Single Block: Decoding single block
DSC Dynamic Servo Control / Dynamic Stiffness Control
DW Data Word
DWORD Double Word (currently 32 bits)
Basic Functions
1704 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
Appendix
A.1 List of abbreviations
I
I Input
I/O Input/Output
ENC Encoder: Actual value encoder
EFP Compact I/O module (PLC I/O module)
ESD Electrostatic Sensitive Devices
EMC ElectroMagnetic Compatibility
EN European standard
EnDat Encoder interface
EPROM Erasable Programmable Read Only Memory: Erasable, electrically programmable
read-only memory
ePS Network Services Services for Internet-based remote machine maintenance
EQN Designation for an absolute encoder with 2048 sine signals per revolution
ES Engineering System
ESR Extended Stop and Retract
ETC ETC key ">"; softkey bar extension in the same menu
F
FB Function Block (PLC)
FC Function Call: Function Block (PLC)
FEPROM Flash EPROM: Read and write memory
FIFO First In First Out: Memory that works without address specification and whose data is
read in the same order in which they was stored
FIPO Fine interpolator
FPU Floating Point Unit: Floating Point Unit
CRC Cutter Radius Compensation
FST Feed Stop: Feedrate stop
FBD Function Block Diagram (PLC programming method)
FW Firmware
G
GC Global Control (PROFIBUS: Broadcast telegram)
GEO Geometry, e.g. geometry axis
GIA Gear Interpolation dAta: Gear interpolation data
GND Signal Ground
GP Basic program (PLC)
GS Gear Stage
GSD Device master file for describing a PROFIBUS slave
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1705
Appendix
A.1 List of abbreviations
G
GSDML Generic Station Description Markup Language: XML-based description language for
creating a GSD file
GUD Global User Data: Global user data
H
HEX Abbreviation for hexadecimal number
AuxF Auxiliary Function
HLA Hydraulic linear drive
HMI Human Machine Interface: SINUMERIK user interface
MSD Main Spindle Drive
HW Hardware
I
IBN Commissioning
ICA Interpolatory compensation
IM Interface Module Interconnection module
IMR Interface Module Receive: Interface module for receiving data
IMS Interface Module Send: Interface module for sending data
INC Increment: Increment
INI Initializing Data: Initializing data
IPO Interpolator
ISA Industry Standard Architecture
ISO International Standardization Organization
J
JOG Jogging: Setup mode
K
KV Gain factor of control loop
Kp Proportional gain
KÜ Transformation ratio
LAD Ladder Diagram (PLC programming method)
Basic Functions
1706 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
Appendix
A.1 List of abbreviations
L
LAI Logic Machine Axis Image: Logical machine axes image
LAN Local Area Network
LCD Liquid Crystal Display: Liquid crystal display
LED Light Emitting Diode: Light-emitting diode
LF Line Feed
PMS Position Measuring System
LR Position controller
LSB Least Significant Bit Least significant bit
LUD Local User Data: User data (local)
M
MAC Media Access Control
MAIN Main program: Main program (OB1, PLC)
MB Megabyte
MCI Motion Control Interface
MCIS Motion Control Information System
MCP Machine Control Panel: Machine control panel
MD Machine Data
MDA Manual Data Automatic: Manual input
MSGW Message Word
MCS Machine Coordinate System
MLFB Machine-readable product code
MM Motor Module
MPF Main Program File: Main program (NC)
MCP Machine Control Panel
N
NC Numerical Control: Numerical Control
NCK Numerical Control Kernel: NC kernel with block preparation, traversing range, etc.
NCU Numerical Control Unit: NCK hardware unit
NRK Name for the operating system of the NCK
IS Interface Signal
NURBS Non-Uniform Rational B-Spline
ZO Zero Offset
NX Numerical Extension: Axis expansion board
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1707
Appendix
A.1 List of abbreviations
O
OB Organization block in the PLC
OEM Original Equipment Manufacturer
OP Operator Panel: Operating equipment
OPI Operator Panel Interface: Interface for connection to the operator panel
OPT Options: Options
OLP Optical Link Plug: Fiber optic bus connector
OSI Open Systems Interconnection: Standard for computer communications
P
PIQ Process Image Output
PII Process Image Input
PC Personal Computer
PCIN Name of the SW for data exchange with the controller
PCMCIA Personal Computer Memory Card International Association:
Plug-in memory card standardization
PCU PC Unit: PC box (computer unit)
PG Programming device
PKE Parameter identification: Part of a PIV
PIV Parameter identification: Value (parameterizing part of a PPO)
PLC Programmable Logic Control: Adaptation control
PN PROFINET
PNO PROFIBUS user organization
PO POWER ON
POU Program Organization Unit
POS Position/positioning
POSMO A Positioning Motor Actuator: Positioning motor
POSMO CA Positioning Motor Compact AC: Complete drive unit with integrated power and
control module as well as positioning unit and program memory; AC infeed
POSMO CD Positioning Motor Compact DC: Like CA but with DC infeed
POSMO SI Positioning Motor Servo Integrated: Positioning motor, DC infeed
PPO Parameter Process data Object: Cyclic data telegram for PROFIBUS DP
transmission and "Variable speed drives" profile
PPU Panel Processing Unit (central hardware for a panel-based CNC, e.g SINUMERIK
828D)
PROFIBUS Process Field Bus: Serial data bus
PRT Program Test
PSW Program control word
PTP Point-To-Point Point-To-Point
PUD Program global User Data: Program-global user variables
PZD Process data: Process data part of a PPO
Basic Functions
1708 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
Appendix
A.1 List of abbreviations
Q
QEC Quadrant Error Compensation
R
RAM Random Access Memory: Read/write memory
REF REFerence point approach function
REPOS REPOSition function
RISC Reduced Instruction Set Computer: Type of processor with small instruction set and
ability to process instructions at high speed
ROV Rapid Override: Input correction
RP R Parameter, arithmetic parameter, predefined user variable
RPA R Parameter Active: Memory area on the NCK for R parameter numbers
RPY Roll Pitch Yaw: Rotation type of a coordinate system
RTLI Rapid Traverse Linear Interpolation: Linear interpolation during rapid traverse motion
RTS Request To Send: Control signal of serial data interfaces
RTCP Real Time Control Protocol
S
SA Synchronized Action
SBC Safe Brake Control: Safe Brake Control
SBL Single Block: Single block
SBR Subroutine: Subroutine (PLC)
SD Setting Data
SDB System Data Block
SEA Setting Data Active: Identifier (file type) for setting data
SERUPRO SEarch RUn by PROgram test: Search run by program test
SFB System Function Block
SFC System Function Call
SGE Safety-related input
SGA Safety-related output
SH Safe standstill
SIM Single Inline Module
SK Softkey
SKP Skip: Function for skipping a part program block
SLM Synchronous Linear Motor
SM Stepper Motor
SMC Sensor Module Cabinet Mounted
SME Sensor Module Externally Mounted
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1709
Appendix
A.1 List of abbreviations
S
SMI Sensor Module Integrated
SPF Sub Routine File: Subprogram (NC)
PLC Programmable Logic Controller
SRAM Static RAM (non-volatile)
TNRC Tool Nose Radius Compensation
SRM Synchronous Rotary Motor
LEC Leadscrew Error Compensation
SSI Serial Synchronous Interface: Synchronous serial interface
SSL Block search
STW Control word
GWPS Grinding Wheel Peripheral Speed
SW Software
SYF System Files: System files
SYNACT SYNchronized ACTion: Synchronized Action
T
TB Terminal Board (SINAMICS)
TCP Tool Center Point: Tool tip
TCP/IP Transport Control Protocol / Internet Protocol
TCU Thin Client Unit
TEA Testing Data Active: Identifier for machine data
TIA Totally Integrated Automation
TM Terminal Module (SINAMICS)
TO Tool Offset: Tool offset
TOA Tool Offset Active: Identifier (file type) for tool offsets
TRANSMIT Transform Milling Into Turning: Coordination transformation for milling operations on
a lathe
TTL Transistor-Transistor Logic (interface type)
TZ Technology cycle
U
UFR User Frame: Zero Offset
SR Subprogram
USB Universal Serial Bus
UPS Uninterruptible Power Supply
Basic Functions
1710 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
Appendix
A.1 List of abbreviations
V
VDI Internal communication interface between NCK and PLC
VDI Verein Deutscher Ingenieure [Association of German Engineers]
VDE Verband Deutscher Elektrotechniker [Association of German Electrical Engineers]
VI Voltage Input
VO Voltage Output
FDD Feed Drive
W
SAR Smooth Approach and Retraction
WCS Workpiece Coordinate System
T Tool
TLC Tool Length Compensation
WOP Workshop-Oriented Programming
WPD Workpiece Directory: Workpiece directory
TRC Tool Radius Compensation
T Tool
TO Tool Offset
TM Tool Management
TC Tool change
X
XML Extensible Markup Language
Z
ZOA Zero Offset Active: Identifier for zero offsets
ZSW Status word (of drive)
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1711
Appendix
A.2 Documentation overview
0DQXIDFWXUHUVHUYLFHGRFXPHQWDWLRQ
6,180(5,. 6,180(5,. 6,1$0,&6 6,180(5,. 6,180(5,.
'VO 'VO 6 'VO '
'
6,1$0,&6 6,1$0,&6
6 6
Basic Functions
1712 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
Glossary
Absolute dimensions
A destination for an axis motion is defined by a dimension that refers to the origin of the
currently active coordinate system. See → Incremental dimension
Address
An address is the identifier for a certain operand or operand range, e.g. input, output, etc.
Alarms
All → messages and alarms are displayed on the operator panel in plain text with date and
time and the corresponding symbol for the cancel criterion. Alarms and messages are
displayed separately.
1. Alarms and messages in the part program:
Alarms and messages can be displayed in plain text directly from the part program.
2. Alarms and messages from the PLC:
Alarms and messages for the machine can be displayed in plain text from the PLC
program. No additional function block packages are required for this purpose.
Archiving
Reading out of files and/or directories on an external memory device.
Asynchronous subprogram
Part program that can be started asynchronously to (independently of) the current program
status using an interrupt signal (e.g. "Rapid NC input" signal).
Automatic
Operating mode of the controller (block sequence operation according to DIN): Operating
mode for NC systems in which a → subprogram is selected and executed continuously.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1713
Glossary
Auxiliary functions
Auxiliary functions enable → part programs to transfer → parameters to the → PLC, which
then trigger reactions defined by the machine manufacturer.
Axes
In accordance with their functional scope, the CNC axes are subdivided into:
● Axes: Interpolating path axes
● Auxiliary axes: Non-interpolating feed and positioning axes with an axis-specific feedrate.
Auxiliary axes are not involved in actual machining, e.g. tool feeder, tool magazine.
Axis address
See → Axis name
Axis name
To ensure clear identification, all channel and → machine axes of the control system must be
designated with unique names in the channel and control system. The → geometry axes are
called X, Y, Z. The rotary axes rotating around the geometry axes → are called A, B, C.
Backlash compensation
Compensation for a mechanical machine backlash, e.g. backlash on reversal for ball screws.
Backlash compensation can be entered separately for each axis.
Backup battery
The backup battery ensures that the → user program in the → CPU is stored so that it is safe
from power failure and so that specified data areas and bit memory, timers and counters are
stored retentively.
Basic axis
Axis whose setpoint or actual value position forms the basis of the calculation of a
compensation value.
Basic Functions
1714 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
Glossary
Baud rate
Rate of data transfer (bits/s).
Blank
Workpiece as it is before it is machined.
Block
"Block" is the term given to any files required for creating and processing programs.
Block search
For debugging purposes or following a program abort, the "Block search" function can be
used to select any location in the part program at which the program is to be started or
resumed.
Booting
Loading the system program after power ON.
C axis
Axis around which the tool spindle describes a controlled rotational and positioning motion.
C spline
The C spline is the most well-known and widely used spline. The transitions at the
interpolation points are continuous, both tangentially and in terms of curvature. 3rd order
polynomials are used.
Channel
A channel is characterized by the fact that it can process a → part program independently of
other channels. A channel exclusively controls the axes and spindles assigned to it. Part
program runs of different channels can be coordinated through → synchronization.
Circular interpolation
The → tool moves on a circle between specified points on the contour at a given feedrate,
and the workpiece is thereby machined.
CNC
See → NC
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1715
Glossary
COM
Component of the NC for the implementation and coordination of communication.
Compensation axis
Axis with a setpoint or actual value modified by the compensation value
Compensation table
Table containing interpolation points. It provides the compensation values of the
compensation axis for selected positions on the basic axis.
Compensation value
Difference between the axis position measured by the encoder and the desired, programmed
axis position.
Continuous-path mode
The objective of continuous-path mode is to avoid substantial deceleration of the → path
axes at the part program block boundaries and to change to the next block at as close to the
same path velocity as possible.
Contour
Contour of the → workpiece
Contour monitoring
The following error is monitored within a definable tolerance band as a measure of contour
accuracy. An unacceptably high following error can cause the drive to become overloaded,
for example. In such cases, an alarm is output and the axes are stopped.
Coordinate system
See → Machine coordinate system, → Workpiece coordinate system
CPU
Central processing unit, see → PLC
Curvature
The curvature k of a contour is the inverse of radius r of the nestling circle in a contour point
(k = 1/r).
Basic Functions
1716 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
Glossary
Cycles
Protected subprograms for execution of repetitive machining operations on the → workpiece.
Data block
1. Data unit of the → PLC that → HIGHSTEP programs can access.
2. Data unit of the → NC: Data modules contain data definitions for global user data. This
data can be initialized directly when it is defined.
Data word
Two-byte data unit within a → data block.
Diagnostics
1. Operating area of the controller.
2. The controller has a self-diagnostics program as well as test functions for servicing
purposes: status, alarm, and service displays
DRF
Differential Resolver Function: NC function which generates an incremental zero offset in
Automatic mode in conjunction with an electronic handwheel.
Drive
The drive is the unit of the CNC that performs the speed and torque control based on the
settings of the NC.
Editor
The editor makes it possible to create, edit, extend, join, and import programs/texts/program
blocks.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1717
Glossary
Exact stop
When an exact stop statement is programmed, the position specified in a block is
approached exactly and, if necessary, very slowly. To reduce the approach time, → exact
stop limits are defined for rapid traverse and feed.
Feed override
The programmed velocity is overriden by the current velocity setting made via the → machine
control panel or from the → PLC (0 to 200%). The feedrate can also be corrected by a
programmable percentage factor (1 to 200%) in the machining program.
Finished-part contour
Contour of the finished workpiece. See → Raw part.
Fixed-point approach
Machine tools can approach fixed points such as a tool change point, loading point, pallet
change point, etc. in a defined way. The coordinates of these points are stored in the
controller. The controller moves the relevant axes in → rapid traverse, whenever possible.
Frame
A frame is an arithmetic rule that transforms one Cartesian coordinate system into another
Cartesian coordinate system. A frame contains the following components: → zero offset,
→ rotation, → scaling, → mirroring.
Basic Functions
1718 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
Glossary
Functionality
The path-jerk limitation can be activated/deactivated by programming the setting data.
Parameter: Value
● Value range: TRUE, FALSE
Application:
● Part program
● Static synchronized action
Geometry
Description of a → workpiece in the → workpiece coordinate system.
Geometry axis
The geometry axes form the 2 or 3-dimensional → workpiece coordinate system in which, in
→ part programs, the geometry of the workpiece is programmed.
Ground
Ground is taken as the total of all linked inactive parts of a device which will not become live
with a dangerous contact voltage even in the event of a malfunction.
Helical interpolation
The helical interpolation function is ideal for machining internal and external threads using
form milling cutters and for milling lubrication grooves.
The helix comprises two motions:
● Circular motion in one plane
● A linear motion perpendicular to this plane
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1719
Glossary
HIGHSTEP
Summary of programming options for → PLCs of the AS300/AS400 system.
HW Config
SIMATIC S7 tool for the configuration and parameterization of hardware components within
an S7 project
Identifier
In accordance with DIN 66025, words are supplemented using identifiers (names) for
variables (arithmetic variables, system variables, user variables), subprograms, key words,
and words with multiple address letters. These supplements have the same meaning as the
words with respect to block format. Identifiers must be unique. It is not permissible to use the
same identifier for different objects.
Increment
Travel path length specification based on number of increments. The number of increments
can be stored as → setting data or be selected by means of a suitably labeled key (i.e. 10,
100, 1000, 10000).
Incremental dimension
Also incremental dimension: A destination for axis traversal is defined by a distance to be
covered and a direction referenced to a point already reached. See → Absolute dimension.
Intermediate blocks
Motions with selected → tool offset (G41/G42) may be interrupted by a limited number of
intermediate blocks (blocks without axis motions in the offset plane), whereby the tool offset
can still be correctly compensated for. The permissible number of intermediate blocks which
the controller reads ahead can be set in system parameters.
Interpolator
Logic unit of the → NCK that defines intermediate values for the motions to be carried out in
individual axes based on information on the end positions specified in the part program.
Basic Functions
1720 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
Glossary
Interpolatory compensation
Interpolatory compensation is a tool that enables manufacturing-related leadscrew error and
measuring system error compensations (SSFK, MSFK).
Interrupt routine
Interrupt routines are special → subprograms that can be started by events (external signals)
in the machining process. A part program block which is currently being worked through is
interrupted and the position of the axes at the point of interruption is automatically saved.
Inverse-time feedrate
The time required for the path of a block to be traversed can also be programmed for the
axis motion instead of the feed velocity (G93).
JOG
Control operating mode (setup mode): In JOG mode, the machine can be set up. Individual
axes and spindles can be traversed in JOG mode by means of the direction keys. Additional
functions in JOG mode include: → Reference point approach, → Repos, and → Preset (set
actual value).
Key switch
The key switch on the → machine control panel has four positions that are assigned functions
by the operating system of the controller. The key switch has three different colored keys
that can be removed in the specified positions.
Keywords
Words with specified notation that have a defined meaning in the programming language for
→ part programs.
KÜ
Transformation ratio
KV
Servo gain factor, a control variable in a control loop.
Leading axis
The leading axis is the → gantry axis that exists from the point of view of the operator and
programmer and, thus, can be influenced like a standard NC axis.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1721
Glossary
Limit speed
Maximum/minimum (spindle) speed: The maximum speed of a spindle can be limited by
specifying machine data, the → PLC or → setting data.
Linear axis
In contrast to a rotary axis, a linear axis describes a straight line.
Linear interpolation
The tool travels along a straight line to the destination point while machining the workpiece.
Load memory
The load memory is the same as the → working memory for the CPU 314 of the → PLC.
Look Ahead
The Look Ahead function is used to achieve an optimal machining speed by looking ahead
over an assignable number of traversing blocks.
Machine axes
Physically existent axes on the machine tool.
Machine zero
Fixed point of the machine tool to which all (derived) measuring systems can be traced back.
Basic Functions
1722 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
Glossary
Machining channel
A channel structure can be used to shorten idle times by means of parallel motion
sequences, e.g. moving a loading gantry simultaneously with machining. Here, a CNC
channel must be regarded as a separate CNC control system with decoding, block
preparation and interpolation.
Macro techniques
Grouping of a set of statements under a single identifier. The identifier represents the set of
consolidated statements in the program.
Main block
A block prefixed by ":" introductory block, containing all the parameters required to start
execution of a -> part program.
Main program
The term "main program" has its origins during the time when part programs were split
strictly into main and → subprograms. This strict division no longer exists with today's
SINUMERIK NC language. In principle, any part program in the channel can be selected and
started. It then runs through in → program level 0 (main program level). Further part
programs or → cycles as subprograms can be called up in the main program.
MDA
Control operating mode: Manual Data Automatic. In the MDA mode, individual program
blocks or block sequences with no reference to a main program or subprogram can be input
and executed immediately afterwards through actuation of the NC start key.
Messages
All messages programmed in the part program and → alarms detected by the system are
displayed on the operator panel in plain text with date and time and the corresponding
symbol for the cancel criterion. Alarms and messages are displayed separately.
Mirroring
Mirroring reverses the signs of the coordinate values of a contour, with respect to an axis. It
is possible to mirror with respect to more than one axis at a time.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1723
Glossary
Mode
An operating concept on a SINUMERIK controller. The following modes are defined: → Jog,
→ MDA, → Automatic.
Mode group
Axes and spindles that are technologically related can be combined into one mode group.
Axes/spindles of a mode group can be controlled by one or more → channels. The same
→ mode type is always assigned to the channels of the mode group.
NC
Numerical Control: Numerical control (NC) includes all components of machine tool control:
→ NCK, → PLC, HMI, → COM.
Note
A more correct term for SINUMERIK controllers would be: Computerized Numerical Control
NCK
Numerical Control Kernel: Component of NC that executes the → part programs and
basically coordinates the motion operations for the machine tool.
Network
A network is the connection of multiple S7-300 and other end devices, e.g. a programming
device via a → connecting cable. A data exchange takes place over the network between the
connected devices.
NRK
Numeric robotic kernel (operating system of → NCK)
NURBS
The motion control and path interpolation that occurs within the controller is performed based
on NURBS (Non Uniform Rational B-Splines). This provides a uniform procedure for all
internal interpolations.
OEM
The scope for implementing individual solutions (OEM applications) has been provided for
machine manufacturers, who wish to create their own user interface or integrate technology-
specific functions in the controller.
Basic Functions
1724 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
Glossary
Offset memory
Data range in the control, in which the tool offset data is stored.
Overall reset
In the event of an overall reset, the following memories of the → CPU are deleted:
● → Working memory
● Read/write area of → load memory
● → System memory
● → Backup memory
Override
Manual or programmable control feature which enables the user to override programmed
feedrates or speeds in order to adapt them to a specific workpiece or material.
Part program
Series of statements to the NC that act in concert to produce a particular → workpiece.
Likewise, this term applies to execution of a particular machining operation on a given → raw
part.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1725
Glossary
Path axis
Path axes include all machining axes of the → channel that are controlled by the
→ interpolator in such a way that they start, accelerate, stop, and reach their end point
simultaneously.
Path feedrate
Path feed affects → path axes. It represents the geometric sum of the feedrates of the
→ geometry axes involved.
Path velocity
The maximum programmable path velocity depends on the input resolution. For example,
with a resolution of 0.1 mm the maximum programmable path velocity is 1000 m/min.
Peripheral module
I/O modules represent the link between the CPU and the process.
I/O modules are:
● → Digital input/output modules
● → Analog input/output modules
● → Simulator modules
PLC
Programmable Logic Controller: → Programmable logic controller. Component of → NC:
Programmable control for processing the control logic of the machine tool.
PLC programming
The PLC is programmed using the STEP 7 software. The STEP 7 programming software is
based on the WINDOWS standard operating system and contains the STEP 5 programming
functions with innovative enhancements.
Basic Functions
1726 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
Glossary
Polar coordinates
A coordinate system which defines the position of a point on a plane in terms of its distance
from the origin and the angle formed by the radius vector with a defined axis.
Polynomial interpolation
Polynomial interpolation enables a wide variety of curve characteristics to be generated,
such as straight line, parabolic, exponential functions (SINUMERIK 840D sl).
Positioning axis
Axis that performs an auxiliary motion on a machine tool (e.g. tool magazine, pallet
transport). Positioning axes are axes that do not interpolate with → path axes.
Pre-coincidence
Block change occurs already when the path distance approaches an amount equal to a
specifiable delta of the end position.
Program block
Program blocks contain the main program and subprograms of → part programs.
Program level
A part program started in the channel runs as a → main program on program level 0 (main
program level). Any part program called up in the main program runs as a → subprogram on
a program level 1 ... n of its own.
Programmable frames
Programmable → frames enable dynamic definition of new coordinate system output points
while the part program is being executed. A distinction is made between absolute definition
using a new frame and additive definition with reference to an existing starting point.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1727
Glossary
Programming key
Characters and character strings that have a defined meaning in the programming language
for → part programs.
Protection zone
Three-dimensional zone within the → working area into which the tool tip must not pass.
R parameters
Arithmetic parameter that can be set or queried by the programmer of the → part program for
any purpose in the program.
Rapid traverse
The highest traverse rate of an axis. For example, rapid traverse is used when the tool
approaches the → workpiece contour from a resting position or when the tool is retracted
from the workpiece contour. The rapid traverse velocity is set on a machine-specific basis
using a machine data element.
Reference point
Machine tool position that the measuring system of the → machine axes references.
Rotary axis
Rotary axes apply a workpiece or tool rotation to a defined angular position.
Rotation
Component of a → frame that defines a rotation of the coordinate system around a particular
angle.
Basic Functions
1728 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
Glossary
Rounding axis
Rounding axes rotate a workpiece or tool to an angular position corresponding to an
indexing grid. When a grid index is reached, the rounding axis is "in position".
RS-232-C
Serial interface for data input/output. Machining programs as well as manufacturer and user
data can be loaded and saved via this interface.
Safety functions
The controller is equipped with permanently active monitoring functions that detect faults in
the → CNC, the → PLC, and the machine in a timely manner so that damage to the
workpiece, tool, or machine is largely prevented. In the event of a fault, the machining
operation is interrupted and the drives stopped. The cause of the malfunction is logged and
output as an alarm. At the same time, the PLC is notified that a CNC alarm has been
triggered.
Scaling
Component of a → frame that implements axis-specific scale modifications.
Setting data
Data which communicates the properties of the machine tool to the NC as defined by the
system software.
Softkey
A key, whose name appears on an area of the screen. The choice of softkeys displayed is
dynamically adapted to the operating situation. The freely assignable function keys
(softkeys) are assigned defined functions in the software.
Spline interpolation
With spline interpolation, the controller can generate a smooth curve characteristic from only
a few specified interpolation points of a set contour.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1729
Glossary
Standard cycles
Standard cycles are provided for machining operations which are frequently repeated:
● For the drilling/milling technology
● For turning technology
The available cycles are listed in the "Cycle support" menu in the "Program" operating area.
Once the desired machining cycle has been selected, the parameters required for assigning
values are displayed in plain text.
Subblock
Block preceded by "N" containing information for a sequence, e.g. positional data.
Subprogram
The term "subprogram" has its origins during the time when part programs were split strictly
into →main and subprograms. This strict division no longer exists with today's SINUMERIK
NC language. In principle, any part program or any → cycle can be called up as a
subprogram within another part program. It then runs through in the next → program level
(x+1) (subprogram level (x+1)).
Synchronization
Statements in → part programs for coordination of sequences in different → channels at
certain machining points.
Synchronized actions
1. Auxiliary function output
During workpiece machining, technological functions (→ auxiliary functions) can be output
from the CNC program to the PLC. For example, these auxiliary functions are used to
control additional equipment for the machine tool, such as quills, grabbers, clamping
chucks, etc.
2. Fast auxiliary function output
For time-critical switching functions, the acknowledgement times for the → auxiliary
functions can be minimized and unnecessary hold points in the machining process can
be avoided.
Synchronized axes
Synchronized axes take the same time to traverse their path as the geometry axes take for
their path.
Basic Functions
1730 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
Glossary
Synchronized axis
A synchronized axis is the → gantry axis whose set position is continuously derived from the
motion of the → leading axis and is, thus, moved synchronously with the leading axis. From
the point of view of the programmer and operator, the synchronized axis "does not exist".
Syntax
$SC_IS_SD_MAX_PATH_JERK = value
System memory
The system memory is a memory in the CPU in which the following data is stored:
● Data required by the operating system
● The operands timers, counters, markers
System variable
A variable that exists without any input from the programmer of a → part program. It is
defined by a data type and the variable name preceded by the character $. See → User-
defined variable.
Text editor
See → Editor
TOA area
The TOA area includes all tool and magazine data. By default, this area coincides with the
→ channel area with regard to the access of the data. However, machine data can be used to
specify that multiple channels share one → TOA unit so that common tool management data
is then available to these channels.
TOA unit
Each → TOA area can have more than one TOA unit. The number of possible TOA units is
limited by the maximum number of active → channels. A TOA unit includes exactly one tool
data block and one magazine data block. In addition, a TOA unit can also contain a
toolholder data block (optional).
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1731
Glossary
Tool
Active part on the machine tool that implements machining (e.g. turning tool, milling tool, drill,
LASER beam, etc.).
Tool offset
Consideration of the tool dimensions in calculating the path.
Transformation
Additive or absolute zero offset of an axis.
Travel range
The maximum permissible travel range for linear axes is ± 9 decades. The absolute value
depends on the selected input and position control resolution and the unit of measurement
(inch or metric).
User interface
The user interface (UI) is the display medium for a CNC in the form of a screen. It features
horizontal and vertical softkeys.
User memory
All programs and data, such as part programs, subprograms, comments, tool offsets, and
zero offsets/frames, as well as channel and program user data, can be stored in the shared
CNC user memory.
Basic Functions
1732 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
Glossary
User program
User programs for the S7-300 automation systems are created using the programming
language STEP 7. The user program has a modular layout and consists of individual blocks.
The basic block types are:
● Code blocks
These blocks contain the STEP 7 commands.
● Data blocks
These blocks contain constants and variables for the STEP 7 program.
User-defined variable
Users can declare their own variables for any purpose in the → part program or data block
(global user data). A definition contains a data type specification and the variable name. See
→ System variable.
Variable definition
A variable definition includes the specification of a data type and a variable name. The
variable names can be used to access the value of the variables.
Velocity control
In order to achieve an acceptable traverse rate in the case of very slight motions per block,
an anticipatory evaluation over several blocks (→ Look Ahead) can be specified.
WinSCP
WinSCP is a freely available open source program for Windows for the transfer of files.
Working area
Three-dimensional zone into which the tool tip can be moved on account of the physical
design of the machine tool. See → Protection zone.
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1733
Glossary
Working memory
The working memory is a RAM in the → CPU that the processor accesses when processing
the application program.
Workpiece
Part to be made/machined by the machine tool.
Workpiece contour
Set contour of the → workpiece to be created or machined.
Workpiece zero
The workpiece zero is the starting point for the → workpiece coordinate system. It is defined
in terms of distances to the → machine zero.
Zero offset
Specifies a new reference point for a coordinate system through reference to an existing
zero point and a → frame.
1. Settable
A configurable number of settable zero offsets are available for each CNC axis. The
offsets - which are selected by means of G functions - take effect alternatively.
2. External
In addition to all the offsets which define the position of the workpiece zero, an external
zero offset can be overridden by means of the handwheel (DRF offset) or from the PLC.
3. Programmable
Zero offsets can be programmed for all path and positioning axes using the TRANS
statement.
Basic Functions
1734 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
Index
$AC_SMAXACC_INFO, 1316
$AC_SMAXVELO, 1316
$AC_SMAXVELO_INFO, 1316
$AC_SMINVELO, 1316
$
$AC_SMINVELO_INFO, 1316
$A_MONIFACT, 1567 $AC_SPECIAL_PARTS, 634
$AA_ACC, 1379 $AC_SPIND_STATE, 1316
$AA_ATOL, 222 $AC_STOLF, 225
$AA_ETRANS, 753 $AC_TOTAL_PARTS, 634
$AA_FGREF, 327 $AN_AUXFU_LIST_ENDINDEX, 426
$AA_FGROUP, 327 $AN_POWERON_TIME, 627
$AA_MOTEND, 1381 $AN_SETUP_TIME, 627
$AA_S, 1230 $C_AUX_EXT, 609
$AA_SCPAR, 1382 $C_AUX_IS_QUICK, 609
$AA_VLFCT, 1316 $C_AUX_VALUE, 609
$AA_VMAXB, 1316 $C_D, 609
$AA_VMAXM, 1316 $C_D_PROG, 609
$AC_ACT_PROG_NET_TIME, 628 $C_DL, 609
$AC_ACTUAL_PARTS, 634 $C_DL_PROG, 609
$AC_ASUP, 572 $C_DUPLO, 609
$AC_AUXFU_EXT, 436 $C_DUPLO_PROG, 609
$AC_AUXFU_M_EXT, 436 $C_M, 609
$AC_AUXFU_M_STATE, 436 $C_M_PROG, 609
$AC_AUXFU_M_TICK, 417 $C_ME, 609
$AC_AUXFU_M_VALUE, 436 $C_MTL, 609
$AC_AUXFU_PREDEF_INDEX, 435 $C_MTL_PROG, 609
$AC_AUXFU_SPEC, 436 $C_T, 609
$AC_AUXFU_STATE, 436 $C_T_PROG, 609
$AC_AUXFU_TYPE, 436 $C_TCA, 609
$AC_AUXFU_VALUE, 436 $C_TE, 609
$AC_CONSTCUT_S, 1310 $C_THNO, 609
$AC_CTOL, 222 $C_THNO_PROG, 609
$AC_CUT_INV, 1507 $C_TS, 609
$AC_CUTMOD, 1507 $C_TS_PROG,
$AC_CUTMOD_ANG, 1507 $P_AD, 1508
$AC_CUTTING_TIME, 631 $P_CHANNO, 553
$AC_CYCLE_TIME, 630 $P_CONSTCUT_S, 1310
$AC_FGROUP_MASK, 327 $P_CTOL, 223
$AC_OLD_PROG_NET_TIME, 628 $P_CUT_INV, 1507
$AC_OLD_PROG_NET_TIME_COUNT, 629 $P_CUTMOD, 1507
$AC_OPERATING_TIME, 630 $P_CUTMOD_ANG, 1507
$AC_OTOL, 222 $P_FGROUP_MASK, 328
$AC_PATHACC, 253 $P_GEAR, 1295
$AC_PATHJERK, 254 $P_ISTEST, 470
$AC_PROG_NET_TIME_TRIGGER, 629 $P_OTOL, 223
$AC_REQUIRED_PARTS, 634 $P_PROG_EVENT, 553
$AC_SGEAR, 1295 $P_REPINF, 569
$AC_SMAXACC, 1316 $P_SEARCH_S, 482
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1735
Index
Basic Functions
1736 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
Index
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1737
Index
Basic Functions
1738 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
Index
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1739
Index
Basic Functions
1740 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
Index
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1741
Index
Basic Functions
1742 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
Index
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1743
Index
Basic Functions
1744 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
Index
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1745
Index
Basic Functions
1746 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
Index
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1747
Index
Basic Functions
1748 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
Index
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1749
Index
Basic Functions
1750 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
Index
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1751
Index
Basic Functions
1752 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
Index
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1753
Index
Basic Functions
1754 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
Index
S SD43300, 1340
SD43400, 109
S functions, 372
SD43410, 109
S..., 1301
SD43420, 108
SAVE, 569
SD43430, 108
SBLOF, 575
SD43500, 296
SBLON, 578
SD43510,
SCPARA, 1381
SD43520, 297
Screen bright, 36
Secant error, 213
SD41100, 1340
Selection of the cutting edge when changing tool, 1393
SD41200, 1296
Selfacting SERUPRO,
SD42010, 1348
SERUPRO
SD42100, 1365
Automatic interrupt pointer, 513
SD42101, 1366
-end ASUB, 426
SD42200, 575
Programmable interrupt pointer, 510
SD42440, 1510
SPEED factor for channel axes during ramp-up, 505
SD42442, 1510
SERUPRO approach
SD42444, 479
control from the PLC, 499
SD42465, 220
SERUPRO ASUB, 292
SD42466, 220
Special features, 506
SD42480, 1464
serurpoMasterChan, 509
SD42496, 1460
Servo gain factor, 351
SD42500,
SETINT, 568
SD42502,
SETMS, 1301
SD42510,
Setpoint output, 328
SD42512,
Setpoint system, 328
SD42600, 1340
SETTCOR, 1557
SD42676, 220
Several transverse axes
SD42678, 220
Acceptance of the additional transverse axis, 802
SD42700, 592
Axis replacement in synchronized actions, 802
SD42750, 584
Axis replacement via axis container rotation, 803
SD42800, 1299
Axis-specific diameter programming, 802
SD42900, 1565
Signal distortions, 80
SD42910, 1547
Signal exchange
SD42920, 1547
Cyclic, 809
SD42930, 1578
Event-controlled, 809
SD42935, 1573
Signals
SD42940, 1547
Alarm signals, 35
SD42950, 1547
Axis/spindle-specific (DB31, ...), 34
SD42960, 1525
Channel-specific (DB21, ...), 34
SD42974, 1481
Compile cycles, 827
SD42980, 763
NCK/PLC, 828
SD42984, 1506
PLC / mode group, 829
SD42990, 582
PLC/axes, spindles, 830
SD43200, 1308
PLC/NCK, 827
SD43202, 1309
PLC/NCK channels, 829
SD43206, 1310
Ready signals, 35
SD43210, 1345
Signature, 1071
SD43220, 1343
Simulation, 475
SD43230, 1343
Simulation axes, 330
SD43235, 1318
Single block
SD43240, 1310
Channel classification, 579
SD43250, 1310
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1755
Index
Basic Functions
1756 Function Manual, 03/2013, 6FC5397-0BP40-3BA1
Index
Basic Functions
Function Manual, 03/2013, 6FC5397-0BP40-3BA1 1757
Index
VELOLIM, 1303
Vertical axes, 296
W
WAITENC, 600
WAITS, 1303
WALCS0, 112
WALIMOF, 110
WALIMON, 110
WCS, 37
Work offset $P_EXTFRAME, 806
Working area limitation, 106
in BCS, 108
in WCS/SZS, 110
Working area limitation group, 111
Workpiece
-counter, 634
-simulation, 475
Workpiece coordinate system (WCS), 686
Workpiece zero W, 670
X
XE \* MERGEFORMAT, 371
Y
YDelta, 991
Z
Zero mark diagnostics, 99
Zero points, 670
Zero vectors, 1477
Basic Functions
1758 Function Manual, 03/2013, 6FC5397-0BP40-3BA1