840Dsl Plc Fct Man 1219 en-US
840Dsl Plc Fct Man 1219 en-US
840Dsl Plc Fct Man 1219 en-US
Fundamental safety
instructions 1
Overview 2
SINUMERIK PLC mode selector 3
Reserve resources (timers,
counters, FC, FB, DB, I/O) 4
SINUMERIK 840D sl Commissioning hardware
PLC configuration of the PLC CPU 5
Starting up the PLC program 6
Function Manual Coupling of the PLC CPU 7
Interface structure 8
Structure and functions of the
basic program 9
SPL for Safety Integrated 10
Assignment overview 11
PLC functions for HMI (DB19) 12
PLC functions for drive
components on the 13
integrated PROFIBUS
Memory requirements of the
basic PLC program 14
NC VAR selector 15
Block descriptions 16
Data lists 17
Valid for Interface signals 18
Control system
SINUMERIK 840D sl / 840DE sl Appendix A
CNC software version 4.93
12/2019
6FC5397-0HP40-0BA0
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 into the following categories:
● General documentation/catalogs
● User documentation
● Manufacturer/service documentation
Additional information
You can find information on the following topics at the following address (https://
support.industry.siemens.com/cs/de/en/view/108464614):
● Ordering documentation/overview of documentation
● Additional links to download documents
● Using documentation online (find and search in manuals/information)
If you have any questions regarding the technical documentation (e.g. suggestions,
corrections), please send an e-mail to the following address
(mailto:[email protected]).
mySupport/Documentation
At the following address (https://support.industry.siemens.com/My/ww/en/documentation),
you can find information on how to create your own individual documentation based on
Siemens' content, and adapt it for your own machine documentation.
Training
At the following address (http://www.siemens.com/sitrain), you can find information about
SITRAIN (Siemens training on products, systems and solutions for automation and drives).
FAQs
You can find Frequently Asked Questions in the Service&Support pages under Product
Support (https://support.industry.siemens.com/cs/de/en/ps/faq).
SINUMERIK
You can find information about SINUMERIK at the following address (http://www.siemens.com/
sinumerik).
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 3
Preface
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
Country-specific telephone numbers for technical support are provided on the Internet at the
following address (https://support.industry.siemens.com/sc/ww/en/sc/2090) in the "Contact"
area.
If you have any technical questions, use the online form in the "Support Request" area.
PLC
4 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Table of contents
Preface ........................................................................................................................................................3
1 Fundamental safety instructions .................................................................................................................27
1.1 General safety instructions.....................................................................................................27
1.2 Warranty and liability for application examples ......................................................................27
1.3 Industrial security ...................................................................................................................28
2 Overview.....................................................................................................................................................31
2.1 Brief description .....................................................................................................................31
2.2 Key data of the PLC CPU ......................................................................................................33
2.3 PLC operating system version ...............................................................................................34
3 PLC mode selector .....................................................................................................................................35
4 Reserve resources (timers, counters, FC, FB, DB, I/O) .............................................................................37
5 Commissioning hardware configuration of the PLC CPU ...........................................................................39
6 Starting up the PLC program ......................................................................................................................41
6.1 Installation of the basic program ............................................................................................41
6.2 Application of the basic program ............................................................................................41
6.3 Version codes ........................................................................................................................42
6.4 Machine program ...................................................................................................................43
6.5 Data backup ...........................................................................................................................43
6.6 PLC series startup, PLC archive ............................................................................................44
6.7 Software upgrade ...................................................................................................................49
6.8 I/O modules (FM, CP modules)..............................................................................................50
6.9 Troubleshooting .....................................................................................................................51
7 Coupling of the PLC CPU ...........................................................................................................................53
7.1 General information................................................................................................................53
7.2 Properties of the PLC CPU ....................................................................................................53
7.3 Interface with integrated PLC .................................................................................................53
7.4 Diagnostic buffer on PLC .......................................................................................................55
8 Interface structure.......................................................................................................................................57
8.1 Interface .................................................................................................................................57
8.2 PLC/NCK interface .................................................................................................................57
8.3 Interface PLC/HMI..................................................................................................................64
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 5
Table of contents
PLC
6 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Table of contents
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 7
Table of contents
PLC
8 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Table of contents
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 9
Table of contents
PLC
10 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Table of contents
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 11
Table of contents
PLC
12 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Table of contents
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 13
Table of contents
PLC
14 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Table of contents
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 15
Table of contents
PLC
16 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Table of contents
18.2.5.127 DB21, ... DBX49.0 (geometry axis 2: handwheel direction of rotation inversion active) ......570
18.2.5.128 DB21, ... DBX52.0 - 2 (geometry axis 3: handwheel active) ................................................571
18.2.5.129 DB21, ... DBX52.4 - 5 (geometry axis 3: traversing request "Plus" / "Minus") .....................571
18.2.5.130 DB21, ... DBX52.6 - 7 (geometry axis 3: traversing command "Plus" / "Minus")..................571
18.2.5.131 DB21, ... DBX53.0 - 6 (geometry axis 3: active machine function) ......................................571
18.2.5.132 DB21, ... DBX55.0 (geometry axis 3: handwheel direction of rotation inversion active) ......571
18.2.5.133 DB21, ... DBB58, DBB60 - 65 (M-, S-, T-, D-, H-, F fct. change) .........................................571
18.2.5.134 DB21, ... DBX59.0 - 4 (M fct. 1-5 not decoded) ...................................................................572
18.2.5.135 DB21, ... DBB60 - 64, ... DBB66 - 67 (M-, S-, T-, D-, H-, F fct. Additional quick information (quick
acknowledgment) ................................................................................................................572
18.2.5.136 DB21, ... DBB68 - 97 (M function 1 - 5 and extended address M function 1 - 5 ) ................572
18.2.5.137 DB21, ... DBB98 - 115 (S function 1 - 3 and extended address S function 1 - 3 ) ...............573
18.2.5.138 DB21, ... DBB118 (T function 1)...........................................................................................573
18.2.5.139 DB21, ... DBB129 (D function 1) ..........................................................................................574
18.2.5.140 DB21, ... DBB140 - 157 (H function 1 - 3 and extended address H function 1 - 3 ) .............574
18.2.5.141 DB21, ... DBB158 - 193 (F function 1 - 6 and extended address F function 1 - 6 )..............574
18.2.5.142 DB21, ... DBB194 - 206 (dynamic M functions: M0 - M99) ..................................................575
18.2.5.143 DB21, ... DBB208 - 271 (active G command of group 1 to 60) ............................................575
18.2.5.144 DB21, ... DBX272.0 - 273.1 (machine-related protection zone 1 - 10 preactivated) ............576
18.2.5.145 DB21, ... DBX274.0 – 275.1 (channel-specific protection zone 1 - 10 preactivated) ...........577
18.2.5.146 DB21, ... DBX276.0 - 277.1 (machine-related protection zone 1 - 10 violated) ...................577
18.2.5.147 DB21, ... DBX278.0 – 279.1 (channel-specific protection zone 1 - 10 violated)...................578
18.2.5.148 DB21, ... DBX280.1 (request disabling of synchronized actions).........................................578
18.2.5.149 DB21, ... DBX281.1 (acknowledgement of synchronized actions disabled) ........................578
18.2.5.150 DB21, … DBX300.0 - 307.7 (disable synchronized action ID/IDS) ......................................579
18.2.5.151 DB21, ... DBX308.0 - 315.7 (synchronized actions ID/IDS can be disabled) .......................579
18.2.5.152 DB21, ... DBB317.1 (workpiece setpoint reached)...............................................................579
18.2.5.153 DB21, ... DBX317.6 (PTP traversing active) ........................................................................580
18.2.5.154 DB21, ... DBX317.7 (TOOLMAN: Tool missing) ..................................................................580
18.2.5.155 DB21, ... DBX318.0 (ASUB is stopped) ...............................................................................580
18.2.5.156 DB21, ... DBX318.1 (block search via program test is active (SERUPRO)) ........................581
18.2.5.157 DB21, ... DBX318.2 (online tool length compensation (TOFF) active).................................581
18.2.5.158 DB21, ... DBX318.3 (online tool length compensation (TOFF): Compensation motion
active)...................................................................................................................................581
18.2.5.159 DB21, ... DBX318.5 (associated M0 / M1 active) .................................................................582
18.2.5.160 DB21, ... DBX319.0 (REPOS mode change acknowledgment) ...........................................582
18.2.5.161 DB21, ... DBX319.1 - 3 (active REPOS mode) ....................................................................583
18.2.5.162 DB21, ... DBX319.5 (REPOS delay) ....................................................................................584
18.2.5.163 DB21, ... DBX320.0 - 2 (orientation axis 1: activate handwheel) .........................................584
18.2.5.164 DB21, ... DBX320.4 (orientation axis 1: traversing key lock) ...............................................585
18.2.5.165 DB21, ... DBX320.5 (orientation axis 1: rapid traverse override) .........................................586
18.2.5.166 DB21, ... DBX320.6 - 7 (Orientierungsachse 1: traversing keys "Plus" / "Minus") ...............586
18.2.5.167 DB21, ... DBX321.0 - 6 (orientation axis 1: machine function request) ................................588
18.2.5.168 DB21, … DBX323.0 (orientation axis 1: invert handwheel direction of rotation) ..................589
18.2.5.169 DB21, ... DBX324.0 - 2 (orientation axis 2: activate handwheel) .........................................589
18.2.5.170 DB21, ... DBX324.4 (orientation axis 2: traversing key lock) ...............................................589
18.2.5.171 DB21, ... DBX324.5 (orientation axis 2: rapid traverse override) .........................................590
18.2.5.172 DB21, ... DBX324.6 - 7 (orientation axis 2: traversing keys "Plus" / "Minus") ......................590
18.2.5.173 DB21, ... DBX325.0 - 6 (orientation axis 2: machine function request) ................................590
18.2.5.174 DB21, … DBX327.0 (orientation axis 2: invert handwheel direction of rotation) ..................590
18.2.5.175 DB21, ... DBX328.0 - 2 (orientation axis 3: activate handwheel) .........................................590
18.2.5.176 DB21, ... DBX328.4 (orientation axis 3: traversing key lock) ...............................................590
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 17
Table of contents
18.2.5.177 DB21, ... DBX328.5 (orientation axis 3: rapid traverse override) .........................................590
18.2.5.178 DB21, ... DBX328.6 - 7 (orientation axis 3: traversing keys "Plus" / "Minus") ......................591
18.2.5.179 DB21, ... DBX329.0 - 6 (orientation axis 3: machine function request) ................................591
18.2.5.180 DB21, … DBX331.0 (orientation axis 3: invert handwheel direction of rotation) ..................591
18.2.5.181 DB21, ... DBX332.0 - 2 (orientation axis 1: handwheel active) ............................................591
18.2.5.182 DB21, ... DBX332.4 - 5 (orientation axis 1: traversing request "Plus" / "Minus") .................592
18.2.5.183 DB21, ... DBX332.6 - 7 (orientation axis 1: traversing command "Plus" / "Minus" ...............593
18.2.5.184 DB21, ... DBX333.0 - 6 (orientation axis 1: active machine function) ..................................594
18.2.5.185 DB21, ... DBX336.0 - 2 (orientation axis 2: handwheel active) ............................................594
18.2.5.186 DB21, ... DBX336.4 - 5 (orientation axis 2: traversing request "Plus" / "Minus") .................595
18.2.5.187 DB21, ... DBX336.6 - 7 (orientation axis 2: traversing command "Plus" / "Minus" ...............595
18.2.5.188 DB21, ... DBX337.0 - 6 (orientation axis 2: active machine function) ..................................595
18.2.5.189 DB21, ... DBX340.0 - 2 (orientation axis 3: handwheel active) ............................................595
18.2.5.190 DB21, ... DBX340.4 - 5 (orientation axis 3: traversing request "Plus" / "Minus") .................595
18.2.5.191 DB21, ... DBX340.6 - 7 (orientation axis 3: traversing command "Plus" / "Minus" ...............595
18.2.5.192 DB21, ... DBX341.0 - 6 (orientation axis 3: active machine function) ..................................595
18.2.5.193 DB21, ... DBX344.0 (TM: tool prewarning limit reached) .....................................................596
18.2.5.194 DB21, ... DBX344.1 (TM: Tool limit value reached) .............................................................596
18.2.5.195 DB21, ... DBX344.2 (TM: Transition to new replacement tool) ............................................596
18.2.5.196 DB21, ... DBX344.3 (TM: Last replacement tool of the tool group) ......................................597
18.2.5.197 DB21, ... DBB376 (PROG_EVENT trigger event) ................................................................597
18.2.5.198 DB21, ... DBX377.0 (collision avoidance: stop) ...................................................................598
18.2.5.199 DB21, ... DBX377.4 (JOG retract active) .............................................................................598
18.2.5.200 DB21, ... DBX377.5 (JOG retract retraction data available).................................................598
18.2.5.201 DB21, ... DBX377.6 (JOG circular travel active) ..................................................................598
18.2.5.202 DB21, … DBX378.0 (ASUB active)......................................................................................599
18.2.5.203 DB21, … DBX378.1 (stopped ASUB active) ........................................................................599
18.2.5.204 DB21, ... DBX384.0 (enable GOTOS)..................................................................................599
18.2.5.205 DB21, ... DBX385.0 - 7 (input signal 1 - 8) ...........................................................................600
18.2.5.206 DB21, ... DBX386.0 - 7 (disabling of input signal 1 - 8)........................................................600
18.2.5.207 DB21, ... DBX387.0 - 7 (status of action 1 - 8) .....................................................................600
18.2.5.208 DB21, ... DBX390.0 - 7 (enable status of input signal 1 - 8) ................................................601
18.2.5.209 DB21, ... DBX391.0 - 7 (enable request for action 1 - 8) .....................................................601
18.2.5.210 DB21, ... DBB392 (selection: Coordinate system for Cartesian manual traversing and
handwheel override in automatic mode in the tool direction (DRF)) ....................................601
18.2.6 DB31, ...: Axis/spindle ..........................................................................................................602
18.2.6.1 DB31, ... DBB0 (feedrate override, axis-specific).................................................................602
18.2.6.2 DB31, ... DBX1.0 (drive test travel enable) ..........................................................................604
18.2.6.3 DB31, ... DBX1.1 (acknowledge fixed stop reached) ...........................................................605
18.2.6.4 DB31, ... DBX1.2 (fixed stop sensor) ...................................................................................605
18.2.6.5 DB31, ... DBX1.3 (axis/spindle disable) ...............................................................................606
18.2.6.6 DB31, ... DBX1.4 (follow-up mode) ......................................................................................609
18.2.6.7 DB31, ... DBX1.5 - 6 (position measuring system 1 (PMS1) / position measuring system
2 (PMS2)) .............................................................................................................................610
18.2.6.8 DB31, ... DBX1.7 (override active) .......................................................................................612
18.2.6.9 DB31, ... DBX2.0 (software cams: activation) ......................................................................613
18.2.6.10 DB31, ... DBX2.1 (controller enable) ....................................................................................613
18.2.6.11 DB31, ... DBX2.2 (spindle reset/delete distance to go) ........................................................615
18.2.6.12 DB31, ... DBX2.3 (clamping in progress) .............................................................................617
18.2.6.13 DB31, ... DBX2.4 - 7 (reference point value 1 - 4) ...............................................................617
18.2.6.14 DB31, ... DBX3.0 (accept external work offset)....................................................................618
18.2.6.15 DB31, ... DBX3.1 (enable travel to fixed stop) .....................................................................618
PLC
18 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Table of contents
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 19
Table of contents
PLC
20 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Table of contents
18.2.6.120 DB31, ... DBX74.4 (modulo rotary axis: traversing range limits active) ...............................671
18.2.6.121 DB31, ... DBX75.0 - 2 (JOG approach fixed point active) ....................................................671
18.2.6.122 DB31, ... DBX75.3 - 5 (JOG approach fixed point reached) ................................................672
18.2.6.123 DB31, ... DBX75.6 (JOG travel to position active) ...............................................................672
18.2.6.124 DB31, ... DBX75.7 (JOG position reached)..........................................................................672
18.2.6.125 DB31, ... DBX76.0 (lubrication pulse) ..................................................................................673
18.2.6.126 DB31, ... DBX76.4 (path axis) ..............................................................................................673
18.2.6.127 DB31, ... DBX76.5 (positioning axis) ....................................................................................674
18.2.6.128 DB31, ... DBX76.6 (indexing axis in position) ......................................................................674
18.2.6.129 DB31, ... DBX77.0 (collision avoidance: Velocity reduction) ................................................675
18.2.6.130 DB31, ... DBD78 (feedrate, positioning axis) .......................................................................675
18.2.6.131 DB31, ... DBX82.0 - 2 (set gear stage) ................................................................................675
18.2.6.132 DB31, ... DBX82.3 (change over gear stage).......................................................................676
18.2.6.133 DB31, ... DBX83.0 (speed limit exceeded)...........................................................................676
18.2.6.134 DB31, ... DBX83.1 (speed setpoint limited)..........................................................................677
18.2.6.135 DB31, ... DBX83.2 (speed setpoint increased) ....................................................................678
18.2.6.136 DB31, ... DBX83.3 (geometry monitoring)............................................................................679
18.2.6.137 DB31, ... DBX83.5 (spindle in setpoint range) .....................................................................679
18.2.6.138 DB31, ... DBX83.6 (speed monitoring) .................................................................................679
18.2.6.139 DB31, ... DBX83.7 (clockwise actual direction of rotation) ...................................................680
18.2.6.140 DB31, ... DBX84.1 (grinding wheel peripheral speed active) ...............................................680
18.2.6.141 DB31, ... DBX84.3 (tapping without compensating check active) ........................................680
18.2.6.142 DB31, ... DBX84.4 (active spindle operating mode: Synchronous operation)......................681
18.2.6.143 DB31, ... DBX84.5 (active spindle mode: positioning mode) ...............................................681
18.2.6.144 DB31, ... DBX84.6 (active spindle mode: oscillating mode) .................................................682
18.2.6.145 DB31, ... DBX84.7 (active spindle mode: control mode) ......................................................682
18.2.6.146 DB31, ... DBX85.0 (tool with dynamic response limitation) ..................................................682
18.2.6.147 DB31, ... DBX85.5 (spindle in position) ................................................................................683
18.2.6.148 DB31, ... DBW86 (M function for spindle) ............................................................................683
18.2.6.149 DB31, ... DBD88 (S function for spindle)..............................................................................684
18.2.6.150 DB31, ... DBX92.1 (ramp-function generator disable active) ...............................................684
18.2.6.151 DB31, ... DBX92.4 (drive-autonomous motion active) .........................................................685
18.2.6.152 DB31, ... DBX93.0 - 4 (motor/drive data set: display) ..........................................................685
18.2.6.153 DB31, ... DBX93.5 (drive ready)...........................................................................................686
18.2.6.154 DB31, ... DBX93.6 (integrator disable, speed controller) .....................................................686
18.2.6.155 DB31, ... DBX93.7 (pulses enabled) ....................................................................................687
18.2.6.156 DB31, ... DBX94.0 (motor temperature prewarning) ............................................................687
18.2.6.157 DB31, ... DBX94.1 (heat sink temperature prewarning) .......................................................688
18.2.6.158 DB31, ... DBX94.2 (run-up completed) ................................................................................688
18.2.6.159 DB31, ... DBX94.3 (|Md| < Mdx)...........................................................................................689
18.2.6.160 DB31, ... DBX94.4 (|nact| < nmin) ........................................................................................690
18.2.6.161 DB31, ... DBX94.5 (|nact| < nx) ............................................................................................690
18.2.6.162 DB31, ... DBX94.6 (nact = nset) ...........................................................................................691
18.2.6.163 DB31, ... DBX94.7 (variable signaling function) ...................................................................691
18.2.6.164 DB31, ... DBX95.1 (ESR: DC link undervoltage)..................................................................691
18.2.6.165 DB31, ... DBX95.2 (ESR: Response initiated or generator operation active) ......................692
18.2.6.166 DB31, … DBX95.3 (generator operation minimum speed fallen below) ..............................692
18.2.6.167 DB31, ... DBX95.7 (alarm of alarm class C is active)...........................................................692
18.2.6.168 DB31, ... DBX96.2 (master-slave: fine differential speed)....................................................693
18.2.6.169 DB31, ... DBX96.3 (master-slave: coarse speed difference) ...............................................693
18.2.6.170 DB31, ... DBX96.4 (master-slave: compensatory controller active) .....................................693
18.2.6.171 DB31, ... DBX96.5 (setpoint switchover: drive control active) ..............................................694
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 21
Table of contents
PLC
22 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Table of contents
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 23
Table of contents
18.2.9.15 DB73 DBW(n+24) (magazine No. (target) for old tool to be removed) ................................733
18.2.9.16 DB73 DBW(n+26) (location number of the old tool to be removed) .....................................733
18.2.9.17 DB73 DBW(n+28) (new tool: Location type) ........................................................................733
18.2.9.18 DB73 DBW(n+30) (new tool: Size left) .................................................................................734
18.2.9.19 DB73 DBW(n+32) (new tool: Size right)...............................................................................734
18.2.9.20 DB73 DBW(n+34) (new tool: Size top).................................................................................734
18.2.9.21 DB73 DBW(n+36) (new tool: Size bottom)...........................................................................735
18.2.9.22 DB73 DBW(n+38) (tool status for new tool) .........................................................................735
18.2.9.23 DB73 DBW(n+40) (new tool: Internal T no. of the NC) ........................................................736
18.2.9.24 DB73 DBW(n+42) (original location of the new tool in this turret magazine) .......................736
18.2.10 DB1071: Tool management, load/unload magazine (multitool) ...........................................736
18.2.10.1 DB1071 DBW(n+0) (distance coding) ..................................................................................736
18.2.10.2 DB1071 DBW(n+2) (multitool location number) ...................................................................737
18.2.10.3 DB1071 DBD(n+4) (multitool location distance)...................................................................737
18.2.10.4 DB1071 DBW(n+8) (multitool number) ................................................................................738
18.2.10.5 DB1071 DBW(n+10) (multitool location number) .................................................................738
18.2.10.6 DB1071 DBW(n+12) (toolholder) .........................................................................................738
18.2.11 DB1072: Tool management, spindle (multitool) ...................................................................739
18.2.11.1 DB1072 DBW(n+0) (distance coding) ..................................................................................739
18.2.11.2 DB1072 DBW(n+2) (multitool location number) ...................................................................739
18.2.11.3 DB1072 DBW(n+4) (multitool location distance) ..................................................................739
18.2.11.4 DB1072 DBW(n+8) (multitool number (new tool))................................................................740
18.2.11.5 DB1072 DBW(n+10) (multitool location number (new tool)) ................................................740
18.2.11.6 DB1072 DBW(n+12) (multitool number (old tool)) ...............................................................740
18.2.11.7 DB1072 DBW(n+14) (multitool location number (old tool)) ..................................................741
18.2.11.8 DB1072 DBW(n+16) (new tool: Location type) ....................................................................741
18.2.11.9 DB1072 DBW(n+18) (new tool: Size left) .............................................................................741
18.2.11.10 DB1072 DBW(n+20) (new tool: Size right)...........................................................................742
18.2.11.11 DB1072 DBW(n+22) (new tool: Size top).............................................................................742
18.2.11.12 DB1072 DBW(n+24) (new tool: Size bottom).......................................................................742
18.2.11.13 DB1072 DBW(n+26) (new tool status) .................................................................................743
18.2.11.14 DB1072 DBW(n+28) (new tool: internal T number of the NC) .............................................743
18.2.11.15 DB1072 DBW(n+30) (tool holder) ........................................................................................744
18.2.11.16 DB1072 DBW(n+32) (original magazine of the new tool) ....................................................744
18.2.11.17 DB1072 DBW(n+34) (original location of the new tool)........................................................744
18.2.12 DB1073: Tool management, turret (multitool) ......................................................................745
18.2.12.1 DB1073 DBW(n+0) (distance coding) ..................................................................................745
18.2.12.2 DB1073 DBW(n+2) (multitool location number) ...................................................................745
18.2.12.3 DB1073 DBW(n+4) (multitool location distance) ..................................................................746
18.2.12.4 DB1073 DBW(n+8) (multitool number (new tool))................................................................746
18.2.12.5 DB1073 DBW(n+10) (multitool location number (new tool)) ................................................746
18.2.12.6 DB1073 DBW(n+12) (multitool number (old tool)) ...............................................................747
18.2.12.7 DB1073 DBW(n+14) (multitool location number (old tool)) ..................................................747
18.2.12.8 DB1073 DBW(n+16) (new tool: Location type) ....................................................................747
18.2.12.9 DB1073 DBW(n+18) (new tool: Size left) .............................................................................748
18.2.12.10 DB1073 DBW(n+20) (new tool: Size right)...........................................................................748
18.2.12.11 DB1073 DBW(n+22) (new tool: Size top).............................................................................748
18.2.12.12 DB1073 DBW(n+24) (new tool: Size bottom).......................................................................749
18.2.12.13 DB1073 DBW(n+26) (new tool status) .................................................................................749
18.2.12.14 DB1073 DBW(n+28) (new tool: internal T number of the NC) .............................................750
18.2.12.15 DB1073 DBW(n+30) (tool holder) ........................................................................................750
18.2.12.16 DB1073 DBW(n+32) (original magazine of the new tool) ....................................................750
PLC
24 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Table of contents
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 25
Table of contents
PLC
26 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Fundamental safety instructions 1
1.1 General safety instructions
WARNING
Danger to life if the safety instructions and residual risks are not observed
If the safety instructions and residual risks in the associated hardware documentation are not
observed, accidents involving severe injuries or death can occur.
● Observe the safety instructions given in the hardware documentation.
● Consider the residual risks for the risk evaluation.
WARNING
Malfunctions of the machine as a result of incorrect or changed parameter settings
As a result of incorrect or changed parameterization, machines can malfunction, which in turn
can lead to injuries or death.
● Protect the parameterization against unauthorized access.
● Handle possible malfunctions by taking suitable measures, e.g. emergency stop or
emergency off.
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 27
Fundamental safety instructions
1.3 Industrial security
Note
Industrial security
Siemens provides products and solutions with industrial security functions that support the
secure operation of plants, systems, machines and networks.
In order to protect plants, systems, machines and networks against cyber threats, it is
necessary to implement – and continuously maintain – a holistic, state-of-the-art industrial
security concept. Products and solutions from Siemens constitute one element of such a
concept.
Customers are responsible for preventing unauthorized access to their plants, systems,
machines and networks. Such systems, machines and components should only be connected
to an enterprise network or the Internet if and to the extent such a connection is necessary and
only when appropriate security measures (e.g. using firewalls and/or network segmentation)
are in place.
For additional information on industrial security measures that can be implemented, please
visit:
Industrial security (https://www.siemens.com/industrialsecurity)
Siemens’ products and solutions undergo continuous development to make them more secure.
Siemens strongly recommends that product updates are applied as soon as they become
available, and that only the latest product versions are used. Use of product versions that are
no longer supported, and failure to apply the latest updates may increase customer’s exposure
to cyber threats.
To stay informed about product updates, subscribe to the Siemens Industrial Security RSS
Feed at:
Industrial security (https://www.siemens.com/industrialsecurity)
PLC
28 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Fundamental safety instructions
1.3 Industrial security
WARNING
Unsafe operating states resulting from software manipulation
Software manipulations, e.g. viruses, Trojans, or worms, can cause unsafe operating states
in your system that may lead to death, serious injury, and property damage.
● Keep the software up to date.
● Incorporate the automation and drive components into a holistic, state-of-the-art industrial
security concept for the installation or machine.
● Make sure that you include all installed products into the holistic industrial security concept.
● Protect files stored on exchangeable storage media from malicious software by with
suitable protection measures, e.g. virus scanners.
● On completion of commissioning, check all security-related settings.
● Protect the drive against unauthorized changes by activating the "Know-how protection"
converter function.
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 29
Fundamental safety instructions
1.3 Industrial security
PLC
30 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Overview 2
2.1 Brief description
General
The PLC basic program organizes the exchange of signals and data between the PLC user
program and the NC, HMI and MCP areas. In the case of signals and data, a distinction is made
between the following groups:
● Cyclic signal exchange
● Event-driven signal exchange
● Messages
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 31
Overview
2.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
PLC
32 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Overview
2.2 Key data of the PLC CPU
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 +
ASUP interface +
Error/operating messages +
Transfer MCP and HHU signals +
Display control handheld unit +
Read/write NC variables and GUD +
PI services +
Tool management +
Star/delta switchover +
M to N +
Safety Integrated +
Program diagnostics +
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 33
Overview
2.3 PLC operating system version
PLC
34 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
PLC mode selector 3
The PLC mode selector is located on the front of the NCU module. The following PLC operating
modes can be set via the PLC mode selector:
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 (de‐
fault data).
1) Switch position of the PLC mode selector
Further information
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 NC and PLC general reset can be found in:
CNC Commissioning Manual: NC, PLC, Drive in chapter "Power-on and startup".
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 35
PLC mode selector
PLC
36 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Reserve resources (timers, counters, FC, FB, DB, I/O) 4
Reserve resources (timers, counters, FC, FB, DB, I/O)
The components below are reserved for the basic program:
● Timer
No reservation
● Counter
No reservation
● FC, FB, DB
FC0 to FC29 and FB0 to FB29 are reserved for the basic program. The number range
between 1000 and 1023 is also reserved for FCs and FBs. DB1 to DB61, DB71 to DB80 are
reserved for data blocks. The number range 1000 to 1099 is also reserved in addition for DB.
The data blocks of channels, axes/spindles and tool management functions that are not
activated may be assigned as desired by the user.
● I/O range
The PLC has an I/O address volume of 16384 bytes each for inputs and outputs. The
address ranges starting at 4096 are reserved for/occupied by integrated drives. However,
diagnostic addresses for modules can be assigned to the highest address range as
proposed by STEP 7. The address range between 4080 and 4097 is also assigned for the
NC, CP and HMI in rack 0 of the SIMATIC 300 station (for NCU 7x0.3).
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 37
Reserve resources (timers, counters, FC, FB, DB, I/O)
PLC
38 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Commissioning hardware configuration of the PLC
CPU 5
The commissioning of the PLC CPU is described in detail in:
Further information
CNC Commissioning Manual: NC, PLC, Drive:
● Chapter: "Commissioning PLC"
● Chapter: "Configuring PLC-controlled drives"
● Chapter: "Requirements for commissioning" > "Power-on and startup" > "Separate NC and
PLC general reset"
● Chapter: "Commissioning PLC" > "Configuring a network (NetPro) for PG/PC" > "Integrating
PG/PC into the network (NetPro)"
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 39
Commissioning hardware configuration of the PLC CPU
PLC
40 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Starting up the PLC program 6
6.1 Installation of the basic program
The installation of the basic program is described in detail in:
Further information
CNC Commissioning Manual: NC, PLC, Drive; Section: "Commissioning PLC" > "Creating a
PLC program"
Note
Installation/update
Before installing SINUMERIK 840D sl STEP 7 Toolbox V16, 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)
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 41
Starting up the PLC program
6.3 Version codes
Basic program
The version of the basic program is displayed on the Version screen of the user interface along
with the control system type.
The control system type is encoded as follows:
PLC
42 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Starting up the PLC program
6.5 Data backup
Examples:
● "Test project version 01.02.03 01/01/2015"
● "1.2 2015/01/01 test project"
● "01/01/15 version 01.02 test project"
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.
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 43
Starting up the PLC program
6.6 PLC series startup, PLC archive
The source programs of all organization blocks and all instance data blocks should always be
available.
7KH6,180(5,.DUFKLYLQJSURJUDPLQWKH
6,0$7,&0DQDJHUFUHDWHVD3/&DUFKLYH
ZLWKWKHEORFNVORFDWHGEHQHDWKIROGHU
&38[[[!!%ORFNV
127,&(
%ORFNVORFDWHGLQIROGHU&3'VODUH
QRWLQFOXGHGLQWKLV3/&DUFKLYH
Data blocks that were created with SFC22 (online) in the CPU are also excluded from the
archive.
The "Sdb archive" option can be activated or deactivated for the archiving program:
PLC
44 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Starting up the PLC program
6.6 PLC series startup, PLC archive
If "Sdb archive" is activated, a PLC archive is created that only contains the system data blocks
(SDB) of the selected program path.
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 45
Starting up the PLC program
6.6 PLC series startup, PLC archive
PLC
46 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Starting up the PLC program
6.6 PLC series startup, PLC archive
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
Const S7SourceContainer = 1122308
set S7 = CreateObject("Simatic.Simatic.1")
rem Instantiate command interface of STEP 7
Set S7Ext = CreateObject("SimaticExt.S7ContainerExt")
Call S7Ext.Magic("")
Functions:
● Function Magic(bstrVal As String) As Long
● Function MakeSerienIB (FileName As String, Option As Long,
Container As S7Container) As Long
Description
Function Magic(bstrVal As String) As Long
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 47
Starting up the PLC program
6.6 PLC series startup, PLC archive
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 MakeSerienIB(FileName As String, Option As Long, Container As S7Container) As
Long
Parameter "Option":
Return value:
0 = OK
-1 = Function unavailable, call Magic function beforehand
-2 = File name cannot be generated
-4 = Container parameter invalid or container block empty
-5 = Internal error (memory request rejected by Windows)
-6 = Internal error (problem in STEP 7 project)
-7 = Write error when generating series startup files (e.g. data storage medium 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
Cont = Nothing
Next
Error = S7Ext.MakeSerienIB("f:\dh\arc.dir\PLC.arc", 0, Cont)
'Now error analysis
PLC
48 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Starting up the PLC program
6.7 Software upgrade
The For Each ... Next block programmed above can be programmed in the Delphi
programming language as follows (The programming in the C, C++ programming languages is
similar):
Program code
Var
EnumVar: IEnumVariant;
rgvar: OleVariant;
fetched: Cardinal;
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 49
Starting up the PLC program
6.8 I/O modules (FM, CP modules)
However, it is normally enough to recompile the organization blocks (OBs) and the instance
data blocks of the S7 project. Before upgrading, therefore, only the sources for the organization
blocks and the instance data blocks are generated.
NC variables
The latest NC VAR selector can be used for each NC software release (even older versions).
The variables can also be selected from the latest list for earlier NC software versions. The data
content in DB120 (default DB for variables) does not depend on the software version. This
means, 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.
PLC
50 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Starting up the PLC program
6.9 Troubleshooting
6.9 Troubleshooting
This section describes problems which may occur, their causes and remedies and should be
read carefully before hardware is replaced.
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 51
Starting up the PLC program
6.9 Troubleshooting
PLC
52 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Coupling of the PLC CPU 7
7.1 General information
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 33)".
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 NC and PLC directly via a dual-port RAM.
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 53
Coupling of the PLC CPU
7.3 Interface with integrated PLC
230&3
(6 3*
(WKHUQHW
,%13RUW
(WKHUQHW3RUW
(WKHUQHW7&3,3
IDFWRU\EXV
LQWHUQDOEXV.%XV5DFN 6SURWRFRO
& 6 6
6 .%XV &
(TXLYDOHQW
FRPP
&3 'ULYH 3/&
' 1&. 9',
8QLW V
VO ,QWHUIDFH
'3'LUHFW .5LVF
$FFHVV
,QWHUQDOYLUWXDO352),%86
5HDOWLPHV\VWHP
6,180(5,.&RQWURO8QLW 1&8
352),%86 03,352),%86
([WHUQDO
'ULYH
(7
8QLW V
Interface: NC/PLC
The data exchange between NC and PLC is organized by the basic program on the PLC side.
The status information, such as "Program running", stored by the NC in the NC/PLC interface
is copied to data blocks by the basic program at the beginning of the cycle (OB1) and can then
be accessed in the user program (user interface). The control signals for the NC (e.g. NC start)
entered in the interface data block by the user are also written to the internal DPR and
transferred to the NC at the start of the cycle.
Workpiece-program-specific auxiliary functions transferred to the PLC are first evaluated by the
basic program (alarmdriven) and then transferred to the user interface at the start of OB1. If the
relevant NC block contains auxiliary functions that require that NC processing is interrupted
(e.g. M06 for tool change), the basic program stops the decoding of the NC block initially for one
PLC cycle. The user can then use the "read disable" interface signal to halt the block execution
until the tool change has been completed. If, on the other hand, the relevant NC block only
contains auxiliary functions, which do not require interruption of the decoding (e.g. M08 for
PLC
54 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Coupling of the PLC CPU
7.4 Diagnostic buffer on PLC
cooling medium on), the transfer of these "fast" auxiliary functions is directly acknowledged in
OB40, so that decoding is only insignificantly influenced by the transfer to the PLC.
The evaluation and enabling of the G commands transferred from the NC are also alarm-driven
and acknowledged, however they are transferred directly to the user interface. If a G command
is evaluated at several points in the PLC program, differences in the information of the G
command within one PLC cycle may arise.
In the case of NC actions triggered and assigned with parameters by the PLC (e.g. traverse
concurrent axes), triggering and parameter assignment is performed using FCs and FBs, not
interface data blocks. The FCs and FBs belonging to the actions are supplied together with the
basic program. The FCs and FBs required must be loaded by the user and called in the PLC
program of the machine manufacturer (machine program). For an overview of FC, FB and data
blocks, sorted according to basic and extended functions, please refer to Section "Start-up of
PLC programs".
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.
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 55
Coupling of the PLC CPU
7.4 Diagnostic buffer on PLC
PLC
56 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface structure 8
8.1 Interface
Interface DBs
Mapping in interface DBs is necessary due to the large number of signals exchanged between
the NC and PLC. These are global DBs from the viewpoint of the PLC program.
General
The PLC/NC interface comprises a data interface on one side and a function interface on the
other. The data interface contains status and control signals, auxiliary and G commands, while
the function interface is used to transfer jobs from the PLC to the NC.
Data interface
The data interface is subdivided into the following groups:
● NC-specific signals
● Mode-group-specific signals
● Channel-specific signals
● Axis/spindle/drive-specific signals
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 57
Interface structure
8.2 PLC/NCK interface
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 NC.
'%
+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 -REIRUORDGXQORDGORFDWLRQ
PDQDJHPHQW -REIRUVSLQGOHDQGWXUUHW
)&
1&FKDQQHO 6WDUW$68%
$[LV 6WDUWFRPSHWLQJD[LVVSLQGOH
VSLQGOH 3RVLWLRQLQJD[LVLQGH[LQJD[LV
7RRO $FNQRZOHGJPHQWIRUWRROPDQDJHPHQW
)XQFWLRQLQWHUIDFH
PDQDJHPHQW 'LUHFWLRQVHOHFWLRQIRUWRROPDJD]LQH
)%
5HDGZULWH1&.YDULDEOH
1& 3,VHUYLFHV
5HDG*8'
+0, 0WR1
6DIHW\ 6,UHOD\EUDNHWHVW
,QWHJUDWHG
PLC
58 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface structure
8.2 PLC/NCK interface
The associated signals, which are dependent on the compile cycles, are transmitted cyclically
at the start of OB1. First, signals are transferred from the PLC to the NC, then from the NC to
the PLC. The signals from the PLC to the NC, whose length is specified by machine data
$MN_CC_VDI_IN_DATA, are defined at the beginning of DB9. Behind that in DB9, the signals
from the NC to the PLC, whose length is specified by machine data
$MN_CC_VDI_OUT_DATA, are defined.
To enable data exchange between the NC and PLC, the user may have to synchronize the NC
and PLC as necessary, e.g. using the semaphore technique. Signal transmission is
asynchronous between NC and PLC. This means, for example, that active NC data
transmission can be interrupted by the PLC. This can mean that data is not always consistent.
PLC/NC signals
The group of signals from the PLC to NC includes:
● Signals for modifying the high-speed digital I/O signals of the NC
● Keyswitch and emergency stop signals
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 59
Interface structure
8.2 PLC/NCK interface
'%
%\WH&RQWUROOLQJGLJLWDO1&.LQSXWV
2QERDUGLQSXWV
&RQWUROOLQJGLJLWDO1&.RXWSXWV
2QERDUGRXWSXWV
$[LVWDEOHV
.H\RSHUDWHGVZLWFKHPHUJRII
$FWXDOYDOXHVRIWKHGLJLWDO1&.LQSXWV
2QERDUGLQSXWV
6HWSRLQWVRIWKHGLJLWDO1&.RXWSXWV
2QERDUGRXWSXWV
9DULRXVVLJQDOV
+DQGZKHHOVHOHFWLRQ
+0,
+0,VWDWXVVLJQDOV
6WDWXVVLJQDOVRIWKHEDVLFSURJUDP *3
6WDWXVVLJQDOV 1&.
6RIWZDUHFDPV
'HFRGLQJ
&RQWUROOLQJGLJLWDO1&.LQSXWV
+DQGZKHHO ([WHUQDOLQSXWV
VHOHFWLRQ
&RQWUROOLQJGLJLWDO1&.RXWSXWV
([WHUQDORXWSXWV
$[LVLQWHUIDFH &RQWUROOLQJDQDORJ1&.LQSXWV
*HRD[LVLQWHUIDFHLQ
([WHUQDOLQSXWV
WKHFKDQQHO
&RQWUROOLQJDQDORJ1&.RXWSXWV
([WHUQDORXWSXWV
$FWXDOYDOXHVRIWKHGLJLWDO1&.LQSXWV
([WHUQDOLQSXWV
6HWSRLQWVRIWKHGLJLWDO1&.RXWSXWV
([WHUQDORXWSXWV
$FWXDOYDOXHVRIWKHDQDORJ1&.LQSXWV
([WHUQDOLQSXWV
6HWSRLQWVRIWKHDQDORJ1&.RXWSXWV
([WHUQDORXWSXWV
NC/PLC signals
The group of signals from the NC to PLC includes:
● Actual values of the digital and analog I/O signals of the NC
● Ready and status signals of the NC
Also stored in this group are the HMI handwheel selection signals and the channel status
signals.
The signals for handwheel selection are decoded by the basic program and entered in the
machine/axis-specific interface.
PLC
60 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface structure
8.2 PLC/NCK interface
Inputs:
● All input signals or input values of the NC are also transferred to the PLC.
● The transfer of signals to the NC part program can be suppressed by the PLC. Instead, a
signal or value can be specified by the PLC.
● The PLC can also transfer a signal or value to the NC even if there is no hardware for this
channel on the NC side.
Outputs:
● All signals or values to be output are also transferred to the PLC.
● The NC can also transfer signals or values to the PLC even if there is no hardware for this
channel on the NC side.
● The values transferred by the NC can be overwritten by the PLC.
● Signals and values from the PLC can also be output directly via the NC I/O.
Note
When implementing the digital and analog NC I/O, the information contained in the following
documentation must be taken into account:
Further information
Function Manual Basic Functions; Digital and Analog NC I/O
'%
%\WH
%DVLFSURJUDP
&RQWUROVLJQDOV
0RGHVHOHFWLRQ 0RGHJURXS
0RGHVHOHFWLRQ
6HOHFWLRQVLJQDOVIURP+0, +0,
PRGHJURXS
$FWLYHPRGH
0&3 1&.
PLC/NC signals
The signal groups below must be considered on the interface:
● Control/status signals
● Auxiliary commands / G commands
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 61
Interface structure
8.2 PLC/NCK interface
3RVLWLRQVHWSRLQWIURP
WKH,32
3RVLWLRQ
FRQWUROOHU
&ORVHGORRS
FRQWUROOHUHQDEOH
FDQFHOHG
8SGDWHVHWSRLQW
$FWXDOSRVLWLRQ
YDOXH
PLC
62 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface structure
8.2 PLC/NCK interface
)HHGUDWH
&RPPRQ 6SLQGOHVSHHG
%\WH D[LVVSLQGOH RYHUULGH
VLJQDOV &RQWUROVLJQDOV
7UDYHUVHVLJQDOV
$[LVVLJQDOV /LPLWVZLWFKHV
6SLQGOHVLJQDOV &RQWUROVLJQDOV
'ULYHVLJQDOV &RQWUROVLJQDOV
7HFKQRORJ\ &RQWUROVLJQDOV
*ULQGLQJ $[LV
5HVHUYHG VSLQGOH
GULYH
&RPPRQ 6WDWXVVLJQDOV
D[LVVSLQGOH
$FWLYH,1&PRGH
VLJQDOV
$[LVVLJQDOV 6WDWXVVLJQDOV
$[LDO)YDOXH
6HWJHDUVWDJH
6SLQGOH 6WDWXVVLJQDOV
VLJQDOV 06:HUW
'ULYHVLJQDOV 6WDWXVVLJQDOV
7HFKQRORJ\
*ULQGLQJ 6WDWXVVLJQDOV
1&.
YDOXHIURP06)GLVWULEXWRURIEDVLFSURJUDP
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 63
Interface structure
8.3 Interface PLC/HMI
General
The following groups of functions are required for the PLC/HMI interface:
● Control signals
● Machine operation
● PLC messages
● PLC status display
Control signals
Some control signals are signal inputs, for example, via the machine control panel, which have
to be taken into account by the HMI. This group of signals includes, for example, display actual
values in MCS or WCS, key disable, etc. These are exchanged with the HMI via a separate
interface data block (DB19).
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 operation via HMI using an FB1
parameter "MMCToIF".
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 alarm buffer.
The associated message texts must be stored on the OP or HMI.
PLC
64 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface structure
8.3 Interface PLC/HMI
An FC (FC10) 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
alarm 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.
● Bit fields are evaluated at several levels by FC10.
– Evaluation 1; acquisition of group signals
A group signal is generated for each group of signals if at least one bit signal is set to "1".
This signal is generally linked to the disable signal of the NC/PLC interface (on modules
with diagnostic functions). The group signals are acquired completely in cycles.
– Evaluation 2; acquisition of alarm messages
A fixed specification exists to define which signals in a group generate an alarm message
when they change from "0" to "1".
– Evaluation 3; acquisition of operating signals
A fixed specification exists to define which signals in a group generate an operational
message.
● The scope of the user bit fields (user area) is set by default to 10 areas with 8 bytes each,
but the number of areas can also be adjusted to suit the requirements of the machine
manufacturer via basic program parameters in FB1.
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".
Alarm messages 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 alarm 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 "Alarm gone". This enables the HMI to also maintain
an up-to-date log of pending alarm 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).
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 65
Interface structure
8.3 Interface PLC/HMI
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.
User program
The user PLC program only has to call the basic program block FC10 with appropriate
parameter settings in the cyclic program section and set or reset the bit fields in DB2.
Everything else is handled by the basic program and the HMI.
&KDQJHVLJQDOV
%LWDUUD\V
0HVVDJH
DFTXLVLWLRQ
&KDQQHO )HHGGLVDEOH
5HDGLQGLVDEOH
1&6WDUWGLVDEOH
&KDQQHOQ $/$50B6
6)&
$/$50B64
$[LVVSLQGOH )HHGUDWHVSLQGOH
GLVDEOH
$[LVVSLQGOHQ
8VHUDUHD ,QWHUUXSW
EXIIHU
$FTXLVLWLRQ 0HVVDJHVHUYLFH
*URXSVLJQDOV RIJURXSVLJQDOV
GLVDEOHVLJQDOV IRUFKDQQHODQG 3* +0,23
D[LV'%
PLC
66 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface structure
8.3 Interface PLC/HMI
Switching over a user program from the small DB2 layout to the large DB2 layout (UDT2 → UDT1002)
With the small DB2 layout, i.e. if DB2 is derived from UDT2 - and FB1 parameter "ExtendAlMsg
= FALSE" is used - then a max. of 8 channel areas, max. of 18 axis areas and a max. of 31 user
areas (depending on FB1 parameter "MsgUser") can be used. As default setting, 10 user areas
are defined in the UDT2. When using more than 10 user areas (FB1 parameter "MsgUser"
> 10), then users must extend UDT2 if DB2 is to be symbolically accessed.
With the large DB2 layout, i.e. if DB2 is derived from UDT1002 - and FB1 parameter
"ExtendAlMsg = TRUE" is used - then you can generate alarms for 10 channels, 31 axes and
64 user areas.
If it is no longer possible to generate alarms with the restrictions of the small DB2 layout, then
it may be necessary to switch over an already existing project to the large layout. The
switchover procedure depends on how DB2 is accessed in the project. The various procedures
are described in the following.
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 67
Interface structure
8.3 Interface PLC/HMI
From this STL file, a UDT can be generated that assigns the offsets of the small DB2 version
to the symbolic names of the large DB2 version.
PLC
68 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface structure
8.3 Interface PLC/HMI
Procedure:
1. Using the cross reference list (menu command "Tools" > "Reference data" > "Display"),
search for blocks in the user program that's contain DB2 access operations.
2. Open the program locations involved one after the other and switchover the offset
addresses of the relevant DB2 signals.
The new offset address results from the sum of the previous address and the "offset".
Note
Searching for DB2 accesses in the user program
Not all DB2 access operations are found via the reference data. Accesses via BLK_DB or
pointer are not detected.
A comparison of the particular offset addresses and/or the address offset are listed in the
following table.
Alarm DB2 without alarm extension Off‐ DB2 with alarm extension
number Area Offset set Offset Area
- 0 Chan
(Channel 1 ... 10)
- 120 Axis
(Axis/spindle 1 ... 31)
Addition‐ 182 As of V6.0: AddVa‐
al value lUserA0 (AddValU‐
serA0 0 ... 63)
(Up to V4.8: ZInfo0
0 ... 63)
5C0000 .. (C1 ... C8) Byte 0 ... <last byte 310 Byte 310 ... <last ChanA
. 5C1315 Channel 1 ... 8 for channel area> byte for channel Channel 1 ... 10
area>
60AA00 .. (Axis areas) Byte 144 ... <last 346 Byte 490 ... <last AxisA
. 60AA15 Axis/spindle byte for axis area> byte for axis area> Axis/spindle 1 ... 31
1 ... 18
70UU00 . (User area) Byte 180 ... <last 374 Byte 554 ... <last UserA
.. User area byte for user area> byte for user area> User area 0 ... 63
70UU63
0 ... 31
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 69
Interface structure
8.4 PLC/MCP/HHU interface
A check has to be made whether BLKMOV copy operations are used that copy a memory area
that is larger than a DB2 area. If this is the case, then copying must be split up over several
operations. The new offset address must then be considered and adapted depending on the
particular DB2 area.
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.
PLC
70 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface structure
8.4 PLC/MCP/HHU interface
%+*
&XVWRPHU
7&8
NH\VGLVSOD\V 0&3
(WKHUQHWEXV
&3'VO 1&.
+0,
):
3*
(QJLQHHULQJ
(WKHUQHWEXV
'35
)%
0&3
6LJ
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 FB1 using 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. DIP192, DIP17).
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 71
Interface structure
8.4 PLC/MCP/HHU interface
2SHUDWLQJPRGHV
,1&PRGH
(%Q .H\VLJQDOV )HHGUDWHVSLQGOHRYHUULGH
$UURZNH\V
)&
.H\RSHUDWHGVZLWFK
0RGH
&XVWRPHUNH\V JURXS
1&.D[LV
&XUUHQWPRGH
VSLQGOH
/('V &XUUHQW,1&PRGH LQWHUIDFH
$%P )HHGUDWHVSLQGOH1&VWDWXV
$FWLYHDUURZNH\
6WDWXVRIFXVWRPHUNH\V
0RQLWRULQJ
$'R
7UDQVPLWGDWD
$'S 0RQLWRULQJ
5HFHLYHGDWD
PLC
72 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Structure and functions of the basic program 9
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 (OB100)
● Cyclic operation (OB1)
● Process alarms (OB40)
● Asynchronous errors: Diagnostics alarm (OB82), module failure (OB86)
The calls of the function blocks of the basic and user programs must be programmed by the
user in the organization blocks (OB).
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 73
Structure and functions of the basic program
2% )%
%DVLFSURJUDP
5HVWDUW
8VHUSURJUDP
2% )&
%DVLFSURJUDP )&)&)&)&
0&3VLJQDOV
+7bVLJQDOV
)&)&)&
7RROPDQDJHPHQW
)&
6SLQGOHFRQWURO
&\FOLFSURFHVVLQJ
)&
6WDUW$683
)%)%)%)%
8VHUSURJUDP
5HDGZULWHWDJ
3,VHUYLFHV
)&
6WDUGHOWD
)&
'LVSOD\FRQWURO
)& +7
)DXOWDQGRSHUDWLQJ
PHVVDJHV
2%
)&
%DVLFSURJUDP
+DUGZDUHLQWHUUXSW
8VHUSURJUDP
2% )&
%DVLFSURJUDP
'LDJQRVWLFLQWHUUXSW
8VHUSURJUDP
2% )&
%DVLFSURJUDP
0RGXOHUDFNIDLOXUH
8VHUSURJUDP
PLC
74 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Structure and functions of the basic program
9.2 Cyclic operation (OB1)
Startup,
The synchronization of NC and PLC is performed during start-up. 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 OB100 and always commences cyclic execution at the start of OB1.
Synchronization
The PLC is synchronized with the HMI, NC and CP during power-up.
Sign-of-life
After a correct initial start and the first complete OB1 cycle (basic setting cycle) the PLC and NC
continuously exchange sign-of-life signals. If the sign of life from the NC fails to materialize, the
PLC/NC interface is initialized and the signal "NC CPU ready" in DB10 is set to FALSE.
General
The NC/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 transferred cyclically; transfer of the
auxiliary commands and G commands takes place only 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 NC
● Acquisition and conditioning of the user errors and operational messages.
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 75
Structure and functions of the basic program
9.2 Cyclic operation (OB1)
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 modes)
● Channel-specific signals (such as program and feed modifications)
● Axis- and spindle-specific signals (such as feed disable)
PLC
76 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Structure and functions of the basic program
9.3 Time-interrupt processing (OB35)
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 duration = 1 cycle time).
G group decoders
In the case of G commands sent by the NC, 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
commands are entered in the channel DBs. The entered G commands are retained even after
the NC program has terminated or aborted.
Note
During system start-up, 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 messages and operational messages is
performed by an FC in the basic program.
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 77
Structure and functions of the basic program
9.5 Diagnostic alarm, module failure processing (OB82, OB86)
General
In the event of a diagnostic alarm or failure of an I/O module, basic program block OB82 or
OB86 is called. The basic program block FC5 "Diagnostic alarm and module failure" is called
from these blocks.
Bus diagnostics
The status of the DP slave modules at PROFIBUS connections MPI/DP, DP1 - or the
PROFINET connection PN - is signaled to the user program by the basic program using the
"Slaves OK" group signal of the particular bus system:
● DB10.DBX92.0 == 1 (MPI/DP bus: Slaves OK)
● DB10.DBX92.1 == 1 (DP1 bus: Slaves OK)
● DB10.DBX92.2 == 1 (PN bus: Slaves OK)
The group signal is derived from the LED status of the respective bus system (system state list
SZL 0x174).
Alarm output
If an error or a failure of a slave is detected at the particular bus system, the following alarm is
displayed:
● Alarm 400551 (MPI/DP bus)
● Alarm 400552 (DP1 bus)
● Alarm 400553 (PN bus)
The alarm is automatically deleted again when the error is removed.
PLC
78 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Structure and functions of the basic program
9.6 Response to NCK failure
The alarm is immediately suppressed as soon as the signal is set. Before the fault occurs or
while a fault is already active.
When the signal is reset, in the case of a fault, the corresponding alarm is displayed.
The signals are reset when the control system powers up.
Note
By setting the signal, the fault monitoring for the complete bus line is deactivated!
General
During cyclic operation, the PLC continuously monitors NC availability by querying the sign-of-
life. If the NC is no longer reacting, the NC/PLC interface is initialized, and the NC-CPU ready
signal in the area of the signals from NC (DB 10.DBX 104.7) is reset. Furthermore, the signals
sent from the NC 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.
NC → PLC signals
The signals sent by the NC to the PLC are divided into the following groups:
● Status signals from the NC, channels, axes and spindles
● Modification signals of the auxiliary functions
● Values of the auxiliary functions
● Values of the G commands
Status signals:
The status signals from the NC, channels, axes, and spindles are reset.
Auxiliary function change signals:
Auxiliary function change 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 NC.
G command values:
G command values are reset (i.e. each initialized with the value 0).
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 79
Structure and functions of the basic program
9.7 Functions of the basic program called from the user program
PLC → NC signals
The signals sent by the PLC to the NC are divided into control signals and tasks that are
transferred by FCs to the NC.
Control signals:
The control signals from the PLC to the NC are frozen; cyclic updating by the PLC basic
program is suspended.
Jobs from PLC to NC:
The FCs and FBs, which are used to pass jobs to the NC, must no longer be processed by the
PLC user program, as this could lead to incorrect checkback signals. During power-up of the
control, a job (e.g. read NC data) must not be activated in the user program until the NC-CPU
ready signal is set.
9.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 OB1, OB40 and
OB100, 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 NC:
● Traversing concurrent axes (FC18)
● Start asynchronous subprograms (ASUPs) (FC9),
● Select NC programs (FB4)
PLC
80 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Structure and functions of the basic program
9.7 Functions of the basic program called from the user program
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 MDI and AUTOMATIK via FC.
● The start is independent of NC block boundaries.
Function calls are available for positioning axes, indexing axes and spindles (FC18).
)&
6SLQ&WUO
6WDUW ,Q3RV
6WRS
(UURU
)XQFW
6WDWH
0RGH
$[LV1R
3RV
)5DWH
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 81
Structure and functions of the basic program
9.7 Functions of the basic program called from the user 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 FB4 (ASUP)
(e.g. if no interrupt no. has been assigned), a start error is output (StartErr = TRUE).
Read/Write NC variables
NC variables can be read with FB GET while values can be entered in NC variables with FB
PUT. The NC 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, a PC software (NC-Var-Selector) 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. NC 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.
PLC
82 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Structure and functions of the basic program
9.8 Symbolic programming of user program with interface DB
)% )%
*(7 387
5HT (UURU 5HT (UURU
1XP9DU 1'5 1XP9DU 'RQH
$GGU 6WDWH $GGU 6WDWH
8QLW 8QLW
&ROXPQ &ROXPQ
/LQH /LQH
5' 6'
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. Generally, 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 155)".
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 SINUMERIK 840D sl STEP 7 Toolbox V16
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, 77, 1002, 1071, 1072, 1073 are used.
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 83
Structure and functions of the basic program
9.8 Symbolic programming of user program with interface DB
UDT assignments
UDT number Assignment to interface DB Meaning
UDT2 DB2 Alarms/messages
UDT10 DB10 NCK signals
UDT11 DB11 Mode group signals
UDT19 DB19 HMI signals
UDT21 DB21 to DB30 Channel signal
UDT31 DB31 to 61 Axis/spindle signals
UDT71 DB71 Tool management: Load/unload locations
UDT72 DB72 Tool management: Change in spindle
UDT73 DB73 Tool management: Change in revolver
UDT77 DB77 MCP and HHU signals with standard SDB 210
UDT1002 DB2 Extended alarms / messages (FB1 parameter "Ex‐
tendAlMsg:=TRUE")
UDT 1071 DB 1071 Tool management: Loading/unloading points (mul‐
titool)
UDT 1072 DB 1072 Tool management: Change in spindle (multitool)
UDT 1073 DB 1073 Tool management: Change in turret (multitool)
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 UDT31 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 command for data access
e.g. "U DB31.DBX60.0" (spindle / rotary axis) is necessary in the program previously created.
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.
PLC
84 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Structure and functions of the basic program
9.9 M decoding acc. to list
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
Function description
Up to 256 M functions with extended address can be decoded from the basic program using the
"M decoding according to list" function. The function is activated using FB1 parameter
"ListMDecGrp" (number of M groups for decoding). The assignment of the M function with
extended address and a signal in the signal list is defined in the decoding list. The signals are
also grouped for this purpose.
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 85
Structure and functions of the basic program
9.9 M decoding acc. to list
1& 3/&
%DVLF3/&SURJUDP 8VHUSURJUDP
&KDQQHO
3DUWSURJUDP '%
)&;
'HFRGLQJOLVW
10 0GHFRGLQJDFF
WROLVW
'%
6LJQDOVWR1& 6LJQDOOLVW
5HDGLQGLVDEOH 0DFKLQLQJ
6WDWXVFRQWURO
VLJQDO
5HDGLQGLVDEOH ฺ
'% )&<
ฺ
5HDGLQGLVDEOH
&KDQQHO
3DUWSURJUDP
'%
10 5HDGLQGLVDEOH
Activation
M decoding is activated using FB1 parameter "ListMDecGrp"
The number of M groups to the evaluated and/or decoded is specified using the appropriate
parameter. The function is active for a parameter value = 1 ... 16.
● Basic program, OB100, FB1 parameter ListMDecGrp = <number of M groups> (also see
" FB1: RUN_UP - basic program, start section (Page 155) ").
PLC
86 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Structure and functions of the basic program
9.9 M decoding acc. to list
● There must be an entry in the decoding list for every group of M functions to be decoded.
● The assignment between the M function with extended address and the signal to be set in
the signal list is specified in the decoding list using the first and last M function of the
associated group.
– First M function: Parameter: "MFirstAdr" ≙ signal or bit 0
– Last M function: Parameter: "MLastAdr" ≙ dependent on the difference to the first M
function maximum signal or bit 15
Structure of the decoding list (DB75):
An entry in the decoding lists consists of 3 parameters, each of which is assigned to a group.
Group Extended M address First M address of the group Last M address of the group
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
Example
3 groups of M functions are to be decoded:
● Group 1: M2 = 1 to M2 = 5
● Group 2: M3 = 12 to M3 = 23
● Group 3: M40 = 55
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 87
Structure and functions of the basic program
9.9 M decoding acc. to list
Program code
DATA_BLOCK DB 75
TITLE =
VERSION : 0.0
STRUCT
MSigGrp : ARRAY [1 .. 16 ] OF STRUCT
MExtAdr : INT;
MFirstAdr : DINT;
MLastAdr : DINT;
END_STRUCT ;
BEGIN
MSigGrp[1].MExtAdr := 2; extended M address of the 1st group
MSigGrp[1].MFirstAdr := L#1; first M address of the group
MSigGrp[1].MLastAdr := L#5; last M address of the group
MSigGrp[2].MExtAdr := 3; extended M address of the 2nd group
MSigGrp[2].MFirstAdr := L#12; first M address of the group
MSigGrp[2].MLastAdr := L#23; last M address of the group
MSigGrp[3].MExtAdr := 40; extended M address of the 3rd group
MSigGrp[3].MFirstAdr := L#55; first M address of the group
MSigGrp[3].MLastAdr := L#55; last M address of the group
END_DATA_BLOCK
Call FB 1, DB 7(
...
ListMDecGrp := 3; //M decoding of three groups
...
);
Description
A restart must be performed after the entry has been made in OB100 and the decoding list
(DB75) has been transferred to the PLC. The basic program creates the signal list (DB76) when
it restarts.
An NC program is then started, for instance in the 1st channel. An extended M function is
included in this (M3=17). When decoding the M function (M3 ≙ group 2), the associated signal
(DBW1.5) is set in the signal list (DB76) and the interface signal "Read-inhibit" in the 1st
channel. The execution of the NC program is stopped. Further, the "Extended address M
function" and the "M function number" are displayed in the channel DB of the 1st channel.
The "Read-in inhibit" signal in the 1st channel is reset once the user has reset all of the signals
output from this channel in the signal list (DB76), and has therefore acknowledged them.
PLC
88 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Structure and functions of the basic program
9.10 PLC machine data
General information
The user has the option of storing PLC-specific machine data in the NC. These machine data
can then be processed during power-up of the PLC (OB100). This enables, for example, user
options, machine expansion levels, machine configurations, etc., to be implemented.
The interface to read this data is in DB20. However, DB20 is only created by the basic program
during power-up when user machine data is used, i.e. sum of GP parameters "UDInt", "UDHex"
and "UDReal" is greater than ZERO.
Note
User machine data as ARRAY
The user machine data is always handled internally as an ARRAY. ARRAY variables occupy
the memory in the PLC up to the next word limit, i.e. at a BYTE with an even address.
A filler byte is therefore added internally when there is an odd number in MD14506
$MN_MAXNUM_USER_DATA_HEX. This filler byte is included in the FB1 output parameter
"UDHex" (number of hexadecimal machine data).
Example:
MD14506 $MN_MAXNUM_USER_DATA_HEX = 3 ⇒ UDHex = 4, although only three hex
values can be read.
Data storage
The data is seamlessly stored in the DB20 by the basic PLC program in the following sequence:
1. INT values
2. HEX values (bit arrays)
3. FLOAT values
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 89
Structure and functions of the basic program
9.10 PLC machine data
'%
8VHUPDFKLQHGDWD 1XPEHURI8',QW
W\SH,17
8VHUPDFKLQHGDWD 1XPEHURI8'+H[
W\SH%<7(
8VHUPDFKLQHGDWD 1XPEHURI
W\SH5($/ 8'5HDO
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.
Example
For the project in the example, four INT values, two HEX values for bit information, and one
FLOAT value are needed.
Machine data:
PLC
90 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Structure and functions of the basic program
9.10 PLC machine data
DB20
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
TYPE UDT20
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
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 91
Structure and functions of the basic program
9.10 PLC machine data
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];
...
PLC
92 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Structure and functions of the basic program
9.11 Configuration machine control panel, handheld unit, direct keys
General
Up to two machine control panels and one handheld unit can be in operation at the same time.
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.
Parameterization of components is always performed by calling the basic program block FB1
in OB100. FB1 saves its parameters in the associated instance data block (DB7, symbolic
"gp_par"). Separate parameter sets are provided for each machine control panel and the
handheld unit. The input/output addresses of the user must be defined in these parameter sets.
These input and output addresses are also used in FC19, FC24, FC25, FC26 and FC13.
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 MCP and
HHU 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 "BHG" 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".
Parameterization is completely realized via the MCP/HHU parameters in FB1.
In the other case the transmission is via the PLC operating system through the PROFIBUS
configuration.
The parameterization is performed via STEP 7 in HW-Config. To enable the basic program to
access this data and failure monitoring of MCP/HHU, the addresses set in the FB1 parameters
must be made known to the basic program.
An overview of the various coupling mechanisms is shown below. Mixed operation can also be
configured.
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 93
Structure and functions of the basic program
9.11 Configuration machine control panel, handheld unit, direct keys
If an error is detected due to a timeout, 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 deleted by the GP.
Note
The abbreviation "(n.r.)" in the tables below means "not relevant".
(WKHUQHW
&3 1&
'VO 0&3 0&3 %+*
LQW '
3/& 3
5
03,'3
'3
PLC
94 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Structure and functions of the basic program
9.11 Configuration machine control panel, handheld unit, direct keys
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: MSST 2 failed
● 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
power-up.
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 95
Structure and functions of the basic program
9.11 Configuration machine control panel, handheld unit, direct keys
the MCP) is to be used. Only the data stream of the direct keys (2 bytes) is transferred via the
direct key interface.
MCP identification
Via the identify interface in DB7 it is possible to query the type of the Ethernet component (MCP,
HT 2, HT 8 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"
PLC
96 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Structure and functions of the basic program
9.11 Configuration machine control panel, handheld unit, direct keys
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 HT 2 or an HT 8 or no device is
connected to the terminal box. With this information, the MCP channel or the HHU channel can
be activated. In cyclic operation the parameters can be written symbolically by the user
program and read via the symbol names of the DB7 (gp_par).
IdentMcpBusProfilNo Value
MCP, HHU, HT 8, HT 2 B#16#0
Direct keys such as e.g. OP 08T, OP 12T 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
HT 8 B#16#85
TCU_DT (direct keys) B#16#86
MCP_MPP B#16#87
HT 2 B#16#88
OP 08T (direct keys) B#16#89
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 97
Structure and functions of the basic program
9.11 Configuration machine control panel, handheld unit, direct keys
(WKHUQHW
&3 1&.
'VO 0&3 0&3 %+*
LQW3/& '
3
5
03,'3
'3
352),%86FRQILJ
IRU0&3++8
PLC
98 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Structure and functions of the basic program
9.11 Configuration machine control panel, handheld unit, direct keys
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 OB82 and OB86 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 SFC12. 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 %+*
LQW3/& '
3
5
03,'3
'3
352),%86
FRQILJIRU0&3
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 99
Structure and functions of the basic program
9.11 Configuration machine control panel, handheld unit, direct keys
MCP failure normally switches the PLC to the STOP state. If this is undesirable, then OB82 and
OB86 can be used to avoid a PLC stop. The basic program has, as standard, the OB82 and
OB86 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 SFC12. 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.
PLC
100 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Structure and functions of the basic program
9.11 Configuration machine control panel, handheld unit, direct keys
(WKHUQHW
&3 1&.
'VO 0&3 0&3 %+*
LQW3/& '
3
5
03,'3
'3
352),1(7
352),1(7
FRQILJIRU0&3
MCP failure normally switches the PLC to the STOP state. If this is undesirable, then OB82 and
OB86 can be used to avoid a PLC stop. The basic program has, as standard, the OB82 and
OB86 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.
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 101
Structure and functions of the basic program
9.12 Switchover of machine control panel, handheld unit
Setting MCPxStop := True causes the basic program to deactivate the MCP as a slave via
SFC12. 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.
PROFIBUS variant
With PROFIBUS variants, this functionality is only possible to a limited extent and with
additional user effort.
With the PROFIBUS variant of the MCP, the data area of the DB77 for specified MCP1, MCP2
or HHU can be used for the MCP pointer on FB1. The MCP slave bus address must be set
correctly under MCPxBusAdr as this is used as the basis for monitoring. A user program copy
routine must copy the signals of the active MCP from the I/O area configured in HW Config to
DB77. This enables a number of MCPs on the PROFIBUS to be switched via signals. Set the
MCPxStop parameter to TRUE for the switchover phase from one MCP to another.
Control signals
Parameters MCP1Stop, MCP2Stop and BHGStop can be used to stop communication with
individual components (parameter setting = 1). 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 FB1 call.
Example: Stopping the transfer from the 1st machine control panel:
SET;
S gp_par.MCP1Stop;
PLC
102 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Structure and functions of the basic program
9.13 Flexible axis configuration
Requirement
MCP firmware as of V02.02.04
Example
Extract from OB100: (based on the example for MCP1)
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 103
Structure and functions of the basic program
9.14 Selection of JOG axis via HMI
This flexibility is implemented with tables for axis numbers in DB10. The parameterization for
the 1st machine control panel (MCP) starts from byte 8 (symbolic name MCP1AxisTbl[1..22])
and for the 2nd machine control panel (MCP) from byte 32 (symbolic name
MCP2AxisTbl[1..22]). The required machine axis numbers must be entered byte by byte here.
The axis numbers are not checked for validity, meaning that incorrect entries can result in a
PLC Stop. It is permissible to enter a value of 0 in the axis table and does not result in axis
selection by the associated key. In this way, gaps in the assignment of axis selection keys can
be left.
The value entered for the 1st machine control panel in DB10.DBW30 (symbolic name
MCP1MaxAxis) or for the 2nd machine control panel in DB10.DBW54 (symbolic name
MCP2MaxAxis) defines the maximum possible number of axis selection keys. If the value 0
(default setting) is used, all axis selection keys assigned a machine axis can be used,
depending on the MCP variant used. The number of available axis selection keys is determined
by the design of the MCP variant.
The value in DB 10 can also be dynamically adjusted. After this, the axis must be selected again
on the MCP in question. Axis numbers may not be switched over while the axes are traversing
the relevant direction keys.
The following figure is intended to illustrate the principle using the example of a MCP483 (call
of FC19) with 9 axis selection keys.
0DFKLQHD[LV ; < =
$GGUHVV 6\PERO 5 5 5
QXPEHU
'%'%% 1&0&3$[LV7EO>@
'%'%% 1&0&3$[LV7EO>@
5 5 5
'%'%% 1&0&3$[LV7EO>@
'%'%% 1&0&3$[LV7EO>@
5 5 5
The 8th axis selection key (R8) selects the machine axis with machine axis number 12.
General
From software version 4.92, the user can select machine or geometry axes using operating
software (for example: HMI Operate). This permits implementation of operating concepts on
touch operator panels, such as the HT 10.
PLC
104 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Structure and functions of the basic program
9.14 Selection of JOG axis via HMI
You will find further information in the descriptions "Commissioning Manual – SINUMERIK
Operate (IM9)".
+0, 0RGHJURXSQXPEHU
$[LVVHOHFWLRQIURP+0,
$[LVVHOHFWLRQ
0&3D[LVVHOHFWLRQ )&
'% )&
'%%$[LVWDEOHV RU)&
0&3
&KDQQHOQXPEHU
,QSXWVRXWSXWV
'%
)OH[LEOHD[LVFRQILJXUDWLRQ
$VVLJQPHQWRIWKHD[LVVHOHFWLRQRU
GLUHFWLRQNH\VWRPDFKLQHD[LV
QXPEHUV
If assignment of the selection by flexible axis assignment is not possible, all LEDs are
deactivated on the axis selection keys of the MCP. This means that it is possible to select axes
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 105
Structure and functions of the basic program
9.15 Mixed operation from the machine control panel and the handheld terminal
that cannot be selected via the keys of the MCP. This is supplementary operation in addition to
axis selection via the keys of the MCP.
9.15 Mixed operation from the machine control panel and the handheld
terminal
General
The PLC basic program supports simultaneous operation of up to two machine control panels
and one handheld terminal. Different PLC basic program blocks are available for the machine
control panel (MCP) and the handheld terminal (HT)
This permits implementation of many possible applications. The blocks of the MCP variants
FC19 (symbolic name "MCP_IFM") M variant, FC24 (symbolic name "MCP_IFM2") narrow M
variant, and FC26 (symbolic name "HPU_MCP") provide support with operation of multiple
channels, multiple mode groups (BAG), and different axis configurations.
Configuration
Parameterization of components is always performed by calling the basic program block FB1
in OB100. FB1 saves its parameters in the associated instance data block, DB7 (symbolic
name gp_par).
These parameterizations are used by the individual blocks FC19, FC24, FC25, and FC26.
Each individual MCP or HT block itself has input and output parameters that are used for the
channel, mode group, and spindle interfaces to be provisioned.
The exception is block FC13 (symbolic name BHGDisp). This block does not support
provisioning of channel, mode group, or spindle signals. For this reason, it is not referred to in
the following application examples.
For example, multiple channels with an MCP (FC19) and HT (FC26) with the same mode group
In this example, the MCP is to provision channel 1 and the HT is to provision channel 2 of a
system. The two channels are assigned to the same mode group (BAG). This means that
channels 1 and 2 can be run separately. The MCP is exclusively responsible for provisioning
the mode group signals.
Call of FC19 for 1st MCP, mode group 1, channel 1, spindle: Axis 4
PLC
106 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Structure and functions of the basic program
9.15 Mixed operation from the machine control panel and the handheld terminal
Example of multiple channels with alternative operation by MCP or HT with the same mode group
In this example, the MCP is to provision channels 1 and 2 and the HT is to provision channels
1 and 2 of a system. The two channels are assigned to the same mode group (BAG).
The calls of blocks FC19 and FC26 are programmed to be mutually exclusive. Otherwise, the
blocks called last would overwrite the signal states of the previous blocks. Moreover, the
spindles, the feed stop and spindle stop signal are only provisioned when FC19 processing is
active. While the FC19 call is skipped, the signals remain in the state of the last FC19 run.
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 107
Structure and functions of the basic program
9.15 Mixed operation from the machine control panel and the handheld terminal
PLC
108 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
SPL for Safety Integrated 10
Rather than being a function of the basic program, SPL is a user function. The basic program
makes a data block (DB18) available for Safety SPL signals and runs a data comparison to
ensure the consistency of SPL program data in the NC.
Further information
Function Manual Safety Integrated
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 109
SPL for Safety Integrated
PLC
110 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Assignment overview 11
11.1 Block address range for PLC user program
From the following block number assignment overview, you can find out whether a specific
block number (or block address) is assigned or reserved by the PLC basic program, or whether
it can be used for the PLC user program.
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 111
Assignment overview
11.1 Block address range for PLC user program
¹Not recommended for use, but possible with limitations. Data blocks of channels, axes/
spindles and tool management functions that have not been activated can be used by the user,
but this can result in conflicts when upgrading or migrating the PLC basic program.
²If you use SINUMERIK Safety Integrated plus (F-PLC), this number range is used for
automatically generated F-blocks by default. You can adapt the number range used by the F-
system, but you must select a sufficiently large range of numbers.
²If you use SINUMERIK Safety Integrated plus (F-PLC), this number range is used for
automatically generated F-blocks by default. You can adapt the number range used by the F-
system, but you must select a sufficiently large range of numbers.
PLC
112 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Assignment overview
11.1 Block address range for PLC user program
²If you use SINUMERIK Safety Integrated plus (F-PLC), this number range is used for
automatically generated F-blocks by default. You can adapt the number range used by the F-
system, but you must select a sufficiently large range of numbers.
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 113
Assignment overview
11.1 Block address range for PLC user program
PLC
114 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
PLC functions for HMI (DB19) 12
12.1 Channel selection
Function
The channel displayed on the HMI, e.g. in the machine start screen, can be selected from the
PLC user program via the HMI/PLC interface.
Requirement
More than one channel is parameterized in the NC.
DB19 Meaning
DBX32.0 - .5 PLC → HMI Function number: 1 = channel selection
DBX32.6 PLC → HMI Function request
DBX32.7 HMI → PLC Status: 1 = "function being executed"
DBB33 PLC → HMI Channel number: 1, 2, 3, ... maximum number of channels
Next channel: FFH
DBB36 HMI → PLC Error identification:
● 0: No error
● 1: Invalid function number (DBX32.0 - .5)
● 2: Invalid parameter (DBB33 - DBB35)
● 3: Error when writing the HMI-internal variable
● 10: Channel not present (DBB33)
Functional sequence
PLC → HMI
The PLC user program must maintain the following execution sequence:
1. Check whether the interface is free for a new job:
– DB19.DBX32.6 == 0 (function request)
– DB19.DBX32.7 == 0 (status)
2. If the interface is free, the job data must be entered and the function request set:
– DB19.DBB33 = <channel number>
– DB19.DBX32.0 - .5 = 1 (function number)
– DB19.DBX32.6 = 1 (function request)
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 115
PLC functions for HMI (DB19)
12.2 Program selection
HMI → PLC
The HMI makes the following responses for error-free parameterization:
1. Once the HMI has recognized the function request for channel selection, the status is set to
"function being performed" and the function request reset:
– DB19.DBX32.7 = 1 (status)
– DB19.DBX32.6 = 0 (function request)
2. Once the channel selection has been performed, the status is reset again and value 0 is set
as error identification:
– DB19.DBX32.7 = 0 (status)
– DB19.DBX36 = 0 (error identification)
The HMI makes the following responses for faulty parameterization:
● The function request is reset and the appropriate error identification is set:
– DB19.DBX32.6 = 0 (function request)
– DB19.DBX36 = <error identification>
Function
Preselected programs/workpieces can be selected for machining by the NC via the PLC/HMI
interface.
The preselection is implemented by entering programs/workpiece in files, these are known as
PLC program lists (*.ppl).
Requirements
The following machine data must be set to allow the HMI to process tasks:
MD9106 $MM_SERVE_EXTCALL_PROGRAMS
In order to activate a sector-specific PLC program list, you must set the appropriate machine
data and at least the protection level password:
● Area User
– MD51041 $MN_ENABLE_PROGLIST_USER = 1
– Protective level password: 3 (users)
– Program list: /user/sinumerik/hmi/plc/programlist/plc_proglist_user.ppl
● Area Manufacturer (OEM)
– MD51043 $MN_ENABLE_PROGLIST_MANUFACT = 1
– Protective level password: 1 (manufacturer)
– Program list: /oem/sinumerik/hmi/plc/programlist/plc_proglist_manufacturer.ppl
PLC
116 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
PLC functions for HMI (DB19)
12.2 Program selection
Note
The PLC may only request a new job if the last job has been acknowledged by the HMI:
DB19.DBB26 == 0
Program list
DB19.DBB16 = <number of the program list>
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 117
PLC functions for HMI (DB19)
12.2 Program selection
Program number
The program number refers to the programs contained in the selected program list.
DB19.DBB17 = <program number>
● user area: 1 - 100
● oem area: 201 - 255
Job acknowledgment
● DB19.DBX26.7 == 1 (selection identified)
● DB19.DBX26.3 == 1 (program is selected)
● DB19.DBX26.2 == 1 (error when selecting the program, see error ID DB19.DBB27)
● DB19.DBX26.1 == 1 (job completed)
Error code
DB19.DBB27 == <value>
<Value> Meaning
0 No error
1 Invalid program list number (DB19.DBB16)
3 User-specific program list plc_proglist_main.ppl not found (for DB19.DBB16 ≠ 129, 131 only)
4 Invalid program number (DB19.DBB17)
5 The job list in the selected workpiece could not be opened
6 Error in job list (Job list Interpreter returns error)
7 No instructions were found in the job list
8 HMI could not execute the selection (SELECT)
9 An error with no further details occurred upon selection
10 An error occurred during analysis of the job list
11 The instruction is not available
12 Invalid instruction (LOAD, UNLOAD, SELECT only)
13 Not all channels have the Reset status
14 The channel number is invalid
PLC
118 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
PLC functions for HMI (DB19)
12.5 Screen numbers
Value Meaning
0 Key lock inactive
1 Key lock active
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 119
PLC functions for HMI (DB19)
12.5 Screen numbers
If the HMI monitor is active, the current screen number is no longer displayed in DB19.DBW24,
but instead in the user-specific configured area of the HMI monitor (Page 129).
JOG mode
Screen Number
Turning technology
Cycle start screen for all screens that can be taken over 81
Milling technology
Cycle start screen for all screens that can be taken over 3
Turning/milling
Start screen 1900
T,S,M 2
Set WO 21
Positioning 4
Face milling 18
Stock removal 80
Cycle start screen for all user screens 91
General settings 1
Multi-channel function settings 106
Collision avoidance settings 107
Measurement log settings 108
Swiveling 60
All G commands 100
Actual zoom value (MCS/WCS) 101
Thread synchronizing 102
Retract 103
PLC
120 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
PLC functions for HMI (DB19)
12.5 Screen numbers
Screen Number
Handwheel 104
Action synchronization 105
Turning technology: Workpiece zero
Workpiece zero (main menu) 30
User screen 31
User screen 34
User screen 35
User screen 36
User screen 37
User screen 38
User screen 40
Measure edge Z 5
Turning technology: Workpiece, measurement
Measure tool (main menu) 50
Manual X or user screen 51
Manual Y 71
Manual Z or user screen 52
Zoom or user screen 53
User screen 54
User screen 55
Probe calibration X or user screen 56
Probe calibration Z or user screen 57
Automatic length in Z 58
Automatic length in Y 73
Automatic length in X 59
Milling technology: Workpiece zero
Workpiece zero (main menu) 30
Measure edge X 5
Measure edge X 22
Measure edge Z 23
User screen 7
Align edge or user screen 31
Distance 2 edges or user screen 32
Right-angled corner 33
Any corner or user screen 8
Rectangular pocket 34
1 hole or user screen 9
2 holes 35
3 holes 36
4 holes 37
Rectangular spigot 38
1 circular spigot or user screen 10
2 circular spigots 39
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 121
PLC functions for HMI (DB19)
12.5 Screen numbers
Screen Number
3 circular spigots 40
4 circular spigots 41
Set up level 42
Probe length calibration or user screen 11
Probe radius calibration 12
Milling technology: Workpiece, measurement
Measure tool (main menu) 50
- Measure length, manual (with milling tool) or 16
- Measure length in X, manual (with turning tool) or
- User screen
Measure length in Y, manual (with turning tool) 74
Measure length in Z, manual (with turning tool) 24
Measure diameter, manual or user screen 17
- Measure length, automatic (with milling tool) or 13
- Measure length in X, automatic (with turning tool) or
- User screen
Measure length in Y, automatic (with turning tool) 75
Measure length in Z, automatic (with turning tool) 25
Measure diameter, automatic or user screen 14
User screen 51
Probe calibration or user screen 15
Fixed point calibration or user screen 52
RunMyScreens (only for set JobShopIntegration)
User screen for the 1st horizontal softkey 96
User screen for the 2nd horizontal softkey 98
User screen for the 3rd horizontal softkey 99
User screen for the 4th horizontal softkey 94
User screen for the 5th horizontal softkey 95
User screen for the 6th horizontal softkey 92
User screen for the 7th horizontal softkey 97
User screen for the 8th horizontal softkey 90
User screen for the 9th horizontal softkey 83
User screen for the 10th horizontal softkey 82
User screen for the 11th horizontal softkey 93
User screen for the 12th horizontal softkey 84
User screen for the 13th horizontal softkey 85
User screen for the 14th horizontal softkey 86
User screen for the 15th horizontal softkey 87
User screen for the 16th horizontal softkey 88
PLC
122 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
PLC functions for HMI (DB19)
12.5 Screen numbers
DB19.DBB24
Screen Screen number
Turning/milling
Taper turning 61
Angle milling 62
Stop 63
Straight line 1300
Straight line all axes 1330
Straight line X alpha 1340
Straight line Z alpha 1350
Circle 1360
Drilling 1400
Center drilling 1410
Drilling, thread centered 1420
Drilling, centering 1433
Drilling, drilling 1434
Drilling, reaming 1435
Drilling, boring 1436
Drilling, deep hole drilling 1440
Drilling, deep hole drilling 2 1441
Drilling, tapping 1453
Drill thread milling 1455
Positions 1473
Position row 1474
Position grid 1477
Position frame 1478
Position circle 1475
Position pitch circle 1479
Obstacle 1476
Turning 1500
Turning, stock removal 1 1513
Turning, stock removal 2 1514
Turning, stock removal 3 1515
Turning, groove 1 1523
Turning, groove 2 1524
Turning, groove 3 1525
Turning, undercut form E 1533
Turning, undercut form F 1534
Turning, undercut thread DIN 1535
Turning, undercut thread 1536
Turning, thread, longitudinal 1543
Turning, thread, taper 1544
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 123
PLC functions for HMI (DB19)
12.5 Screen numbers
DB19.DBB24
Screen Screen number
Turning, thread, facing 1545
Turning, thread, chain 1546
Turning, cut-off 1550
Milling 1600
Milling, face milling 1610
Milling, rectangular pocket 1613
Milling, circular pocket 1614
Milling, rectangular spigot 1623
Milling, circular spigot 1624
Milling, longitudinal groove 1633
Milling, circumferential groove 1634
Milling, open groove 1635
Milling, multi-edge 1,640
Milling, thread milling 1454
Milling, engraving 1670
Contour turning 1,200
Contour turning, new contour / last contour 1210
Contour turning, stock removal along contour 1220
Contour turning, contour grooving 1230
Contour turning, contour plunge turning 1240
Contour milling 1100
Contour milling, new contour / last contour 1110
Contour milling, path milling 1120
Contour milling, centering 1130
Contour milling, rough drilling 1140
Contour milling, contour pocket 1150
Turning technology: Simulation
Side view 1740
Front view 1750
3D view 1760
2-window view 1770
Half section 1780
Turning technology: Simultaneous recording
Side view 1741
Front view 1751
3D view 1761
2-window view 1771
Machine space 1791
Half section 1781
Milling technology: Simulation
Top view 1742
3D view 1760
PLC
124 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
PLC functions for HMI (DB19)
12.5 Screen numbers
DB19.DBB24
Screen Screen number
From the front 1744
From the rear 1746
From the Left 1748
From the right 1752
Half section 1780
Turning view 1782
Milling technology: Simultaneous recording
Top view 1743
3D view 1761
From the front 1745
From the rear 1747
From the Left 1749
From the right 1753
Machine space 1791
Half section 1781
Turning view 1783
Screen Number
Actual zoom value MCS/WCS 101
Screen Number
MDI 20
All G commands 100
Actual zoom value MCS/WCS 101
Handwheel 104
Action synchronization 105
Program control 210
Settings 250
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 125
PLC functions for HMI (DB19)
12.5 Screen numbers
Screen Number
Automatic 200
Overstore 202
Program control 210
Block search 220
General settings 250
Multi-channel function settings 106
Collision avoidance settings 107
All G commands 100
Actual zoom value MCS/WCS 101
Handwheel 104
Action synchronization 105
Turning technology: Simultaneous recording
Side view 243
Front view 244
3D view 245
2-window view 246
Machine space 247
Half section 253
Milling technology: Simultaneous recording
Top view 242
3D view 244
From the front 248
From the rear 249
From the Left 251
From the right 252
Machine space 247
Half section 253
Turning view 254
Screen Number
Tool list 600
Tool wear 610
User tool list 620
Magazine 630
Work offset
Work offset, active 642
Work offset, overview 643
PLC
126 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
PLC functions for HMI (DB19)
12.5 Screen numbers
Screen Number
Work offset, basic 644
Work offset, G54 - G509 645
Details of work offset, active, overview, basic or G54 - G509 647
User variable
R parameters 650
Global GUD 1 (SGUD) 660
Global GUD 2 (MGUD) 661
Global GUD 3 (UGUD) 662
Global GUD 4 663
Global GUD 5 664
Global GUD 6 665
Global GUD 7 666
Global GUD 8 667
Global GUD 9 668
Channel GUD 1 (SGUD) 690
Channel GUD 2 (MGUD) 691
Channel GUD 3 (UGUD) 692
Channel GUD 4 693
Channel GUD 5 694
Channel GUD 6 695
Channel GUD 7 696
Channel GUD 8 697
Channel GUD 9 698
Local LUD 681
Local LUD/PUD 684
Setting data
Working area limitation 671
Spindle data 670
Spindle chuck data 672
Ctrl-Energy
Ctrl-Energy, main menu 6170
Ctrl-Energy, analysis 6171
Ctrl-Energy, profiles 6172
Ctrl-Energy, analysis graphic 6176
Ctrl-Energy, analysis long-term measurement 6177
Ctrl-Energy, analysis details 6179
Ctrl-Energy, compare measurements 6178
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 127
PLC functions for HMI (DB19)
12.5 Screen numbers
Screen Number
Turning technology: Simulation
Side view 413
Front view 414
3D view 415
2-window view 416
Half section 423
Milling technology: Simulation
Top view 412
3D view 414
From the front 418
From the rear 419
From the Left 421
From the right 422
Half section 423
Turning view 424
Screen Number
NC directory 300
Local drive 325
USB / configured drive1 330
Configured drive2 340
Configured drive3 350
Configured drive4 360
Configured drive5 383
Configured drive6 384
Configured drive7 385
Configured drive8 386
Screen Number
Alarm list 500
Messages 501
Alarm log 502
NC/PLC variable 503
PLC
128 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
PLC functions for HMI (DB19)
12.6 HMI monitor
Function
The HMI monitor is an 8-byte data area in a freely selectable data block, in which the HMI can
provide the following data for the PLC user program:
● Operating area numbers (Page 119)
● Screen numbers (Page 119)
Parameterization
The data area is configured using the following display machine data:
MD9032 $MM_HMI_MONITOR = "string"
with "string" = "DB<DB number>.DBB<byte address>"
Note
Even byte address
The data area must start at an even byte address.
Byte Meaning
EB n + 0 Active SINUMERIK operating area
EB n + 1 Reserved
EB n + 2 Current screen number
EB n + 3
EB n + 4 Reserved
..................
EB n + 7 Reserved
Supplementary conditions
When the HMI monitoring is active, the following PLC/HMI interface signals are no longer
processed:
● DB19.DBB10 (PLC hardkeys)
● DB19.DBB21 (active SINUMERIK operating area)
● DB19.DBW24 (current screen number)
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 129
PLC functions for HMI (DB19)
12.6 HMI monitor
Example
Assumptions
● Current operating area: "Machine", number: 201
● Actual screen: "AUTOMATIC" start screen, number: 200
● PLC data area: DB60.DBB10
Parameterization
● MD9032 $MM_HMI_MONITOR = "DB60.DBB10"
PLC
130 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
PLC functions for drive components on the integrated
PROFIBUS 13
13.1 Overview
Using the function described below, input and output data from drive components on the
integrated PROFIBUS can be consistently, cyclically read and written from the PLC user
program of the hardware PLC. The following boundary conditions must be observed:
● For reading / writing input/output data, the system functions SFC14 / SFC15 must be used.
● The reading / writing of input/output data is always over the entire slot length.
● The function only supports cyclical, non-equidistant data transfer.
● An output slot may not already be occupied on the NC side; (e.g. output slots of drives).
NC machine data
The start addresses of the slots to be transferred cyclically are to be entered into the following
machine data:
● Input slots:
MD10520 $MN_PLCINTERN_LOGIC_ADDRESS_IN[<Index>] = <Slot address>
● Output slots:
MD10525 $MN_PLCINTERN_LOGIC_ADDRESS_OUT[<Index>] = <Slot address>
<Index>: 0, 1, 2, ... (Max no. of slots) – 1
<Slot address>: The slot address parameterized in HW Config
Note
Maximum quantity of data
The sum of all data to be cyclically transferred in inward and outward directions may not
currently exceed 2,048 bytes.
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 131
PLC functions for drive components on the integrated PROFIBUS
13.3 Example
13.3 Example
PLC
132 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
PLC functions for drive components on the integrated PROFIBUS
13.3 Example
The SIMATIC S7 block FB390 "ALM_Control" checks the status of the ALM and enables the
user to switch it on or off.
A description of the block and an example project are available for download under the
following link to Industry Online Support:
http://support.automation.siemens.com/WW/view/de/49515414
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 133
PLC functions for drive components on the integrated PROFIBUS
13.3 Example
PLC
134 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Memory requirements of the basic PLC program 14
The basic program consists of basic and optional functions. The basic functions include cyclic
signal exchange between the NC and PLC. The Options include e.g. the FCs, which can be
used, if needed.
The table below lists the memory requirements for the basic functions and the options. The data
quoted represent guide values, the actual values depend on the current software version.
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 135
Memory requirements of the basic PLC program
PLC
136 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
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).
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 137
Memory requirements of the basic PLC program
PLC
138 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
NC VAR selector 15
15.1 Overview
General
The PC application "NC VAR selector" retrieves the addresses of required NC variables and
prepares them for access in the PLC program (FB2/FB3). This enables the PLC programmer
to select NC and drive variables from the entire range of NC and drive variables, to store this
selection of variables, and to prepare them with a code generator for the STEP 7 compiler. The
data is then stored as ASCII file (*.awl) in the machine CPU program. The "NC VAR Selector"
graphic shows this process.
3URMHFW
YDU DZO
+DUGGLVN
To store the files created by NC VAR selector, create via Windows Explorer an arbitrary folder
where the selected data of NC VAR selector can be stored (data.VAR and data.AWL files).
Then transfer and compile the data in a STEP 7 project with "Code - in STEP 7 project". As
alternative, insert the "data.awl" file into the STEP 7 machine project via SIMATIC Manager -
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 139
NC VAR selector
15.1 Overview
Program LAD/STL/FBD blocks with "Insert - External source". The file is stored in the project
structure. Once the file has been transferred, compile the AWL (STL) files with STEP 7.
Note
The latest NC VAR selector can be used for each NC software release (even older versions).
For older NC software releases, the variables can also be selected from the latest complete list.
The data content in DB120 (default DB for variables) does not depend on the software version.
This means, variables selected in an older software release need not be reselected when the
software is upgraded.
After starting the "NC VAR selector" application, the variables of the current software version
are displayed.
Transfer the variables to the project list (another window). These selected variables can then
be stored in an ASCII file, prepared as a STEP 7 source file (.awl) and stored.
After creating a PLC data block by means of the STEP 7 compiler, the PLC programmer is able
to read or write NC variables via the basic program function blocks "PUT" and "GET" using the
created STEP 7 file.
The project list 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 software
release. This list does not contain any variables (GUD variables) defined by the user. These
variables are processed by the function block FB5 in the basic program.
PLC
140 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
NC VAR selector
15.2 Using NC VAR selector
① Menu bar
② Available buttons
③ Drop-down list with the available software versions
④ Tab for switching between NC variables and SINAMICS parameters
⑤ List of the NC variables (variable list)
⑥ List of the selected NC variables (project list)
Figure 15-2 Software user interface
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 141
NC VAR selector
15.2 Using NC VAR selector
Buttons
Sym‐
bol
Creates a new project. The file selection for the NC variable list opens (applies only when the NC variable list is not
already open).
Opens an existing project (*.var). The project already contains a stored list of selected variables
Main menu
The main menu contains the following entries:
PLC
142 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
NC VAR selector
15.2 Using NC VAR selector
Overview
The figure below illustrates how NC VAR selector is used within the STEP 7 environment.
1&9$5VHOHFWRU 67(3
XVHUGDWD
8( 9DU,'
&DOO)%9DU $UHDXQLW
9DU1DPH &ROXPQ
NC VAR selector generates a list of selected variables from a list of variables and then creates
an .awl file that can be compiled by the STEP 7 compiler.
● An *.awl file contains the names and alias names of the NC variables, as well as information
about their address parameters. A data block created from this file only contains the address
parameters (10 bytes per parameter).
● The created data blocks must always be stored in the machine-specific file storage
according to STEP 7 specifications.
● To ensure that the parameterization of the FB2 and FB3 blocks with regard to NC addresses
can be implemented with symbols, the freely assignable, symbolic name of the created data
block must be included in the STEP 7 symbol list.
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 143
NC VAR selector
15.2 Using NC VAR selector
Create a project
The data relevant for a project is stored in *.var file format. When the NC VAR selector is
opened a project is created implicitly and an empty variable list is shown.
1. Perform "Project - New" to create a new project and to close any currently open project.
2. If a project with a variable list already exists, a query opens:
– Discard the settings of the opened project; all settings are deleted.
– Save the project settings. The "Save as" dialog opens.
Enter a name for the project
The open project closes. The newly created project does not have any name. To do this, save
the project with a new name with "Project - Save as".
Save project
After creating a project, only the "Save as" menu item is active.
1. Perform "Project - Save as" to save the project with a new name.
2. If the data of a project has been changed, perform "Project - Save" to save the changes.
Open project
Existing projects can be opened in NC VAR selector.
1. Perform "Project - Open". The "Open" dialog opens.
2. Navigate to the path of the project to be opened.
3. Select the project (*.var) and click "Open".
The project with the stored variable list opens, the open project closes.
Print project
The selected variables can be printed. The layout of the printed documents can be adapted with
the print preview.
1. Perform "Project - Print" to send the variable list to the selected printer.
2. Perform "Project - Print preview" to check the print-out before printing and to adapt the
layout.
PLC
144 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
NC VAR selector
15.2 Using NC VAR selector
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 145
NC VAR selector
15.2 Using NC VAR selector
To display the subsets of NC variables, filter criteria can be defined in the "Select NC variables"
dialog:
PLC
146 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
NC VAR selector
15.2 Using NC VAR selector
channelName
chanAssignment
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 147
NC VAR selector
15.2 Using NC VAR selector
The dialog shows an excerpt from the variable description. Fields in which parameters can be
entered are active. The description how the various parameters can be entered correctly is
shown below the input fields.
● The value that can be entered in the "Area number" field to control the correct variable is
described in this field.
● The meaning of row and column is contained in the variable description. The "Column index"
and "Row index" fields there describe the associated inputs.
Parameterizing variables
The associated required parameters must be entered for the various variable types:
● Single-line variable; only the area number must be entered to access variables of this type.
If this is also fixed, the variable can be used without further parameterization.
● Multi-line variable: A variable of this type is a one-dimensional field. The "area number" and
a "line" must be entered for access.
● Multi-line and multi-column NC variables: A variable of this type is a two-dimensional field.
The "area number", a "line" and a "column number" must be entered for access.
Delete variable
To delete a variable from the project list, proceed as follows:
1. Select the variable.
2. Perform "Delete in the project" via the context menu.
The variable is deleted from the list.
This action can also be undone with 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 absolutely necessary to create one or
more text files of all user blocks prior 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.
PLC
148 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
NC VAR selector
15.2 Using NC VAR selector
Description
The variable names provided can be up to 32 characters in length. To make variables unique
in the data block to be generated, several ASCII characters are added to the selected name.
However, the STEP 7 compiler recognizes maximum 24 ASCII characters as a unique S7
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 that are too long. Consequently, the
length of the S7 name to be used is checked when a variable is selected. If the name is longer
than 24 characters, the user must enter an additional name, which is then used as the alias
name.
In this case, the user must ensure that the alias name is unique.
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 149
NC VAR selector
15.2 Using NC VAR selector
Perform settings
Enter in the "Code - Settings" menu item, the DB number and the symbol for the DB number for
which the code is generated.
● Select in the "Measuring system" tab how the measuring system variables are processed in
the PLC.
● The creation for the associated target system is specified in the "Generate" tab.
Perform generation
Generate the STEP 7 file from the selected variable list with extension *.awl:
1. Save the project list as project (*.var).
2. Perform "Code - Generate". The "Save as" dialog opens.
3. Enter a name for the file and specify the path for the *.awl file to be created.
The *.awl file is stored with this name.
PLC
150 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
NC VAR selector
15.2 Using NC VAR selector
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 151
NC VAR selector
15.2 Using NC VAR selector
SINAMICS parameters
In addition to the "NCData" tab and the variable list of the NC variables, a list of SINAMICS
parameters can also be shown.
The list contains the parameters of the "Servo" drive object:
● r parameters: display parameters with which values of the drive axis can be displayed.
● p parameters: read and write parameters with which values can be transferred to the drive
axis.
Similar to NC variables, SINAMICS parameters can also be added to the project list and
transferred to STEP 7.
PLC
152 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
NC VAR selector
15.2 Using NC VAR selector
Selecting parameters
To select drive parameters, proceed as follows:
1. Search for the variables to be added to the project list.
2. Double-click the variable.
- OR -
3. Perform "Transfer NC variables" via the context menu.
The "Input Area No., Row, Column" dialog opens.
4. Enter the number of the drive module that corresponds to the deployed drive.
For drives, the area number is the number of the drive module. This corresponds to the
component number.
The component number can be found in the topology view (SINUMERIK Operate).
Variables List
NC variables including machine and setting data: ncv_NcData.mdb
Parameters of the drive: ncv_SinamicsServo.mdb
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 153
NC VAR selector
15.2 Using NC VAR selector
PLC
154 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Block descriptions 16
16.1 FB1: RUN_UP - basic program, start section
Function
The synchronization of NC and PLC is performed during start-up. The data blocks for the NC/
PLC user interface are created based on the NC configuration defined via machine data, and
the basic program parameters are verified for plausibility. In the event of an error, FB1 passes
an error identifier to the diagnostic buffer and switches the PLC to the stop state.
Input parameters
Only the respectively relevant parameters of function block FB1 must be described with user-
specific values for parameterization of the basic program. The preset values in the instance
data block DB7 of the FB1 do not need to be assigned. The function block FB1 must only be
called in the organization block OB100.
Output parameters
The output parameters of function block FB1 can also be read from the cyclical part of the basic
program. Two options are available for this purpose:
1. Direct access to the instance data block DB7 of FB1 in symbolic form.
Example: "L gp_par.MaxChan", with "gp_par" as the symbolic name of DB7
2. A bit memory is assigned to an output parameter when FB1 is parameterized. The bit
memory is then read in the basic program in order to determine the value of the output
parameter.
Example: "MaxChan":= MW 20
Note
For assigning the FB1 parameters for MCP and HHU, see "Configuration machine control
panel, handheld unit, direct keys (Page 93) ".
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 155
Block descriptions
16.1 FB1: RUN_UP - basic program, start section
PLC
156 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Block descriptions
16.1 FB1: RUN_UP - basic program, start section
VAR_OUTPUT
MaxBAG: INT;
MaxChan: INT;
MaxAxis: INT;
ActivChan: ARRAY[1..10] OF
BOOL;
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 157
Block descriptions
16.1 FB1: RUN_UP - basic program, start section
ActivAxis: ARRAY[1..31] OF
BOOL;
UDInt : INT;
UDHex: INT;
UDReal : INT;
IdentMcpType : BYTE ;
IdentMcpLengthIn BYTE ;
:
IdentMcpLengthOut BYTE ;
:
END_VAR
PLC
158 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Block descriptions
16.1 FB1: RUN_UP - basic program, start section
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 159
Block descriptions
16.1 FB1: RUN_UP - basic program, start section
PLC
160 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Block descriptions
16.1 FB1: RUN_UP - basic program, start section
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 161
Block descriptions
16.1 FB1: RUN_UP - basic program, start section
If an error occurs during communication with a machine control panel (MCP) or handheld unit
(HHU), the following alarm is displayed at the HMI and the input signals (MCP1In, MCP2In or
BHGIn) are set to the zero value:
PLC
162 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Block descriptions
16.2 FB2: GET - read NC variable
Function
The FB2 "GET" function block is used to read variables from the NC area.
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 S7 symbol table. When calling FB2, the variable addresses are transferred in the
following form: Parameter "Addr1" to "Addr8" = "<DB name>.<S7 name>"
Requirements
● Release of the NC/PLC communication by OB100, FB1 parameter "NCKomm" = 1
● For the data block DB120 (data interface), the S7 Symbol Editor must be used to assign a
symbol (default: NCVAR) in the S7 symbol table of the S7 project. Via this icon you then
specify the NC variable e.g. "ADDR1: = "NCVAR".<NC-Variable>" in the FB2 parameters
"Addr<x>"
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 163
Block descriptions
16.2 FB2: GET - read NC variable
Boundary conditions
● FB2 has multi-instance capability.
● A separate instance or separate instance DB must be assigned from the user area to each
call of the FB2.
● When channel-specific variables are read, only variables from exactly one channel may be
addressed via "Addr1" to "Addr8" if FB2 is called.
● When drive-specific variables are read, only variables from exactly one SERVO drive object
may be addressed via "Addr1" to "Addr8" if FB2 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.
● In a read job, only variables from the same area, channel, or drive object can be read.
Note
Error case
When reading variables from different channels or drive objects, or simultaneously from a
channel and a drive object, an error message is output:
● "Error" == TRUE
● "State" == W#16#02
Variable addressing
For some NC variables, it is necessary to select "Area no." and/or "Line" or "Column" from the
NC VAR selector. It is possible to select a basic type, i.e. "Area no.", "Line" and "Column" are
preassigned "0". The values of the "Area no.", "Line" and "Column" specified by the NC VAR
selector are checked for a "0" in FB2. If an NC-VAR selector value == "0", the corresponding
value of the FB2 parameter is adopted. To do this, the FB2 parameters "Unit<x>", "Column<x>"
and "Line<x>", with <x> = 1 - 8, must be written before FB2 is called.
Group Area
1 C[1] N B A T
2 C[2] N B A T
3 V[.] H[.] --- --- ---
The same rules apply for channels 3 to 10 as for group 1 and group 2 shown in the example.
PLC
164 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Block descriptions
16.2 FB2: GET - read NC variable
Note
The number of usable variables can be less than eight when simultaneously reading several
variables of the "String" type.
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 165
Block descriptions
16.2 FB2: GET - read NC variable
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
PLC
166 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Block descriptions
16.2 FB2: GET - read NC variable
Error identifiers
NC variables
Drive-specific variables
If an error occurs while reading/writing a drive-specific variable (DB1200.DBX3000.1 == 1), an
error number is displayed in the access result which is based on the error numbers defined in
the PROFIdrive profile.
State Meaning
x <Error number of PROFIdrive profile> + 20H or 36D
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 167
Block descriptions
16.2 FB2: GET - read NC variable
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
● Parameterizing the FB2
Pulse diagram
5HT
1'5
(UURU
PLC
168 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Block descriptions
16.2 FB2: GET - read NC variable
Call example
Reading three channel-specific machine data from channel 1, whose address specifications
are stored in DB120.
Specification of data
The data is selected with the NC VAR selector and saved in the DB120.VAR file. Then the
DB120.AWL file is created from this.
S7 (ALIAS) names are selected.
To adopt the channel designation into the variable name and to delete the characters "[" and "]",
which are not permitted in a STEP 7 symbol, new S7 names are selected:
S7 symbol table
"NCVAR" is entered in the S7 symbol table as a symbolic name for the data block DB120:
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 169
Block descriptions
16.2 FB2: GET - read NC variable
DATA_BLOCK DB120
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 FB2, DB110(
PLC
170 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Block descriptions
16.3 FB3: PUT - write NC variables
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);
Example
For example, to be able to read an NC variable of the type DOUBLE without adapting the
format, an ANY pointer with REAL2 type must be specified in the destination area "RDx" (e.g.:
P#M100.0 REAL2). If the basic PLC program identifies a variable of the type DOUBLE as
REAL2 target type when reading, the data is adopted as a 64 bit floating point number in the
PLC data area.
Function
The FB3 "PUT" function block is used to write variables from the NC area.
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 171
Block descriptions
16.3 FB3: PUT - write NC variables
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 S7 symbol table. When calling FB3, the variable addresses are transferred in the
following form: Parameter "Addr1" to "Addr8" = "<DB name>".<S7 name>
Requirements
● Release of the NC/PLC communication by OB100, FB1 parameter "NCKomm" = 1
● For the data block DB120 (data interface), the S7 Symbol Editor must be used to assign a
symbol (default: NCVAR) in the S7 symbol table of the S7 project. Via this symbol, the NC
variable is then specified in the FB3 parameters "Addr<x>", e.g. "ADDR1":= "NCVAR".<NC-
Variable>"
Boundary conditions
● FB3 has multi-instance capability.
● A separate instance or a separate instance DB must be assigned from the user area to each
call of the FB3.
● In order to define machine data and GUD without a password, the protection level of the data
you want to access must be redefined to the lowest level.
Further information
– SINUMERIK Operate Commissioning Manual; chapter: "Protection levels concept"
– Programming Manual NC Programming; Section: "Attribute: Access rights (APR, APW,
APRP, APWP, APRB, APWB)"
● When channel-specific variables are written, only variables from exactly one channel may
be addressed via "Addr1" to "Addr8" if FB2 is called.
● When drive-specific variables are written, only variables from exactly one SERVO drive
object may be addressed via "Addr1" to "Addr8" if FB2 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.
● In a write job, only variables from the same area, channel, or drive object can be written.
PLC
172 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Block descriptions
16.3 FB3: PUT - write NC variables
Note
Error case
When writing variables from different channels or drive objects, or simultaneously from a
channel and a drive object, an error message is output:
● "Error" == TRUE
● "State" == W#16#02
Variable addressing
For some NC variables, it is necessary to select "Area no." and/or "Line" or "Column" from the
NC VAR selector. It is possible to select a basic type, i.e. "Area no.", "Line" and "Column" are
preassigned "0". The values of the "Area no.", "Line" and "Column" specified by the NC VAR
selector are checked for a "0" in FB2. If an NC-VAR selector value == "0", the corresponding
value of the FB3 parameter is adopted. To do this, the FB3 parameters "Unit<x>", "Column<x>"
and "Line<x>", with <x> = 1 - 8, must be written before FB3 is called.
Group Area
1 C[1] N B A T
2 C[2] N B A T
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.
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 173
Block descriptions
16.3 FB3: PUT - write NC variables
Req : BOOL;
NumVar : INT;
Addr1 : ANY;
Unit1 : BYTE ;
Column1 : WORD;
Line1 : WORD;
Addr2 : ANY;
Unit2 : BYTE ;
Column2 : WORD;
Line2 : WORD;
Addr3 : ANY;
Unit3 : BYTE ;
Column3 : WORD;
Line3 : WORD;
Addr4 : ANY;
Unit4 : BYTE ;
Column4 : WORD;
Line4 : WORD;
Addr5 : ANY;
Unit5 : BYTE ;
Column5 : WORD;
Line5 : WORD;
Addr6 : ANY;
Unit6 : BYTE ;
Column6 : WORD;
Line6 : WORD;
Addr7 : ANY;
Unit7 : BYTE ;
Column7 : WORD;
Line7 : WORD;
Addr8 : ANY;
Unit8 : BYTE ;
Column8 : WORD;
Line8 : WORD;
END_VAR
VAR_OUTPUT
Error : BOOL;
Done : BOOL;
State : WORD;
END_VAR
VAR_IN_OUT
PLC
174 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Block descriptions
16.3 FB3: PUT - write NC variables
SD1 : ANY;
SD2 : ANY;
SD3 : ANY;
SD4 : ANY;
SD5 : ANY;
SD6 : ANY;
SD7 : ANY;
SD8 : ANY;
END_VAR
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 175
Block descriptions
16.3 FB3: PUT - write NC variables
Error identifiers
NC variables
Drive-specific variables
If an error occurs while reading/writing a drive-specific variable (DB1200.DBX3000.1 == 1), an
error number is displayed in the access result which is based on the error numbers defined in
the PROFIdrive profile.
State Meaning
x <Error number of PROFIdrive profile> + 20H or 36D
PLC
176 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Block descriptions
16.3 FB3: PUT - write NC variables
Configuration steps
To write NC variables, the same configuration steps are required as for reading NC variables.
It is useful to store the address data of all NC variables to be read or written in a DB.
Pulse diagram
5HT
'RQH
(UURU
Call example
Writing of three channel-specific machine data items of channel 1:
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 177
Block descriptions
16.3 FB3: PUT - write NC variables
Selection of the three data items with NC VAR selector and storage in file DB120.VAR
S7 (ALIAS) names are selected in order to adopt the block designation into the name and to
remove the characters [ ], which are not permitted in a STEP 7 symbol.
PLC
178 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Block descriptions
16.4 FB4: PI_SERV - request PI service
DATA_BLOCK DB120
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 FB3, DB122(
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,
State := MW 12,
SD1 := P#M 4.0 REAL 1,
SD2 := P#M 24.0 REAL 1);
Function
The function block FB4 "PI_SERV" is used to start PI services.
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 179
Block descriptions
16.4 FB4: PI_SERV - request PI service
The available PI services are described in the following chapters with their specific parameters.
An overview of the available PI services can be found in: List of available Pl services
(Page 184)
Note
Due to the large number of "WVar" parameters, it is recommended that you use the function
block FB7 instead of FB4. See Section "FB7: PI_SERV2 - request PI service (Page 217)".
Start of a PI service
Request to start a PI service: Call of the FB4 with positive edge, parameter "Req" = 0 → 1
Completion of a PI service
PI service successfully completed: Parameter "Done" == 1.
PI service completed with error: Parameter "Error" == 1, error cause in parameter "State"
Requirements
● Release of the NC/PLC communication by OB100, FB1 parameter "NCKomm" = 1
● For the data block DB16 (data interface of the PI services), the S7 Symbol Editor must be
used to assign a symbol (default: PI) in the S7 symbol table of the S7 project. The requested
PI service is then specified via this symbol in the FB4 parameter "PIService", e.g.
"PIService:= "PI".<PI service>"
Boundary conditions
● A separate instance or a separate instance DB must be assigned from the user area to each
call of the FB4.
● The start of a PI service (FB4 call with "Req" = 1) is only permitted in the cyclic part of the
PLC basic program (OB1).
If the PI service is not started (FB4 call with "Req" = 0), the parameters can also be written
in the start-up part of the PLC basic program (OB100). The PI service can then be started
using the already written parameters in the cyclic part of the PLC basic program (OB1) by
calling FB4 with "Req" = 1.
● The execution of a PI service generally extends over several PLC cycles.
PLC
180 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Block descriptions
16.4 FB4: PI_SERV - request PI service
Req : BOOL;
PIService: ANY;
Unit: INT;
Addr1 : ANY;
Addr2 : ANY;
Addr3 : ANY;
Addr4 : ANY;
WVar1: WORD;
WVar2: WORD;
WVar3: WORD;
WVar4: WORD;
WVar5: WORD;
WVar6: WORD;
WVar7: WORD;
WVar8: WORD;
WVar9: WORD;
WVar10: WORD;
END_VAR
VAR_OUTPUT
Error : BOOL;
Done : BOOL;
State : WORD;
END_VAR
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 181
Block descriptions
16.4 FB4: PI_SERV - request PI service
Call example
Parameterization
Symbol Operand Data type
PI DB16 DB16
STR DB124 DB124
PLC
182 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Block descriptions
16.4 FB4: PI_SERV - request PI service
//
-------------------------------------------------------------------------
Function FC "PICall": VOID
U I 7.7; // Unassigned machine control panel key
S M 0.0; // Activate req.
U M 1.1; // Done completed message
R M 0.0; // Terminate job
U I 7.6; // Manual error acknowledgment
U M 1.0; // Error pending
R M 0.0; // Terminate job
Flow diagram
5HT
'RQH
(UURU
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 183
Block descriptions
16.4 FB4: PI_SERV - request PI service
PI service Function
ASUP (Page 185) Assign interrupt
CANCEL (Page 186) Execute cancel
CONFIG (Page 186) Reconfiguration of tagged machine data
DIGION (Page 186) Digitizing on
DIGIOF (Page 186) Digitizing off
FINDBL (Page 187) Activate block search
LOGIN (Page 187) Activate password
LOGOUT (Page 188) Reset password
NCRES (Page 188) Trigger NC-RESET
SELECT (Page 188) Select program for processing for one channel
SETUDT (Page 189) Sets the current user data to active
SETUFR (Page 189) Activate user frame
RETRAC (Page 190) Retraction of the tool in the tool direction
PI service Function
CRCEDN (Page 191) Create a tool cutting edge with specification of the T number
CREACE (Page 191) Create a tool cutting edge with the next higher/free D number
CREATO (Page 192) Create a tool with specification of a T number.
DELECE (Page 192) Delete a tool cutting edge
DELETO (Page 193) Delete tool
MMCSEM (Page 193) Semaphores for various PI services
TMCRAD (Page 194) Create an adapter
TMCRTO (Page 195) Create a tool with specification of a name, a duplo number
TMDLAD (Page 196) Delete an adapter
TMFDPL (Page 196) Empty location search for loading
TMFPBP (Page 197) Empty location search
TMGETT (Page 198) T number for the specified tool name with duplo number
TMMVTL (Page 199) Prepare magazine location for loading, unload tool
TMPOSM (Page 200) Position magazine location or tool
TMPCIT (Page 201) Set increment value for workpiece counter
TMRASS (Page 202) Reset active status
TRESMO (Page 202) Reset monitoring values
TSEARC (Page 203) Complex search using search screen forms
TMCRMT (Page 206) Create multitool
TMDLMT (Page 207) Delete multitool
POSMT (Page 207) Position multitool
FDPLMT (Page 208) Search/check an empty location within the multitool
PLC
184 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Block descriptions
16.4 FB4: PI_SERV - request PI service
Note
The ASUP (ASUB) PI service must only ever be executed when the specified channel is in the
reset state. An ASUB prepared with FB7 can be subsequently initiated with FC9.
Additional information
Programming Manual NC Programming; Chapter: "Work preparation" > "Interrupt routine
(ASUB)"
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 185
Block descriptions
16.4 FB4: PI_SERV - request PI service
PLC
186 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Block descriptions
16.4 FB4: PI_SERV - request PI service
Note
Visibility of the password in the PLC project
To use the PI service LOGIN, the password for the NCK access level must be stored in the PLC
user program. This ensures that the password for the NCK access level is visible to everyone
who has access to the PLC user program.
Example
Password: String[32]:= 'SafePassword.123';
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 187
Block descriptions
16.4 FB4: PI_SERV - request PI service
Further information
Programming Manual NC Programming; Job Preparation; Section: "File and Program
Management" > "Program Memory"
PLC
188 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Block descriptions
16.4 FB4: PI_SERV - request PI service
Block types
Workpiece directory WPD
Main program MPF
Subprogram SPF
Cycles CYC
Asynchronous subprograms ASP
Binary files BIN
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 189
Block descriptions
16.4 FB4: PI_SERV - request PI service
Note
The RETRAC PI service can only be activated in JOG mode in the "Reset" state.
Automatic determination
For automatic determination, the geometric axis is selected as a retraction axis, which is
perpendicular (orthogonal) to the currently selected working plane:
● G17: Retraction axis ⇒ 3rd geometry axis (Z)
● G18: Retraction axis ⇒ 2nd geometry axis (Y)
● G19: Retraction axis ⇒ 1st Geometry axis (X)
Note
OPI variable retractState
The active retraction axis can be read via the OPI variable retractState.Bit 2/3.
PLC
190 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Block descriptions
16.4 FB4: PI_SERV - request PI service
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 191
Block descriptions
16.4 FB4: PI_SERV - request PI service
PLC
192 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Block descriptions
16.4 FB4: PI_SERV - request PI service
NOTICE
Resetting the semaphore
After blocking the critical data area by setting the semaphore and subsequent reading or
writing of the data, the critical data area must be enabled once again by resetting the
semaphore, otherwise subsequent blocking will not be possible.
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 193
Block descriptions
16.4 FB4: PI_SERV - request PI service
PLC
194 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Block descriptions
16.4 FB4: PI_SERV - request PI service
Note
Before and after this PI service, the PI service MMCSEM with parameter "WVar1" must be
called with function number 1 for TMCRTO. See Chapter "PI service: MMCSEM (Page 193)".
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 195
Block descriptions
16.4 FB4: PI_SERV - request PI service
Note
Before and after this PI service, the PI service MMCSEM with parameter "WVar1" must be
called with function number 2 for TMFDPL.
See Chapter "PI service: MMCSEM (Page 193)".
PLC
196 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Block descriptions
16.4 FB4: PI_SERV - request PI service
Note
Before and after this PI service, the PI service MMCSEM with parameter "WVar1" must be
called with function number 4 for TMFPBP. See ChapterPI" service: MMCSEM (Page 193)".
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 197
Block descriptions
16.4 FB4: PI_SERV - request PI service
PLC
198 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Block descriptions
16.4 FB4: PI_SERV - request PI service
The result is written in OPI variables in the TF block (parameterization, return parameters from
TMGETT, TSEARC):
● resultNrOfTools
– resultNrOfTools == 0: The specified tool was not found
– resultNrOfTools == 1: The specified tool was found
● resultToolNr: T number of the specified tool with "resultNrOfTools" == 1
Note
Before and after this PI service, the PI service MMCSEM with parameter "WVar1" must be
called with function number 5 for TMGETT. See Chapter "PI service: MMCSEM (Page 193)".
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 199
Block descriptions
16.4 FB4: PI_SERV - request PI service
Loading
● "WVar2" LocationNumber_From, "WVar3" MagazineNumber_From
The tool location of the magazine is moved to the loading station/location for loading and the
tool is loaded.
● "WVar4" LocationNumber_To== -1
First, an empty location for the tool is searched for in the magazine. The empty location of
the magazine is then moved to the loading station/location for loading and the tool is loaded.
Unload
● "WVar4" LocationNumber_To, "WVar5" MagazineNumber_To
● The tool location of the magazine is moved to the loading station for loading and the tool is
unloaded.
In the OPI block TP (magazine data: location data), the magazine location of the removed tool
is designated as free.
Note
Before and after this PI service, the PI service MMCSEM with parameter "WVar1" must be
called with function number 3 for TMMVTL. See Chapter "PI service: MMCSEM (Page 193)".
PLC
200 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Block descriptions
16.4 FB4: PI_SERV - request PI service
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 201
Block descriptions
16.4 FB4: PI_SERV - request PI service
PLC
202 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Block descriptions
16.4 FB4: PI_SERV - request PI service
Note
Active tool management
The PI service is only available if tool management is activated.
Specification options
● Search direction
● Search for next tool with the specified property
● Search for all tools with the specified property
Result
As a result, a list with the internal T-numbers of the tools that are found is created.
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 203
Block descriptions
16.4 FB4: PI_SERV - request PI service
Logic operations
For filtering properties, only one AND link is available as a linking option. An OR link must be
achieved by the user via several calls of the PI service and subsequent evaluation of the
individual results.
Result list
After completion of the PI service without errors, the search result is located in the BTSS block
TF (parameterization, return parameter from TMGETT, TSEARC) in the following variables:
● "resultCuttingEdgeNrUsed" D numbers of cutting edges used since last quantity count
● "resultNrOfCutEdgesUsed" Number of cutting edges since last quantity count
● "resultNrOfTools" Number of found tools
● "resultToolNr" T numbers of found tools
● "resultToolNrUsed" T numbers of cutting edges used since last quantity count
If no tool was found, the number of found tools is zero ("resultNrOfTools" == 0).
PLC
204 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Block descriptions
16.4 FB4: PI_SERV - request PI service
Symmetrical search
A symmetrical search, relative to a magazine location, can only be performed if the following
conditions have been met:
● The search range must encompass only one magazine: "WVar1" (from: Magazine number)
== "WVar3" (to: magazine number)
● Specification of a reference location, i.e. a magazine location for which a symmetrical
search is to be performed: "WVar5" (number of the reference magazine) and "WVar6"
(number of the reference location)
● For the reference location, a multiple assignment to the magazine to be searched must have
been configured in the TPM block.
● "WVar7" (search direction) = 3
The reference location is a buffer location, i.e. a tool location from the buffer magazine or from
the internal loading magazine, e.g. swapping station, gripper, loading station. The symmetrical
search is made in relation to the magazine location in front of the reference location.
If the magazine location is upstream of the reference location outside of the search range, the
PI service will respond as if no suitable location had been found.
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 Chapter "PI service: MMCSEM (Page 193)".
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 205
Block descriptions
16.4 FB4: PI_SERV - request PI service
Note
Before and after this PI service, the PI service MMCSEM with parameter "WVar1" =1
(TMCRTO) must be called. See Chapter: "PI service: MMCSEM (Page 193)".
PLC
206 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Block descriptions
16.4 FB4: PI_SERV - request PI service
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 207
Block descriptions
16.4 FB4: PI_SERV - request PI service
Position specification
The position specification can be specified as one of three variants:
Note
Before and after this PI service, the PI service MMCSEM with parameter "WVar1" = 2
(TMFDPL) must be called. See Chapter "PI service: MMCSEM (Page 193)".
PLC
208 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Block descriptions
16.5 FB5: GETGUD - read GUD variable
Position specification
The tool to be positioned in the multitool can be specified as one of the following variants:
● "Addr1" = <Tool name>, "WVar1" = -1 and "WVar2" = <Duplo number>
● "Addr1" = <Empty string>, "WVar1" = <Tool number> and "WVar2" = -1
The position specification can be assigned via:
● "WVar4" = <Multitool location number>
Function
The function block FB5 "GETGUD" is used for reading global user data (GUD) in the NC or
channel area.
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 209
Block descriptions
16.5 FB5: GETGUD - read GUD variable
Prerequisites
● Release of the NC/PLC communication by OB100, FB1 parameter "NCKomm" = 1
● For the data block that will contain the string with the name of the GUD variable, the S7
Symbol Editor must be used to assign a symbol in the S7 symbol table of the S7 project (cf.
call example 1 below: DB_GUDVAR). In the data block, a string of suitable length must be
created to contain the name of the GUD variable (cf. call example 1 below:
"DB_GUDVAR".GUDVar1). This symbol is then passed on to parameter "Addr" of FB5, e.g.
Addr := "DB_GUDVAR".GUDVar1. If the token for the GUD variable is required for the
following calls of the FB2/FB3, the 10-byte token structure must be created in a DB, e.g. the
same DB (cf. call example 1 below: "DB_GUDVAR".GUDVar1Token). This structure is
specified in parameter VarToken of the FB5, cf. call example 1 below: FB5, VarToken :=
"DB_GUDVAR".GUDVar1Token. This token is then specified in parameters "Addr1" …
"Addr8" when FB2/FB3 is called, cf. call example 1 below: FB3, Addr1 := "GUDVar1Token".
General conditions
● FB5 has multi-instance capability.
● Every call of FB5 must be assigned a separate instance DB from the user area.
● Reading of a GUD variable (FB5 call with Req = 1) is only permitted in the cyclic part of the
PLC basic program (OB1). If the job is not started (FB5 call with Req = 0), the parameters
can also be written in the start-up part of the PLC basic program (OB100). The job can then
be executed using the already written parameters in the cyclic part of the PLC basic program
(OB1) by calling FB5 with Req = 1.
● Only capital letters may be used for the names of GUD variables.
● Reading of a GUD variable generally extends over several PLC cycles.
PLC
210 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Block descriptions
16.5 FB5: GETGUD - read GUD variable
Note
Error case
When variables from different channels are read, the following feedback message is output:
● "Error" == TRUE
● "State" == W#16#02
Note
To read a variable of the DOUBLE type from NC without adapting the format, an ANY pointer
of the REAL2 type must be specified in the target area (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.
VAR_OUTPUT
Error : BOOL;
Done : BOOL;
State : WORD;
END_VAR
VAR_IN_OUT
RD: ANY;
END_VAR
BEGIN
END_FUNCTION_BLOCK
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 211
Block descriptions
16.5 FB5: GETGUD - read GUD variable
Error identifiers
PLC
212 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Block descriptions
16.5 FB5: GETGUD - read GUD variable
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
Call example 1
Read a GUD variable from channel 1:
● Name "GUDVAR1"
● Type: INTEGER
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 213
Block descriptions
16.5 FB5: GETGUD - read GUD variable
Conversion to a 10 byte variable pointer. See table "Assignment of the data types" in Chapter
"FB2: GET - read NC variable (Page 163)"
Reading the GUD variables: FB5 with instance DB111
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
FB5
BEGIN
END_DATA_BLOCK
FB3
BEGIN
END_DATA_BLOCK
PLC
214 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Block descriptions
16.5 FB5: GETGUD - read GUD variable
Call example 2
Read a GUD variable from channel 1:
● Name "GUD_STRING"
● Type: STRING[32]
Conversion to a 10 byte variable pointer.
Reading the GUD variables: FB5 with instance DB111
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 215
Block descriptions
16.5 FB5: GETGUD - read GUD variable
STRUCT
GUDVarS : STRING[32] := 'GUD_STRING'; // Name 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
FB5
BEGIN
END_DATA_BLOCK
FB3
BEGIN
END_DATA_BLOCK
PLC
216 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Block descriptions
16.6 FB7: PI_SERV2 - request PI service
Function
With the exception of a higher number of "WVar" parameters ("WVar11" - "WVar16"), function
block FB7 has the same functionality as function block FB4. It is recommended that function
block FB7 be used instead of function block FB4.
For a detailed description, refer to Chapter "FB4: PI_SERV - request PI service (Page 179)".
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 217
Block descriptions
16.7 FB9: MtoN - operator panel switchover
Function
The function block FB9 "MzuN" is used for switching over operating components (MCP/OP),
which are connected via a bus system to one or more NCU control modules.
The interface between the individual operating units (operator panels) and the NCU (PLC) is
the M : N interface in data block DB19. FB9 uses the signals of these interfaces.
PLC
218 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Block descriptions
16.7 FB9: MtoN - operator panel switchover
Apart from initialization, sign-of-life monitoring and error routines, the following basic functions
are also performed by the block for control unit switchover:
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.
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
In order to prevent, that for an NCU restart, the previously selected MCP is activated, when
calling FB1 in OB100, input parameter "MCP1BusAdr" must be set = 255 (address 1st MCP)
and "MCP1Stop" must be set = TRUE (switch off 1st MCP).
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 219
Block descriptions
16.7 FB9: MtoN - operator panel switchover
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 (MCP 1 ready).
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.
PLC
220 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Block descriptions
16.7 FB9: MtoN - operator panel 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.
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 221
Block descriptions
16.7 FB9: MtoN - operator panel switchover
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).
// Save override
L DB21.DBB4; //Feed override interface
T EB28; //Buffer storage (freely input
// or flag byte)
wei1:
U M 100.2; //Switchover takes place
PLC
222 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Block descriptions
16.8 FB10: Safety relay (SI relay)
O DB10.DBX104.0; //MCP1Ready
JCN smth2;
U DB10.DBX104.0; //MCP1Ready
FP M 100.1; // Edge memory bit 2
JC smth2;
U M 100.2; //Switchover takes place
R M 100.2; //Reset auxiliary flag 1
JC smth2;
U M 100.3; //Comparison has taken place
SPB MCP; //Call MCP program
// Route the stored override to the interface of the switched MCP
// until the override values match
L EB28; //Buffer storage open
T DB21.DBB4; //Route override interface
L EB3; //Override input byte for feed
<>i; //Match?
JC smth2; //No, jump
S M 100.3; //Yes, set auxiliary flag 2
// When override values match, call the MCP program again
MCP: CALL "MCP_IFM"( //FC19
BAGNo := B#16#1,
ChanNo := B#16#1,
SpindleIFNo := B#16#0,
FeedHold := M 101.0,
SpindleHold := M 101.1);
wei2: NOP 0:
Function
The SPL function block FB10 "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" are deactivated via the parameterized timer values (parameters
"TimeValue1", "TimeValue2", "TimeValue3"). The outputs are activated again without delay if
inputs "In1" to "In3" take on value 1 and a positive edge change is detected at one of the
acknowledgment inputs "Ack1", "Ack2".
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 223
Block descriptions
16.8 FB10: Safety relay (SI relay)
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 OB100. The parameter "FirstRun" is reset to FALSE when FB10 is
executed for the first time. Separate data must be used for parameter "FirstRun" for each call
with its own instance.
General conditions
● FB10 has multi-instance capability
● After the start of the SPL program, FB10 is called once per SI relay in the cyclic part of the
PLC basic program (OB1).
● Every call of FB10 must be assigned a separate instance DB from the user area.
PLC
224 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Block descriptions
16.9 FB11: Brake test
In2 : BOOL;
In3 : BOOL;
Ackn1 : BOOL;
Ackn2 : BOOL;
TimeValue1 : TIME;
TimeValue2 : TIME;
TimeValue3 : TIME;
END_VAR
VAR_OUTPUT
Out0 : BOOL;
Out1 : BOOL;
Out2 : BOOL;
Out3 : BOOL;
END_VAR
VAR_INOUT
FirstRun: BOOL;
END_VAR
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. "Vertical axes" are the main application.
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 225
Block descriptions
16.9 FB11: Brake test
The machine manufacturer can use the PLC user program to regularly close the brake at a
suitable instant (e.g. every 8 hours) and have the drive exert torque/force in addition to the
weight of the axis. In errorfree operation, the brake can produce the necessary braking torque/
braking force. The axis will hardly move during this.
When an error occurs, the actual position value exits the parameterizable monitoring window.
The position controller prevents sagging of the axis. The function test of the brake mechanical
system is negatively acknowledged.
Further information
A detailed description of the parameterization of the NC and drive within the framework of the
"Safety Integrated" function can be found in:
Function Manual for Safety Integrated
Note
Note on FC18
If FC18 is called over the further course of the user program for the same axis, 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 FC18 parameters. A 2nd 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.
PLC
226 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Block descriptions
16.9 FB11: Brake test
Boundary conditions
● FB2 has multi-instance capability.
● Every call of FB11 must be assigned a separate instance DB from the user area.
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 227
Block descriptions
16.9 FB11: Brake test
Fault IDs
State Meaning
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 mon‐
itoring 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
PLC
228 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Block descriptions
16.9 FB11: Brake test
JCN m001
L DBB 68;
AW W#16#F;
T MB 115; //flag channel state
L B#16#10
T DBB 8; //Request neutral axis
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 229
Block descriptions
16.9 FB11: Brake test
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
PLC
230 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Block descriptions
16.10 FB29: Signal recorder and data trigger diagnostics
Function
Signal recorder
FB29 "Diagnostics" 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 OB1 cycles is also stored in the buffer as additional information. This
information enables the graphical evaluation of signals and values in OB1 cycle grid.
Call rule
First call of FB29 in OB1 cycle: Parameter "NewCycle" = 1
All other calls of FB29 in the same OB1 cycle: Parameter "NewCycle" = 0
Ring buffer
The ring buffer, which must be defined 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 to the start. The instance DB related to the FB29 is a DB from the user area and is to be
transferred to the FB Diagnostics with the parameter "BufDB".
Data trigger
The data trigger function is intended to allow triggering on specific values (or bits) at any
permissible memory cell. The cell to be triggered is "rounded" with a bit mask ("AndMask"
parameter) before the "TestVal" parameter is compared in the diagnostic block.
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.
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 231
Block descriptions
16.10 FB29: Signal recorder and data trigger diagnostics
STRUCT
Field: ARRAY [0 .. 249 ] OF //can be any size of this struct
STRUCT
PLC
232 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Block descriptions
16.10 FB29: Signal recorder and data trigger diagnostics
Signal_4 : BOOL;
Signal_5 : BOOL;
Signal_6 : BOOL;
Signal_7 : BOOL;
Signal_8 : BOOL;
Var1 : BYTE ;
Var2 : WORD;
Var3 : WORD;
END_STRUCT;
END_STRUCT;
BEGIN
END_DATA_BLOCK
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.
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 233
Block descriptions
16.11 FC2 : GP_HP - basic program, cyclic section
● Create a data block for the ring buffer, see call example.
● Call the diagnostics FB with parameters in the user program.
In function 1, it is advisable to clear the ring buffer with the "ClearBuf" parameter. When the
recording phase with function 1 is completed, read out the ring buffer DB in STEP7 with the
function "opening the data block in the data view". The content of the ring buffer DB can now
be analyzed.
Call example
FUNCTION FC99: VOID
TITLE =
VERSION : 0.0
BEGIN
NETWORK
TITLE = NETWORK
Function
The NC/PLC interface is processed by the basic program in cyclic mode (OB1). To keep the
runtime to a minimum, only the control and state signals are cyclically transferred. The transfer
of auxiliary and G commands is processed only on request from the NC.
Furthermore, the data for handwheel selection, modes, and other operating signals are
transferred from the operator panel (HMI) to the NC/PLC interface so that the modes support
the selection from the MCP or HMI as required.
PLC
234 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Block descriptions
16.11 FC2 : GP_HP - basic program, cyclic section
The transfer of HMI signals to the NC/PLC interface can be deactivated by setting the value of
the parameter "MMCToIF" to "FALSE" in FB1 (DB7).
Declaration
FUNCTION FC2: 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 OB1.
The following example contains the standard declarations for OB1 and the calls for the basic
program (FC2), the transfer of the MCP signals (FC19), and the acquisition of error and
operational messages (FC10).
ORGANIZATION_BLOCK OB1
VAR_TEMP
OB1_EV_CLASS : BYTE ;
OB1_SCAN_1 : BYTE ;
OB1_PRIORITY : BYTE ;
OB1_OB_NUMBR : BYTE ;
OB1_RESERVED_1 : BYTE ;
OB1_RESERVED_2 : BYTE ;
OB1_PREV_CYCLE : INT;
OB1_MIN_CYCLE : INT;
OB1_MAX_CYCLE : INT;
OB1_DATE_TIME : DATE_AND_TIME;
END_VAR
BEGIN
CALL FC2; // Call basic program as 1st FC
//INSERT USER PROGRAM HERE
CALL FC19( //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
// (Number of the associated machine
axis)
FeedHold := m22.0, //Feed stop signal
//Modal
SpindleHold := db2.dbx151.0); //Spindle stop modal
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 235
Block descriptions
16.12 FC3: GP_PRAL - basic program, interruptdriven section
//in message DB
CALL FC10( // Error and operational messages
ToUserIF := TRUE, //Signals transferred from DB2
//to interface
Ackn := I6.1); //Acknowledgment of error messages
//via I6.1
END_ORGANIZATION_BLOCK
Function
Block-synchronized transfers from the NC to the PLC (auxiliary and G commands) are
processed in the alarm-driven 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 transferred 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 commands are evaluated immediately and passed to the application interface.
NC process alarms
If the interrupt is triggered by the NC (possible in each IPO cycle), a bit in the local data of OB40
("GP_IRFromNCK") is set by the basic program, only when the FB1 parameter "UserIR" is
TRUE. This data is not set on other events (process alarms 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 (OB40 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 OB40 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 process alarms (time delay, interruptibility, etc.) refer to the
corresponding SIMATIC documentation.
PLC
236 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Block descriptions
16.12 FC3: GP_PRAL - basic program, interruptdriven section
Auxiliary functions
Generally, high-speed or acknowledging auxiliary functions are processed with or without
interrupt control independently of any assignment.
Basic-program parameters in FB1 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 for a specific channel in the local data "GP_AuxFunction" for the user program (if
"GP_AuxFunction[1]" is set, 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.
The request signal of this 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 OB40 is set for this
purpose. The PLC user program can thus check the tool management DB (DB72 or DB73) for
the tool change function and initiate the tool change operation.
Position reached
In the bit structure, "GP_InPosition" of the local data of OB40 is specific to the machine axis
(each bit corresponds to an axis/spindle, e.g. GP_InPosition[5] corresponds to the 5th axis).
If a function has been activated via FC18 (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 FC3: VOID
// No parameters
Call example
As far as the time is concerned, the basic program must be executed before other alarm-driven
user programs. It is, therefore, called first in OB40.
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 237
Block descriptions
16.13 FC5: GP_DIAG - basic program, diagnostic alarm and module failure
The following example contains the standard declarations for OB40 and the call for the basic
program.
ORGANIZATION_BLOCK OB40
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;
16.13 FC5: GP_DIAG - basic program, diagnostic alarm and module failure
Function
The block FC5 "GP_DIAG" is used to record assembly disruptions and failures.
A PLC stop can be triggered via the parameter "PlcStop". The PLC stop is only triggered for
incoming events. The MCPs connected to the parameterized PROFIBUS (DP1) at FB1 are
excluded from this.
Declaration
FUNCTION FC5: VOID
VAR_INPUT
PLC
238 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Block descriptions
16.13 FC5: GP_DIAG - basic program, diagnostic alarm and module failure
Call example
The basic program should be run through after processing of the user programs. This is
recommended because a PLC stop can be triggered by the FC5.
The example contains the standard declaration for OB82 and OB86 and the call of the FC5.
ORGANIZATION_BLOCK OB82
VAR_TEMP
OB82_EV_CLASS : BYTE ;
OB82_FLT_ID : BYTE ;
OB82_PRIORITY : BYTE ;
OB82_OB_NUMBR : BYTE ;
OB82_RESERVED_1 : BYTE ;
OB82_IO_FLAG : BYTE ;
OB82_MDL_ADDR : INT ;
OB82_MDL_DEFECT : BOOL;
OB82_INT_FAULT : BOOL;
OB82_EXT_FAULT : BOOL;
OB82_PNT_INFO : BOOL;
OB82_EXT_VOLTAGE : BOOL;
OB82_FLD_CONNCTR : BOOL;
OB82_NO_CONFIG : BOOL;
OB82_CONFIG_ERR : BOOL;
OB82_MDL_TYPE : BYTE ;
OB82_SUB_NDL_ERR : BOOL;
OB82_COMM_FAULT : BOOL;
OB82_MDL_STOP : BOOL;
OB82_WTCH_DOG_FLT : BOOL;
OB82_INT_PS_FLT : BOOL;
OB82_PRIM_BATT_FLT : BOOL;
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
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 239
Block descriptions
16.14 FC6: TM_TRANS2 - transfer block for tool management and multitool
BEGIN
CALL FC5
(PlcStop := FALSE) ;
END_ORGANIZATION_BLOCK
ORGANIZATION_BLOCK OB86
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 FC5
(PlcStop := TRUE) ;
END_ORGANIZATION_BLOCK
16.14 FC6: TM_TRANS2 - transfer block for tool management and multitool
Function
The block FC6 "TM_TRANS2" is used for position changes of the tools, state changes, and
multitool.
The FC6 block has the same functionality as the FC8 block, plus the multitool functionality.
The description of FC6 only contains the multitool functionality.
The functionality of FC8 is described in FC8:
" TM_TRANS - transfer block for tool management
(Page 245)".
PLC
240 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Block descriptions
16.15 FC7: TM_REV - transfer block for tool change with revolver
OldToolLoc: INT;
Status: INT;
MtoolPlaceNum: INT;
END_VAR
VAR_OUTPUT
Ready: BOOL;
Error: INT;
END_VAR
BEGIN
END_FUNCTION
16.15 FC7: TM_REV - transfer block for tool change with revolver
Function
After a revolver has been changed, the user calls block FC7 "TM_REV". The revolver number
corresponding to interface number in DB73 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 FC7 is reset after parameter "Ready" == TRUE is returned.
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 241
Block descriptions
16.15 FC7: TM_REV - transfer block for tool change with revolver
positive edge for a subsequent job, "Start" = 1 remains, because the job has not yet been
completed. See "Call example" and "Pulse diagram" below.
Boundary conditions
● Block FC7 may only be started with parameter "Start" = 1 if an activation signal for the
associated interface (DB73.DBW0) for this transfer has been supplied by the tool
management function.
● A cancellation of a transfer, e.g. by a channel reset, is not permitted.
● Parameter "Start" = 1, until parameter "Ready" == 1 or "Error" == 1
Further information
● For detailed information about tool management, refer to the Function Manual Tool
Manager.
● PI services for tool management, see:
– FB4: PI_SERV - request PI service (Page 179)
– FC8: TM_TRANS - transfer block for tool management (Page 245)
– FC22: TM_DIR - direction selection for tool management (Page 292)
TaskIdent = 4
TaskIdentNo = Channel no.
NewToolMag = Magazine no. of the revolver
NewToolLoc = Original location of the tool
OldToolMag = Magazine no. of the buffer storage (spindle) = 9998
OldToolLoc = Buffer storage no. of the spindle
Status = 1
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
should take place, for example, at the end of revolver switching from the PLC user program, an
ASUP must be started for this purpose. The current revolver position must be transferred to the
ASUP. In this way, the tool at this location is determined in the ASUP and is selected (see
Jobshop example in the toolbox).
PLC
242 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Block descriptions
16.15 FC7: TM_REV - transfer block for tool change with revolver
ChgdRevNo : BYTE ;
END_VAR
VAR_OUTPUT
Ready : BOOL;
Error : INT;
END_VAR
BEGIN
END_FUNCTION
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 243
Block descriptions
16.15 FC7: TM_REV - transfer block for tool change with revolver
Pulse diagram
6WDUW
5HDG\
(UURU !
Call example
CALL // Tool management: Transfer block for revolver
FC7(
Start := m 20.5, // Start := "1 " => initiate the
transfer
ChgdRevNo := DB61.DBB1,
Ready := m 20.6,
Error := DB61.DBW12
};
u m 20.6; // Poll ready
r m 20.5; // Reset start
spb m001; // Jump, if everything OK
l db61.dbw 12; // Error information
ow w#16#0; // Evaluate error
spn error; // Jump to troubleshooting, if <> 0
m001: // Start of another program
error :
r m 20.5; // Start reset, if an error has
occurred
PLC
244 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Block descriptions
16.16 FC8: TM_TRANS - transfer block for tool management
Function
The user calls this block FC TM-TRANS when the position of the tool or the status of the transfer
operation changes. The parameter "TaskIdent" specifies the transfer job for the block FC8 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 NC of the current positions of the old tool.
The NC knows where the old and the new tool were 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 (DB71, DB72, DB73 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 FC8 and pulse 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 DB71 or DB72 or DB73, word 0 is deactivated (process completed). The
appropriate bit for the interface is set to 0 by FC8.
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.
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 245
Block descriptions
16.16 FC8: TM_TRANS - transfer block for tool management
Asynchronous transfer
To ensure that changes in the position of a tool are automatically signaled from the PLC to the
tool management (e.g. power failure during an active command or independent changes in the
position by the PLC), FC8 is called with "TaskIdent" = 4 or 5. This call does not require interface
activation by the 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 location of the tool is specified in the parameters "OldToolMag" and "OldToolLoc".
The current location of the tool is specified in the 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.
Boundary conditions
● A cancellation of a transfer, e.g. by a channel reset, is not permitted.
● Parameter "Start" = 1, until parameter "Ready" == 1 or "Error" == 1
Further information
● For detailed information about tool management, refer to
the Function Manual Tool Management.
● PI services for tool management
– FB4: PI_SERV - request PI service (Page 179)
– FC7: TM_REV - transfer block for tool change with revolver (Page 241)
– FC22: TM_DIR - direction selection for tool management (Page 292)
PLC
246 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Block descriptions
16.16 FC8: TM_TRANS - transfer block for tool management
VAR_OUTPUT
Ready : BOOL;
Error : INT;
END_VAR
BEGIN
END_FUNCTION
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 247
Block descriptions
16.16 FC8: TM_TRANS - transfer block for tool management
Pulse diagram
6WDUW
5HDG\
(UURU !
PLC
248 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Block descriptions
16.16 FC8: TM_TRANS - transfer block for tool management
Status
Status Description
1 The tool management job has been completed
The parameters "NewToolMag", "NewToolLoc", "OldToolMag", "OldToolLoc" of the FC8 block
should be parameterized to the actual positions of the tools involved. Except in the case of
preparing the change, they are normally the specified target positions of the tools of the asso‐
ciated tool management interface, see also "Explanations of the formal parameters".
1. In the case of loading/unloading/reloading, the tool has arrived at the required target ad‐
dress. 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 acknowledgment, the "Change" command can be received. The posi‐
tions in parameters "NewToolMag", "NewToolLoc", "OldToolMag" and "OldToolLoc" corre‐
spond to the current tool positions.
3. In the case of "Change" (spindle or revolver), the tools addressed in the interface have now
reached the required target addresses.
The tool change operation is thus completed.
2 The "new" tool cannot be made available
This status is only admissible in conjunction with the "Change tool" 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 NC. A new command
is then output by the tool management with a duplo tool. The positions in parameters "New‐
ToolMag", "NewToolLoc", "OldToolMag", and "OldToolLoc" correspond to the original tool po‐
sitions.
3 An error has occurred
The tool positions must not have been changed. Any changes to the magazine positions of the
tool that have taken place in the meantime must be notified beforehand, for example, with status
= 105 via FC8 transfer block. Only then will the tool positions be taken into account by the tool
management function.
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). The magazine location specified for the "old" tool must be free. Once this status has
been passed to the tool management in the NC, a new preparation command is generated
(Status_4 = final acknowledgment) and output to the DB72, for which the requested magazine
position of the old tool is considered.
No new tool search is performed explicitly, the positions for "NewToolMag" and "NewToolLoc"
are taken from the original preparation command. But this is done only when this position is
free. Parameters "NewToolMag" and "NewToolLoc" are not taken into account.
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 249
Block descriptions
16.16 FC8: TM_TRANS - transfer block for tool management
Status Description
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. The status 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 par‐
ameterized with the data of a buffer.
● Loading, reloading:
On loading or reloading, a location for the tool is already reserved in the NC. 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 the loading point:
If the bit in the interface in DB 71.DBX (n+0).3 "position at loading point" is enabled, then
only status 5 be used for the function termination (not status 1).
6 The tool management job has been completed
This status has the same function as status 1, but, in addition, a reservation of the source
location is carried out. This status is only permitted when reloading. The command is ended and
the source location of the tool is reserved if the target location is in a buffer magazine.
7 Initiate repetition of the command "Prepare Tool"
This status is only admissible in conjunction with the "Change tool" command. This status is
intended for use when the "new" tool has changed its position (e.g. via an asynchronous com‐
mand of the "new" tool). After "Ready = 1" has been provided by FC8, the "Prepare Change"
command is repeated automatically with the same tool. For the automatic repetition, a new tool
search is carried out. The positions in parameters "NewToolMag", "NewToolLoc", "OldTool‐
Mag", and "OldToolLoc" correspond to the original tool positions.
103 The "new" tool can be inserted
This status is permitted only in the tool change preparation, when the PLC may reject the new
tool (e.g. in case of MD20310 $MC_TOOL_MANAGEMENT_MASK, bit 4=1 for the possibility,
request changed parameter from PLC once again). The tool positions have remained un‐
changed. This status is therefore necessary, when the processing is to be continued in the NC
without an unnecessary stop.
104 The "new" tool is in the position specified in parameters "NewToolMag", "NewToolLoc"
This status is only permissible if the tool is still in the magazine in the same location. The "old"
tool is in the position (buffer) specified in parameters "OldToolMag", "OldToolLoc". In this case,
however, the new tool is not really in this position, but is still in the same magazine location.
However, this magazine location has been moved to the position set in the parameters (e.g. tool
change position). This status may be used only in conjunction with revolvers, chaintype mag‐
azines and disk magazines for the "Tool change preparation" phase. The status enables the
tool management to adjust the current position of a magazine and to improve the search strat‐
egy for subsequent commands.
105 The specified buffer location has been reached by all tools involved
Standard case if the operation has not yet been completed.
The tools are in the specified tool positions (parameters "NewToolMag", "NewToolLoc", "Old‐
ToolMag", "OldToolLoc").
PLC
250 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Block descriptions
16.17 FC9: ASUP - start of asynchronous subprograms
Status definition
A general rule for the acknowledgment status is that the status information 1 to 7 leads to the
termination of the command. If FC8 receives a status information, the "Interface active bit" of
the interface specified in FC8 is reset to "0" (see also interface lists DB 71 to DB 73). thus
completing the operation. The behavior is different in the case of status information 103 to 105.
When the FC8 receives a 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 status information is generally used to transfer changes in position
of one or both tools while the operation is still in progress.
Call example
CALL FC8( //Tool management transfer block
Start := m 20.5, // Start := "1 " => initiate the transfer
TaskIdent := DB61.DBB0,
TaskIdentNo := DB61.DBB1,
NewToolMag := DB61.DBW2, // Current position of new tool
NewToolLoc := DB61.DBW4,
OldToolMag := DB61.DBW6, // Current position of old tool
OldToolLoc := DB61.DBW8,
Status := DB61.DBW10, // Status
Ready := m 20.6,
Error := DB61.DBW12);
u m 20.6; // Poll ready
r m 20.5; // Reset start
spb m001; // Jump if everything OK
l DB61.dbw12; // Error information
ow w#16#0; // Evaluate error
JC error; // Jump to troubleshooting
error : //Troubleshooting
r m 20.5: // Reset start
Function
The block FC9 "ASUP" can be used to trigger any functions in the NC. Before an ASUP can be
started from the PLC, it must have been selected and parameterized by an NC program or by
FB4 (PI service ASUP). In this case, the channel and the interrupt numbers must match the
parameters in FC9.
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 251
Block descriptions
16.17 FC9: ASUP - start of asynchronous subprograms
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 ASUP can be started in the same channel at a time. If several ASUPs are started in
one PLC cycle, the ASUPs are started in this order in the NC.
Parameter "Start" = 0 must be set by the user if the ASUP has been terminated ("Done" == 1)
or an error has occurred ("Error" == 1).
For processing jobs, each FC9 needs its own parameter "Ref" from the global user 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 OB1 cycle and, for this reason, every FC9 must be called
absolutely. Alternatively, the user can initialize parameter "Ref" with a value of 0 during startup.
This option makes conditional calls possible. A conditional call requires parameter "Start" = 1
during activation of FC9 until a negative edge change has occurred at parameter "Done" (1 → 0).
General conditions
● The function block FB4 must be terminated before the block FC9 is started.
● The block FC9 cannot be started if DB10, DBX56.1 == 1 (emergency stop).
● Block FC9 must not be started if channel reset is active in the channel in which the ASUP
is to be started.
PLC
252 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Block descriptions
16.17 FC9: ASUP - start of asynchronous subprograms
Pulse diagram
6WDUW
$FWLY
'RQH
(UURU
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 253
Block descriptions
16.18 FC10: AL_MSG - error and operating messages
Call example
CALL FC9( //Start an asynchronous subprogram
//in channel 1 interrupt number 1
Start := I 45.7,
ChanNo := 1,
IntNo := 1,
Active := M 204.0,
Done := M204.1,
Error := M 204.4,
StartErr := M 204.5,
Ref := MW 200);
Function
With block FC10 "AL_MSG", the signals entered in DB2 are evaluated and displayed as
incoming or outgoing error messages and operational messages on the user interface.
The incoming signals (positive edge) are displayed immediately in the case of both error and
operational messages.
Outgoing signals (negative edge) are deleted immediately only for operational messages. In
the event of error messages, the messages that are no longer pending are only deleted with the
parameter "Quit", i.e. errors remain displayed on the user interface until they have been
acknowledged by the user even if the signals are no longer pending.
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
DB2 irrespective of an alarm acknowledgment.
1. If parameter "ToUserIF" = 0, there is no transfer of the signals 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. The FB1 parameter "ExtendChanAxMsg" is evaluated and so
avoids the limitation of the usable message ranges by configuring the NCK machine data.
2. If parameter "ToUserIF" = 1, 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
DB2 in conjunction with a message or alarm output. The appropriate information is
overwritten in the user interface.
Alternatively to the response described in paragraph 2, the disable and hold signals can be
influenced without a message being output by influencing the interface signals with a disable
or stop signal state after FC10 is called.
The following program illustrates this method:
CALL FC10(
ToUserIF := TRUE,
PLC
254 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Block descriptions
16.18 FC10: AL_MSG - error and operating messages
Ackn := I 6.1);
Display on HMI
In DB2, 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 alarms 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.
Further information:
PLC alarms/messages (Page 325)
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 255
Block descriptions
16.19 FC12: AUXFU - call interface for user with auxiliary functions
Call example
CALL FC10( // Error and operational messages
ToUserIF := TRUE, // Signals from DB2 are transferred to interface.
Ackn := E6.1 // Acknowledgment of error message via input I6.1
);
16.19 FC12: AUXFU - call interface for user with auxiliary functions
Function
The block FC12 "AUXFU" is 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.
PLC
256 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Block descriptions
16.20 FC13: BHGDisp - display control for handheld unit
Example
FUNCTION FC12: VOID // Event control of auxiliary functions
VAR_INPUT
Chan: BYTE ; // Parameter is supplied by basic program
END_VAR
VAR_TEMP
ChanDB: INT;
END_VAR
BEGIN
L Chan; // Channel index
+ 21; // Channel DB offset
T ChanDB; // Save channel DB no.
TO DB[ChanDB]; // Channel DB is opened indirectly
// Auxiliary-function change signals are now scanned, etc.
BE;
END_FUNCTION
Function
Block FC13 "BHGDisp" handles the display control for the handheld unit (HHU or HT 2). The
information that is to appear on the display must be saved to a string variable. The pointer to the
string is specified in the parameter "ChrArray". To do this, a fixed text assignment of 32
characters (HHU) or 64 characters (HT 2) is needed when the data block for this string is
created.
16 characters are sent to the HHU per job. The assignment of the characters in the "ChrArray"
for the respective line is unambiguous. For line 1, characters 1 to 16 and for line 2, characters
17 to 32 of the string data ChrArray are transferred. In addition, for HT 2 line 3 with characters
33 to 48 is displayed and line 4 with characters 49 to 64. A job takes several OB1 cycles.
Display
Block FC13 checks whether the necessary minimum length of the "ChrArray" exists for
operating the handheld unit. If fewer characters exist in the string variables than should be
displayed, the line is filled with blank spaces. If several variables are to be entered in the string
in one or more PLC cycles without a display output, the display output can be suppressed by
parameter "Row" = 0. The transfer of the characters to the rows takes several OB1 cycles. If
several rows are to be updated "simultaneously" (parameter "Row" > 1), the rows are updated
successively with 16 characters per row.
Variable portions
Variable components within the string can be inserted using the optional number converter
functionality with the parameter "Convert" = 1. The variable to be displayed is referenced via the
parameter "Addr". The format of the variables is described in the parameter "DataType". The
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 257
Block descriptions
16.20 FC13: BHGDisp - display control for handheld unit
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.
HT 2 handheld terminal
If HT 2 is used, FB1 parameter "HHU" = 5 must be set. The parameters of the input and output
data must be set, as described in the above paragraph "Handheld Unit HHU".
The value that was configured at S2 of the DIP-Fix switch (rotary coding switch) of the
connecting module of the HT 2 must be assigned to the parameters "BHGRecGDNo" and
"BHGRecGBZNo".
PLC
258 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Block descriptions
16.20 FC13: BHGDisp - display control for handheld unit
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 259
Block descriptions
16.20 FC13: BHGDisp - display control for handheld unit
Ranges of values
PLC
260 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Block descriptions
16.21 FC17: YDelta - star-delta switchover
Call example
// DB with name strdat in the simple table, data element disp is declared as String[32] (for HT 2:
// String[64]) and completely assigned with characters
CALL FC13(
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
Block FC17 is used for star-delta changeover for digital main spindle drives. The changeover
can be made in both directions (star > delta or delta > star).
Prerequisite
The prerequisite is two isolated contactors. The contactors are controlled via the peripheral
output signals configured at the FC17 outputs: "Y" or "Delta".
Internal sequence
The internal sequence when changing over between star and delta after switching over the
FC17 control signal is described in the following: "YDelta" displayed.
1. DB31, ... .DBX21.5 = 0 (reset feedback signal "motor selected")
DB31, ... .DBX21.x = 1 (set request "2nd motor data set" corresponding to the interface
parameterization DB31, ... .DBX130.0 - 4)
2. DB31, ... .DBX93.7 == 0 (feedback signal "pulses enabled" was reset) ⇒
– Start FC17 timer
– FC17: "Y" = 0 (reset output for star contactor)
3. After the FC17 timer elapses (FC17: "TimeVal") ⇒
– FC17: "Y" = 1 (set output for delta contactor)
4. After the FC17 timer elapses again (FC17: "TimeVal") ⇒
– The pulses are again internally set
– DB31, ... .DBX93.7 == 1 (feedback signal "pulses enabled" was set)
– DB31, ... .DBX21.5 = 0 (feedback signal "motor selected" was set)
PLC
Function Manual, 12/2019, A6FC5397-0HP40-0BA0 261
Block descriptions
16.21 FC17: YDelta - star-delta switchover
Signal flow
Further information
For additional explanations of motor speed adjustments, see:
● Function Manual Axes and Spindles; spindles; configurable gear adaptations
● Function Manual Axes and Spindles; speeds, setpoint/target value syst., closed-loop control
Note
Drive parameters
The following drive parameters must be considered for a star-delta changeover:
● p833 (dataset changeover configuration)
– Bit 0 = 1 (contactor switchover via application)
– Bit 1 = 0 (pulse cancellation by drive)
● p826 (motor changeover motor number)
● p827 (motor changeover status word bit number)
PLC
262 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Block descriptions
16.21 FC17: YDelta - star-delta switchover
Boundary conditions
● Block FC17 must be called absolutely and separately for each spindle.
● The drive pulses are deactivated during a star-delta changeover. The feedback signal to the
PLC is realized using:
– DB31, ....DBX93.7 == 0 (pulses enabled)
– DB31, ....DBX61.7 == 0 (current controller active)
– DB31, ....DBX61.6 == 0 (speed controller active)
● For a spindle which is located in an axis mode such as M70 or SPOS, a start-delta
changeover is not carried out.
● For a closed-loop position controlled spindle (DB31,
DBX61.5 == 1 (position control active) ), while the spindle is moving it is not permissible to
carry out a star-delta changeover. In the case of a fault, Alarm 25050 "Contour monitoring"
is displayed, and the star-delta changeover is not executed.
● Once the star-delta changeover has been initiated using FC17, it cannot be delayed by the
user, e.g. by waiting until the star-delta contactors change over during the course of
operation. A delay such as this must be implemented by the user in the PLC user program.
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 263
Block descriptions
16.22 FC18: SpinCtrl - spindle control
Call example
CALL FC17 (
YDelta := I 45.7, // Accept star/delta changeover from
input 45.7
SpindleIFNo := 4, // Spindle interface number: 4
// (Number of the associated machine
axis)
TimeVal := S5T#150ms, // Changeover time: 150 ms
TimerNo := 10, // Timer: 10
Y := O 52.3, // Control of the star contactor:
Output 52.3
Delta := O 52.4, // Control of the delta contactor:
Output 52.4
Ref := MW 50 // Bit memory word 50
};
Function
Block FC18 "SpinCtrl" can be used to control spindles and axes from the PLC. The block
supports the following functions:
● Position spindle
● Rotate spindle
● Oscillate spindle
● Traverse indexing axis
● Traverse positioning axis
Each function is activated by the positive edge of the appropriate initiation signal (start, stop).
This signal must remain at a logical "1" until the function has been acknowledged positively or
PLC
264 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Block descriptions
16.22 FC18: SpinCtrl - spindle control
negatively by InPos="1" or Error = "1". The output parameters are deleted when the relevant
trigger signal is reset and the function has been completed.
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 block with activation of the "Start" or "Stop" parameter.
When you do this, the block requests control of the spindle/axis from the NC.
The NC signals the status of the spindle/axis in the associated axis-specific interface DB31, ...
DBX68.4 - 7. Once the axis/spindle is operating under PLC control, the travel command for the
active status can be evaluated via the relevant axis-specific interface.
Upon completion ("InPos" is True, "Start" changes to zero), the axis/spindle check function is
switched to a neutral status using block FC18.
Alternatively, the PLC user program can also request control for the PLC before calling FC18.
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.
Further information
● Function Manual Axes and Spindles; spindles
● Function Manual Axes and Spindles; positioning axes
● Function Manual Axes and Spindles; indexing axes
WARNING
Changed response behavior of the axis/spindle
If several block calls (FC18) 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.
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 265
Block descriptions
16.22 FC18: SpinCtrl - spindle control
Functions
Parameter Meaning
Start : 0 → 1: Start the function
Funct : 1: Function number for "Position spindle"
Mode : Positioning modes 1, 2, 3, 4 (refer to the paragraph below, "Explanation of the
formal parameters"
AxisNo : Number of machine axis
Pos : Position
FRate : FRate ≠ 0: Positioning velocity
FRate = 0: Velocity corresponding to MD35300 $MA_SPIND_POSCTRL_VE‐
LO
InPos : 1: Position reached with "Exact stop fine"
Error : 1: Positioning error
State : Error code
Parameter Meaning
Start : 0 → 1: Start the function
Stop : 0 → 1: Stop the function
Funct : 2: Function number for "Rotate spindle"
PLC
266 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Block descriptions
16.22 FC18: SpinCtrl - spindle control
Parameter Meaning
Mode : Mode = 5: direction of rotation M4
Mode ≠ 5: direction of rotation M3
AxisNo : Number of machine axis
FRate : Spindle speed
InPos : 1: Setpoint speed is output, also see DB31, ... DBX83.5 (spindle in the set‐
point range)
Error : 1: Positioning error
State : Error code
Parameter Meaning
Start : 0 → 1: Start the function
Stop : 0 → 1: Stop the function
Funct : 3: Function number for "Oscillate spindle"
AxisNo : Number of machine axis
Pos : Set gear stage
InPos : 1: Setpoint speed is output, also see DB31, ... DBX83.5 (spindle in the set‐
point range)
Error : 1: Positioning error
State : Error code
Note
The modulo conversion can be compared with approaching the indexing position via POS[AX]
= CIC (value) in the part program.
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 267
Block descriptions
16.22 FC18: SpinCtrl - spindle control
Parameter Meaning
Start : 0 → 1: Start the function
Funct : 4: Function number for "Indexing axis"
Mode : Positioning mode 0, 1, 2, 3, 4
AxisNo : Number of machine axis
Pos : Indexing position
FRate : FRate ≠ 0: Positioning velocity
FRate = 0: Velocity corresponding to MD32060 $MA_POS_AX_VEL
InPos : 1: Position reached with "Exact stop fine"
Error : 1: Positioning error
State : Error code
Parameter Meaning
Start : 0 → 1: Start the function
Funct : 5, 6, 7, 8: Function number for "Position axes"
Mode : Positioning mode 0, 1, 2, 3, 4
AxisNo : Number of machine axis
Pos : Position
FRate : FRate ≠ 0: Positioning velocity
FRate = 0: Velocity corresponding to MD32060 $MA_POS_AX_VELO
InPos : 1: Position reached with "Exact stop fine"
Error : 1: Positioning error
State : Error code
Parameter Meaning
Start : 0 → 1: Start the function
Stop : 0 → 1: Stop the function
Funct : 9: Function number for "Rotate spindle with gear stage selection"
Mode : Mode = 5: direction of rotation M4
Mode ≠ 5: direction of rotation M3
AxisNo : Number of machine axis
FRate : Spindle speed
InPos : 1: Setpoint speed is output
Error : 1: Positioning error
State : Error code
PLC
268 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Block descriptions
16.22 FC18: SpinCtrl - spindle control
Parameter Meaning
Start : 0 → 1: Start the function
Stop : 0 → 1: Stop the function
Funct : 10: Function number for "Constant cutting rate (m/min)"
11: Function number for "Constant cutting rate (feet/min)"
Mode : Mode = 5: direction of rotation M4
Mode ≠ 5: direction of rotation M3
AxisNo : Number of machine axis
FRate : Cutting rate
InPos : 1: Setpoint speed is output
Error : 1: Positioning error
State : Error code
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 269
Block descriptions
16.22 FC18: SpinCtrl - spindle control
Error identifiers
An error is active, if: Parameter "Error" == 1 (TRUE)
The cause of the error is displayed in: Parameter "State"
State Meaning
Cause of the error on the PLC side
1 Several functions of the axis/spindle were activated simultaneously
20 A function was started without the position being reached
30 The axis/spindle was transferred to the NC while still in motion
PLC
270 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Block descriptions
16.22 FC18: SpinCtrl - spindle control
State Meaning
40 The axis is programmed by the NC program, NC internal error
50 Permanently assigned PLC axis: Traverses (JOG) or references
60 Permanently assigned PLC axis: Channel status does not permit a start
Cause of the error on the NC side
100 Incorrect position programmed for axis/spindle (corresponds to alarm 16830)
101 Programmed speed is too high
102 Incorrect value range for constant cutting rate (corresponds to alarm 14840)
104 Following spindle: Illegal programming (corresponds to alarm 22030)
105 No measuring system available (corresponds to alarm 16770)
106 Axis positioning still active (corresponds to alarm 22052)
107 Reference mark not found (corresponds to alarm 22051)
108 No transition from speed control to position control (corresponds to alarm 22050)
109 Reference mark not found (corresponds to alarm 22051)
110 Velocity/speed is negative
111 Setpoint speed == zero
112 Invalid gear stage
115 Programmed position has not been reached
117 G96/G961 is not active in the NC
118 G96/G961 is still active in the NC
120 Axis is not an indexing axis (corresponds to alarm 20072)
121 Indexing position error (corresponds to alarm 17510)
125 DC (shortest distance) not possible (corresponds to alarm 16800)
126 Absolute value minus not possible (corresponds to alarm 16820)
127 Absolute value plus not possible (corresponds to alarm 16810)
128 No transverse axis available for diameter programming (corresponds to alarm 16510)
130 Software limit switch plus (corresponds to alarm 20070)
131 Software limit switch minus (corresponds to alarm 20070)
132 Working area limit plus (corresponds to alarm 20071)
133 Working area limit minus (corresponds to alarm 20071)
134 Frame not permitted for indexing axis
135 Indexing axis with "Hirth joint" is active (corresponds to alarm 17501)
136 Indexing axis with "Hirth joint" is active and axis not referenced (corresponds to alarm 17503)
137 Spindle operation not possible for transformed spindle/axis (corresponds to alarm 22290)
138 Axis: Coordinate system-specific working area plus violated (corresponds to alarm 20082)
139 Axis: Coordinate system-specific working area minus violated (corresponds to alarm 20082)
System error
200 corresponds to alarm 450007
Alarm numbers: Further information Diagnostics Manual
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 271
Block descriptions
16.22 FC18: SpinCtrl - spindle control
6WDUW
,Q3RV
(UURU
6WDUW(UU
6WDUW
,Q3RV
(UURU
6WDUW(UU
Call examples
PLC
272 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Block descriptions
16.22 FC18: SpinCtrl - spindle control
R M 100.0; //Start
//Negative acknowledgment, after error evaluation (state: MB114) reset with T12 start
U M113.0; // Error
U E 6.4; //Key T12
R M 100.0; //Start
//Start with T13
U E 6.3; //Key T13
UN M 112.0; //Restart only when InPos or Error = 0
UN M 113.0;
S M 100.0;
CALL FC18(
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 FC18(
Start := M100.0,
Stop := FALSE,
Funct := B#16#2, //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);
CALL FC18(
Start := M100.0,
Stop := FALSE,
Funct := B#16#3, //Oscillate spindle
Mode := B#16#0,
AxisNo := 5,
Pos := 0.0,
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 273
Block descriptions
16.23 FC19: MCP_IFM - transfer of MCP signals to interface
FRate := MD108,
InPos := M112.0,
Error := M113.0,
State := MB114);
CALL FC18(
Start := M100.0,
Stop := FALSE, //Not used
Funct := B#16#4, //Traverse indexing axis
Mode := B#16#0, //Absolute positioning
AxisNo := 4,
Pos := MD104, //Default setting in REAL: 1.0;2.0;..
FRate := MD108,
InPos := M112.0,
Error := M113.0,
State := MB114);
CALL FC18(
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);
Function
Block FC19 "MCP_IFM" (M version e.g. MCP 483) is used to transfer data from the machine
control panel to the NC/PLC interface:
● Modes
● Axis selections
● WCS/MCS switchover
● Traversing keys
● Spindle and feedrate override
PLC
274 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Block descriptions
16.23 FC19: MCP_IFM - transfer of MCP signals to interface
● Program control
● Keyswitch
The following specifications apply to the feedrate override, axis travel keys and INC keys
depending on the active mode or on the coordinate system selected:
● Feedrate override
– The feedrate override is transferred to the interface of the selected channel (DB21,
… .DBB4) and to the interface of all axes (DB31, … .DBB0).
– The feedrate override signals are transferred to the NC channel in addition to the "Rapid
traverse override" (DBB5) interface byte if the "Feedrate override for rapid traverse
effective" HMI signal is set (exception: Switch setting "Zero"). "Rapid traverse override
effective" is also set with this HMI signal.
● Axis traversing 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 feedback.
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
FC10: 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.
FC19 or also FC24, FC25, FC26 can be called a multiple number of times 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:
● Provisioning of the mode group interface in accordance with parameter "BAGNo" (mode
group number)
● Provisioning of the channel interface in accordance with parameter "ChanNo"
● Provisioning of the axis interface of all axes up to the maximum configured axis number
● Provisioning of the spindle interface in accordance with parameter "SpindleIFNo"
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 mode group number is contained in the
lower nibble.
"BAGNo" = 0 or B#16#10 ⇒ mode group signals are not processed.
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 275
Block descriptions
16.23 FC19: MCP_IFM - transfer of MCP signals to interface
Example
Machine axes 10 to 18 are to be selected on the axis selection keys R1 to R9 using a free key
of the MCP. We recommend that you proceed as follows:
● Reserve free key on MCP
● Evaluate this key as a flip-flop
● Evaluate the flip-flop output as positive and negative edge
● On a positive edge, enter axis numbers 10 to 18 (remember to enter hexadecimal values)
in the axis table DB10.DBB8 – 16 (symbolic name MCP1AxisTbl[1..9]) and activate the LED
via this key
● On a negative edge, enter the preset axis numbers 1 to 9 in the axis table DB10.DBB8 – 16
(symbolic name MCP1AxisTbl[1..9]) again and deactivate the LED via this key
PLC
276 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Block descriptions
16.23 FC19: MCP_IFM - transfer of MCP signals to interface
Axis selections via the function "Selection of JOG axis via HMI"
FC19 supports the function "Selection of JOG axis via HMI" from software version 4.92. This
functionality can be used as an alternative to or as extended operation of the axis selection keys
of the MCP.
The precondition for supporting this function is explained in Selection of JOG axis via HMI
(Page 104).
FC19 then only takes over a machine axis selected via HMI if the channel view of the HMI
matches the input parameter (parameter "ChanNo" of FC19). Only this can ensure that axis
selection is performed.
If a selection is made via HMI, axis selection is performed and the associated LED on the MCP
axis selection keys is activated in accordance with the axis table in DB10 (symbolic name "NC")
(alternative operation). If assignment is not possible, the axis is selected with FC19 and all
LEDs of the axis selection keys (R1 to R9) are deactivated (supplementary operation). In this
case, feedback from the selected axis is performed only via the corresponding channel DB or
the view in the HMI.
The following figure shows SINUMERIK Operate with channel 1 by way of example. The setting
of parameter "ChanNo" of FC19 for this is "ChanNo := B#16#1".
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 277
Block descriptions
16.23 FC19: MCP_IFM - transfer of MCP signals to interface
Call examples
Single call
Call of the block for the 1st MCP, mode group 1, channel 1, spindle: Axis 4
Multiple call
Call of the block for the 1st MCP, mode group 1, channel 1, spindle: Axis 4
Call of the block for the 1st MCP, without mode group, channel 2, without spindle
Call for 2 MCPs (1st MCP responsible for channel 1, 2nd MCP responsible for channel 2)
Call of the block for the 1st MCP, mode group 1, channel 1, spindle: Axis 4
PLC
278 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Block descriptions
16.23 FC19: MCP_IFM - transfer of MCP signals to interface
Call of the block for the 2nd MCP, Mode Group 1, Channel 2, without spindle
VAR_INPUT
BAGNo : BYTE ;
ChanNo: BYTE ;
SpindleIFNo: BYTE ;
END_VAR
VAR_OUTPUT
FeedHold : BOOL;
SpindleHold : BOOL;
END_VAR
BEGIN
END_FUNCTION
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 279
Block descriptions
16.23 FC19: MCP_IFM - transfer of MCP signals to interface
Keyswitch
The signals are transmitted for the very first call, irrespective of whether it is for MCP1 or MCP2.
Source: Target:
MCP switches Interface DB
Position 0 DB10.DBX56.4
Position 1 DB10.DBX56.5
Position 2 DB10.DBX56.6
Position 3 DB10.DBX56.7
Source: Target:
MCP keys Interface DB (parameter BAGNo)
Display for BAG 1
AUTOMATIC DB11.DBX0.0
MDI DB11.DBX0.1
JOG DB11.DBX0.2
REPOS DB11.DBX1.1
REF DB11.DBX1.2
TEACH IN DB11.DBX1.0
INC 1 ... 10 000, INC Var. DB11.DBX2.0 - 2.5
Source: Target:
MCP keys 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
PLC
280 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Block descriptions
16.23 FC19: MCP_IFM - transfer of MCP signals to interface
The signals are transmitted only in the first call for each MCP called if MCS is active for the
machine axis selected at the time. The interface signals are zeroed for the deselected machine
axes.
Source: Target:
MCP keys Interface DB (all axis DBs)
Direction key + DB31, ....DBX4.7
Direction key - DB31, ....DBX4.6
Rapid traverse override DB31, ....DBX4.5
Override
The signals are transmitted in each call for each called MCP to the channel DB in accordance
with the ChanNo parameter.
Source: Target:
MCP switches Interface DB (parameter ChanNo)
Feedrate override DB21, ....DBB4
Source: Target:
MCP switches Interface DB (all axis DBs)
Feedrate override DB31, ....DBB0
The signals are transmitted only in the first call for
each MCP called if MCS is active for the machine
axis selected at the time. For MCP1, the signals
are also transmitted to all other machine axes.
Spindle override DB31, ....DBB19 (parameter SpindleIFNo)
The signals are transmitted in each call for each
called MCP in accordance with the SpindleIFNo
parameter.
Channel signals
The signals are transmitted in each call for each called MCP to the channel DB in accordance
with the ChanNo parameter.
Pressing the single block key activates single block mode and pressing the key again
deactivates single block mode. If the mode is called several times for one MCP, the block
transfers single block mode state from the channel of the first call to the channels of the
subsequent calls.
Source: Target:
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
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 281
Block descriptions
16.23 FC19: MCP_IFM - transfer of MCP signals to interface
Source: Target:
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
Source: Target:
MCP keys Interface DB (parameter ChanNo)
R11 direction key DB21, ....DBB392
Direction key + DB21, ....DBX20.7
Direction key - DB21, ....DBX20.6
Target: Source:
MCP LEDs Interface DB (parameter BAGNo)
Display for BAG 1
AUTOMATIC DB11.DBX6.0
MDI DB11.DBX6.1
JOG DB11.DBX6.2
REPOS DB11.DBX7.1
REF DB11.DBX7.2
TEACH IN DB11.DBX7.0
The signals are transmitted accordingly on the first call for each called MCP from the range of
the BagNo (mode group number) parameter.
Target: Source:
MCP LEDs Interface DB (parameter BAGNo)
Display for BAG 1
INC 1 ... 10 000, INC Var. DB11.DBX8.0 - 8.5
PLC
282 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Block descriptions
16.23 FC19: MCP_IFM - transfer of MCP signals to interface
Channel signals
The signals are transmitted on each call for each called MCP from the interface DB in
accordance with the ChanNo parameter. Depending on the MCP, the last call wins to display
its ChanNo parameter on the LEDs.
Target: Source:
MCP LEDs 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.
The axis selection LED is set after successful selection.
The WCS/MCS LED indicates the current mode: LED on --> WCS active, LED off --> MCS
active.
The LEDs of rapid traverse and reset are not activated.
Call example
CALL FC19( //Machine control panel M variants signals to interface
BAGNo := B#16#1, // Mode group no. 1
ChanNo := B#16#1, // Channel no. 1
SpindleIFNo := B#16#4, // Spindle interface number = 4
FeedHold := m22.0, // Feed stop signal modal
SpindleHold := db2.dbx151.0); //Spindle stop modal in
//message DB
With these parameter settings, the signals are sent to the 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.
Example
The spindle is defined as the 4th machine axis and is to be selected via axis key 9 (key R9 of
the R key group).
Solution:
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 283
Block descriptions
16.24 FC21: Transfer - data exchange NC/PLC
The value 4 must be entered in DB10 byte16 (symbolic name MCP1AxisTbl[9]) for the 4th axis.
16.24.1 Function
Block FC21 is used to exchange data between the PLC and NC. The data are immediately
transferred when FC21 is called – not waiting until the next basic PLC program cycle starts.
The data transfer is activated by calling the block FC21 with parameter "Enable" =1
Functions
The block provides the following functions:
● Synchronized action signals: PLC → NC channel
● Synchronized action signals: NC channel → PLC
● Fast data exchange PLC-NC (read function in NC)
● Fast data exchange PLC-NC (write function in NC)
● Update signals to the NC channel
● Update signals to axes (data byte 2 of the user interface)
● Update signals to axes (data byte 4 of the user interface)
PLC
284 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Block descriptions
16.24 FC21: Transfer - data exchange NC/PLC
VAR_OUTPUT
Error : BOOL;
ErrCode : INT ;
END_VAR
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 285
Block descriptions
16.24 FC21: Transfer - data exchange NC/PLC
Call example:
BEGIN
NETWORK
END_FUNCTION
PLC
286 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Block descriptions
16.24 FC21: Transfer - data exchange NC/PLC
General
A separate, internal data area is provided as interface to allow the fast exchange of data
between the NC and the PLC. The interface encompasses 4096 bytes. PLC access operations
(reading/writing) are realized via FC21. The internal structure of the interface is solely defined
by the user, and must have precisely the same definition on the NC and PLC sides.
This data can be accessed by the NC program with the commands $A_DBB[x], $A_DBW[x],
$A_DBD[x], $A_DBR[x] (further information: List Manual, System Variables).
The concrete address in the data array is specified by a byte offset (0 to 4095) in parameter
"IVAR1". In this case, the alignment must be selected according to the data 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. Individual bits cannot be accessed. FC21 converts them over to a byte
access. Data type information and quantity of data are taken from the ANY parameter,
transferred via S7Var.
Without additional programming-related measures, data consistency is only ensured for 1 and
2 byte access operations - both from the NCU and from the PLC. For 2-byte consistency this
is true only for the data type WORD or INT, but not for the data type BYTE.
In the case of longer data types or transfer of arrays which should be transferred consistently,
the semaphore byte must be used in parameter "IVAR2", which can be used by FC21 to
determine the validity or consistency of a block. This handling must be supported by the NC, i.e.
in the NC program, by writing or deleting the semaphore byte. The semaphore byte is stored in
the same data field as the user data.
The semaphore byte is identified by a value between 0 and 4095 in "IVAR2".
The PLC reads and writes to the semaphore byte via FC21 in the same call, in which the user
data should be transferred. The PLC programmer only has to define the semaphore variable in
the interface. For access from the NC via the NC program, the semaphore mechanism must be
programmed using individual instructions according to the flow chart shown below. The
sequence is different for reading and writing variables.
Only individual variables or arrays (fields) can be supported directly using the semaphore
technique. Transferring structures must be split up into individual jobs. Here, the user must
ensure data consistency of this structure by programming the appropriate semaphore
mechanism.
If "IVAR2" = -1 is set, data are transferred without a semaphore.
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 287
Block descriptions
16.24 FC21: Transfer - data exchange NC/PLC
1R 1R
6HPDSKRU " 6HPDSKRU "
<HV <HV
7UDQVIHUGDWD 'DWHQYRQ
IURP1&WR (UURU 3/&]XU1& (UURU
3/& (UU&RGH ¾EHUWUDJHQ (UU&RGH
5HDG :ULWHLQWKH
LQWKH1&. 1&.
1R 1R
6HPDSKRU " 6HPDSKRU "
<HV <HV
5HDG 7UDQVIHU
GDWD GDWDWR3/&
IURP3/&
PLC
288 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Block descriptions
16.24 FC21: Transfer - data exchange NC/PLC
Example 1: Reading a DWORD from position offset 4 using a semaphore in byte 0 - and saving in
memory double word 100
● Data type Dword (4 bytes)
● Position offset 4
6HPDSKRU
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 289
Block descriptions
16.24 FC21: Transfer - data exchange NC/PLC
PLC programming
CALL FC21(
Enable := M 10.0, // if TRUE, FC 21 is 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;
Example 2: Reading a WORD from position offset 8 without semaphore, and saving in memory word 104
CALL FC21(
Enable :=M 10.0, // if TRUE, FC 21 is active
Funct :=B#16#3, //Read data
S7Var :=P#M 104.0 WORD 1,
IVAR1 :=8,
IVAR2 :=-1,
Error :=M 10.1,
ErrCode :=MW12);
PLC
290 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Block descriptions
16.24 FC21: Transfer - data exchange NC/PLC
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 291
Block descriptions
16.25 FC22: TM_DIR - direction selection for tool management
NOTICE
Use
Block FC22 "TM_DIR" may only be used in conjunction with the tool management.
Function
Referred to the location numbers, e.g. a tool magazine or revolver (indexing axis) block FC22
"TM_DIR" supplies the shortest path and direction of motion for positioning, based on the target
and current position.
Outputs
● Input FC22: "Start" = 1 ⇒ the outputs are cyclically updated.
● Input FC22: "Start" = 0 ⇒ the outputs are undefined.
Special positioning
For direction selection with special positioning (input FC22: "Offset" > 0) a new target position
is calculated from the target position, the offset for special positioning as well as the number of
magazines locations:
New_target position = ( target position - ( special position -1 ) ) neg. MODULO
number_of_magazine locations
The new target position corresponds to the location number at which the magazine must be
positioned so that the target 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.
Call
The block must be called once with the appropriate parameter settings for each magazine.
Further information
● Further PI services for tool management:
– FB4: PI_SERV - request PI service (Page 179)
– FC7: TM_REV - transfer block for tool change with revolver (Page 241)
– FC8: TM_TRANS - transfer block for tool management (Page 245)
● Function Manual, Tool Management
PLC
292 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Block descriptions
16.25 FC22: TM_DIR - direction selection for tool management
MagNo: INT;
ReqPos: INT;
ActPos: INT;
Offset: BYTE ;
Start : BOOL;
END_VAR
VAR_OUTPUT
Cw: BOOL;
Ccw: BOOL;
InPos : BOOL;
Diff: INT;
Error : BOOL;
END_VAR
BEGIN
END_FUNCTION
Call example
CALL FC22( // Tool management direction selection
// Inputs
MagNo := 2, // Magazine number
ReqPos := mw 20, //Target position
ActPos := mw 22, // Current position
Offset := b#16#0, // Offset for special positioning
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 293
Block descriptions
16.26 FC24: MCP_IFM2 - transferring MCP signals to the interface
Function
Block FC24 "MCP_IFM2" (M variant, e.g. MCP 310) is used for transferring data from the
machine control panel to the NC/PLC interface:
● Modes
● Axis selections
● WCS/MCS switchover
● Traversing keys
● Overrides or override simulation signals
● Key-operated switch position
The following specifications apply to the feedrate override, axis travel keys and INC keys
depending on the active mode or on the coordinate system selected:
● Feedrate override:
– The feedrate override is transferred to the interface of the selected channel and to the
interface of the axes.
– The feedrate override signals are transferred to the NC channel in addition to the "Rapid
traverse override" (DBB 5) interface byte if the "Feedrate 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 acknowledgments
from the relevant selections.
PLC
294 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Block descriptions
16.26 FC24: MCP_IFM2 - transferring MCP signals to the interface
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
FC10: 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, FC18 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.
FC24 or also FC19, FC25, FC26 can be called a multiple number of times 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 ⇒ mode group signals are not processed.
"ChanNo" = 0 ⇒ no processing of the channel signals.
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 block call
for the 2nd machine control panel in OB1 cycle must be set after the call of the 1st MCP.
Support for two MCPs is provided in the control panel blocks up to certain limits (support is not
provided as standard for mutual interlocking of axis selections with identical assignments on
two MCPs).
Note
For further information see "FC19: MCP_IFM - transfer of MCP signals to interface (Page 274)".
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 295
Block descriptions
16.26 FC24: MCP_IFM2 - transferring MCP signals to the interface
axis-numbers are also specified in the parameterized mode group number of the MCP block in
the axis tables of the relevant MCP.
To provide this flexibility, tables for axis numbers are stored in DB10.
For the 1st machine control panel (MCP) the table starts at byte 8 (symbolic name:
MCP1AxisTbl[1..22]) and for the second machine control panel (MCP) starting at byte 32
(symbolic name: MCP2AxisTbl[1..22]). The machine axis numbers must be entered byte by
byte here. It is permissible to enter a value of 0 in the axis table. Checks are not made to find
illegal axis numbers, meaning that false entries can lead to a PLC Stop.
For FC24, 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 for FC24. 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 ;
PLC
296 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Block descriptions
16.26 FC24: MCP_IFM2 - transferring MCP signals to the interface
ChanNo: BYTE ;
SpindleIFNo: BYTE ;
END_VAR
VAR_OUTPUT
FeedHold : BOOL;
SpindleHold : BOOL;
SpindleDir: BOOL;
END_VAR
BEGIN
END_FUNCTION
Call example
CALL FC24( // Slimline machine control panel M
variant
// Signals to interface
BAGNo := B#16#1, // Mode group no. 1
ChanNo := B#16#1, // Channel no. 1
SpindleIFNo : B#16#4, // Spindle Interface Number = 4
=
FeedHold := m22.0, // Feed stop signal modal
SpindleHold : db2.dbx151.0, // Spindle stop modal in message data block
=
SpindleDir:= m22.1); // Spindle direction return
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 297
Block descriptions
16.27 FC25: MCP_IFT - transfer of MCP/OP signals to interface
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 FC18 call.
Function
Block FC25 "MCP_IFT" (T variant, e.g. MCP 483) is used for transferring data from the machine
control panel to the NC/PLC interface:
● Modes
● Direction keys of four axes
● WCS/MCS switchover
● Overrides
● Keyswitch
The following specifications apply to the feedrate override, axis travel keys and INC keys
depending on the active mode or on the coordinate system selected:
● Feedrate override:
– The feedrate override is transferred to the interface of the selected channel and to the
interface of the axes.
– The feedrate override signals are transferred to the NC channel in addition to the "Rapid
traverse override" (DBB 5) interface byte if the "Feedrate 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.
The associated LEDs on the machine control panel derived from the acknowledgments 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
FC10: 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.
FC25 or also FC19, FC24, FC26 can be called a multiple number of times 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
PLC
298 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Block descriptions
16.27 FC25: MCP_IFT - transfer of MCP/OP signals to interface
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 ⇒ mode group signals are not processed.
"ChanNo" = 0 ⇒ no processing of the channel signals.
Note
For further information see F
" C19: MCP_IFM - transfer of MCP signals to interface (Page 274) ".
VAR_INPUT
BAGNo : BYTE ;
ChanNo: BYTE ;
SpindleIFNo: BYTE ;
END_VAR
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 299
Block descriptions
16.27 FC25: MCP_IFT - transfer of MCP/OP signals to interface
VAR_OUTPUT
FeedHold : BOOL;
SpindleHold : BOOL;
END_VAR
BEGIN
END_FUNCTION
Call example
With this parameter assignment example, the signals are sent to the 1st mode group, the
1st channel and all axes. The spindle override is transferred to the 4th axis/spindle. Feed stop
is sent to bit memory 22.0 and spindle stop is sent to the data block DB2, DBX151.0.
PLC
300 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Block descriptions
16.28 FC26: HPU_MCP - Transfer of the HT 8/HT 10 signals to the interface
Bit 6.7 in the input image is used to differentiate between the HT 8 and HT 10. This bit is set for
an HT 10.
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.
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 301
Block descriptions
16.28 FC26: HPU_MCP - Transfer of the HT 8/HT 10 signals to the interface
VAR_INPUT
BAGNo : BYTE ;
ChanNo: BYTE ;
END_VAR
BEGIN
END_FUNCTION
PLC
302 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Block descriptions
16.28 FC26: HPU_MCP - Transfer of the HT 8/HT 10 signals to the interface
Call examples
Calling FC26 for the first MCP, the first mode group and the first channel of the NC.
Calling FC26 for the second MCP, the second mode group and the third channel of the NC.
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:
● IB n + 2, Bit 0 - Bit 5 (positive traversing direction)
● IB n + 3, Bit 0 - Bit 5 (negative traversing direction)
The switchover of the coordinate system is done via the input signal:
● IB n + 0, Bit 0 (MCS/WCS)
The input signal is evaluated in FC26 with the help of the edge trigger flag. The active
coordinate system is shown in the following output signal:
● QB 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).
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 303
Block descriptions
16.28 FC26: HPU_MCP - Transfer of the HT 8/HT 10 signals to the interface
For HT 8 with active WCS, it is assumed that the axes 1 - 3 of the machine axis table are
geometry axes. For the traverse key signals with HT 8, the following applies:
● The traverse key signals of axes 1 - 3 (EB n + 2 / 3, bit 0 - bit 2) are transferred into the
interface of the geometry axes in DB21, ... .DBB12 + (n * 4), with n = 0, 1, 2), bit 6 and bit
7 (traverse keys +/-) of the channel specified with parameter "ChanNo".
The assignment of the traversing key signals of axes 1, 2 and 3 to the geometric axes 1, 2
and 3 of the channel is permanent and may not be changed.
● The traverse key signals of axes 4 - 6 (EB n + 2 / 3, bit 3 - bit 5) are transferred into the axis-
specific interfaces (DB31, ... .DBX4.6 and DBX4.7 (traverse keys +/-)) of axes 4 - 6 entered
in the machine axis table (DB10.DBB11 to DBB13 or DBB35 to DBB37).
For HT 10, only one geometry axis which was selected from the HMI can be traversed
respectively.
The axis traverse signals (+/- and rapid traverse) for HT 10 relate to a machine axis or a
geometry axis, depending on which axis was selected in the HMI and whether WCS or MCS is
active. See also "Flexible axis configuration for the HT 10".
Feedrate override
The value of the HT 8 override switch is transferred as feedrate override in the channel-specific
interface DB21, ... .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).
PLC
304 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Block descriptions
16.28 FC26: HPU_MCP - Transfer of the HT 8/HT 10 signals to the interface
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: FB1 parameters: "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).
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 305
Block descriptions
16.28 FC26: HPU_MCP - Transfer of the HT 8/HT 10 signals to the interface
Source: MCP Target: Geometry axes of the prog. channel (parameter: ChanNo)
1st traversing key + DB21, ....DBX12.7
1st traversing key - DB21, ....DBX12.6
2nd traversing key + DB21, ....DBX16.7
2nd traversing key - DB21, ....DBX16.6
3rd traversing key + DB21, ....DBX20.7
3rd traversing key - DB21, ....DBX20.6
Source: MCP Target: Depending on the geometry axis selected in the HMI (Smart
Operate)
WCS is active
Traversing key + DB21, ....DBX12.7, .DBX16.7, .DBX20.7
PLC
306 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Block descriptions
16.28 FC26: HPU_MCP - Transfer of the HT 8/HT 10 signals to the interface
Source: MCP Target: Depending on the geometry axis selected in the HMI (Smart
Operate)
Traversing key - DB21,
..........................DBX12.6, .DBX16.6,
DB21, ....DBX12.5,
.DBX20.6 .DBX16.5,
Rapid traverse .DBX20.5
override key
MCS is active
Traversing key + DB31, ....DBX4.7
Traversing key - DB31,
..........................DBX4.6 Rapid traverse
DB31,override
....DBX4.5
key
Override
Channel signals
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 307
Block descriptions
16.29 FC1005: AG_SEND - transfers data to Ethernet CP
Note
Unlike other MCP models, the HT 8 does not indicate the feedback messages via output signals
with LEDs.
Output signals from the axis traversing key pairs are not switched.
Output signals from the WCS and single block are switched after the keys have been pressed
(toggle mode).
The output signal from Reset is not switched. (HT 8)
The LEDs of the traversing keys +/- and rapid traverse are directly controlled by pressing the
keys in question.
Program control
Note
Smaller volume of transmittable data with SINUMERIK CP and UDP or ISO-on-TCP protocol
For SINUMERIK CP, only 240 bytes can be transmitted when function block FC1005 and the
UDP or ISO-on-TCP protocol are used.
PLC
308 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Block descriptions
16.30 FC1006: AG_RECV - receives data from the Ethernet CP
Documentation
A detailed module description can be found in:
● SINUMERIK user interfaces: Online help
● SIMATIC Programming Manual: Program blocks for SIMATIC NET S7-CPs
Chapter: "Program blocks for Industrial Ethernet" > "Program blocks for open
communication services (SEND/RECEIVE interface)" > "AG_SEND / AG_LSEND /
AG_SSEND"
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 309
Block descriptions
16.30 FC1006: AG_RECV - receives data from the Ethernet CP
Note
Smaller volume of transmittable data with SINUMERIK CP and UDP or ISO-on-TCP protocol
For SINUMERIK CP, only 240 bytes can be transmitted when function block FC1006 and the
UDP or ISO-on-TCP protocol are used.
Formal parameters
Documentation
A detailed module description can be found in:
● SINUMERIK user interfaces: Online help
● SIMATIC Programming Manual: Program blocks for SIMATIC NET S7-CPs
Chapter: "Program blocks for Industrial Ethernet" > "Program blocks for open
communication services (SEND/RECEIVE interface)" > "AG_RECV / AG_LRECV /
AG_SRECV"
PLC
310 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Data lists 17
17.1 Machine data
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 DB20 even when the PLC
boots.
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 311
Data lists
17.1 Machine data
PLC
312 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals 18
18.1 Interface signals - overview
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 313
Interface signals
18.1 Interface signals - overview
* The actual upper limit of the block number depends on the PLC CPU contained in the selected NCU.
* The actual upper limit of the block number depends on the PLC CPU contained in the selected NCU.
PLC
314 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.1 Interface signals - overview
Note
The number of DBs to be set up depends on the parameterization made in the NC machine
data.
Note
Data blocks of channels, axes/spindles and tool management that have not been activated are
available for the user.
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 315
Interface signals
18.1 Interface signals - overview
* The actual upper limit of the timer number (DB) depends on the PLC CPU contained in the selected NCU.
PLC
316 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.1 Interface signals - overview
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 317
Interface signals
18.1 Interface signals - overview
Table 18-10 Slimline version, signals from the MCP: Input image
Signals from the slimline MCP (switches and keys) (MCP → PLC)
Byte Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
EB n + 0 Spindle override Operating mode
*NC stop SP - SP 100% SP + SINGLEB JOG MDI AUTO
EB n + 1 Spindle Key-operat‐ Machine function
ed switch
NC start SP right *SP stop SP left INT 3 REF REPOS TEACH IN
PLC
318 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.1 Interface signals - overview
Signals from the slimline MCP (switches and keys) (MCP → PLC)
Byte Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
EB n + 2 Feedrate Key-operat‐ Machine functions
ed switch
Start *Stop INCvar INT 0 INC1000 INC100 INC10 INC1
EB n + 3 Key-operated switch Feedrate override
Reset INT 2 INT 1 E D C B A
EB n + 4 Direction keys Optional customer keys
+R15 -R13 Rapid tra‐ KT4 KT3 KT2 KT1 KT0
verse R14
EB n + 5 Axis selection
T17 KT5 6 5 4 Z Y X
EB n + 6 Freely assignable customer keys MCS/WCS Freely assignable customer keys
T9 T10 T11 T12 T14 T15 T16
EB n + 7 Freely assignable customer keys
T1 T2 T3 T4 T5 T6 T7 T8
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 319
Interface signals
18.1 Interface signals - overview
PLC
320 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.1 Interface signals - overview
Note
The parameterization or configuration of the various MCP/HHU versions is described in:
Further information
● Manual, Operator Components and Networking
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 321
Interface signals
18.1 Interface signals - overview
PLC
322 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.1 Interface signals - overview
Table 18-16 Signals from the handheld unit HT 10: Input image
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 323
Interface signals
18.1 Interface signals - overview
Table 18-17 Signals from the handheld unit HT 10: Output image
PLC
324 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.1 Interface signals - overview
Message type
● FM: A fault message with the associated event number as fault number is triggered by the
signal.
● OM: An operating message with the associated event number as message number is
triggered by the signal.
Further information
A detailed description regarding error and system status messages can be obtained in:
FC10: AL_MSG - error and operating messages (Page 254)
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 325
Interface signals
18.1 Interface signals - overview
PLC
326 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.1 Interface signals - overview
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 327
Interface signals
18.1 Interface signals - overview
PLC
328 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.1 Interface signals - overview
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 329
Interface signals
18.1 Interface signals - overview
PLC
330 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.1 Interface signals - overview
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 331
Interface signals
18.1 Interface signals - overview
PLC
332 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.1 Interface signals - overview
Note
Parameterizing user ranges
The number of user ranges (maximum of 32) can be parameterized using FB 1 "MsgUser".
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 333
Interface signals
18.1 Interface signals - overview
Description
Message type
● FM: A fault message with the associated event number as fault number is triggered by the
signal.
● OM: An operating message with the associated event number as message number is
triggered by the signal.
Further information
FC10: AL_MSG - error and operating messages (Page 254)
PLC
334 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.1 Interface signals - overview
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 335
Interface signals
18.1 Interface signals - overview
PLC
336 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.1 Interface signals - overview
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 337
Interface signals
18.1 Interface signals - overview
PLC
338 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.1 Interface signals - overview
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 339
Interface signals
18.1 Interface signals - overview
PLC
340 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.1 Interface signals - overview
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 341
Interface signals
18.1 Interface signals - overview
PLC
342 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.1 Interface signals - overview
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 343
Interface signals
18.1 Interface signals - overview
PLC
344 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.1 Interface signals - overview
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 345
Interface signals
18.1 Interface signals - overview
PLC
346 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.1 Interface signals - overview
Note
Parameterizing user ranges
The number of user ranges (maximum of 64) can be parameterized using FB 1 "MsgUser".
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 347
Interface signals
18.1 Interface signals - overview
DBW30 Upper limit of the machine axis numbers for FC 19, FC 24 (1st MCP)
With 0, the maximum number of machine axis numbers applies
DBB32 - Machine axis numbers table for FC 19, FB 24, FB 25, FB 26 (2nd MCP)
DBB53
DBW54 Upper limit of the machine axis numbers for FC 19, FC 24 (2nd MCP)
With 0, the maximum number of machine axis numbers applies
PLC
348 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.1 Interface signals - overview
18.1.7.3 DB10, onboard inputs and outputs from the NC/operating software
Table 18-42 DB10, onboard inputs and outputs from the NC/operating software
DBB88 Reserved
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 349
Interface signals
18.1 Interface signals - overview
18.1.7.4 DB10, selection and status signals from the operating software
Table 18-43 DB10, selection and status signals from the operating software
PLC
350 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.1 Interface signals - overview
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 351
Interface signals
18.1 Interface signals - overview
PLC
352 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.1 Interface signals - overview
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 353
Interface signals
18.1 Interface signals - overview
PLC
354 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.1 Interface signals - overview
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 355
Interface signals
18.1 Interface signals - overview
PLC
356 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.1 Interface signals - overview
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 357
Interface signals
18.1 Interface signals - overview
PLC
358 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.1 Interface signals - overview
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 359
Interface signals
18.1 Interface signals - overview
PLC
360 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.1 Interface signals - overview
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 361
Interface signals
18.1 Interface signals - overview
PLC
362 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.1 Interface signals - overview
Table 18-59 DB11, mode signals mode group 1 from the HMI
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 363
Interface signals
18.1 Interface signals - overview
Table 18-62 DB11, mode signals mode group 2 from the HMI
PLC
364 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.1 Interface signals - overview
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 365
Interface signals
18.1 Interface signals - overview
PLC
366 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.1 Interface signals - overview
DBB142 -
DBB149
DBB150 -
DBB157
DBB158 -
DBB188
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 367
Interface signals
18.1 Interface signals - overview
PLC
368 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.1 Interface signals - overview
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 369
Interface signals
18.1 Interface signals - overview
PLC
370 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.1 Interface signals - overview
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 371
Interface signals
18.1 Interface signals - overview
PLC
372 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.1 Interface signals - overview
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 373
Interface signals
18.1 Interface signals - overview
PLC
374 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.1 Interface signals - overview
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 375
Interface signals
18.1 Interface signals - overview
PLC
376 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.1 Interface signals - overview
DBB651 15 14 13 12 11 10 9 8
DBW652 ERR_REAC
DBB654 ACK_REI
DBB655 SEND‐ ACK_REQ SUBS_ON ERROR
MODE
DBW656 DIAG
DBW658 RETVAL14
DBW660 RETVAL15
11th F_RECVDP interface: FRDP_HF[11]
(SUBS)
DBB662 7 6 5 4 3 2 1 0
DBB663 15 14 13 12 11 10 9 8
DBW664 ERR_REAC
DBB666 ACK_REI
DBB667 SEND‐ ACK_REQ SUBS_ON ERROR
MODE
DBW668 DIAG
DBW670 RETVAL14
DBW672 RETVAL15
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 377
Interface signals
18.1 Interface signals - overview
DBB675 15 14 13 12 11 10 9 8
DBW676 ERR_REAC
DBB678 ACK_REI
DBB679 SEND‐ ACK_REQ SUBS_ON ERROR
MODE
DBW680 DIAG
DBW682 RETVAL14
DBW684 RETVAL15
13th F_RECVDP interface: FRDP_HF[13]
(SUBS)
DBB686 7 6 5 4 3 2 1 0
DBB687 15 14 13 12 11 10 9 8
DBW688 ERR_REAC
DBB690 ACK_REI
DBB691 SEND‐ ACK_REQ SUBS_ON ERROR
MODE
DBW692 DIAG
DBW694 RETVAL14
DBW696 RETVAL15
14th F_RECVDP interface: FRDP_HF[14]
(SUBS)
DBB698 7 6 5 4 3 2 1 0
DBB699 15 14 13 12 11 10 9 8
DBW700 ERR_REAC
DBB702 ACK_REI
DBB703 SEND‐ ACK_REQ SUBS_ON ERROR
MODE
DBW704 DIAG
DBW706 RETVAL14
DBW708 RETVAL15
15th F_RECVDP interface: FRDP_HF[15]
(SUBS)
DBB710 7 6 5 4 3 2 1 0
DBB711 15 14 13 12 11 10 9 8
DBW712 ERR_REAC
DBB714 ACK_REI
DBB715 SEND‐ ACK_REQ SUBS_ON ERROR
MODE
PLC
378 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.1 Interface signals - overview
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 379
Interface signals
18.1 Interface signals - overview
PLC
380 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.1 Interface signals - overview
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 381
Interface signals
18.1 Interface signals - overview
PLC
382 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.1 Interface signals - overview
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 383
Interface signals
18.1 Interface signals - overview
PLC
384 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.1 Interface signals - overview
Table 18-76 DB19, sidescreen - interface for the MCP function signals to/from the operator panel
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 385
Interface signals
18.1 Interface signals - overview
DBW
DBB
PLC
386 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.1 Interface signals - overview
DBD
Note
The start and end addresses of the PLC machine data areas are dependent on the particular
length data of the partial areas. The range of INTEGER values always starts with data byte 0.
The upper limit is defined by the associated length data. The range of the bit arrays starts after
the range of the INTEGER values at the next even address. The range of REAL values starts
after the range of the bit arrays at the next even address.
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 387
Interface signals
18.1 Interface signals - overview
PLC
388 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.1 Interface signals - overview
Note
● Feedrate override active: Even if the feedrate override is not active (= 100%), the 0%
position is still effective.
● Feedrate override: Either 31 positions (Gray code) with 31 MD for % evaluation, or 0% to
200% corresponding to the dual value in the byte (201 to 255 = max. 200%)
● Rapid traverse override: Either 31 positions (Gray code) with 31 MD for % evaluation, or 0%
to 100% corresponding to the dual value in the byte (101 to 255 = max. 100%)
● Single block: Select the version using "Write variable"
● Delete distance-to-go: Is only active for path axes and not for positioning axes
Geometry axis 2
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 389
Interface signals
18.1 Interface signals - overview
Geometry axis 3
DBB20 Traversing keys Rapid tra‐ Traversing Feedrate Activate handwheel
see also (Page 536) verse over‐ key lock stop see also (Page 535)
ride see see
see also also
Plus Minus C B A
also (Page 535) (Page 530)
(Page 536)
PLC
390 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.1 Interface signals - overview
Note
The NC only evaluates the machine function signals if the signal DB10 DBX57.0
(Page 348)"INC inputs in mode group area active" is not set.
18.1.12.3 DB21 - DB30, HMI signals to channel / OEM signals from/to channel
Table 18-79 DB21 - DB30, control signals from the operating software to the PLC, PLC to the NC and status signal from
channel to the PLC
DB21 - Signals from the channel/PLC/operating software (operating software → PLC, PLC → NC, NC → PLC)
DB30
Byte Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
DBB24 Dry run fee‐ M01 selec‐ M01 associ‐ DRF selec‐ Activate
Operating drate selec‐ ted ated with ted configured
software → ted see NC selec‐ see STOP
PLC see also ted also see
also (Page 538) see (Page 537) also
(Page 538) also (Page 536)
(Page 537)
DBB25 Program REPOS Feedrate REPOS mode /FB-K1/
Operating test selec‐ mode override se‐ C B A
software → ted change lected for
PLC /FB-K1/ /FB-K1/ rapid tra‐
verse
see
also
(Page 539)
DBB26 Skip block requested, level/x
Operating /FB-K1/
software → /7 /6 /5 /4 /3 /2 /1 /0
PLC
DBB27 Skip block requested, lev‐
Operating el/x
software → /9 /8
PLC
DBB28 OEM signals: Requirement
PLC → NC
DBB29 Tool Deactivate Deactivate Activate Activate fixed feedrate
PLC → NC do not lock wear moni‐ workpiece PTP traver‐ see also (Page 541)
toring counter sal
see 4 3 2 1
also see see see
(Page 543) also also also
(Page 542) (Page 542) (Page 542)
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 391
Interface signals
18.1 Interface signals - overview
DB21 - Signals from the channel/PLC/operating software (operating software → PLC, PLC → NC, NC → PLC)
DB30
Byte Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
DBB30 No tool Jog circles Activate Contour Contour Activate contour handwheel
PLC → NC change see NC-associ‐ handwheel handwheel see also (Page 543)
commands also ated M0/1 simulation, simulation
C B A
(Page 545) see negative di‐ on
also rection see
(Page 545) see also
also (Page 544)
(Page 545)
DBB31 Activate skip block Invert con‐ REPOS REPOS mode
PLC → NC tour hand‐ mode see also (Page 546)
wheel direc‐ change
/9 /8 C B A
tion of rota‐ see
tion also
see (Page 547)
also
(Page 547)
DBB32 Last action M00/M01 Approach Action RESU: RESU: Execution
NC → PLC block active active block active block active Retrace Retrace from exter‐
see see see see support ac‐ mode active nal active
also also also also tive see
(Page 549) (Page 549) (Page 548) (Page 548) see also
also (Page 547)
(Page 548)
DBB33 Program Transfor‐ M02/M30 Block Handwheel Revolution‐ Orientable Referenc‐
NC → PLC test active mation ac‐ active search ac‐ override ac‐ al feedrate tool carrier ing active
see tive see tive tive active active see
also see also see see /FB-V1/ also
(Page 552) also (Page 551) also also (Page 550)
(Page 552) (Page 551) (Page 550)
DBB34 OEM signals: Feedback signal
NC → PLC
DBB35 Channel state Program status
NC → PLC Reset Interrupted Active Canceled Interrupted Stopped Waiting Running
see see see see see see see see
also also also also also also also also
(Page 558) (Page 557) (Page 557) (Page 556) (Page 555) (Page 555) (Page 554) (Page 553)
DBB36 NC alarm Channel- Channel is Interrupt All axes sta‐ All axes
NC → PLC with ma‐ specific NC ready handling tionary that have to
chining alarm is ac‐ see active see be refer‐
stop is ac‐ tive also see also enced are
tive see (Page 559) also (Page 559) referenced
see also (Page 559) see
also (Page 560) also
(Page 560) (Page 558)
PLC
392 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.1 Interface signals - overview
DB21 - Signals from the channel/PLC/operating software (operating software → PLC, PLC → NC, NC → PLC)
DB30
Byte Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
DBB37 "Stop at the Read-in dis‐ CLC stop‐ CLC stop‐ CLC active Contour handwheel active
NC → PLC end of able is ig‐ ped ped see see also (Page 560)
block for nored Upper limit Lower limit also C B A
single block see (Page 561)
see see
(SBL)" is also also also
suppressed (Page 563)
(Page 562) (Page 562)
see
also
(Page 563)
DBB38 Nibbling and punching /FB-N4/
NC → PLC Manual Stroke ini‐
stroke initia‐ tiation ac‐
tion: Ac‐ tive
knowledg‐ see
ment also
see (Page 564)
also
(Page 564)
DBB39 Stop at end Configured Contour Stop at end NC alarm Protection
NC → PLC of block stop is acti‐ handwheel of block with pro‐ zone moni‐
due to con‐ vated direction of due to sin‐ gram stop toring not
figured stop see rotation in‐ gle block see guaranteed
see also verted ac‐ see also /FB-A5/
also (Page 566) tive also (Page 565)
(Page 566) see (Page 565)
also
(Page 565)
Table 18-80 DB21 - DB30, control signals from the geometry axes
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 393
Interface signals
18.1 Interface signals - overview
DBB49 Handwheel
direction of
rotation in‐
verted
see
also
(Page 570)
DBB50
Operating
soft‐
ware → PLC
Geometry axis 3
DBB52 Travel command Traversing requests Handwheel active
see also (Page 571) see also (Page 571) see also (Page 571)
C B A
DBB53 Active machine function
see also (Page 571)
Continuous INCvar INC10000 INC1000 INC100 INC10 INC1
manual
travel
DBB54 OEM signals
PLC
394 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.1 Interface signals - overview
18.1.12.5 DB21 - DB30, change signals for auxiliary function transfer from the channel
Table 18-81 DB21 - DB30, change signals for auxiliary function transfer from the channel
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 395
Interface signals
18.1 Interface signals - overview
Note
● For 10-decade T numbers, only the signal DBB61, DBX0 "T fct.1 change" is available.
● For 5-decade D numbers, only the signal DBB62, DBX0 "D fct.1 change" is available.
PLC
396 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.1 Interface signals - overview
Note
M functions are programmed in the part program in the INTEGER format (8 decades plus
leading sign).
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 397
Interface signals
18.1 Interface signals - overview
Note
● Programmed T functions are not output to the PLC when tool management is active.
● 8 decade T numbers are only available under DBD118 "T function 1".
● Programmed D functions with names (e.g. D=CUTTING EDGE_1) cannot be output to the
PLC in ASCII format.
● 5-decade D numbers are only available as DBW130 "D function 1".
● The REAL format corresponds to the floating-point representation in STEP 7 (24-bit
mantissa and 8-bit exponent). This floating point format supplies a maximum of 7 valid
places.
PLC
398 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.1 Interface signals - overview
Note
● F functions are programmed in the part program in the REAL data format.
● The extended address of the F function contains an identifier with the following meaning:
– 0: Path feedrate
– 1 – 31: Machine axis number for feedrate for positioning axes
● The data type of the H function depends on machine data: MD22110
$MC_AUXFU_H_TYPE_INT
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 399
Interface signals
18.1 Interface signals - overview
Note
● #: the M function is not displayed here, if a spindle is parameterized in the channel. In this
case, the M function is displayed as extended M function under DB21,... DBB68 ff. and axial
under DB31,... DBB86 ff. displayed.
● Dynamic M functions (M00 - M99) are decoded by the basic PLC program.
Static M functions must be generated in the PLC user program from dynamic M functions.
PLC
400 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.1 Interface signals - overview
Note
● The active G functions of the group, for each programming of a G function or a mnemonic
identifier (e.g. SPLINE), are updated.
● G functions within a G group are output as binary value, starting with 1. A G function with the
value 0 means that for this G group, no G function is active.
Table 18-87 DB21 - DB30, signals for the protection zones from the channel
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 401
Interface signals
18.1 Interface signals - overview
Note
The request signals should be set in the PLC user program. After data transfer, they are reset
by the basic PLC program.
PLC
402 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.1 Interface signals - overview
Note
The request signals should be set in the PLC user program. After data transfer, they are reset
by the basic PLC program.
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 403
Interface signals
18.1 Interface signals - overview
PLC
404 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.1 Interface signals - overview
DBB323 Handwheel
direction of
rotation in‐
verted
see
also
(Page 589)
Orientation axis 2
DBB324 Traversing keys Rapid tra‐ Traversing Feedrate Activate handwheel
see also (Page 590) verse over‐ key disable stop see also (Page 589)
ride see
Plus Minus C B A
see also
also (Page 589)
(Page 590)
DBB325 Requested machine function
see also (Page 590)
Continuous var. INC 10000 INC 1000 INC 100 INC 10 INC 1 INC
traversing
DBB326 OEM signals
DBB327 Handwheel
direction of
rotation in‐
verted
see
also
(Page 590)
Orientation axis 3
DBB328 Traversing keys Rapid tra‐ Traversing Feedrate Activate handwheel
see also (Page 591) verse over‐ key disable stop see also (Page 590)
ride see
Plus Minus C B A
see also
also (Page 590)
(Page 590)
DBB329 Requested machine function
see also (Page 591)
Continuous var. INC 10000 INC 1000 INC 100 INC 10 INC 1 INC
traversing
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 405
Interface signals
18.1 Interface signals - overview
DBB331 Handwheel
direction of
rotation in‐
verted
see
also
(Page 591)
DBB335 Handwheel
direction of
rotation in‐
version ac‐
tive
Orientation axis 2
DBB336 Traversing command Travel request Handwheel active
see also (Page 595) see also (Page 595) see also (Page 594)
Plus Minus Plus Minus C B A
DBB337 Active machine function
see also (Page 595)
Continuous INCvar INC10000 INC1000 INC100 INC10 INC1
traversing
active
DBB338 OEM signals
PLC
406 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.1 Interface signals - overview
DBB343 Handwheel
direction of
rotation in‐
version ac‐
tive
Table 18-92 DB21 - DB30, tool management functions from the channel
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 407
Interface signals
18.1 Interface signals - overview
PLC
408 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.1 Interface signals - overview
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 409
Interface signals
18.1 Interface signals - overview
DBB394 Reserved
DBB395 Reserved
PLC
410 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.1 Interface signals - overview
DBB2 Reference point value 1 - 4 Clamping Delete dis‐ Controller Cam activa‐
Axis and see also (Page 617) in progress tance-to- enable tion
spindle see go / spindle see see
Bit 4 Bit 3 Bit 2 Bit 1
also reset also also
(Page 617) see (Page 613) (Page 613)
also
(Page 615)
DBB3 Program Velocity / Activate fixed feedrate Travel to Accept off‐
Axis and test axis/ spindle see also (Page 619) fixed stop set external
spindle spindle speed limi‐ enabled WO
Bit 4 Bit 3 Bit 2 Bit 1
enable tation see see
see also also
also (Page 618) (Page 618)
(Page 619)
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 411
Interface signals
18.1 Interface signals - overview
PLC
412 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.1 Interface signals - overview
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 413
Interface signals
18.1 Interface signals - overview
PLC
414 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.1 Interface signals - overview
Note
DBX8.4 is automatically reset after the assignment is executed
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 415
Interface signals
18.1 Interface signals - overview
DBB61 Current Speed con‐ Position Axis/spin‐ Follow-up Axis ready Axis-specif‐ Drive test
Axis / spin‐ controller troller active controller dle station‐ mode active see ic alarm travel re‐
dle active see active ary (n < nmin) see also see quest
see also see see also (Page 657) also see
also (Page 659) also also (Page 657) (Page 656) also
(Page 659) (Page 658) (Page 658) (Page 656)
DBB62 Axis con‐ Travel to Travel to Travel to Measure‐ Revolution‐ Handwheel Software
tainer: fixed stop: fixed stop: fixed stop: ment active al feedrate override ac‐ cams active
Rotation ac‐ Force limit‐ Fixed stop Activating see active tive see
tive ing active reached the function also see see also
see see see (Page 661) also also (Page 660)
also also also (Page 661) (Page 660)
(Page 662) (Page 662) (Page 661)
DBB63 Stop Axis/spin‐ Axis stop PLC-con‐ Reset exe‐
HIAxMove Corr. active DEPBCS DEPMCS dle disable active trolled axis cuted
active active active active see see see
also also also
(Page 663) (Page 663) (Page 662)
DBB64 Traversing command Travel request Handwheel active
Axis / spin‐ see also (Page 665) see also (Page 665) see also (Page 664)
dle Plus Minus Plus Minus Bit 2 Bit 1 Bit 0
DBB65 Active machine function
Axis / spin‐ see also (Page 666)
dle Continuous INCvar INC10000 INC1000 INC100 INC10 INC1
manual
travel
DBB66 MCS cou‐
Axis / spin‐ pling:
dle Collision
protection
active
see
also
(Page 666)
PLC
416 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.1 Interface signals - overview
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 417
Interface signals
18.1 Interface signals - overview
PLC
418 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.1 Interface signals - overview
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 419
Interface signals
18.1 Interface signals - overview
PLC
420 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.1 Interface signals - overview
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 421
Interface signals
18.1 Interface signals - overview
DBB127
PLC
422 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.1 Interface signals - overview
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 423
Interface signals
18.1 Interface signals - overview
Table 18-98 DB31 - DB61, axis signals: Safety Control Channel (SCC)
Table 18-99 DB31 - DB61, axis signals: Safety Info Channel (SIC)
PLC
424 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.1 Interface signals - overview
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 425
Interface signals
18.1 Interface signals - overview
PLC
426 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.1 Interface signals - overview
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 427
Interface signals
18.1 Interface signals - overview
PLC
428 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.1 Interface signals - overview
Spindle 1: n=4
Spindle 2: n = 52
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 429
Interface signals
18.1 Interface signals - overview
PLC
430 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.1 Interface signals - overview
Turret, 1: n=4
Turret, 2: n = 48
18.1.16 Signals from/to the machine control panel and the handheld unit
Table 18-103 DB77, signals from/to the MCP and the HHU
DBB48 - Input signals from the HHU to the PLC, MPI bus
DBB53
DBB60 - Output signals from the HHU to the PLC, MPI bus
DBB79
DBD80 Status, send HHU, MPI bus
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 431
Interface signals
18.1 Interface signals - overview
PLC
432 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.1 Interface signals - overview
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 433
Interface signals
18.1 Interface signals - overview
PLC
434 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.1 Interface signals - overview
DBD36 Supplied active energy in kWh day (REAL) to the operating software
DBD40 Drawn active energy in kWh previous day (REAL) to the operating software
DBD44 Supplied active energy in kWh previous day (REAL) to the operating software
DBD48 Drawn active energy in kWh month (REAL) to the operating software
DBD52 Supplied active energy in kWh month (REAL) to the operating software
DBD56 Drawn active energy in kWh previous month (REAL) to the operating software
DBD60 Supplied active energy in kWh previous month (REAL) to the operating software
DBD64 Drawn active energy in kWh year (REAL) to the operating software
DBD68 Supplied active energy in kWh year (REAL) to the operating software
DBD72 Drawn active energy in kWh previous year (REAL) to the operating software
DBD76 Supplied active energy in kWh previous year (REAL) to the operating software
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 435
Interface signals
18.1 Interface signals - overview
DBBn+102 Reserved
DBBn+104 Active power or active energy of the auxiliary unit [kW] or [kWh]
PLC → GP op‐
erating soft‐
ware
DBDn+108 Drawn active energy of the auxiliary unit [kWh]
PLC → operat‐
ing software
DBDn+112 Active energy supplied by the auxiliary unit [kWh]
GP → operat‐
ing software
DBDn+116 Active energy drawn by the auxiliary unit at the measurement start [kWh]
GP → operat‐
ing software
DBDn+120 Active energy supplied by the auxiliary unit at the measurement start [kWh]
GP → operat‐
ing software
DBDn+124 Active energy drawn by the auxiliary unit at the measurement end [kWh]
GP → operat‐
ing software
DBDn+128 Active energy supplied by the auxiliary unit at the measurement end [kWh]
GP → operat‐
ing software
DBDn+132 Reserved
DBDn+136 Reserved
PLC
436 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.1 Interface signals - overview
DBWn + 2 Reserved
DBDn + 4 Sensor n
Temperature sensor actual value [°C]
DBDn + 8 Sensor n
Temperature sensor warning threshold value [°C]
DBWn + 12 Sensor n
Number of alarm limit value violations
DBBn + 14 Sensor n
Last alarm limit value violation: Year total active power (REAL) to the operating software
DBBn + 15 Sensor n
Last alarm limit value violation: Month
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 437
Interface signals
18.1 Interface signals - overview
DBBn + 17 Sensor n
Last alarm limit value violation: Hour
DBBn + 18 Sensor n
Last alarm limit value violation: Minute
DBBn + 19 Sensor n
Last alarm limit value violation: Seconds
DBBn + 20 Sensor n
Duration of the warning limit value violations
DBBn + 24 Sensor n
Temperature sensor fault threshold value [°C]
DBBn + 28 Sensor n
Number of fault limit value violations
DBBn + 30 Sensor n
Last alarm limit value violation: Year
DBBn + 31 Sensor n
Last alarm limit value violation: Month
DBBn + 32 Sensor n
Last alarm limit value violation: Day
DBBn + 33 Sensor n
Last alarm limit value violation: Hour
DBBn + 34 Sensor n
Last alarm limit value violation: Minute
DBBn + 35 Sensor n
Last alarm limit value violation: Seconds
PLC
438 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.1 Interface signals - overview
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 439
Interface signals
18.1 Interface signals - overview
PLC
440 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.1 Interface signals - overview
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 441
Interface signals
18.2 Interface signals - detailed description
PLC
442 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 443
Interface signals
18.2 Interface signals - detailed description
PLC
444 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 445
Interface signals
18.2 Interface signals - detailed description
PLC
446 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 447
Interface signals
18.2 Interface signals - detailed description
PLC
448 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
18.2.1.13 DB10 DBX93.0 ... 7 (collision avoidance: Deactivate protection area group)
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 449
Interface signals
18.2 Interface signals - detailed description
PLC
450 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 451
Interface signals
18.2 Interface signals - detailed description
PLC
452 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 453
Interface signals
18.2 Interface signals - detailed description
PLC
454 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 455
Interface signals
18.2 Interface signals - detailed description
PLC
456 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 457
Interface signals
18.2 Interface signals - detailed description
PLC
458 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 459
Interface signals
18.2 Interface signals - detailed description
18.2.1.45 DB10 DBX110.0 - 113.7 (software cams: minus cam signal 1 to 32)
PLC
460 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
18.2.1.46 DB10 DBX114.0 - 117.7 (software cams: plus cam signal 1 to 32)
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 461
Interface signals
18.2 Interface signals - detailed description
PLC
462 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 463
Interface signals
18.2 Interface signals - detailed description
PLC
464 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 465
Interface signals
18.2 Interface signals - detailed description
PLC
466 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 467
Interface signals
18.2 Interface signals - detailed description
PLC
468 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 469
Interface signals
18.2 Interface signals - detailed description
PLC
470 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 471
Interface signals
18.2 Interface signals - detailed description
PLC
472 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 473
Interface signals
18.2 Interface signals - detailed description
PLC
474 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 475
Interface signals
18.2 Interface signals - detailed description
PLC
476 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 477
Interface signals
18.2 Interface signals - detailed description
PLC
478 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 479
Interface signals
18.2 Interface signals - detailed description
PLC
480 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 481
Interface signals
18.2 Interface signals - detailed description
PLC
482 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 483
Interface signals
18.2 Interface signals - detailed description
PLC
484 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 485
Interface signals
18.2 Interface signals - detailed description
PLC
486 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 487
Interface signals
18.2 Interface signals - detailed description
PLC
488 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 489
Interface signals
18.2 Interface signals - detailed description
PLC
490 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 491
Interface signals
18.2 Interface signals - detailed description
PLC
492 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 493
Interface signals
18.2 Interface signals - detailed description
PLC
494 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 495
Interface signals
18.2 Interface signals - detailed description
PLC
496 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
Notice
If the screen is darkened with (DB19 DBX0.1 = 1), the operator panel front keyboard still
remains functional. It is therefore recommended that the keyboard of the operator panel front
is also locked:
DB19 DBX0.2 = 1 (key lock)
Corresponds with DB19 DBX0.0 (brighten screen)
DB19 DBX0.1 (darken screen)
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 497
Interface signals
18.2 Interface signals - detailed description
PLC
498 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 499
Interface signals
18.2 Interface signals - detailed description
18.2.4.17 DB19 DBB16 (program selection from the PLC: Index of the program list)
DB19 DBB16 Program selection from the PLC: Index of the program list
Signal flow PLC → OP
Update Cyclic
Further information Preselected programs/workpieces in the PLC program lists can be selected for machining by
the NC via the PLC/HMI interface.
To specify the program list, its number (index) is output in binary code via control byte DB19
DBB16:
Bit 7 Bit 6 Bit 5 Bit 4 Bit 3 Bit 2 Bit 1 Bit 0
Always 1
DB19 DBB16 = <number of the program list>
Number Number Program list
(binary-coded) (decimal)
1000 0001 129 User program list (/user/sinumerik/hmi/plc/
programlist/plc_proglist_user.ppl)
1000 0011 131 Manufacturer program list (/oem/
sinumerik/hmi/plc/programlist/plc_prog‐
list_manufacturer.ppl)
PLC
500 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
DB19 DBB16 Program selection from the PLC: Index of the program list
Corresponds to DB19.DBX13.7 (NC program: Selection)
DB19.DBB17 (program selection from the PLC: program index in the program list)
DB19.DBB26 (program selection from the PLC: Status signals)
DB19.DBB27 (program selection from the PLC: Error detection)
MD9106 $MM_SERVE_EXTCALL_PROGRAMS (editing EXTCALL calls)
MD51041 $MN_ENABLE_PROGLIST_USER (activation of PLC program list USER area)
MD51043 $MN_ENABLE_PROGLIST_MANUFACT (activation of PLC program list MANU‐
FACTURER area)
Further information Program selection (Page 116)
18.2.4.18 DB19 DBB17 (program selection from the PLC: Program index in the program list)
DB19 DBB17 Program selection from the PLC: Program index in the program list
Signal flow PLC → OP
Update Cyclic
Further information Preselected programs/workpieces in the PLC program lists can be selected for machining by
the NC via the PLC/HMI interface.
To specify the program within the program list selected via DB19 DBB16, the program number
is output in binary code via control byte DB19 DBB17.
Area Program number
user 1 - 100
oem 201 - 255
Corresponds to DB19.DBX13.7 (NC program: Selection)
DB19.DBB16 (program selection from the PLC: index of the program list)
DB19.DBB26 (program selection from the PLC: Status signals)
DB19.DBB27 (program selection from the PLC: Error detection)
MD9106 $MM_SERVE_EXTCALL_PROGRAMS (editing EXTCALL calls)
MD51041 $MN_ENABLE_PROGLIST_USER (activation of PLC program list USER area)
MD51043 $MN_ENABLE_PROGLIST_MANUFACT (activation of PLC program list MANU‐
FACTURER area)
Further information Program selection (Page 116)
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 501
Interface signals
18.2 Interface signals - detailed description
PLC
502 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
18.2.4.26 DB19 DBX26.1 (program selection from the PLC: Job completed)
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 503
Interface signals
18.2 Interface signals - detailed description
PLC
504 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 505
Interface signals
18.2 Interface signals - detailed description
18.2.4.32 DB19 DBB27 (program selection from the PLC: Error detection)
PLC
506 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 507
Interface signals
18.2 Interface signals - detailed description
PLC
508 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 509
Interface signals
18.2 Interface signals - detailed description
PLC
510 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 511
Interface signals
18.2 Interface signals - detailed description
PLC
512 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 513
Interface signals
18.2 Interface signals - detailed description
PLC
514 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 515
Interface signals
18.2 Interface signals - detailed description
PLC
516 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 517
Interface signals
18.2 Interface signals - detailed description
PLC
518 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 519
Interface signals
18.2 Interface signals - detailed description
PLC
520 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 521
Interface signals
18.2 Interface signals - detailed description
PLC
522 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 523
Interface signals
18.2 Interface signals - detailed description
PLC
524 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 525
Interface signals
18.2 Interface signals - detailed description
PLC
526 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 527
Interface signals
18.2 Interface signals - detailed description
18.2.5.36 DB21, ... DBX8.0 - 9.1 (activate machine-related protection zone 1 - 10)
18.2.5.37 DB21, ... DBX10.0 - 11.1 (activate channel-specific protection zone 1 - 10)
PLC
528 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 529
Interface signals
18.2 Interface signals - detailed description
18.2.5.39 DB21, ... DBX12.3, 16.3, 20.3 (feedrate stop, geometry axes 1 / 2 / 3)
PLC
530 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
18.2.5.42 DB21, ... DBX12.6 - 7 (geometry axis 1: traversing keys "Plus" / "Minus")
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 531
Interface signals
18.2 Interface signals - detailed description
PLC
532 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
Notes
● If several requests are set simultaneously, no machine function becomes active.
● If a geometry axis is currently being traversed via a machine function, the movement is
aborted through deselection or change of the machine function.
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 533
Interface signals
18.2 Interface signals - detailed description
18.2.5.44 DB21, ... DBX15.0 (geometry axis 1: invert handwheel direction of rotation)
See also
DB21 - DB30, decoded M signals (Page 399)
PLC
534 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
18.2.5.48 DB21, ... DBX16.6 - 7 (geometry axis 2: traversing keys "Plus" / "Minus")
18.2.5.50 DB21, ... DBX19.0 (geometry axis 2: invert handwheel direction of rotation)
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 535
Interface signals
18.2 Interface signals - detailed description
18.2.5.54 DB21, ... DBX20.6 - 7 (geometry axis 3: traversing keys "Plus" / "Minus")
18.2.5.56 DB21, ... DBX23.0 (geometry axis 3: invert handwheel direction of rotation)
18.2.5.57 DB21, ... DBX24.1 (activate configured stop (CST) using the operating software)
DB21, ... DBX24.1 Activate configured stop (CST) using the operating software
Signal flow HMI → PLC
Update Cyclic
Signal state 1 Activation of the configured stop is requested.
Signal state 0 Activation of the configured stop is not requested.
Additional information "Activate configured stop" (CST) is selected via the SINUMERIK Operate user interface in the
operating area "Automatic" > "Program control" by setting the HMI/PLC interface signal
DB21, … DBX24.1.
Depending on the value of FB1 parameter MMCToIf, the interface signal is transferred from
the basic PLC program to the NC/PLC interface signal DB21, … DBX7.6:
● "TRUE": Transmission"
● "FALSE": No transmission
The default value of the parameter is "TRUE".
Corresponds with DB21, … DBX7.6 (activate configured stop)
PLC
536 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 537
Interface signals
18.2 Interface signals - detailed description
PLC
538 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
18.2.5.62 DB21, ... DBX25.3 (feedrate override selected for rapid traverse)
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 539
Interface signals
18.2 Interface signals - detailed description
PLC
540 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 541
Interface signals
18.2 Interface signals - detailed description
PLC
542 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
18.2.5.69 DB21, ... DBX29.7 (tool manager: Tool lock not active)
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 543
Interface signals
18.2 Interface signals - detailed description
PLC
544 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 545
Interface signals
18.2 Interface signals - detailed description
PLC
546 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
18.2.5.77 DB21, ... DBX31.5 (contour handwheel: invert handwheel direction of rotation)
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 547
Interface signals
18.2 Interface signals - detailed description
PLC
548 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 549
Interface signals
18.2 Interface signals - detailed description
PLC
550 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 551
Interface signals
18.2 Interface signals - detailed description
PLC
552 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 553
Interface signals
18.2 Interface signals - detailed description
PLC
554 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 555
Interface signals
18.2 Interface signals - detailed description
PLC
556 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 557
Interface signals
18.2 Interface signals - detailed description
18.2.5.99 DB21, ... DBX36.2 (all axes that have to be referenced have been referenced)
DB21, ... DBX36.2 All axes that have to be referenced are referenced
Signal flow NC → PLC
Update Cyclic
Signal state 1 All axes that must be referenced (linear axes and rotary axes) of the channel are referenced.
The machine data:
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 the part program processing is only accepted when this signal is
present.
Axes that have to be referenced are axes, if:
MD34110 $MA_REFP_CYCLE_NR _ = -1
and the axis is not in the parked position (position measuring system inactive and the con‐
troller enable withdrawn).
Signal state 0 One or more axes of the channel that have to be referenced are not referenced.
Additional information The spindles of the channel have no effect on this interface signal.
Corresponds with DB31, ... DBX60.4 (referenced / synchronized 1)
DB31, ... DBX60.5 (referenced / synchronized 2)
Additional information Function Manual Axes and Spindles
PLC
558 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 559
Interface signals
18.2 Interface signals - detailed description
18.2.5.104 DB21, ... DBX36.7 (NC alarm with machining stop active)
PLC
560 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 561
Interface signals
18.2 Interface signals - detailed description
18.2.5.107 DB21, ... DBX37.4 (clearance control (CLC): Stop at the lower motion limit)
DB21, ... DBX37.4 Clearance control (CLC): Stop at the lower motion limit
Signal flow NC → PLC
Update Cyclic
Signal state 1 The traversing motion of the clearance-controlled axis, generated by the clearance control,
has reached the lower motion limit and was stopped.
Signal state 0 The traversing motion of the clearance-controlled axis, generated by the clearance control,
has not reached the lower motion limit.
Additional information The lower motion limit of the clearance control is set in machine data:
MD62505 $MC_CLC_SENSOR_LOWER_LIMIT
The parameterized limit value can be adapted on a block-specific basis by
programming CLC_LIM(...) in the part program.
Note
If, in addition to DB21, ... DBX37.4, DB21, ... DBX37.5 are also simultaneously set, then signal
"DB21, ... DBX37.3 (clearance control (CLC): Active) (Page 561)"is active.
Corresponds with CLC_LIM(...) ; the control range is limited
DB21, ... DBX37.5 (clearance control (CLC): Stop at the upper motion limit)
DB21, ... DBX37.4 - 5 (clearance control (CLC): Motion has stopped)
MD62505 $MC_CLC_SENSOR_LOWER_LIMIT (lower clearance control motion limit)
Additional information Function Manual Technologies
18.2.5.108 DB21, ... DBX37.5 (clearance control (CLC): Stop at the upper motion limit)
DB21, ... DBX37.5 Clearance control (CLC): Stop at the upper motion limit
Signal flow NC → PLC
Update Cyclic
Signal state 1 The traversing motion of the clearance-controlled axis, generated by the clearance control,
has reached the upper motion limit and was stopped.
Signal state 0 The traversing motion of the clearance-controlled axis, generated by the clearance control,
has not reached the upper motion limit.
Additional information The upper motion limit of the clearance control is set in machine data:
MD62506 $MC_CLC_SENSOR_UPPER_LIMIT
The parameterized limit value can be adapted on a block-specific basis by
programming CLC_LIM(...) in the part program.
Note
If, in addition to DB21, ... DBX37.5, DB21, ... DBX37.4 are also simultaneously set, then signal
"DB21, ... DBX37.3 (clearance control (CLC): Active) (Page 561)"is active.
Corresponds with CLC_LIM(...) ; the control range is limited
DB21, ... DBX37.4 (clearance control (CLC): Stop at the lower motion limit)
DB21, ... DBX37.4 - 5 (clearance control (CLC): Motion has stopped)
MD62506 $MC_CLC_SENSOR_UPPER_LIMIT (upper clearance control motion limit)
Additional information Function Manual Technologies
PLC
562 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
18.2.5.110 DB21, ... DBX37.7 (stop at block end is ignored during single block (SBL))
DB21, ... DBX37.7 Stop at block end is ignored during single block (SBL)
Signal flow NC → PLC
Update Cyclic
Signal state 1 Stop at block end is ignored during single block (SBL).
Signal state 0 Stop at block end is not ignored during single block (SBL).
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 563
Interface signals
18.2 Interface signals - detailed description
DB21, ... DBX37.7 Stop at block end is ignored during single block (SBL)
Additional information Stop at block end is ignored during single block (SBL), if the following applies:
DB21, ... DBX0.4 == 1 (single block) AND actual block has the status "single block inactive"
Stop at block end is not ignored during single block (SBL), if the following applies:
DB21, ... DBB0.4 == 0 (single block) OR
(DB21, ... DBB0.4 == 1 (single block) AND actual block has the status "single block active")
The following machine data and commands are used to specify that the stop at block end
during single block (DB21, ... DBX0.4) 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 (neutral single block suppression)
Blocks for which stop at block end during single block is ignored are designated as "single
block inactive".
Corresponds with DB21, ... DBX0.4 (single block)
DB21, ... DBX37.6 (read-in disable is ignored)
Additional information Function Manual Basic Functions
PLC
564 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
18.2.5.114 DB21, ... DBX39.4 (stop at block end due to single block)
18.2.5.115 DB21, ... DBX39.5 (Contour handwheel: handwheel direction of rotation inversion active)
DB21, ... DBX39.5 Contour handwheel: handwheel direction of rotation inversion active
Signal flow NC → PLC
Update Cyclic
Signal state 1 Inversion of the direction of rotation of the contour handwheel is active.
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 565
Interface signals
18.2 Interface signals - detailed description
DB21, ... DBX39.5 Contour handwheel: handwheel direction of rotation inversion active
Signal state 0 Inversion of the direction of rotation of the contour handwheel is not active.
Corresponds with DB31, ... DBX31.5 (contour handwheel: invert handwheel direction of rotation)
Additional information Function Manual Axes and Spindles
18.2.5.117 DB21, ... DBX39.7 (stop at block end due to configured stop)
PLC
566 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
18.2.5.119 DB21, ... DBX40.4 - 5 (geometry axis 1: traversing request "Plus" / "Minus")
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 567
Interface signals
18.2 Interface signals - detailed description
18.2.5.120 DB21, ... DBX40.6 - 7 (geometry axis 1: traversing command "Plus" / "Minus")
PLC
568 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
18.2.5.122 DB21, ... DBX43.0 (geometry axis 1: handwheel direction of rotation inversion active)
DB21, ... DBX43.0 Geometry axis 1: handwheel direction of rotation inversion active
Signal flow NC → PLC
Update Cyclic
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 569
Interface signals
18.2 Interface signals - detailed description
DB21, ... DBX43.0 Geometry axis 1: handwheel direction of rotation inversion active
Signal state 1 Inversion of the direction of rotation of the handwheel assigned to the geometry axis is active.
Signal state 0 Inversion of the direction of rotation of the handwheel assigned to the geometry axis is not
active.
Corresponds with DB21, ... DBX49.0 (geometry axis 2: handwheel direction of rotation inversion active)
DB21, ... DBX55.0 (geometry axis 3: handwheel direction of rotation inversion active)
DB21, ... DBX15.0 (geometry axis 1: invert handwheel direction of rotation)
DB21, ... DBX19.0 (geometry axis 2: invert handwheel direction of rotation)
DB21, ... DBX23.0 (geometry axis 3: invert handwheel direction of rotation)
Additional information Function Manual Axes and Spindles
18.2.5.124 DB21, ... DBX46.4 - 5 (geometry axis 2: traversing request "Plus" / "Minus")
18.2.5.125 DB21, ... DBX46.6 - 7 (geometry axis 2: traversing command "Plus" / "Minus")
18.2.5.127 DB21, ... DBX49.0 (geometry axis 2: handwheel direction of rotation inversion active)
DB21, ... DBX49.0 Geometry axis 2: handwheel direction of rotation inversion active
Additional information See DB21, ... DBX43.0 (geometry axis 1: handwheel direction of rotation inversion active)
(Page 569).
PLC
570 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
18.2.5.129 DB21, ... DBX52.4 - 5 (geometry axis 3: traversing request "Plus" / "Minus")
18.2.5.130 DB21, ... DBX52.6 - 7 (geometry axis 3: traversing command "Plus" / "Minus")
18.2.5.132 DB21, ... DBX55.0 (geometry axis 3: handwheel direction of rotation inversion active)
DB21, ... DBX55.0 Geometry axis 3: handwheel direction of rotation inversion active
Additional information See DB21, ... DBX43.0 (geometry axis 1: handwheel direction of rotation inversion active)
(Page 569).
18.2.5.133 DB21, ... DBB58, DBB60 - 65 (M-, S-, T-, D-, H-, F fct. change)
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 571
Interface signals
18.2 Interface signals - detailed description
18.2.5.135 DB21, ... DBB60 - 64, ... DBB66 - 67 (M-, S-, T-, D-, H-, F fct. Additional quick information
(quick acknowledgment)
DB21, ... DBB60 - 64, M, S, T, D, H, F fct. Additional quick information (fast acknowledgment)
DB21, ... DBB66 - 67
Signal flow NC → PLC
Update Job-controlled
Signal state 1 M, S, T, D, H or F information has been output to the interface with a new value together with
the associated change signal at the beginning of an OB1 cycle.
In this case, the additional info "Quick" indicates the quick help function.
Signal state 0 The change signals are reset by the PLC basic program at the start of the next OB1 cycle.
The value of the respective data is not valid.
PLC
572 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
18.2.5.137 DB21, ... DBB98 - 115 (S function 1 - 3 and extended address S function 1 - 3 )
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 573
Interface signals
18.2 Interface signals - detailed description
18.2.5.140 DB21, ... DBB140 - 157 (H function 1 - 3 and extended address H function 1 - 3 )
DB21, ... DBB140 - 157 H function 1 - 3 and extended address H function 1-3
Signal flow NC → PLC
Update Job-controlled
Additional information If an H function change signal (DB21, ... DBB64) is present, then the up to three H functions
- that can be programmed in an NC block - together with the number of the H function and the
extended address are available here.
The H function values remain until they are overwritten by new H functions.
The H function values are deleted by the following events:
● The PLC powers up (boots).
● A new H function is entered.
Corresponds with DB21, ... DBX64.0 - 2 (change signals: H function)
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)
Additional information Function Manual Basic Functions
18.2.5.141 DB21, ... DBB158 - 193 (F function 1 - 6 and extended address F function 1 - 6 )
PLC
574 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 575
Interface signals
18.2 Interface signals - detailed description
PLC
576 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 577
Interface signals
18.2 Interface signals - detailed description
PLC
578 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
18.2.5.151 DB21, ... DBX308.0 - 315.7 (synchronized actions ID/IDS can be disabled)
DB21, ...
DBX308.0 - 315.7 Synchronized action ID/IDS can be inhibited
Signal flow PLC → NC
Update Cyclic
Signal state 1 The synchronized action ID/IDS associated with the inhibit signal can be inhibited.
Signal state 0 The synchronized action ID/IDS associated with the inhibit signal cannot be inhibited.
Corresponds to DB21, … DBX280.1 (disable request for synchronized actions)
Additional information Function Manual Synchronized Actions
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 579
Interface signals
18.2 Interface signals - detailed description
PLC
580 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
18.2.5.156 DB21, ... DBX318.1 (block search via program test is active (SERUPRO))
DB21, ... DBX318.1 Block search via program test is active (SERUPRO)
Signal flow NC → PLC
Update Cyclic
Signal state 1 Block search via program test is active
During processing of the blocks as part of the block search (internal channel state: "Program
test"), the interface signal is set up until the target block is changed to in the main run (program
state: "stopped") .
Signal state 0 Block search via program test is not active
When the target block is changed to in the main run (internal channel state "Program test" is
deselected; stop condition: "Search target found" is displayed), the interface signal is reset.
Additional information The block search (SERUPRO) can only be activated in AUTOMATIC mode in program state
"Aborted".
Additional information Function Manual Basic Functions
18.2.5.157 DB21, ... DBX318.2 (online tool length compensation (TOFF) active)
18.2.5.158 DB21, ... DBX318.3 (online tool length compensation (TOFF): Compensation motion
active)
DB21, ... DBX318.3 Online tool length compensation (TOFF): Compensation motion active
Signal flow NC → PLC
Update Cyclic
Signal state 1 Compensation motion active.
Signal state 0 Compensation motion is not active.
Additional information If, for active online tool length compensation (DB21, ... DBX318.2 == 1), compensation motion
is active, then the interface signal is set to "1":
DB21, ... DBX318.3 == 1
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 581
Interface signals
18.2 Interface signals - detailed description
DB21, ... DBX318.3 Online tool length compensation (TOFF): Compensation motion active
Corresponds with DB21, ... DBX318.2 (online tool length compensation (TOFF) active)
Additional information Function Manual Transformations
PLC
582 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 583
Interface signals
18.2 Interface signals - detailed description
PLC
584 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 585
Interface signals
18.2 Interface signals - detailed description
PLC
586 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 587
Interface signals
18.2 Interface signals - detailed description
Notes
● If several requests are set simultaneously, no machine function becomes active.
● If an orientation axis is currently being traversed via a machine function, the movement is
aborted through deselection or change of the machine function.
PLC
588 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 589
Interface signals
18.2 Interface signals - detailed description
18.2.5.172 DB21, ... DBX324.6 - 7 (orientation axis 2: traversing keys "Plus" / "Minus")
PLC
590 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
18.2.5.178 DB21, ... DBX328.6 - 7 (orientation axis 3: traversing keys "Plus" / "Minus")
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 591
Interface signals
18.2 Interface signals - detailed description
18.2.5.182 DB21, ... DBX332.4 - 5 (orientation axis 1: traversing request "Plus" / "Minus")
PLC
592 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
18.2.5.183 DB21, ... DBX332.6 - 7 (orientation axis 1: traversing command "Plus" / "Minus"
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 593
Interface signals
18.2 Interface signals - detailed description
PLC
594 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
18.2.5.186 DB21, ... DBX336.4 - 5 (orientation axis 2: traversing request "Plus" / "Minus")
18.2.5.187 DB21, ... DBX336.6 - 7 (orientation axis 2: traversing command "Plus" / "Minus"
18.2.5.190 DB21, ... DBX340.4 - 5 (orientation axis 3: traversing request "Plus" / "Minus")
18.2.5.191 DB21, ... DBX340.6 - 7 (orientation axis 3: traversing command "Plus" / "Minus"
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 595
Interface signals
18.2 Interface signals - detailed description
PLC
596 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
18.2.5.196 DB21, ... DBX344.3 (TM: Last replacement tool of the tool group)
DB21, ... DBX344.3 TOOLMAN: Last replacement tool of the tool group
Signal flow PLC → NC
Update Job-controlled
Signal state 1 The last replacement tool of the tool group has been reached
Signal state 0 Irrelevant.
Additional information The T number of the last replacement tool of the tool group is located in: DBD360
The change signal is active for one OB 1 cycle.
Note
The monitoring for the last replacement tool must be activated in MD20310
$MC_TOOL_MANAGEMENT_MASK, bit 18.
Corresponds with DB21, ... DBX344.0 tool management change signal: T number for tool pre-alarm limit
DB21, ... DBX344.1 tool management change signal: T number for tool limit value
DB21, ... DBX344.2 tool management change signal: T number for the new replacement tool
DB21, ... DBD360 (T-number of the last replacement tool)
Additional information Function Manual, Tool Management
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 597
Interface signals
18.2 Interface signals - detailed description
PLC
598 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 599
Interface signals
18.2 Interface signals - detailed description
DB21, ...
DBX385.0 - 7 Input signal 1 - 8
DB21, ...
DBX386.0 - 7 Disabling of input signal 1 - 8
DB21, ...
DBX387.0 - 7 Status of action 1 - 8
PLC
600 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
DB21, ...
DBX390.0 - 7 Enable status of input signal 1 - 8
DB21, ...
DBX391.0 - 7 Enable request for action 1 - 8
18.2.5.210 DB21, ... DBB392 (selection: Coordinate system for Cartesian manual traversing and
handwheel override in automatic mode in the tool direction (DRF))
DB21, ... DBB392 Selection: Coordinate system for Cartesian manual traversing and handwheel override in
automatic mode in the tool direction (DRF)
Signal flow PLC → NC
Update Cyclic
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 601
Interface signals
18.2 Interface signals - detailed description
DB21, ... DBB392 Selection: Coordinate system for Cartesian manual traversing and handwheel override in
automatic mode in the tool direction (DRF)
Additional information Selection of the coordinate system for:
● Cartesian manual traversing of the geometry axes in the tool direction (TCS)
● Handwheel override of the geometry axes in the AUTOMATIC mode in the tool direction
(DRF)
Value Description
0 The function is not selected
1 Manual traversing of the geometry axes in the basic coordinate system (BCS)
2 Manual traversing of the geometry axes in the workpiece coordinate system
(WCS)
3 Manual traversing or handwheel override (DRF) of the geometry axes in the
workpiece coordinate system (WCS)
Additional information ● Function Manual Basic Functions
● FC19: MCP_IFM - transfer of MCP signals to interface (Page 274)
● Function Manual Transformations
● Function Manual Axes and Spindles
PLC
602 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 603
Interface signals
18.2 Interface signals - detailed description
PLC
604 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 605
Interface signals
18.2 Interface signals - detailed description
PLC
606 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
'%'%;
$[LVVSLQGOHGLVDEOH
3RVLWLRQ 3RVLWLRQ
VHWSRLQW
FRQWUROOHU
3RVLWLRQDFWXDOYDOXH
Axis/spindle disable
Note
● If one of the following interface signals is set for a traversing axis/spindle for which the
signal "Axis/spindle disable" is present, the axis/spindle is not stopped:
– DB21, ... DBX12.3, 16.3 or 20.3 (feedrate stop for geometry axes 1, 2 and 3)
– DB21, ... DBX320.3, 324.3 or 328.3 (feedrate stop for orientation axes 1, 2 and 3)
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 607
Interface signals
18.2 Interface signals - detailed description
PLC
608 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 609
Interface signals
18.2 Interface signals - detailed description
18.2.6.7 DB31, ... DBX1.5 - 6 (position measuring system 1 (PMS1) / position measuring system
2 (PMS2))
DB31, ... DBX1.5 - 6 Position measuring system 1 (PMS1) / position measuring system 2 (PMS2)
Signal flow PLC → NC
Update Cyclic
Signal state 1 The position measuring system is active.
Signal state 0 The position measuring system is inactive.
PLC
610 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
DB31, ... DBX1.5 - 6 Position measuring system 1 (PMS1) / position measuring system 2 (PMS2)
Additional information Bit 6 Bit 5 Effect
(PMS 2) (PMS 1)
0 1 Position measuring system 1 is active:
● Position control of the machine axis via position measuring system 1.
● Monitoring functions (measuring system, standstill, clamping moni‐
toring, contour deviation, etc.) of the machine axis via position meas‐
uring system 1.
● If position measuring system 2 exists (MD30200 $MA_NUM_ENCS
== 2), its actual position value is acquired, but not monitored by any
of these functions.
1 0 Position measuring system 2 is active:
● Position control of the machine axis via position measuring system 2.
● Monitoring functions (measuring system, standstill, clamping moni‐
toring, contour deviation, etc.) of the machine axis via position meas‐
uring system 2.
● If position measuring system 1 exists (MD30200 $MA_NUM_ENCS
== 2), its actual position value is acquired, but not monitored by any
of these functions.
1 1 ● Position control of the machine axis via position measuring system 1.
● If position measuring system 2 is available (MD30200
$MA_NUM_ENCS == 2), its actual position value is also acquired.
0 0 Position measuring systems 1 and 2 are inactive ("parking" of the ma‐
chine axis):
● There is no actual value acquisition.
● The monitoring of the position measuring system has been deactiva‐
ted.
● The following interface signals are reset:
– DB31, ... DBX60.4 / 5 == 0 (referenced/synchronized, encoder
1/2)
– DB31, ... DBX61.5 (position controller active)
– DB31, ... DBX61.6 (speed controller active)
– DB31, ... DBX61.7 (current controller active)
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 cancelled inter‐
nally.
● 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)
● After deactivation of the "parking" state, incremental position measuring systems have to
be referenced to achieve the "referenced" encoder status.
● If the "parking" state is active, the following interface signal is ignored at NC start for this
axis:
DB31, ... DBX60.4 / 5 (referenced/synchronized 1/ 2).
Application examples
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 611
Interface signals
18.2 Interface signals - detailed description
DB31, ... DBX1.5 - 6 Position measuring system 1 (PMS1) / position measuring system 2 (PMS2)
1. Switching over from position measuring system 1 to positioning measuring system 2 (and
vice 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/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 in the following machine data:
MD36500 $MA_ENC_CHANGE_TOL (maximum tolerance for actual position value
switchover)
If the actual value difference is greater than the tolerance, switchover is not performed and
alarm 25100 "Measuring system switchover not possible" is displayed.
2. Machine axis is parked:
The position measuring system monitoring is switched off when the measured value en‐
coder is removed.
3. Switch off position measuring system:
When the position measuring system 1 or 2 is switched off, the associated interface signal
is reset:
DB31, ... DBX60.4/5 (referenced/synchronized 1/2)
4. Reference point approach:
Reference point approach of the axis is executed with the selected position measuring
system. Every position measuring system must be referenced separately.
Corresponds 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 information Function Manual Axes and Spindles
PLC
612 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 613
Interface signals
18.2 Interface signals - detailed description
PLC
614 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 615
Interface signals
18.2 Interface signals - detailed description
PLC
616 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 617
Interface signals
18.2 Interface signals - detailed description
PLC
618 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 619
Interface signals
18.2 Interface signals - detailed description
PLC
620 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 621
Interface signals
18.2 Interface signals - detailed description
PLC
622 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 623
Interface signals
18.2 Interface signals - detailed description
Notes
● If several requests are set simultaneously, no machine function becomes active.
● If an axis is currently being traversed via a machine function, the movement is aborted
through deselection or change of the machine function.
Corresponds with DB31, ... DBX65.0 - 65.6 (active machine function)
MD11320 $MN_HANDWH_IMP_PER_LATCH (handwheel pulses per detent position)
MD11330 $MN_JOG_INCR_SIZE_TAB (increment size for INC/handwheel)
MD31090 $MA_JOG_INCR_WEIGHT (evaluation of an increment for INC/handwheel)
SD41010 $SN_JOG_VAR_INCR_SIZE (size of the variable increment for JOG)
Additional information Function Manual Axes and Spindles
PLC
624 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 625
Interface signals
18.2 Interface signals - detailed description
PLC
626 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 627
Interface signals
18.2 Interface signals - detailed description
18.2.6.33 DB31, ... DBX12.4 (modulo rotary axis: activate traversing range limits)
DB31, ... DBX12.4 Modulo rotary axis: activate traversing range limits
Signal flow PLC → NC
Update Cyclic
Signal state 1 Activate traversing range limits (software limit switch, working area limits) for modulo rotary
axes.
Signal state 0 Deactivate traversing range limits for modulo rotary axes.
Additional information Note
The signal is irrelevant if linear axes/rotary axes do not have modulo functionality.
Application example
Mounted rotary axis with monitoring
Corresponds with DB31, ... DBX74.4 (modulo rotary axis: traversing range limits active)
Additional information Function Manual Axes and Spindles
PLC
628 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 629
Interface signals
18.2 Interface signals - detailed description
PLC
630 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 631
Interface signals
18.2 Interface signals - detailed description
PLC
632 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 633
Interface signals
18.2 Interface signals - detailed description
18.2.6.44 DB31, ... DBX17.4 (resynchronizing the spindle before positioning, measuring system 1)
DB31, ... DBX17.4 Resynchronizing the spindle before positioning, measuring system 1
Signal flow PLC → NC
Update Cyclic
Edge change 0 → 1 There is an active request to resynchronize measuring system 1 before positioning the spin‐
dle.
Edge change 1 → 0 No effect.
Additional information Note
The interface signal is irrelevant for all spindle modes with the exception of the positioning
mode.
Corresponds with DB31, ... DBX60.4 (referenced/synchronized 1)
Additional information Function Manual Axes and Spindles
18.2.6.45 DB31, ... DBX17.5 (resynchronizing the spindle before positioning, measuring system 2)
DB31, ... DBX17.5 Resynchronizing the spindle before positioning, measuring system 2
Signal flow PLC → NC
Update Cyclic
Edge change 0 → 1 There is an active request to resynchronize measuring system 2 before positioning the spin‐
dle.
PLC
634 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
DB31, ... DBX17.5 Resynchronizing the spindle before positioning, measuring system 2
Edge change 1 → 0 No effect.
Additional information Note
The interface signal is irrelevant for all spindle modes with the exception of the positioning
mode.
Corresponds with DB31, ... DBX60.2 (referenced/synchronized 2)
Additional information Function Manual Axes and Spindles
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 635
Interface signals
18.2 Interface signals - detailed description
PLC
636 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 637
Interface signals
18.2 Interface signals - detailed description
PLC
638 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 639
Interface signals
18.2 Interface signals - detailed description
PLC
640 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 641
Interface signals
18.2 Interface signals - detailed description
PLC
642 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 643
Interface signals
18.2 Interface signals - detailed description
PLC
644 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 645
Interface signals
18.2 Interface signals - detailed description
PLC
646 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 647
Interface signals
18.2 Interface signals - detailed description
PLC
648 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
18.2.6.74 DB31, ... DBX28.5 (PLC-controlled axis: Stop at the next reversal point)
DB31, ... DBX28.5 PLC-controlled axis: Stop at the next reversal point
Signal flow PLC → NC
Update Cyclic
Signal state 1 Interrupt oscillation motion of the PLC-controlled axis at the next reversal point.
Signal state 0 There is no request to interrupt the oscillation motion of the PLC-controlled axis at the next
reversal point.
Corresponds with DB31, ... DBX28.6 (PLC-controlled axis: Stop along braking ramp)
DB31, ... DBX28.7 (PLC-controlled axis)
Additional information Function Manual Technologies
18.2.6.75 DB31, ... DBX28.6 (PLC-controlled axis: Stop along braking ramp)
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 649
Interface signals
18.2 Interface signals - detailed description
PLC
650 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 651
Interface signals
18.2 Interface signals - detailed description
PLC
652 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
18.2.6.82 DB31, ... DBX60.3 (encoder frequency limit exceeded, measuring system 2)
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 653
Interface signals
18.2 Interface signals - detailed description
PLC
654 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
18.2.6.86 DB31, ... DBX60.7 (position reached with exact stop fine)
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 655
Interface signals
18.2 Interface signals - detailed description
PLC
656 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 657
Interface signals
18.2 Interface signals - detailed description
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 user
interface, an actual speed of zero is displayed and with the system variable $AA_S[n] zero is
read.
Additional information The signal is always 0 if, for the axis/spindle, a travel command is present (DB31,
DBX64.6 or .7) - or if the actual velocity of the axis or actual speed of the spindle is less
than or equal to the parameterized limit value.
Corresponds with MD36060 $MA_STANDSTILL_VELO_TOL (maximum velocity/speed for signal "Axis/spindle
stationary")
PLC
658 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 659
Interface signals
18.2 Interface signals - detailed description
PLC
660 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 661
Interface signals
18.2 Interface signals - detailed description
PLC
662 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 663
Interface signals
18.2 Interface signals - detailed description
PLC
664 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 665
Interface signals
18.2 Interface signals - detailed description
PLC
666 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 667
Interface signals
18.2 Interface signals - detailed description
PLC
668 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 669
Interface signals
18.2 Interface signals - detailed description
PLC
670 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
18.2.6.120 DB31, ... DBX74.4 (modulo rotary axis: traversing range limits active)
DB31, ... DBX74.4 Modulo rotary axis: traversing range limits active
Signal flow NC → PLC
Update Cyclic
Signal state 1 Traversing range limits (software limit switch, working area limits) active for modulo rotary
axes.
Signal state 0 Traversing range limitation for modulo rotary axes not active.
Additional information Note
The signal is irrelevant if linear axes/rotary axes do not have modulo functionality.
Application example
Mounted rotary axis with monitoring
Corresponds with DB31, ... DBX12.4 (modulo rotary axis: activate traversing range limits)
Additional information Function Manual Axes and Spindles
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 671
Interface signals
18.2 Interface signals - detailed description
PLC
672 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 673
Interface signals
18.2 Interface signals - detailed description
PLC
674 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 675
Interface signals
18.2 Interface signals - detailed description
PLC
676 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 677
Interface signals
18.2 Interface signals - detailed description
PLC
678 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 679
Interface signals
18.2 Interface signals - detailed description
PLC
680 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
18.2.6.142 DB31, ... DBX84.4 (active spindle operating mode: Synchronous operation)
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 681
Interface signals
18.2 Interface signals - detailed description
PLC
682 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 683
Interface signals
18.2 Interface signals - detailed description
PLC
684 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 685
Interface signals
18.2 Interface signals - detailed description
PLC
686 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 687
Interface signals
18.2 Interface signals - detailed description
PLC
688 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 689
Interface signals
18.2 Interface signals - detailed description
PLC
690 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 691
Interface signals
18.2 Interface signals - detailed description
18.2.6.165 DB31, ... DBX95.2 (ESR: Response initiated or generator operation active)
DB31, ... DBX95.3 ESR: Generator operation - minimum speed fallen below
Signal flow NC → PLC
Update Cyclic
Signal state 1 The axis is parameterized as generator axis. The drive signals that the actual speed is less
than the minimum speed set using parameter p2161 (speed threshold value 3).
Signal state 0 The axis is parameterized as generator axis. The drive signals that the actual speed is greater
than the minimum speed set using parameter p2161 (speed threshold value 3).
Additional information The PLC user program can initiate measures in order to safely end machining and/or to buffer
the DC link voltage, e.g. initiate a drive-based and/or control-managed extended stop and
retract (ESR).
Corresponds with Drive parameter p2161 (speed threshold value 3)
Drive telegram MELDW.Bit2
Additional information SINUMERIK 840D sl Commissioning Manual, CNC Commissioning: NC, PLC, drive
PLC
692 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 693
Interface signals
18.2 Interface signals - detailed description
PLC
694 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 695
Interface signals
18.2 Interface signals - detailed description
PLC
696 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 697
Interface signals
18.2 Interface signals - detailed description
PLC
698 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 699
Interface signals
18.2 Interface signals - detailed description
PLC
700 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 701
Interface signals
18.2 Interface signals - detailed description
PLC
702 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 703
Interface signals
18.2 Interface signals - detailed description
PLC
704 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
18.2.6.201 DB31, ... DBX132.5 (sensor S5 available (angular position of the motor shaft))
DB31, ... DBX132.5 Sensor S5 available (angular position of the motor shaft)
Signal flow NC → PLC
Update Cyclic
Signal state 1 Sensor S5 is available.
Signal state 0 Sensor S5 is not available.
Additional information Note
Only relevant for spindles with SMI 24 (Weiss spindle)
Corresponds with DB31, … DBX138.5 (sensor S5: angular position of the motor shaft)
Additional information Function Manual Axes and Spindles
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 705
Interface signals
18.2 Interface signals - detailed description
18.2.6.202 DB31, ... DBX133.2 (state value is generated, speed limitation p5043 is active)
DB31, ... DBX133.2 State value is generated, speed limitation p5043 is active
Signal flow NC → PLC
Update Cyclic
Signal state 1 The status value is generated and the speed limits from drive parameter p5043 are active.
Signal state 0 The status value is not generated and the speed limits from drive parameter p5043 are not
active.
Additional information Note
● Only relevant for spindles with SMI 24 (Weiss spindle)
● When generating the status value, the analog voltage values of sensor S1 are transformed
into discrete status values of drive parameter r5001.
Corresponds with DB31, … DBX134 (clamped state)
Drive parameters: r5001
System variable: $VA_MOT_CLAMPING_STATE[<axis>]
OPI variable: vaMotClampingState
Additional information Function Manual Axes and Spindles
PLC
706 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
18.2.6.204 DB31, ... DBW136 (analog measured value: of the clamping system)
18.2.6.206 DB31, ... DBX138.5 (sensor S5 angular position of the motor shaft)
DB31, ... DBX138.5 Sensor S5, angular position of the motor shaft
Signal flow NC → PLC
Update Cyclic
Signal state 1 The motor shaft is in position (requirement: the spindle is stationary)
Signal state 0 The motor shaft is not aligned
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 707
Interface signals
18.2 Interface signals - detailed description
DB31, ... DBX138.5 Sensor S5, angular position of the motor shaft
Additional information Note
Only relevant for spindles with SMI 24 (Weiss spindle)
Corresponds with DB31, … DBX132.5 (sensor S5 available)
Additional information Function Manual Axes and Spindles
PLC
708 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 709
Interface signals
18.2 Interface signals - detailed description
PLC
710 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 711
Interface signals
18.2 Interface signals - detailed description
PLC
712 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
18.2.7.13 DB71 DBW(n+16) (identifier for loading/unloading point (fixed value 9999))
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 713
Interface signals
18.2 Interface signals - detailed description
PLC
714 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 715
Interface signals
18.2 Interface signals - detailed description
PLC
716 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 717
Interface signals
18.2 Interface signals - detailed description
PLC
718 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 719
Interface signals
18.2 Interface signals - detailed description
PLC
720 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 721
Interface signals
18.2 Interface signals - detailed description
DB72 DBW(n+16) Buffer magazine no. (fixed value 9998); target position for new tool
PLC
722 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
18.2.8.20 DB72 DBW(n+20) (magazine No. (source) for new tool to be loaded)
18.2.8.22 DB72 DBW(n+24) (magazine No. (target) for old tool to be removed)
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 723
Interface signals
18.2 Interface signals - detailed description
PLC
724 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 725
Interface signals
18.2 Interface signals - detailed description
PLC
726 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 727
Interface signals
18.2 Interface signals - detailed description
PLC
728 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
DB73 DBX(n+0).3 T0
Signal flow NC → PLC
Update Job-controlled
Signal state 1 Indicates that T0 has been programmed.
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 729
Interface signals
18.2 Interface signals - detailed description
DB73 DBX(n+0).3 T0
Signal state 0 Does not indicate that T0 has been programmed.
Additional information Start address of the turret:
Turret, 1: n = 4
Turret 2: n = 48
Turret 3: n = 92
The bits in DBB(n+0) (obligatory change, execute change, ...) are not reset by the system.
They are only current (up-to-date) if the corresponding interface bit in DBB0 is set to "1''.
However, the bits can be reset by the user if necessary.
PLC
730 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 731
Interface signals
18.2 Interface signals - detailed description
PLC
732 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
18.2.9.15 DB73 DBW(n+24) (magazine No. (target) for old tool to be removed)
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 733
Interface signals
18.2 Interface signals - detailed description
PLC
734 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 735
Interface signals
18.2 Interface signals - detailed description
18.2.9.24 DB73 DBW(n+42) (original location of the new tool in this turret magazine)
PLC
736 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 737
Interface signals
18.2 Interface signals - detailed description
PLC
738 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 739
Interface signals
18.2 Interface signals - detailed description
PLC
740 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 741
Interface signals
18.2 Interface signals - detailed description
PLC
742 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 743
Interface signals
18.2 Interface signals - detailed description
PLC
744 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 745
Interface signals
18.2 Interface signals - detailed description
PLC
746 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 747
Interface signals
18.2 Interface signals - detailed description
PLC
748 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 749
Interface signals
18.2 Interface signals - detailed description
PLC
750 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Interface signals
18.2 Interface signals - detailed description
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 751
Interface signals
18.2 Interface signals - detailed description
PLC
752 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Appendix A
A.1 Overview
You will find extensive documentation on the functions of SINUMERIK 840D sl from version 4.8
SP4 at 840D sl documentation overview (https://support.industry.siemens.com/cs/ww/en/view/
109766213).
You can display the documents or download them in PDF or HTML5 format.
The documentation is divided into the following categories:
● User: Operating
● User: Programming
● Manufacturer/Service: Configure
● Manufacturer/Service: Commissioning
● Manufacturer/Service: Functions
● Safety Integrated
● SINUMERIK Integrate / MindApp
● Information and training
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 753
Appendix
A.1 Overview
PLC
754 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Index
DBX103.6, 456
DBX103.7, 456
A DBX104.3, 95
DBX104.4, 95
Activation
DBX104.7, 79, 456
from machine control panel, hand-held unit, 93
DBX106.1, 457
AG_SEND, AG_RECV, 83
DBX107.0 - 1, 457
DBX107.6, 457
DBX108.3, 458
B DBX108.5, 458
Basic PLC program DBX108.6, 458
Assignment overview, 111 DBX108.7, 458, 459
DBX109.0, 459
DBX109.5, 459
C DBX109.6, 460
DBX109.7, 460
Concurrent axes, 81
DBX110.0 - 113.7, 460, 461
Cyclic operation, 75
DBX114.0 - 117.7, 461
DBX122.0 - 7, 462
DBX123.0 - 7, 462
D DBX124.0 - 7, 462, 463
Data block DB, 315 DBX125.0 - 7, 463
Data exchange DBX126.0 - 7, 463
with operator panel, 53 DBX127.0 - 7, 464
Data interface, 57 DBX128.0 - 7, 464
DB10 DBX129.0 - 7, 464, 465
Analog NC inputs and outputs, 358 DBX130.0 - 7, 465
Collision avoidance: Activate protection area, 359 DBX131.0 - 7, 465, 466
Collision avoidance:protection area active, 359 DBX132.0 - 7, 466
DBB194 - 208, 481 DBX133.0 - 7, 467
DBW148 - 162, 475 DBX134.0 - 7, 467
DBW170 - 184, 477 DBX135.0 - 7, 468
DBW210 - 224, 481, 482 DBX136.0 - 7, 468, 469
DBX0.0 - 7, 442, 443 DBX137.0 - 7, 469
DBX1.0 - 7, 443 DBX138.0 - 7, 469, 470
DBX100.0 - 4, 452 DBX139.0 - 7, 470
DBX100.5, 452, 453 DBX140.0 - 7, 470, 471
DBX100.6, 453 DBX141.0 - 7, 471
DBX100.7, 454 DBX142.0 - 7, 472
DBX101.0 - 4, 454 DBX143.0 - 7, 472
DBX101.5, 454 DBX144.0 - 7, 473
DBX101.6, 454 DBX145.0 - 7, 473, 474
DBX101.7, 455 DBX146.0 - 7, 474
DBX102.0 - 4, 455 DBX147.0 - 7, 474
DBX102.5, 455 DBX166.0 - 7, 475
DBX102.6, 455 DBX167.0 - 7, 476
DBX102.7, 455 DBX168.0 - 7, 476
DBX103.0, 455 DBX186.0 - 7, 477
DBX103.5, 455, 456 DBX187.0 - 7, 478
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 755
Index
PLC
756 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Index
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 757
Index
PLC
758 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Index
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 759
Index
PLC
760 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Index
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 761
Index
PLC
762 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Index
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 763
Index
Activate program test, 631, 703, 704 AUTOMATIC mode selected, 490
Activate program test (PRT), 514, 515 Axis accelerates, 700
Activate PTP travel, 542 Axis container: Rotation active, 662
Activate referencing, 511, 512 Axis number handwheel 1, 452
Activate single block, 510 Axis number handwheel 2, 454
Activate skip block, 515 Axis number handwheel 3, 455
Activate travel to fixed stop, 661 Axis stop active, 663
Active G command of group 1 to 60, 575, 576 Axis/spindle disable, 606, 607, 608, 609
Active infeed axes, 703 Axis/spindle disable active, 663, 664
Active JOG mode, 492 Axis/spindle exchange request, 625
Active machine function, 666 Axis/spindle stationary, 658
Active MDI mode, 491 Axis-specific alarm, 656, 657
Active position controller parameter set, 667, 668 Block search active, 551
Active REPOS mode, 583 Block search via program test is active, 581
Active spindle mode, control mode, 682 Brighten screen, 496
Active spindle mode, oscillation mode, 682 Buffer location of old tool, 727
Active spindle mode, positioning mode, 681, 682 Buffer magazine no. (fixed value 9998); target
Active spindle mode: Synchronous mode, 681 position for new tool, 722
Active status of interface 1- 16, 728 Cancel alarm deleted, 502
Active status of interfaces 1- 16, 708 Change gear stage, 676
Active status of interfaces 1-16, 715, 716 Change reversal point, 649
Actual direction of rotation clockwise, 680 Channel is ready, 559
Actual gear stage A to C, 631, 632 Channel number, 498
Actual screen number, 503 Channel number for geometry axis, handwheel
Actual value coupling, 697, 698 1, 450, 451
Actual values in the WCS, 497, 498 Channel number for geometry axis, handwheel
Air temperature alarm, 460 2, 451
All axes stationary, 559 Channel number for geometry axis, handwheel
All axes that have to be referenced are 3, 451
referenced, 558 Channel state active, 557
All channels in the "Reset" state, 492 Channel state interrupted, 557
Analog measured value of the clamping Channel state reset, 558
system, 707 Channel-specific NC alarm active, 560
Analog NC input 1: Setting value, 475 Channel-specific protection zone 1 - 10
Analog NC inputs 1 - 8: Actual value, 481 violated, 578
Analog NC inputs 1 - 8: Lock, 474 Clamping in progress, 617
Analog NC inputs 1 - 8: Target, 474 Clearance control (CLC):, 561
Analog NC outputs 1 - 8: Overwrite, 475 Clearance control (CLC): Override, 513
Analog NC outputs 1 - 8: Setpoint, 449, 481, 482 Clearance control (CLC): Stop, 512, 513
Analog NC outputs 1 - 8: Setting value, 477 Clearance control (CLC): Stop at the lower motion
Analog NC outputs 1 - 8: Target, 476 limit, 562
Analog spindle 1, utilization in percent, 498 Clearance control (CLC): Stop at the upper motion
Analog spindle 2, utilization in percent, 498 limit, 562
Approach block active, 548, 549 Collision avoidance: Activate protection
Assigned channel, 712, 720, 721, 730, 731 zone, 482, 483
Associated auxiliary function is active, 582 Collision avoidance: Deactivate protection area
Associated auxiliary function selected, 537 group, 447, 448, 449, 450
ASUB is active, 599 Collision avoidance: Protection area active, 482
ASUB is stopped, 580 Collision avoidance: Stop, 598
AT box ready, 455, 456 Collision avoidance: Velocity reduction, 675
AUTOMATIC mode, 484 Command code: Load manual tool, 718, 719
AUTOMATIC mode active, 491 Command code: Obligatory change, 716
PLC
764 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Index
Command code: Old tool in buffer, 718 Digital NC inputs 25 - 32: Actual value, 478
Command code: Perform change with M06, 716, Digital NC inputs 25 - 32: Lock, 463
717 Digital NC inputs 25 - 32: Set, 464
Command code: Prepare change, 717 Digital NC inputs 33 - 40: Actual value, 479
Command code: T0, 717, 718 Digital NC inputs 33 - 40: Lock, 464
Command code: Tool remains in spindle, 719, Digital NC inputs 33 - 40: Set, 464, 465
720 Digital NC inputs 9 - 16: Actual value, 477
Command code: Unload manual tool, 719 Digital NC inputs 9 - 16: Lock, 462
Command: Data in the extended range, 712, 720, Digital NC inputs 9 - 16: Set, 462
730 Digital NC outputs 1 - 8: Lock, 443, 444
Command: Loading, 708, 709 Digital NC outputs 1 - 8: Overwrite, 444
Command: Obligatory change, 729 Digital NC outputs 1 - 8: Setting value, 444, 445
Command: Perform change, 729 Digital NC outputs 1 - 8: Target, 445
Command: Position a multitool, 711 Digital NC outputs 17 - 24: Lock, 467
Command: Position to the loading point, 710 Digital NC outputs 17 - 24: Overwrite, 468
Command: Relocate, 709, 710 Digital NC outputs 17 - 24: Setpoint, 479, 480
Command: Task comes from the NC Digital NC outputs 17 - 24: Setting value, 468,
program, 710, 711 469
Command: Unload, 709 Digital NC outputs 17 - 24: Target, 469
Configured stop is activated, 566 Digital NC outputs 25 - 32: Lock, 469, 470
Contour handwheel active, 560, 561 Digital NC outputs 25 - 32: Overwrite, 470
Contour handwheel: handwheel direction of Digital NC outputs 25 - 32: Setpoint, 480
rotation inversion active, 565, 566 Digital NC outputs 25 - 32: Setting value, 470,
Contour handwheel: invert handwheel direction of 471
rotation, 547 Digital NC outputs 25 - 32: Target, 471
Control axis, 643 Digital NC outputs 33 - 40: Lock, 472
Controller enable, 613, 614, 615 Digital NC outputs 33 - 40: Overwrite, 472
Current channel number, 503 Digital NC outputs 33 - 40: Setpoint, 480, 481
Current controller active, 659, 660 Digital NC outputs 33 - 40: Setting value, 473
D function 1, 574 Digital NC outputs 33 - 40: Target, 473, 474
Darken screen, 496 Digital NC outputs 9 - 16: Lock, 465
Data area of the SPL inputs, 494, 495 Digital NC outputs 9 - 16: Overwrite, 465, 466
Data area of the SPL outputs, 495 Digital NC outputs 9 - 16: Setpoint, 479
Deceleration of reference point approach, 628, Digital NC outputs 9 - 16: Setting value, 466
629 Digital NC outputs 9 - 16: Target, 467
Define handwheel 1 as contour handwheel, 452, Disable all synchronized actions, 512
453 Disable synchronization, 651
Define handwheel 2 as contour handwheel, 454 Disable synchronized actions ID/IDS, 579
Define handwheel 3 as contour handwheel, 455 Disabling of input signal 1 - 8, 600
Delayed stroke, 516 Distance coding, 736, 737, 739, 745
Delete cancel alarms, 497 Drive ready, 458, 686
Delete distance-to-go (channel-specific), 522, Drive test travel enable, 604
523 Drive test travel request, 656
Delete distance-to-go/spindle reset, 615, 616 Drive-autonomous motion active, 685
Delete recall alarms, 497 Drives in cyclic operation, 458
Delete S value, 634 Dry run feedrate (DRY) requested, 538
Digital NC inputs 1 - 8: Actual value, 448, 449 Dynamic M functions M0 - M99, 575
Digital NC inputs 1 - 8: Lock, 442, 443 Emergency Stop, 446
Digital NC inputs 1 - 8: Set, 443 Emergency Stop active, 457
Digital NC inputs 17 - 24: Actual value, 478 Enable following axis override, 646
Digital NC inputs 17 - 24: Lock, 462, 463 Enable GOTOS, 599
Digital NC inputs 17 - 24: Set, 463 Enable request for action 1 - 8, 601
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 765
Index
Enable status of input signal 1 - 8, 601 Geometry axis 1: traversing request Plus /
Enable travel to fixed stop, 618 Minus, 567, 568
Encoder frequency limit exceeded, measuring Geometry axis 2: Activate handwheel, 534
system 2, 653, 654 Geometry axis 2: active machine function, 570
Encoder limit frequency exceeded, measuring Geometry axis 2: handwheel active, 570
system 1, 653 Geometry axis 2: handwheel direction of rotation
Error code, 508 inversion active, 570
Error during oscillation, 701 Geometry axis 2: invert handwheel direction of
ESR DC link undervoltage, 691, 692 rotation, 535
ESR: Generator operation - minimum speed fallen Geometry axis 2: machine function request, 535
below, 692 Geometry axis 2: Rapid traverse override, 535
ESR: Response initiated or generator operation Geometry axis 2: traversing command Plus /
active, 692 Minus, 570
Ethernet handwheel is stationary, 483 Geometry axis 2: traversing keys plus /
Extended address, F function 1 - 6, 574, 575 minus, 535
Extended address, M function 1 - 5, 572, 573 Geometry axis 2: traversing request Plus /
Extended address, S function 1 - 3, 573 Minus, 570
External oscillation reversal active, 700, 701 Geometry axis 3: Activate handwheel, 535
Feedrate disable, 521, 522 Geometry axis 3: active machine function, 571
Feedrate override selected for rapid traverse, 539 Geometry axis 3: handwheel active, 571
Feedrate override, axis-specific, 602, 603, 604 Geometry axis 3: handwheel direction of rotation
Feedrate stop, geometry axis 1, 2, 3), 530 inversion active, 571
Feedrate, positioning axis, 675 Geometry axis 3: invert handwheel direction of
Feedrate/spindle stop, axis-specific, 621 rotation, 536
Fixed stop reached, 662 Geometry axis 3: machine function request, 536
Following spindle active, 700 Geometry axis 3: Rapid traverse override, 536
Follow-up active, 657, 658 Geometry axis 3: traversing command Plus /
Follow-up mode, 609 Minus, 571
Function selection from the PLC: Function Geometry axis 3: Traversing key lock, 535
number, 507 Geometry axis 3: traversing keys plus /
Function selection from the PLC: Parameter 1 - minus, 536
3, 508 Geometry axis 3: traversing request Plus /
Function selection from the PLC: Request Minus, 571
strobe, 507 Geometry monitoring, 679
Function selection from the PLC: Status, 507 Grinding wheel peripheral speed active, 680
Gear is changed over, 632, 633 H function 1 - 3 and extended address H function
Gear ratio selection, 643 1-3, 574
Geometry axis 1: Activate handwheel, 529, 530 Handwheel 1 selected, 453
Geometry axis 1: active machine function, 569 Handwheel 2 selected, 454
Geometry axis 1: handwheel active, 566, 567 Handwheel 3 selected, 455
Geometry axis 1: handwheel direction of rotation Handwheel active, 484, 664
inversion active, 569, 570 Handwheel direction of rotation inversion
Geometry axis 1: invert handwheel direction of active, 667
rotation, 534 Handwheel offset (DRF) selected, 537
Geometry axis 1: machine function request, 533, Handwheel override active, 550, 660
534 Hardware limit switch minus:, 627
Geometry axis 1: Rapid traverse override, 531 Hardware limit switch plus, 627
Geometry axis 1: traversing command Plus / Heat sink temperature prewarning, 688
Minus, 568, 569 HMI battery alarm, 456
Geometry axis 1: Traversing key lock, 530 HMI temperature limit, 456
Geometry axis 1: traversing keys plus / Indexing axis in position, 674
minus, 531, 532, 533 Input signals 1 - 8, 600
PLC
766 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Index
Integrator disable, speed controller, 686 Magazine No. (source) for new tool to be
Interrupt handling active, 559 loaded, 723
Invert handwheel direction of rotation, 624, 625 Magazine No. (Source) for unloading/relocating/
Invert M3/M4, 635 positioning, 713
JOG approach fixed point active, 671 Magazine No. (target) for old tool to be
JOG approach fixed point reached, 672 removed, 723, 724, 733
JOG circular travel, 545, 546 Magazine No. (Target) for unloading/relocating/
JOG circular travel active, 598 positioning, 714
JOG fixed point approach, 629 Magazine no. of new tool, 732
JOG mode, 485 Manual stroke initiation: Acknowledgment, 564
JOG mode selected, 490 Master/slave: Active, 694
JOG position reached, 672, 673 Master-slave: activate coupling, 645, 646
JOG retract active, 598 Master-slave: activate torque compensatory
JOG retract retraction data available, 598 controller, 645
JOG travel to position, 629, 630 Master-slave: Coarse speed difference, 693
JOG travel to position active, 672 Master-slave: Compensatory controller
Key lock, 496, 497 active, 693, 694
Key-operated switch position, 446, 447 Master-slave: Fine speed difference, 693
Last action block active, 549 MCS coupling: Activate collision protection, 644
Leading spindle active, 699 MCS coupling: Collision protection active, 666
Loading/unloading without magazine MCS coupling: Coupling active, 695
movement, 715 MCS coupling: Deactivate or do not permit, 644
Location in buffer magazine (spindle), 722, 723 MCS coupling: Following axis, 695
Location No. (source) for new tool, 723 MCS coupling: offset change, 696
Location No. (Source) for unloading/relocating/ MDI mode, 484, 485
positioning, 714 MDI mode selected, 490
Location No. (target) for old tool, 724 Measurement active, 661
Location No. (Target) for unloading/relocating/ Mirroring active, 695, 696
positioning, 714, 715 Mode change acknowledgment, 582, 583
Location no. of new tool to be loaded at Mode change inhibit, 485
change, 732, 733 Mode group ready, 492
Location no. of old tool to be unloaded, 733 Mode group reset, 487
Location No. of the loading/unloading point, 713 Mode group stop, 485, 486
Lubrication pulse, 673 Mode group stop axes plus spindles, 486
M fct. 1-5 not decoded, 572 Modulo rotary axis: activate traversing range
M function for spindle, 683, 684 limits, 628
M(d) less than M(dx), 689 Modulo rotary axis: traversing range limits
M, S, T, D, H, F fct. Additional quick information active, 671
(fast acknowledgment), 572 Motor being selected, 640, 641
M, S, T, D, H, F fct. change, 571 Motor temperature prewarning, 687
M00/M01 active, 549 Motor/drive data set: Display, 685
M01 selected, 538 Motor/drive data set: Formatting, 704
M02/M30 active, 551, 552 Motor/drive data set: Selection, 640
Machine axis handwheel 1, 454 Multitool location distance, 737, 739, 746
Machine axis handwheel 2, 455 Multitool location number, 737, 738, 739, 745
Machine axis handwheel 3, 455 Multitool location number (new tool), 740, 746
Machine function request, 623, 624 Multitool location number (old tool), 741, 747
Machine-related protection zone 1 - 10 Multitool number, 738
preactivated, 576, 577 Multitool number (new tool), 740, 746
Machine-related protection zone 1 - 10 Multitool number (old tool), 740, 747
violated, 577 n(act) equals n(set), 691
n(act) less than n(min), 690
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 767
Index
n(act) less than n(x), 690, 692, 693 Orientation axis 2: active machine function, 595
NC alarm is active, 459 Orientation axis 2: handwheel active, 594
NC alarm with machining stop is active, 560 Orientation axis 2: invert handwheel direction of
NC alarm with program stop, 565 rotation, 590
NC battery alarm, 460 Orientation axis 2: machine function request, 590
NC CPU ready, 456 Orientation axis 2: Rapid traverse override, 590
NC program: Load, 499 Orientation axis 2: traversing command Plus /
NC program: Selection, 499 Minus, 595
NC program: Unload, 499 Orientation axis 2: Traversing key lock, 589
NC ready, 458, 459 Orientation axis 2: traversing keys plus /
NC start, 525 minus, 590
NC start disable, 524, 525 Orientation axis 2: traversing request Plus /
NC stop, 526 Minus, 595
NC Stop at block limit, 525 Orientation axis 3: Activate handwheel, 590
NC Stop axes plus spindles, 526, 527 Orientation axis 3: active machine function, 595
NCU heat sink temperature alarm, 459 Orientation axis 3: handwheel active, 595
NCU link: Active, 457 Orientation axis 3: invert handwheel direction of
NCU link: Axis active, 652 rotation, 591
NCU link: Axis ready, 657 Orientation axis 3: machine function request, 591
New tool: Internal T no. of the NC, 736 Orientation axis 3: Rapid traverse override, 590
New tool: Internal T number of the NC, 726, 727, Orientation axis 3: traversing command Plus /
743, 750 Minus, 595
New tool: Location type, 724, 733, 734, 741 Orientation axis 3: Traversing key lock, 590
New tool: Location type), 747 Orientation axis 3: traversing keys plus /
New tool: Size bottom, 725, 726, 735, 742 minus, 591
New tool: Size left, 724, 725, 734, 741 Orientation axis 3: traversing request Plus /
New tool: Size left), 748 Minus, 595
New tool: Size right, 725, 734, 742 Original location of new tool, 727, 728, 744, 745,
New tool: Size right), 748 751
New tool: Size top, 725, 734, 735, 742 Original location of new tool in this turret
New tool: Size top), 748, 749 magazine, 736
Online tool length compensation (TOFF) Original magazine of new tool, 727, 744, 750
active, 581 Oscillation active, 701, 702
Online tool length compensation (TOFF): Oscillation cannot be started, 701
Compensation motion active, 581, 582 Oscillation controlled by the PLC, 635, 636
Operating software ready, 458 Oscillation enable, 636
Orientation axis 1: Activate handwheel, 584, 585 Oscillation reversal from external, 646, 647
Orientation axis 1: active machine function, 594 Oscillation: Clockwise direction of rotation, 636,
Orientation axis 1: handwheel active, 591, 592 637
Orientation axis 1: invert handwheel direction of Oscillation: Counterclockwise direction of
rotation, 589 rotation, 637
Orientation axis 1: machine function request, 588, Overlaid motion, 698
589 Override active, 612, 613
Orientation axis 1: Rapid traverse override, 586 Parameter set definitions disabled by NC, 626
Orientation axis 1: traversing command Plus / Path axis, 673
Minus, 593, 594 Path feedrate override, 517, 518, 519
Orientation axis 1: Traversing key lock, 585, 586 Path feedrate override active, 524
Orientation axis 1: traversing keys plus / Path rapid traverse override, 519, 520, 521
minus, 586, 587, 588 Path rapid traverse override active, 523, 524
Orientation axis 1: traversing request Plus / PLC action completed, 513, 514
Minus, 592, 593 PLC hardkeys, 498
Orientation axis 2: Activate handwheel, 589 PLC index, 499
PLC
768 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Index
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 769
Index
PLC
770 Function Manual, 12/2019, 6FC5397-0HP40-0BA0
Index
MD14504, 89
MD14506, 89
MD14508, 89 R
MD35400, 267
REPOS activation, 547
MD51041, 116
REPOS mode, 546
MD51043, 116
MD9106, 116
Memory requirements
of basic PLC program, 135
S
Mode group, 76 Signal exchange
Multitool, 206 Cyclic, 31
Event-controlled, 31
Signals
N Compile cycles, 59
NCK/PLC, 60
NC
PLC / mode group, 60, 61
failure, 79
PLC/axes, spindles, 63
-Read/write variables, 82
PLC/NC, 59
NC VAR selector, 139
PLC/NCK channels, 61
Alias name, 149
Star-delta changeover, 261
Commissioning, installation, 154
Startup and synchronization of NCK PLC, 75
Compiling, 149
Symbolic programming, 83
Create a project, 144
Create project list, 147
Filtering the variable list, 145
Open project, 144
T
Save project, 144 Timer No., 316
Software version, 145
Transfer to STEP 7, 151
Number range U
for user program, 111
UDT assignments, 84
UTD-blocks, 83
O
Organization block OB, 313
P
PLC
Basic program functions, 33
HMI monitor, 129
Key disable, 119
Program list, 115, 116
-Versions, 33
PROFIBUS
connection, 98
PROFIBUS connection, 98
PROFIBUS diagnostics, 78
PROFINET
connection, 100
Program
Select via PLC, 116
PLC
Function Manual, 12/2019, 6FC5397-0HP40-0BA0 771
Index
PLC
772 Function Manual, 12/2019, 6FC5397-0HP40-0BA0