siemens 840D User Manual

Page 1
Description of Functions 11/2002 Edition
ISO Dialects for SINUMERIK SINUMERIK 840D/840Di/810D
Page 2
Page 3
SINUMERIK 840D/840Di/810D
ISO Dialects for SINUMERIK
Brief Description 1
Programming 2
Cycles and Contour Definition 3
Start-Up 4
Boundary Conditions 5
Data Description (MD, SD) 6
Description of Functions
Valid for
Signal Description 7
Example 8
Data Fields, Lists 9
Alarms 10
References A
Index
Control Software version
SINUMERIK 840D 6 SINUMERIK 840DE (export version) 6 SINUMERIK 840D powerline 6 SINUMERIK 840DE powerline 6 SINUMERIK 840Di 2 SINUMERIK 840DiE (export version) 2 SINUMERIK 810D 3 SINUMERIK 810DE (export version) 3 SINUMERIK 810D powerline 6 SINUMERIK 810DE powerline 6
11.2002 Edition
Page 4
3ls
SINUMERIK Documentation
Printing history
Brief details of this edition and previous editions are listed below. The status of each edition is shown by the code in the “Remarks” column.
Status code in the “Remarks” column:
A New documentation.. . . . .
B Unrevised reprint with new order no.. . . . .
C Revised edition with new status. . . . . .
If factual changes have been made on the page in relation to the same software version, this is indicated by a new edition coding in the header on that page.
Edition Order No. Remarks
08.99 6FC5297–5AE10–0BP0 A
04.00 6FC5297–5AE10–0BP1 C
10.00 6FC5297–6AE10–0BP0 C
09.01 6FC5297–6AE10–0BP1 C
12.01 6FC5297–6AE10–0BP2 C
11.02 6FC5297–6AE10–0BP3 C
This book is part of the documentation on CD-ROM (DOCONCD)
Edition Order No. Remarks
11.02 6FC5 298-6CA00-0BG3 C
Trademarks
SIMATICr, SIMATIC HMIr, SIMATIC NETr, SIROTECr, SINUMERIKr and SIMODRIVEr are trademarks of Siemens. Other product names used in this documentation may be trademarks which, if used by third parties, could infringe the rights of their owners.
Other functions not described in this documentation might be
executable in the control. However, no claim can be made regarding Further information is available on the Internet under: http://www.ad.siemens.de/sinumerik
This publication was produced with Interleaf V7. The reproduction, transmission or use of this document or its
contents is not permitted without express written authority. Offenders will be liable for damages. All rights, including those created by patent grant or registration of a utility model or design, are reserved.
Siemens AG, 1999–2002. All rights reserved
the availability of these functions when the equipment is first supplied
or for service cases.
We have checked that the contents of this document correspond to
the hardware and software described. Nonetheless, differences might
exist and therefore we cannot guarantee that they are completely
identical. The information contained in this document is, however,
reviewed regularly and any necessary changes will be included in the
next edition. We welcome suggestions for improvement.
Subject to changes without prior notice.
Printed in Germany
Siemens AktiengesellschaftOrder No. 6FC5-297-6AE10-0BP3
Page 5
Preface
Structure of the documentation
Reader group
Hotline
The SINUMERIK documentation is structured in three levels:
S General documentation S User documentation S Manufacturer/service documentation.
For detailed information on further publications on SINUMERIK 840D/840Di/ 810D, as well as on publications applicable to all SINUMERIK control systems, please contact your regional Siemens branch office.
This documentation is intended for use by manufacturers of machine tools with SINUMERIK 840D or SINUMERIK 810D and SIMODRIVE 611D.
If you have any questions about the control, please contact the hotline: A&D Technical Support Phone.: ++49-180-5050-222
Fax: ++49-180-5050-223 Email: [email protected]
Please send any questions about the documentation (suggestions for improvement, corrections) to the following fax number or email address:
Fax: ++49-9131-98-2176 Email: [email protected]
Fax form: see reply form at the end of the manual.
Internet address
SINUMERIK 840D powerline
http://www.ad.siemens.de/sinumerik
With effect from 09.2001 the
S SINUMERIK 840D powerline and S SINUMERIK 840DE powerline
have been given improved performance. See the hardware description below for the list of the available powerline modules:
References: /PHD/, Configuring Manual SINUMERIK 840D
Siemens AG, 2002. All rights reserved SINUMERIK 840D/840Di/810D, Description of Functions ISO Dialects (FBFA) – 11.02 Edition
v
Page 6
Preface
10.02
SINUMERIK 810D powerline
Target readers
The purpose of this manual
Indexes and references
With effect from 12.2001 the
S SINUMERIK 810D powerline and S SINUMERIK 810DE powerline
have been given improved performance. See the hardware description below for the list of the available powerline modules:
References: /PHC/, Configuring Manual SINUMERIK 810D
S Configuring engineers, S Electricians and start-up specialists S Service and operating personnel
The information in this manual makes it possible to import and use parts programs from external CNC systems.
For your better orientation, this manual offers a list of contents and the following appendices:
S References S Index S Index of commands
vi
SINUMERIK 840D/840Di/810D, Description of Functions ISO Dialects (FBFA) – 11.02 Edition
Siemens AG, 2002. All rights reserved
Page 7
10.02
Preface
Warning notes
!
!
!
The following warning notes with graded degrees of importance are used in this documentation:
Danger
Indicates an imminently hazardous situation which, if not avoided, will result in death or serious injury or in substantial property damage.
Warning
Indicates a potentially hazardous situation which, if not avoided, could result in death or serious injury or in substantial property damage.
Caution
Used with the safety alert symbol indicates a potentially hazardous situation which, if not avoided, may result in minor or moderate injury or in property damage.
Caution
Used without safety alert symbol indicates a potentially hazardous situation which, if not avoided, may result in property damage.
Further information
Notice
Used without the safety alert symbol indicates a potential situation which, if not avoided, may result in an undesirable result or state.
Important
!
Important indicates an important or especially relevant item of information.
Note
The “note” symbol is displayed in this document to draw your attention to information relevant to the subject in hand.
Machine manufacturer
The symbol shown is found in this documentation whenever the machine manufacturer can influence or amend the feature described. Please note the machine manufacturer’s specifications.
Siemens AG, 2002. All rights reserved SINUMERIK 840D/840Di/810D, Description of Functions ISO Dialects (FBFA) – 11.02 Edition
vii
Page 8
Preface
10.02
Trademarks
IBM is a registered trademark of the International Business Corporation. MS DOS and WINDOWS Corporation.
TM
are registered tradmarks of the Microsoft
viii
SINUMERIK 840D/840Di/810D, Description of Functions ISO Dialects (FBFA) – 11.02 Edition
Siemens AG, 2002. All rights reserved
Page 9
10.02
Contents
1 Brief Description 1-13. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2 Programming 2-15. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.1 Activation of functions 2-15. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.1.1 Switchover from ISO mode to Siemens mode 2-16. . . . . . . . . . . . . . . . . . .
2.2 G commands 2-18. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.2.1 G code display 2-23. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.2.2 Display of non–modal G codes 2-23. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.2.3 G code output to PLC (as from SW 6.4) 2-24. . . . . . . . . . . . . . . . . . . . . . . .
2.2.4 Zero offset 2-26. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.2.5 Writing a zero offset with G10 2-27. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.2.6 Decimal point programming 2-27. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.2.7 Dwell time in spindle revolutions G04 2-29. . . . . . . . . . . . . . . . . . . . . . . . . . .
2.2.8 Scaling and mirroring: G51, G51.1 (ISO Dialect M) 2-29. . . . . . . . . . . . . . .
2.2.9 2D/3D rotation G68 / G69 (ISO Dialect M) 2-32. . . . . . . . . . . . . . . . . . . . . . .
2.2.10 Polar coordinates: G15 (ISO Dialect M) 2-33. . . . . . . . . . . . . . . . . . . . . . . . .
2.2.11 Polar coordinate interpolation G12.1 / G13.1 (G112/G113) 2-34. . . . . . . . .
2.2.12 Cylindrical interpolation G07.1 (G107) 2-35. . . . . . . . . . . . . . . . . . . . . . . . . .
2.2.13 Interrupt program with M96 / M97 (ASUB) 2-37. . . . . . . . . . . . . . . . . . . . . . .
2.2.14 Comments 2-39. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.2.15 Block skip 2-40. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.2.16 Auxiliary function output 2-41. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.2.17 Align first reference point G28 2-42. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.2.18 Enable/disable feed–forward control using G08 P.. 2-42. . . . . . . . . . . . . . .
2.2.19 Compressor in ISO dialect mode 2-43. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.2.20 Automatic corner override G62 2-44. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.3 Subprogram and macro technology 2-46. . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.3.1 Subprogram technology: M98 2-46. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.3.2 Siemens language commands in ISO Dialect mode 2-48. . . . . . . . . . . . . .
2.3.3 Extending the subprogram call for contour preparation
with CONTPRON 2-49. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.3.4 Macro commands with G65, G66 and G67 2-51. . . . . . . . . . . . . . . . . . . . . .
2.3.5 Mode changing in macro calls with G65 / G66 2-54. . . . . . . . . . . . . . . . . . .
2.3.6 Macro call with M function 2-55. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.3.7 Macro call with G function 2-56. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.3.8 High-speed cycle cutting G05 P.. 2-58. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.3.9 Switchover modes for DryRun and skip levels 2-59. . . . . . . . . . . . . . . . . . .
2.3.10 Eight–digit program numbers 2-60. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.4 Tool change and tool offsets 2-61. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.4.1 Tool offsets: T, D, M (ISO Dialect M) 2-61. . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.4.2 Possible H numbers 2-62. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.4.3 Tool offset: T (ISO Dialect T) 2-65. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
2.4.4 Tool-changing cycle 2-67. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3 Cycles and Contour Definition 3-69. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.1 Calling cycles in the external CNC system using G commands 3-69. . . . .
3.2 Global user data (GUD) 3-71. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.3 Drilling cycles (ISO Dialect M) 3-74. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Siemens AG, 2002. All rights reserved SINUMERIK 840D/840Di/810D, Description of Functions ISO Dialects (FBFA) – 11.02 Edition
ix
Page 10
3.3.1 Overview and parameter description 3-74. . . . . . . . . . . . . . . . . . . . . . . . . . .
3.3.2 Description of shell cycle CYCLE381M 3-77. . . . . . . . . . . . . . . . . . . . . . . . .
3.3.3 Description of shell cycle CYCLE383M 3-77. . . . . . . . . . . . . . . . . . . . . . . . .
3.3.4 Description of shell cycle CYCLE384M 3-78. . . . . . . . . . . . . . . . . . . . . . . . .
3.3.5 Description of shell cycle CYCLE387M 3-79. . . . . . . . . . . . . . . . . . . . . . . . .
3.4 Turning and drilling cycles (ISO Dialect T) 3-80. . . . . . . . . . . . . . . . . . . . . . .
3.4.1 Turning cycles G70 to G76 3-80. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.4.2 Turning cycles G77 to G79 3-86. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.4.3 Drilling cycles G80 to G89 3-88. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.4.4 Description of shell cycle CYCLE383T 3-90. . . . . . . . . . . . . . . . . . . . . . . . . .
3.4.5 Description of shell cycle CYCLE384T 3-91. . . . . . . . . . . . . . . . . . . . . . . . . .
3.4.6 Description of shell cycle CYCLE385T 3-92. . . . . . . . . . . . . . . . . . . . . . . . . .
3.5 System variables 3-93. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.6 Programming contour definitions (ISO Dialect T) 3-96. . . . . . . . . . . . . . . . .
3.6.1 End point programming with angles 3-97. . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.6.2 Straight line with angle 3-98. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.6.3 Two straight lines 3-99. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.6.4 Three straight lines 3-101. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.6.5 Polygon turning with G51.2 3-103. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
3.6.6 Contour repetition G72.1 / G72.2 3-104. . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
10.02
4 Start-Up 4-107. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.1 Machine data 4-107. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.1.1 Active G command to PLC 4-112. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.1.2 Tool change, tool data 4-112. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.1.3 G00 always with exact stop 4-113. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.1.4 Response to syntax errors 4-113. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.1.5 Selection of code system A, B, C (ISO Dialect T) 4-114. . . . . . . . . . . . . . . .
4.1.6 Fixed feedrates F0–F9 4-115. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.1.7 Parallel axes G17<axis name>.. (G18 / G19) 4-116. . . . . . . . . . . . . . . . . . . .
4.1.8 Insertion of chamfers and radii 4-117. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.1.9 Rotary axis function 4-118. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
4.1.10 Program coordination between two channels and M functions 4-119. . . . . .
4.2 Default assignment of machine data for ISO Dialect 4-120. . . . . . . . . . . . . .
5 Boundary Conditions 5-123. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5.1 Restrictions 5-123. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5.1.1 Program commands 5-124. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5.1.2 Tool management 5-126. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
5.1.3 Control system response to Power ON, Reset and block search 5-127. . .
6 Data Descriptions (MD, SD) 6-129. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6.1 General machine data 6-129. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6.2 Channel-specific machine data 6-145. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6.3 Axis-specific setting data 6-152. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
6.4 Channel-specific setting data 6-153. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
x
SINUMERIK 840D/840Di/810D, Description of Functions ISO Dialects (FBFA) – 11.02 Edition
Siemens AG, 2002. All rights reserved
Page 11
10.02
7 Signal Descriptions 8-157. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
8 Example 8-157. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
9 Data Fields, Lists 9-159. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
9.1 Machine data 9-159. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
9.2 Setting data 9-161. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
10 Alarms 10-163. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
A References A-167. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Index I-179. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Commands I-181. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Siemens AG, 2002. All rights reserved SINUMERIK 840D/840Di/810D, Description of Functions ISO Dialects (FBFA) – 11.02 Edition
xi
Page 12
Notes
10.02
xii
SINUMERIK 840D/840Di/810D, Description of Functions ISO Dialects (FBFA) – 11.02 Edition
Siemens AG, 2002. All rights reserved
Page 13
Brief Description
1
Introduction
Terms used
Parts programs can be read in from external CNC systems, and can then be edited and executed.
This manual describes the startup measures and procedures necessary to run NC programs created on an external CNC system. Functional differences are also explained.
Note
For a detailed description of the external programming functions, please refer to the original documentation of the external CNC system.
The following terms are defined for this manual:
S ISO Dialect M is similar to the G code of the “Fanuc16 Milling” control S ISO Dialect T is similar to the G code of the “Fanuc16 Turning” control
System B
S ISO Dialect Original is equivalent to the original Fanuc16 control.
J
Siemens AG, 2002. All rights reserved SINUMERIK 840D/840Di/810D, Description of Functions ISO Dialects (FBFA) – 11.02 Edition
1-13
Page 14
1 Brief Description
Notes
10.02
1-14
SINUMERIK 840D/840Di/810D, Description of Functions ISO Dialects (FBFA) – 11.02 Edition
Siemens AG, 2002. All rights reserved
Page 15
Programming
2.1 Activation of functions
Machine data 18800 $MN_EXTERN_LANGUAGE is used to activate the external language. The language type, ISO Dialect–M or T is selected with machine data 10880 $MN_EXTERN_CNC_SYSTEM. The external language can be activated separately for each channel. For example, channel 1 can operate in ISO mode but channel 2 is active in Siemens mode.
2
Switchover
Siemens mode
ISO Dialect mode
The following two G commands from Group 47 are used to switch between Siemens mode and ISO Dialect mode:
S G290 Siemens NC programming language active S G291 ISO Dialect NC programming language active
The active tool, tool offsets and zero offsets remain active here (see Subsection
2.2.4 and Section 2.4).
The following conditions apply when Siemens mode is active:
S Siemens G commands are interpreted on the control by default. S It is not possible to extend the Siemens programming system with ISO
Dialect functions because some of the G functions have different meanings.
S Downloadable MD files can be used to switch the control to ISO Dialect
mode. In this case, the user sees the ISO Dialect mode by default.
The following conditions apply when ISO Dialect mode is active:
S Only ISO Dialect G codes can be programmed, not Siemens G codes. S It is not possible to use a mixture of ISO Dialect code and Siemens code in
the same NC block.
S It is not possible to switch between ISO Dialect M and ISO Dialect T via
G command
S If further Siemens functions are to be used, it is necessary to switch to
Siemens mode first (exception: program branches and subprogram calls, see Subsection 2.3.2)
Siemens AG, 2002. All rights reserved SINUMERIK 840D/840Di/810D, Description of Functions ISO Dialects (FBFA) – 11.02 Edition
2-15
Page 16
2 Programming
2.1 Activation of functions
Power ON/Reset Table 2-1 shows the possible combinations of machine data
$MN_EXTERN_CNC_SYSTEM and $MC_GCODE_RESET_VALUE. This specifies the Power ON/Reset response.
Table 2-1 Activation of functions
10.02
After Power ON/Reset... $MC_GCODE_RESET_VA-
LUES[46] =
Siemens mode active, switch­over to ISO Dialect M possible
Siemens mode active, switch­over to ISO Dialect T possible
ISO Dialect M active, switchover to Siemens mode possible
ISO Dialect T active, switchover to Siemens mode possible
Modal G commands
Data management
Modal G commands which have the same function in both systems (Siemens and ISO Dialect) are treated as follows. When these G codes are programmed in one language, the equivalent G code in the other language is determined and activated. The following G codes are affected:
ISO programs can be both read into and output from the MMC 103 in punchtape format. ISO programs which have been read in are stored in the NC data management system as main programs in the default path: _N_WKS_DIR/_N_SHOPMILL_WPD.
Y ou can change the entry by editing the file DINO.INI in the USER directory. You will find further information in the publication
References: /IAM/, IM3: MMC Installation and Startup Guide, Section 3.1.
1 G290 Siemens mode 1 ISO Dialect M
1 G290 Siemens mode 2 ISO Dialect T
2 G291 ISO Dialect mode 1 ISO Dialect M
2 G291 ISO Dialect mode 2 ISO Dialect T
$MN_EXTERN_CNC_SYSTEM =
2.1.1 Switchover from ISO mode to Siemens mode
G290/291
G65/66
2-16
G commands 290/291 can be used from the parts program to change mode. On switchover, the display of current G codes also changes.
Non-modal and modal macro: The programmed subprogram is called. Switchover to Siemens mode only takes place when the PROC instruction is used in the first line of the subprogram. If a program of this type is terminated with M17 or RET, when the subprogram returns, the mode is switched back to ISO mode.
SINUMERIK 840D/840Di/810D, Description of Functions ISO Dialects (FBFA) – 11.02 Edition
Siemens AG, 2002. All rights reserved
Page 17
10.02
Modal and non-modal subprogram calls, e.g.
Siemens subprogram call in ISO mode
N100 CALL “SHAFT”
or
N100 MCALL SHAFT
or
N100 SHAFT
Modal and non–modal subprogram calls with parameter passing
N100 MCALL SHAFT(”ABC”, 33.5) or N100 SHAFT(“ABC”, 33.5)
Subprogram calls with path name
N100 CALL “/_N_SPF_DIR/SHAFT or N100 MCALL /_N_SPF_DIR/SHAFT or N100 PCALL /_N_SPF_DIR/SHAFT
Siemens mode is selected implicitly on subprogram calls, and the system is switched back to ISO Dialect mode at the end of the subprogram.
2 Programming
2.1 Activation of functions
Modal, non-modal cycles
If a modal or non-modal cycle is programmed in ISO mode, a shell cycle will be called. This call results in switchover to Siemens mode.
Siemens AG, 2002. All rights reserved SINUMERIK 840D/840Di/810D, Description of Functions ISO Dialects (FBFA) – 11.02 Edition
2-17
Page 18
2 Programming
2.2 G commands
2.2 G commands
The G codes of ISO Dialect T refer to G code system B (see also 4.1.5). The active G codes in ISO mode can be read using system variable
$P_EXTGG[...]. The numbers alongside the G code specify the respective value in $P_EXTGG[...]. Machine data 20154 EXTERN_GCODE_RESET_VALUES[n]: 0, ..., 30 is used to specify the G codes that are effective on start–up when the NC channel is not operating in Siemens mode.
10.02
Table 2-2 The default setting is indicated by
ISO
Dialect T
Group 1
1)
G00 G01 2 G01 2 Linear motion G02 3 G02 3 Circle/helix, clockwise
G03 4 G03 4 Circle/helix, counterclockwise
G33 5 G33 5 Thread cutting with constant lead G34 9 Thread cutting with variable lead G77 6 Longitudinal turning cycle G78 7 Thread cutting cycle G79 8 Face turning cycle
Group 2
G96 1 Constant cutting rate ON G97
Group 3
G90 G91 2 G91 2 Incremental programming
Group 4
G68 1 Double turret/slide on G69 2 Double turret/slide off
1 G00
1)
2
1)
1 G90
ISO
Dialect M
1)
G02.2 6 Involute, clockwise
G03.2 7 Involute, counterclockwise
1)
G17 G18 2 ZX plane G19 3 YZ plane
1)
G22 1 Working area limitation, protection zone 3 ON
1)
G23
Rapid traverse
1
XY plane
1
Constant cutting rate OFF
Absolute programming
1
Working area limitation, protection zone 3 OFF
2
1)
Description
2-18
SINUMERIK 840D/840Di/810D, Description of Functions ISO Dialects (FBFA) – 11.02 Edition
Siemens AG, 2002. All rights reserved
Page 19
10.02
2 Programming
2.2 G commands
Table 2-2 The default setting is indicated by
ISO
Dialect T
Dialect M
1)
DescriptionISO
Group 5
G93 3 Inverse–time feedrate (rpm)
G94 1
1)
G95
2
G94
1)
Feed in [mm/min, inch/min]
1
G95 2 Revolutional feedrate in [mm/rev, inch/rev]
Group 6
G20
1)
1 G20
1)
(G70) 1
Input system inch
G21 2 G21 (G71) 2 Input system metric
Group 7
G40
1)
1 G40
1)
Deselect cutter radius compensation
1 G41 2 G41 2 Compensation to left of contour G42 3 G42 3 Compensation to right of contour
Group 8
G43 1 Tool length compensation positive ON G44 2 Tool length compensation negative ON G49
1)
Tool length compensation OFF
3
Group 9
G22 1 Working area limitation, protection zone 3 ON G23 2 Working area limitation, protection zone 3 OFF
G73 1 Deep hole drilling cycle with chipbreaking G74 2 Counterclockwise tapping cycle G76 3 Fine drilling cycle G80
1)
4
Cycle OFF
G81 5 Counterbore drilling cycle G82 6 Countersink drilling cycle G83 7 Deep hole drilling cycle with swarf removal G84 8 Clockwise tapping cycle G85 9 Drilling cycle G86 10 Drilling cycle, retraction with G00 G87 11 Reverse countersinking G89 13 Drilling cycle, retraction with machining feed
Group 10
G80
1)
1
Drilling cycle OFF
G83 2 Face deep hole drilling G84 3 Face tapping G85 4 End face drilling cycle
Siemens AG, 2002. All rights reserved SINUMERIK 840D/840Di/810D, Description of Functions ISO Dialects (FBFA) – 11.02 Edition
2-19
Page 20
2 Programming
2.2 G commands
10.02
Table 2-2 The default setting is indicated by
ISO
Dialect T
Dialect M
1)
DescriptionISO
G87 5 Side deep hole drilling G88 6 Side tapping G89 7 Side drilling
G98
1)
Return to starting point for fixed cycles
1
G99 2 Return to point R for fixed cycles
Group 11
G98
1)
1
Return to starting point for drilling cycles
G99 2 Return to point R for drilling cycles
G50
1)
Scaling OFF
1
G51 2 Scaling ON
Group 12
G66 1 G66 1 Modal macro call G67
1)
2 G67
1)
Delete modal macro call
Group 13
G96 1 Constant cutting rate ON G97
1)
Constant cutting rate OFF
2
Group 14
G54 1
G54
1)
Select zero offset
1 G55 2 G55 2 Select zero offset G56 3 G56 3 Select zero offset G57 4 G57 4 Select zero offset G58 5 G58 5 Select zero offset G59 6 G59 6 Select zero offset G54 P{1...48}1 G54 P{1...48}1 Extended zero offsets
G54.1 7 Extended zero offset
G54 P0 1 G54 P0 1 “External ZO extOffset”
Group 15
G61 1 Exact stop modal G62 4 Automatic corner override G63 2 Tapping mode G64
1)
Continuous-path mode
3
Group 16
G17 1 XY plane G18
1)
2
ZX plane
G19 3 YZ plane
2-20
SINUMERIK 840D/840Di/810D, Description of Functions ISO Dialects (FBFA) – 11.02 Edition
Siemens AG, 2002. All rights reserved
Page 21
10.02
2 Programming
2.2 G commands
Table 2-2 The default setting is indicated by
ISO
Dialect T
Group 17
Group 18 (non-modal)
G04 1 G04 1 Dwell time in [s] or spindle revolutions G05 20 G05 18 High–speed cycle cutting G05.1 22 G05.1 20 High speed cycle –> call CYCLE305 G07.1 18 G07.1 16 Cylindrical interpolation
G10 2 G10 3 Write zero offset/tool offset G10.6 19 G10.6 17 Rapid lift ON/OFF (T)
G27 16 G27 13 Referencing check (available soon) G28 3 G28 5 Approach 1st reference point G30 4 G30 6 Approach 1st reference point G30.1 21 G30.1 19 Floating reference position G31 5 G31 7 Measurement with touch-trigger probe G52 6 G52 8 Programmable zero offset G53 17 G53 9 Approach position in machine coordinate system G65 7 G65 10 Call macro G70 8 Finishing cycle G71 9 Stock removal cycle longitudinal axis G72 10 Stock removal cycle transverse axis
G73 11 Repeat contour G74 12 Deep hole drilling and recessing in longitudinal axis
G75 13 Deep hole drilling and recessing in facing axis (X) G76 14 Multiple thread cutting cycle G92 15 G92 11 Preset actual value memory, spindle speed limitation G92.1 23 G92.1 21 Reset actual value, reset WCS
Dialect M
G68 1 Rotation ON 2D 3D G69 2 Rotation OFF
1)
G15 G16 2 Polar coordinates ON
G08 12 Feedforward control ON/OFF G09 2 Exact stop
G11 4 Terminate parameter input
G72.1 14 Contour repetition with rotation G72.2 15 Contour repetition, linear
Polar coordinates OFF
1
Retraction from contour (POLF) (M)
(Z)
1)
DescriptionISO
Siemens AG, 2002. All rights reserved SINUMERIK 840D/840Di/810D, Description of Functions ISO Dialects (FBFA) – 11.02 Edition
2-21
Page 22
2 Programming
2.2 G commands
10.02
Table 2-2 The default setting is indicated by
ISO
Dialect T
Group 20
G50.2 1 Polygon turning OFF G51.2 2 Polygon turning ON
Group 21
G13.1 1 TRANSMIT OFF G12.1 2 TRANSMIT ON
Group 22
Group 25
Group 31
1)
G290 G291 2 G291 2 Select ISO Dialect mode
Dialect M
G50.1 1 Mirroring on programmed axis OFF G51.1 2 Mirroring on programmed axis ON
G13.1 1 Polar coordinates, interpolation G12.1 2 Polar coordinates, interpolation
1 G290
1)
Select Siemens mode
1
1)
DescriptionISO
Table 2-3 G commands are functionally identical in Siemens mode and in ISO Dialect mode
G commands in Siemens mode Corresponding G commands in
Group 1: G00, G01, G02, G03, G33
Group 6: G17, G18, G19 Group 16: G17, G18, G19 Group 2: G17, G18, G19 Group 7: G40, G41, G42 Group 7: G40, G41, G42 Group 7: G40, G41, G42 Group 8: G54 to G554 Group 14: G54 to G59, G54 P1 to P48 Group 10: G60, G64 Group 15: G60, G64 Group 13: G700, G710 Group 6: G20, G21 Group 6: G20, G21 Group 14: G90, G91 Group 3: G90, G91 Group 3: G90, G91 Group 15: G94
G95 G96 G961 G97 G971
Group 1: G00, G01, G02, G03, G33 Group 1: G00, G01, G02, G03, G33
Group 5: G94 Group 2: G97 Group 5: G95 Group 2: G97 Group 5: G95 Group 2: G96 Group 5: G94 Group 2: G96 Group 5: G95 Group 2: G97 Group 5: G94 Group 2: G97
ISO Dialect T
Corresponding G commands in
ISO Dialect M
Group 5: G94 Group 13: G97 Group 5: G95 Group 13: G97 Group 5: G95 Group 13: G96 Group 5: G94 Group 13: G96 Group 5: G95 Group 13: G97 Group 5: G94 Group 13: G97
2-22
SINUMERIK 840D/840Di/810D, Description of Functions ISO Dialects (FBFA) – 11.02 Edition
Siemens AG, 2002. All rights reserved
Page 23
10.02
2 Programming
2.2 G commands
Note
If individual G codes of the groups in Table 2-3 cannot be mapped, the default setting in machine data $MC_EXTERN_GCODE_RESET_VALUES and/or $MC_GCODE_RESET_VALUES is activated.
Example: ISO mode
N5 G00 X100. Y100. N10 G90 ;Activate G90 in ISO mode Group 3
;In Siemens mode Group 14
N15 G290 ;Switch over to Siemens, G90 is active N20 G91 ;Activate G91 in ISO mode Group 3
;In Siemens mode Group 14
N25 G291 ;Switch over to ISO mode N30 G291 ;G91 is active
2.2.1 G code display
In the G code display, the G codes for the currently active language are displayed. G290/G291 also causes the G code display to switch over.
Example:
The Siemens standard cycles are called up using some of the ISO Dialect mode G functions (e.g. G28). DISPLOF is programmed at the start of the cycle, with the result that the ISO Dialect G commands remain active for the display.
PROC CYCLE328 SAVE DISPLOF N10 ... ... N99 RET
Sequence:
S External main program calls Siemens shell cycle.
Siemens mode is selected implicitly on the shell cycle call.
S DISPLOF freezes the block display at the call block;
the G code display remains in external mode. This display is refreshed while the Siemens cycle is running.
2.2.2 Display of non–modal G codes
As of SW 6.4 the external non–modal G codes (group 18) will no longer be reset on block change if these G codes call up subprograms. The G codes remain visible on the display until the next jump out of this subprogram.
Switching to external language mode in the subprogram and programming another G code from group 18 overwrites the previous value and the new value is retained until the return jump.
Example:
Siemens AG, 2002. All rights reserved SINUMERIK 840D/840Di/810D, Description of Functions ISO Dialects (FBFA) – 11.02 Edition
2-23
Page 24
2 Programming
2.2 G commands
Main program Display group 18
N05 G00 X0 Y0 empty N08 G27 X10 –> calls Cycle328 empty N09 M0 empty N40 M30 empty
Subprogram Cycle328
N100 G290 G27 N102 X=$C_X G27 N103 M0 G27 N104 G291 G27 N105 G30 X10 Y12 Z13 G30 N120 M99 G30
2.2.3 G code output to PLC (as from SW 6.4)
The behavior of G group transfer to PLC is described in machine data $MC_GCODE_GROUPS_TO_PLC_MODE.
The previous behavior was for the G group to be the array index of a 64 byte field (DBB 208 – DBB 271). That way, up to the 64th G group can be reached. Only the G groups of the standard or external language can be displayed.
The new behavior is for the data storage in the PLC to be up to 8 bytes (DBB 208 – DBB 215), i.e. up to 8 G groups can be output.
This method has the array index of machine data $MC_GCODE_GROUPS_TO_PLC[ ] or $MC_EXTERN_GCODE_GROUPS_TO_PLC[ ] equal to the array index of the data storage in the PLC (DBB 208 – DBB215). The G code group from MD $MC_GCODE_GROUPS_TO_PLC[ ] is output in DBB 208.
The advantage is that Siemens mode and ISO mode G codes can be output simultaneously.
Because only the G code of one language can be output in a DBB2xx, each index (0 –7) can only be set on one of the two machine data, and the value 0 must be entered in the other MD. Errors are signaled with Alarm 4045.
10.02
Display group 18
Example
2-24
$MC_GCODE_GROUPS_TO_PLC[0]=3 $MC_GCODE_GROUPS_TO_PLC[1]=0 $MC_GCODE_GROUPS_TO_PLC[2]=0 $MC_GCODE_GROUPS_TO_PLC[3]=0 $MC_GCODE_GROUPS_TO_PLC[4]=1 $MC_GCODE_GROUPS_TO_PLC[5]=2 $MC_GCODE_GROUPS_TO_PLC[6]=0 $MC_GCODE_GROUPS_TO_PLC[7]=0
$MC_EXTERN_GCODE_GROUPS_TO_PLC[0]=0 $MC_EXTERN_GCODE_GROUPS_TO_PLC[1]=3 $MC_EXTERN_GCODE_GROUPS_TO_PLC[2]=18 $MC_EXTERN_GCODE_GROUPS_TO_PLC[3]=1 $MC_EXTERN_GCODE_GROUPS_TO_PLC[4]=0 $MC_EXTERN_GCODE_GROUPS_TO_PLC[5]=0 $MC_EXTERN_GCODE_GROUPS_TO_PLC[6]=6 $MC_EXTERN_GCODE_GROUPS_TO_PLC[7]=31
The following G codes are then available on the PLC
SINUMERIK 840D/840Di/810D, Description of Functions ISO Dialects (FBFA) – 11.02 Edition
Siemens AG, 2002. All rights reserved
Page 25
10.02
2 Programming
2.2 G commands
DBB 208 = group 03 Siemens DBB 209 = group 03 ISO dialect DBB 210 = group 18 ISO dialect DBB 211 = group 01 ISO dialect DBB 212 = group 01 Siemens DBB 213 = group 02 Siemens DBB 214 = group 06 ISO dialect DBB 215 = group 31 ISO dialect
Example of faulty configuration:
$MC_GCODE_GROUPS_TO_PLC[0]=3 $MC_GCODE_GROUPS_TO_PLC[1]=0 $MC_GCODE_GROUPS_TO_PLC[2]=0
$MC_EXTERN_GCODE_GROUPS_TO_PLC[0]=3 –>
Alarm 4045, channel K1 conflict between machine data {S$MC_GCODE_GROUPS_TO_PLC} and machine data
{S$MC_EXTERN_GCODE_GROUPS_TO_PLC} $MC_EXTERN_GCODE_GROUPS_TO_PLC[1]=0 $MC_EXTERN_GCODE_GROUPS_TO_PLC[2]=18
The method enables simultaneous display of G codes of standard mode and ISO dialect mode.
Siemens AG, 2002. All rights reserved SINUMERIK 840D/840Di/810D, Description of Functions ISO Dialects (FBFA) – 11.02 Edition
2-25
Page 26
2 Programming
2.2 G commands
2.2.4 Zero offset
10.02
The zero offsets (ZO) of Siemens mode are shown in Fig. 2-1.
Progr . frame G52 ZO $P_BFRAME G51 scale
Settable frame G54 – G59 ZO $P_UIFR G54 P1..100 ZO
Channel-specific base frame
$P_CHBFRAME[3] G68 3DRot
$P_CHBFRAME[2] G68 2DRot/3DRot
$P_CHBFRAME[1] Mirroring on progr. axis
$P_CHBFRAME[0] G92 Preset actual value memory $P_CHBFRAME[0] ZO extOffset
Fig. 2-1 Instantaneous mapping of the ISO functions onto the Siemens frames
The zero offsets that are available in ISO mode are mapped onto the existing Siemens frames. No separate frames exist for ISO mode. Active zero offsets are incorporated in both language modes. Changes in ISO mode have an immediate effect in Siemens mode and vice–versa.
Zero offsets exist in both ISO Dialect T and ISO Dialect M:
S G52 is a programmable, additive ZO that remains active until the end of the
program or a reset
S G54 to G59 are settable zero offsets
2-26
S G54 P1...P100 are additional settable zero offsets S G54 P0 is an “external ZO” extOffset
SINUMERIK 840D/840Di/810D, Description of Functions ISO Dialects (FBFA) – 11.02 Edition
Siemens AG, 2002. All rights reserved
Page 27
10.02
2 Programming
2.2 G commands
G54.1
G54.1 Pxx is provided as an alternative notation to G54 Pxx. The functionality is identical. With G54.1 the P address must always be programmed in the block. If P is not programmed, alarm 12080 (syntax error) is produced.
2.2.5 Writing a zero offset with G10
G10 can be used from the parts program to write the zero offsets. G10 L2 P1...P6 X.. Y.. ; G54.. G59
G10 L20 P1...P100 ; Additional, settable ZO G10 L2 P0 External ZO extOffset
These zero offsets are mapped onto the same frames as the zero offsets that already exist in ISO Dialect M.
The G10 command is extended for ISO dialect T : Writing of system data
G10 Pxx X Y Z ;writing of tool offset data Depending on machine data $MC_EXTERN_FUNCTION_MASK, bit1, G10
Pxx is used to write either tool geometry or tool wear. $MC_EXTERN_FUNCTION_MASK, bit1 = 0:
P > 100 write geometry values P < 100 write wear values
$MC_EXTERN_FUNCTION_MASK, bit 1=1:
P > 10000 write geometry values P < 10000 write wear values
2.2.6 Decimal point programming
There are two notations for the interpretation of programming values without a decimal point in ISO Dialect mode:
S Pocket calculator type notation
Values without decimal points are interpreted as mm, inch or degrees.
S Standard notation
Values without decimal points are multiplied by a conversion factor. The setting is defined by MD 10884, see Chapter 4 “Startup”. There are two different conversion factors, IS-B and IS-C. This evaluation refers
to addresses X Y Z U V W A B C I J K Q R and F.
Example of linear axis in mm: X 100.5 corresponds to value with decimal point: 100.5mm X 1000 pocket calculator type notation: 1000mm standard notation: IS-B: 1000* 0.001= 1mm
IS-C: 1000* 0.0001 = 0.1mm
Siemens AG, 2002. All rights reserved SINUMERIK 840D/840Di/810D, Description of Functions ISO Dialects (FBFA) – 11.02 Edition
2-27
Page 28
2 Programming
2.2 G commands
ISO dialect Milling
10.02
Table 2-4 Different conversion factors for IS-B and IS-C
Address
Linear axis mm
Rotary axis deg 0.001 0.0001 F feed G94 (mm/inch per min.) mm
F feed G95 (mm/inch per min.) mm
F thread pitch mm
C chamfer mm
R radius, G10 toolcorr mm
Q mm
I, J, K interpolation parameters mm
G04 X or U S 0.001 0.001 A contour angle deg 0.001 0.0001 G74, G84 thread drilling cycles
$MC_EXTERN_FUNCTION_MASK Bit8 = 0 F feedrate like G94, G95 Bit8 = 1 F thread pitch
Unit IS-B IS-C
inch
inch
inch
inch
inch
inch
inch
inch
0.001
0.0001
1
0.01
0.01
0.0001
0.01
0.0001
0.001
0.0001
0.001
0.0001
0.001
0.0001
0.001
0.0001
0.0001
0.00001
1
0.01
0.01
0.0001
0.01
0.0001
0.0001
0.00001
0.0001
0.00001
0.0001
0.00001
0.0001
0.00001
ISO dialect Turning
Table 2-5 Different conversion factors for IS-B and IS-C
Address Unit IS-B IS-C
Linear axis mm
inch Rotary axis deg 0.001 0.0001 F feed G94 (mm/inch per min.) mm
inch F feed G95 (mm/inch per rev)
$MC_EXTERN_FUNCTION_MASK Bit8 = 0 mm
inch Bit8 = 1 mm
inch F thread pitch mm
inch C chamfer mm
inch R radius, G10 toolcorr mm
inch
0.001
0.0001
1
0.01
0.01
0.0001
0.0001
0.000001
0.0001
0.000001
0.001
0.0001
0.001
0.0001
0.0001
0.00001
1
0.01
0.01
0.0001
0.0001
0.000001
0.0001
0.000001
0.0001
0.00001
0.0001
0.00001
2-28
SINUMERIK 840D/840Di/810D, Description of Functions ISO Dialects (FBFA) – 11.02 Edition
Siemens AG, 2002. All rights reserved
Page 29
10.02
Table 2-5 Different conversion factors for IS-B and IS-C
Address IS-CIS-BUnit
I, J, K interpolation parameters mm
G04 X or U 0.001 0.001 A contour angle 0.001 0.0001 G76, G78 thread drilling cycles
$MC_EXTERN_FUNCTION_MASK Bit8 = 0 F feedrate like G94, G95 Bit8 = 1 F thread pitch
G84, G88 thread drilling cycles $MC_EXTERN_FUNCTION_MASK
Bit9 = 0 G95 F mm
Bit8 = 1 G95 F mm
2.2.7 Dwell time in spindle revolutions G04
inch
inch
inch
2 Programming
2.2 G commands
0.001
0.0001
0.01
0.0001
0.0001
0.000001
0.0001
0.00001
0.01
0.0001
0.0001
0.000001
MD $MC_EXTERN_FUNCTION_MASK, bit 2 defines how the programmed dwell time will be interpreted in a G04 block. The hold time can be programmed using G04 X U or P.
Bit 2 = 0: Dwell time is always interpreted in [s]. Bit 2 = 1: If G95 is active, dwell time is interpreted in spindle
revolutions.
In the case of standard notation, X and U values without a decimal point are converted into internal units depending on IS-B or IS-C. P is always interpreted in internal units.
Example: N5 G95 G04 X1000 Standard notation 1000 * 0.001 = 1 spindle revolution
pocket calculator notation: 1000 spindle revolutions
2.2.8 Scaling and mirroring: G51, G51.1 (ISO Dialect M)
G51 selects scaling and mirroring, G51.1. There are two scaling modes:
S Axial scaling with parameters I, J, K
If I, J, K is not programmed in the G51 block, the default value from the setting data is effective. Negative axial scaling factors have the additional effect of mirroring.
S Scaling in all axes with scale factor P
If P is not programmed in the G51 block, the default value from the setting data is effective. Negative P values are not possible. The scale factors are multiplied by either 0.001 or 0.00001.
Siemens AG, 2002. All rights reserved SINUMERIK 840D/840Di/810D, Description of Functions ISO Dialects (FBFA) – 11.02 Edition
2-29
Page 30
2 Programming
2.2 G commands
10.02
Note
If a factor other than “1” is programmed for parameters I, J, K or if the address is missing (default value is active for I, J, K), the contour is also scaled.
Example
00512 (parts program) N10 G17 G90 G00 X0 Y0 Approach start position N30 G90 G01 G94 F6000 N32 M98 P0513 1) Contour programmed as in the
subprogam
N34 G51 X0. Y0. I-1000 J1000 2) Mirror contour around X N36 M98 P0513 N38 G51 X0. Y0. I-1000 J-1000 3) Mirror contour around X and Y N40 M98 P0513 N42 G51 X0. Y0. I1000 J-1000 4) Mirror contour around Y N44 M98 P0513 N46 G50 Deselect scaling and mirroring N50 G00 X0 Y0 N60 M30
00513 (subprogram) N10 G90 X10. Y10. N20 X50 N30 Y50 N40 X10. Y10. N50 M99
50
10
0
–10
2)
Starting point
3)
1)
4)
2-30
–50
–50 –10
Fig. 2-2 Scaling and mirroring
System parameter settings for the scaling and mirroring example: MD 22910 $MC_WEIGHTING_FACTOR_FOR_SCALE = 0
MD 22914 $MC_AXES_SCALE_ENABLE = 1 MD 10884 $MN_EXTERN_FLOATINGPOINT_PROG = 0 MD 10886 $MN_EXTERN_INCREMENT_SYSTEM = 0
Axial scaling is not possible when MD $MC_AXES_SCALE_ENABLE = 0.
SINUMERIK 840D/840Di/810D, Description of Functions ISO Dialects (FBFA) – 11.02 Edition
0
10
Siemens AG, 2002. All rights reserved
50
Page 31
10.02
2 Programming
2.2 G commands
The reference point during scaling is always the workpiece zero; it is not possible to program a reference point.
Mirroring
G51.1 selects mirroring. Mirroring is performed around a mirror axis that runs parallel to X, Y or Z and whose position is programmed with X, Y or Z. G51.1 X0 is used to mirror about the X axis and G51.1 X10 is used to mirror about an axis that runs parallel to the X axis at a distance of 10mm.
All axes in the channel and not just the geometry axes can be mirrored. G51.1 functions additively, i.e. following N5 G51.1 X10 and N10 G51.1 Y10, mirroring in X and V is active.
Example G51.1 X80.
Mirroring is performed around a mirror axis that runs parallel to Y and that crosses the X axis at position 80.
Y
Mirrored
Original
G51.1 X80
60
Fig. 2-3 Mirroring around a mirror axis parallel to Y
80
100
X
If the standard notation is active (see Subsection 2.2.6), the axis positions without a decimal point are interpreted in internal units.
Mirroring is deselected with G50.1 X0 Y0. It can also be deselected for individual axes. Following G50.1 X0, mirroring is only deselected for the X axis; mirroring around all other axes remains active.
G51.1 and G50.1 must be in a block of their own. G51.1 is mapped onto channel–specific base frame [1]. For this purpose, MD 28081 $MC_MM_NUM_BASE_FRAMES >=2 must be set. When base frame[1] is changed in Siemens mode, it directly affects the function in ISO mode. If the frame is deleted in every frame component, this corresponds to a G50.1 X0 Y0.. in all axes.
G51.1 is deselected on a Reset.
Siemens AG, 2002. All rights reserved SINUMERIK 840D/840Di/810D, Description of Functions ISO Dialects (FBFA) – 11.02 Edition
2-31
Page 32
2 Programming
2.2 G commands
2.2.9 2D/3D rotation G68 / G69 (ISO Dialect M)
10.02
2D rotation
Programming
The coordinate system is rotated about the vertical axis of the selected plane.
G68 X.. Y.. R.. X.. Y..: Coordinates of the pivot point related to the current
workpiece zero. If a coordinate is not programmed, the
pivot point is taken from the actual value memory. The value is always interpreted as an absolute value. R: The angle of rotation is interpreted as an absolute or
incremental value depending on G90/G91. If an angle is not
programmed, the angle from setting data
$SA_DEFAULT_ROT_FACTOR_R is active.
G68 must be in a block of its own. G69 Rotation Off; Additional codes can be programmed
in this block. G68 is mapped onto channel–specific base frame 2. For this purpose, machine
data $MC_MM_NUM_BASE_FRAMES >= 3 must be set. A programmed angle R is not entered in setting data
$SA_DEFAULT_ROT_FACTOR_R. This setting data can only be written manually and is effective provided that no R has been programmed in the G68 block.
3D rotation
Programming
G code G68 has been expanded for 3D rotation.
G68 X.. Y.. Z.. I.. J.. K.. R..
X.. Y.. Z..: Coordinates of the pivot point related to the current
workpiece zero. If a coordinate is not programmed the pivot point is at the workpiece zero. The value is always interpreted as anabsolute value. The coordinates of the pivot point act likea zero offset. A G90/91 in the block hasno effect on the G68 command.
I.. J.. K..: Vector in the pivot point. The coordinate system is rotated
about this vector by the angle R.
R: Angle of rotation, always interpreted as an absolute value.
If an angleis not programmed, the angle from setting data 42150 $SA_DEFAULT_ROT_FACTOR_R is active.
G68 must be in a block of its own.
The distinction between 2D and 3D rotation is determined solely by programming the vector I, J, K. If no vector exists in the block, G68 2DRot is selected. If a vector exists in the block, G68 3DRot is selected.
If a vector of length 0 (I0, Y0, K0) is programmed, the alarm 12560 “Programmed value lies outside the permissible limits” is output.
2-32
SINUMERIK 840D/840Di/810D, Description of Functions ISO Dialects (FBFA) – 11.02 Edition
Siemens AG, 2002. All rights reserved
Page 33
10.02
With G68, two rotations can be connected in series. If a G68 is not already active in a block containing G68, the rotation is written into channel-specific base frame 2. If G68 is already active, the rotation is written in channel-specific base frame 3. This means that both rotations are activated in sequence.
With G69, 3D rotation is terminated. If two rotations are active, they are both deactivated with G69. G69 does not have to be in a block of its own.
2.2.10 Polar coordinates: G15 (ISO Dialect M)
In ISO Dialect mode, NC program sections programmed with polar coordinates must commence with start command G16. Until the end command G15 is reached, the coordinates of the end points are interpreted as the polar coordinate values for radius and angle in the current plane.
The first axis of the plane is the polar radius, the second axis is the polar angle, i.e. X is the radius and Y is the angle for G17.
After G16 a new pole is set in each block up to G15, with the result as follows for G17:
S G90 X The pole is at the workpiece zero
2 Programming
2.2 G commands
Programmed angle
S G91 X The pole is at the current position S No X in the block The pole is at the workpiece zero
If the pole is moved from the current position to the workpiece zero, the radius is calculated as the distance from the current position to the workpiece zero.
Example:
N5 G17 G90 X0 Y0 N10 G16 X100. Y45. Polar coordinates ON, pole is the workpiece zero,
Position X 70,711 Y 70,711 in the Cartesian coordinate system
N15 G91 X100 G90 Y0 Pole is the current position, position X 170,711
Y 70,711
N20 Y90. No X in block, pole is at workpiece zero,
Radius = SORT(X*X +Y*Y) = 184,776
The polar radius is always traversed as an absolute distance; the polar angle can be interpreted as an absolute or incremental value.
In the case of active polar coordinate programming, the programmed angle can be read via the system variable $P_AP. This variable is inserted in the shell cycle. Before the new pole is set, with incremental programming, the angle must be stored because the angle will be deleted.
Polar programming is terminated by G15. The polar radius is set to 0.
Siemens AG, 2002. All rights reserved SINUMERIK 840D/840Di/810D, Description of Functions ISO Dialects (FBFA) – 11.02 Edition
2-33
Page 34
2 Programming
2.2 G commands
2.2.11 Polar coordinate interpolation G12.1 / G13.1 (G112/G113)
G12.1 and G13.1 are used to switch on and switch off an interpolation in the processing level between an axis of rotation and a linear axis. A second linear axis passes vertically through this plane. This function corresponds to the Transmit function in Siemens mode. In Siemens mode, two Transmit transformations can be parameterized. For G12.1 the first TRANSMIT data block is always the one which must correspond to the second transformation record. For a detailed description of the TRANSMIT function please refer to the following documentation:
/FB2/ SINUMERIK 840D/810D(CCU2)
Description of Functions, Extended Functions, chapter M1 and
/PGA/ SINUMERIK 840D/810D
Programming Guide, Advanced, chapter “Transformations”
Example:
10.02
N204
N205
N206
Fig. 2-4 Example of polar coordinate interpolation
N203
N208
N207
Rotary axis C
N201
N202
N200
X axis
Z axis
2-34
SINUMERIK 840D/840Di/810D, Description of Functions ISO Dialects (FBFA) – 11.02 Edition
Siemens AG, 2002. All rights reserved
Page 35
10.02
2 Programming
2.2 G commands
O0001 N010 T0101 N0100 G90 G00 X60.0 C0 Z.. N0200 G12.1 ;TRANSMIT selection N0201 G42 G01 X20.0 F1000 N0202 C10.0 ; N0203 G03 X10.0 C20.0 R10.0 N0204 G01 X–20.0 N0205 C–10.0 N0206 G03 X–10.0 C–20.0 I10.0 J0 N0207 G01 X20.0 N0208 C0 N0209 G40 X60.0 N0210 G13.1 ;TRANSMIT deselection N0300 Z . . N0400 X.. C.. N0900 M30
Note
Geo axis exchange (parallel axes with G17 (g18, G19)) must not be active.
2.2.12 Cylindrical interpolation G07.1 (G107)
Function G07.1 (cylindrical interpolation) can be used to mill any kind of grooving on cylindrical bodies. The path of the grooving is programmed by reference to the developed, level surface of the cylinder barrel. Cylindrical interpolation is started in function G07.1 by specifying the cylindrical radius G07.1 C<cylindrical radius> and ended with G07.1 C0 (radius = 0).
The function is mapped internally onto the Siemens functionality TRACYL. In ISO Dialect mode, G07.1 always activates the first TRACYL transformation and the first transformation record. The second TRACYL function cannot be activated in ISO Dialect mode. For a detailed description and the parameter setting for the first TRACYL function, please refer to the following documentation:
/FB2/ SINUMERIK 840D/810D(CCU2)
Description of Functions, Extended Functions, chapter M1 and
/PGA/ SINUMERIK 840D/810D
Programming Guide, Advanced, chapter “Transformations”
Restrictions:
In Siemens mode the axis of rotation for cylindrical interpolation must be defined in machine data. In ISO Dialect mode the axis of rotation for cylindrical interpolation is
defined by programming G07.1 <axis of rotation>... .
Siemens AG, 2002. All rights reserved SINUMERIK 840D/840Di/810D, Description of Functions ISO Dialects (FBFA) – 11.02 Edition
2-35
Page 36
2 Programming
2.2 G commands
Example:
Z
mm
N05
120
90 70
50
N10
N20
N30
10.02
C
Radius
Z
N80
N70
N60
N40
N50
Degr.
0
30
60 70
Fig. 2-5 Example of cylindrical interpolation G07.1
150
230190
270
360
Programming example in ISO Dialect mode:
%0001 N05 G00 G90 Z100.0 C0 N10 G01 G91 G18 Z0 C0 N20 G07.1 C57299 ;Select cylindrical interpolation with radius
; 57.299mm
N30 G90 G01 G42 Z120.0 D01 F250 N40 C30.0 N50 G02 Z90.0 C60.0 R30.0 N60 G01 Z70.0 N70 G03 Z60.0 C70.0 R10.0 N80 G01 C150.0 N90 G03 Z70.0 C190.0 R75.0 N100 G01 Z110.0 C230.0 N110 G02 Z120.0 C270.0 R75.0 N120 G01 C360.0 N130 G40 Z100.0 N140 G07.1 C0 ;Deselect cylindrical interpolation N150 M30 ;
2-36
SINUMERIK 840D/840Di/810D, Description of Functions ISO Dialects (FBFA) – 11.02 Edition
Siemens AG, 2002. All rights reserved
Page 37
10.02
2 Programming
2.2 G commands
Programming example in Siemens mode: The Y axis is assigned to the axis of rotation as a linear axis.
%0001 N05 G00 G90 Z100 C0 N10 G01 G91 G18 Z0 C0; N20 TRACYL(114.598) ;Select cylindrical interpolation with
; radius 57.299mm
N30 G90 G01 G42 Z120 D01 F250 N40 Y30 N50 G02 Z90 Y60 RND=30 N60 G01 Z70 N70 G03 Z60.0 Y70 RND=10 N80 G01 Y150 N90 G03 Z70 Y190 RND=75 N100 G01 Z110 Y230 N110 G02 Z120 Y270 RND=75 N120 G01 Y360 N130 G40 Z100 N140 TRAFOOF ;Deselect cylindrical interpolation N150 M30 ;
2.2.13 Interrupt program with M96 / M97 (ASUB)
M96
A subprogram can be defined as an interrupt routine with M96 P <program number>.
This program is started by an external signal. The first high–speed NC input of the 8 inputs available in Siemens mode is always used to start the interrupt routine. Machine data $MN_EXTERN_INTERRUPT_NUM_ASUP lets you select an other fast input (1 – 8).
The function is mapped onto standard syntax: SETINT(1) <program name> [PRIO=1].
In shell cycle CYCLE396, the interrupt program programmed with Pxxxx is called in ISO mode. The program number is in $C_PI. At the end of the shell cycle, machine data $MN_EXTERN_INTERRUPT_BITS_M96 BIT1 is evaluated, resulting either in positioning at the interruption point with REPOSA or in continuation with the next block. The new cycle variable $C_PI contains the value programmed with “P” without leading zeroes. These must be added to fill out to four digits in the shell cycle before the subprogram is called.
Example: N0020 M96 P5
Call in shell cycle
progName = “000” << $C_PI
ISOCALLprogName See treatment of 8–digit program numbers, if MD
$MC_EXTERN_FUNCTION_MASK, bit6 is set.
M97
Siemens AG, 2002. All rights reserved SINUMERIK 840D/840Di/810D, Description of Functions ISO Dialects (FBFA) – 11.02 Edition
M97 is used to suppress starting of the interrupt routine. The interrupt routine can then only be started by the external signal following activation with M96.
2-37
Page 38
2 Programming
2.2 G commands
10.02
This corresponds to Standard syntax: ENABLE(1).
x = content of $MN_EXTERN_INTERRUPT_NUM_ASUP
If the interrupt program programmed with M96 Pxx is called up directly with the interrupt signal (without the intermediate step with CYCLE396), machine data $MC_EXTERN_FUNCTION_MASK BIT10 must be set. The subprogram programmed with Pxx is then called on a 0 –> 1 signal transition in Siemens mode.
The M function numbers for the interrupt function are set via machine data. With machine data 10804: $MN_EXTERN_M_NO_SET_INT, the M number is used to activate an interrupt routine and with MD 10806: $MN_EXTERN_M_NO_DISABLE_INT the M number is used to suppress an interrupt routine.
Only non-standard M functions are permitted to be set. M functions M96 and M97 are set as defaults. To activate the function, bit 0 must be set in machine data 10808: $MN_EXTERN_INTERRUPT_BITS_M96. These M functions will not be output to the PLC in this case. If bit 0 is not set, the M functions will be interpreted as conventional auxiliary functions.
On completion of the “Interrupt” program, the end position of the parts program block that follows the interruption block is approached. If processing of the parts program has to continue starting from the interruption point, there must be a REPOS instruction at the end of the “Interrupt” program, e.g. REPOSA. For this purpose the interrupt program must be written in Siemens mode.
The M functions for activating and deactivating an interrupt program must be in a block of their own. If further addresses other than “M” and “P” are programmed in the block, alarm 12080 (syntax error) is output.
Note about machining cycles
Machine data MD $MN_EXTERN_INTERRUPT_BITS_M96:
For ISO dialect original, you can set whether a machining cycle will be interrupted by an interrupt routine immediately or not until the end. The shell cycles must evaluate machine data $MN_INTERRUPT_BITS_M96 bit 3 for that purpose. If bit=1, the interrupt must be disabled at the beginning of the cycle with DISABLE(1) and reactivated at the end of the cycle with ENABLE(1) to avoid interrupting the machining cycle. Because the interrupt program is only started on a 0/1 signal transition, the interrupt input must be monitored with a disabled interrupt during the cycle runtime with a synchronized action in the shell cycle. If the interrupt signal switches from 0 to 1, the interrupt signal after the ENABLE(1) must be set once again at the end of the shell cycle, so that the interrupt program will then start. To permit writing to the interrupt input in the shell cycle, the machine data $MN_FASTO_DIG_SHORT_CIRCUIT[1] must be parameterized.
Bit 0: = 0: Interrupt program is not possible, M96/M97 are conventional
M functions
= 1: Activation of an interrupt program with M96/M97 permitted
2-38
SINUMERIK 840D/840Di/810D, Description of Functions ISO Dialects (FBFA) – 11.02 Edition
Siemens AG, 2002. All rights reserved
Page 39
10.02
2 Programming
2.2 G commands
Bit 1: = 0: Execution of parts program continues from the final position
of the next block after the interruption block
= 1: Continue parts program as from interruption position
(evaluated in interrupt program (ASUB), return with/without REPOSL)
Bit 2: = 0: The interrupt signal interrupts the current block immediately and
starts the interrupt routine
= 1: The interrupt routine is not started until the block has been
completed.
Bit 3: = 0: The machining cycle is interrupted on an interrupt signal
= 1: The interrupt program is not started until the machining cycle
has been completed.
(evaluated in the shell cycles)
Bit 3 must be evaluated in the shell cycles and the cycle sequence must be adapted accordingly.
Bit 1 must be evaluated in the interrupt program. If bit 1 = TRUE, on completion of the program, REPOSL must be used to reposition at the interruption point.
Example:
N1000 M96 P1234 ;Activate ASUB 1234.spf in the case of a rising
; edge on the first high-speed input, program 1234.spf ; is activated
“ “ N3000 M97 ;Deactivate the ASUB
Rapid lifting (LIFTFAST) is not performed before the interrupt program is called. On the rising flank of the interrupt signal, depending on machine data $MN_EXTERN_INTERRUPT_BITS_M96, the interrupt program is started immediately.
Limitations in Siemens mode
Limitations in ISO Dialect mode
2.2.14 Comments
The interrupt routine is handled like a conventional subprogram. This means that in order to execute the interrupt routine, at least one subprogram level must be free. (12 program levels are available in Siemens mode, there are 5 in ISO Dialect mode).
The interrupt routine is only started on a signal transition of the interrupt signal from 0 to 1. If the interrupt signal remains permanently set to 1, the interrupt routine will not be restarted.
One program level is reserved for the interrupt routine so that all permissible program levels can be reserved before the interrupt program is called.
Depending on the machine data, the interrupt program will also be started when the signal is permanently on.
Parentheses are interpreted as comment characters in ISO Dialect mode. In Siemens mode, “;” is interpreted as a comment. As a simplification, “;” is also interpreted as a comment in ISO Dialect mode.
Siemens AG, 2002. All rights reserved SINUMERIK 840D/840Di/810D, Description of Functions ISO Dialects (FBFA) – 11.02 Edition
2-39
Page 40
2 Programming
2.2 G commands
2.2.15 Block skip
10.02
The skip character “/” can be anywhere within the block, even in the middle. If the programmed skip level is active at the moment of compiling, the block will not be compiled from this position to the end of the block. An active skip level therefore has the same effect as an end of block.
Example: N5 G00 X100. /3 YY100 ––> Alarm 12080,
N5 G00 X100. /3 YY100 ––> No alarm when skip level 3 is active Skip characters within a comment are not interpreted as skip characters. Example: N5 G00 X100. ( /3 part1 ) Y100 ;even when skip level 3 is active, the
;Y axis will be traversed
The skip level can be /1 to /9. Skip values <1 >9 give rise to alarm 14060 The function is mapped onto the existing Siemens skip levels. In contrast to ISO Dialect Original, / and /1 are separate skip levels and therefore have to be activated separately.
2-40
SINUMERIK 840D/840Di/810D, Description of Functions ISO Dialects (FBFA) – 11.02 Edition
Siemens AG, 2002. All rights reserved
Page 41
10.02
2.2.16 Auxiliary function output
2 Programming
2.2 G commands
M
Spindle axis changeover using M29
H
ISO Dialect mode
M functions are output to the PLC as auxiliary functions. Only M98 and M99 are exceptions. All other predefined M functions are transferred to the PLC as auxiliary functions. The following are predefined M functions: M17, M40, M41, M42, M43, M44, M45, M70, M96, M97, M98, M99.
In ISO Dialect mode the spindle is switched to axis operation with the aid of M29. The M function number can also be set variably with machine data. MD 20095 $MC_EXTERN_RIGID_TAPPING_M_NR is used to preset the M function number. The machine data is only effective in external language mode and is initialized with M29. It may only be assigned M function numbers which are not used as default M functions. M function numbers M0-M5, M30, M98, M99 are not allowed. The same function is executed in Siemens mode with M70. MD 20094 $MC_SPIND_RIGID_TAPPING_M_NR is used to preset the M function number. The machine data is only effective in Siemens mode and is initialized with M70. This allows an M function other than M70 to be used for the spindle switchover in Siemens mode. The machine data may only be assigned M function numbers which are not used as default M functions. The following are not allowed: M0–M5, M17, M19, M30, M40–M45.
All H functions are output to the PLC as auxiliary functions with ISO Dialect M. In ISO Dialect T, G code system A, H is the incremental distance of the 4th axis provided that a 4th axis exists.
T
D
B
T functions are output to the PLC as auxiliary functions. T has the additional meaning of a tool selection.
Die The D function is output to the PLC as an auxiliary function. With ISO Dialect M, tool length compensation is activated with address D.
If B is not an axis, the B function is output to the PLC as an auxiliary function with address extension H1=. Example: B1234 is output as H1=1234.
Siemens AG, 2002. All rights reserved SINUMERIK 840D/840Di/810D, Description of Functions ISO Dialects (FBFA) – 11.02 Edition
2-41
Page 42
2 Programming
2.2 G commands
2.2.17 Align first reference point G28
CYCLE328 is called up automatically when ISO Dialect command “G28 <Axis>” is read in. <Axis> specifies the intermediate position (incremental or absolute) via which the reference point is to be approached. The intermediate position and the reference position are then approached in positioning mode.
The cycle is only valid for the axes supported by ISO Dialect:
S ISO Dialect M: X, Y, Z (A, B, C, U, V, W) S ISO Dialect T: X, Z, Y (C)
The cycle always runs with radius programming (DIAMOF). When the cycle is terminated, the G commands that were active before the cycle was called are effective again.
Before the 1st reference point is approached, various machine data must be set, see Chapter 4 “Start-Up”.
2.2.18 Enable/disable feed–forward control using G08 P..
10.02
Feed-forward control reduces speed-related overtravel during contouring to virtually nil. Traversing with feed-forward control enables higher contouring precision and thus better finished results.
Note
Machine data is used to define the type of feed-forward control and which path axes are to be traversed under pilot actuation. Default: Speed-dependent feed–forward control. Option: Acceleration-dependent feed–forward control.
Example: N0010 G08 P1 ; Enable feed-forward control
N0020 G1 X10 Y50 F900 N0030 G1 X10 Y50 F900 N1000 G08 P0 ; Disable feed-forward control
If G08 is programmed without “P”, alarm 12470 is produced. To make it more convenient to use G08 P1 to activate other functions such as
SOFT, BRISK etc., G08 P.. is used to call the CYCLE308.spf cycle. G08 P1 has to be in a block of its own.
2-42
SINUMERIK 840D/840Di/810D, Description of Functions ISO Dialects (FBFA) – 11.02 Edition
Siemens AG, 2002. All rights reserved
Page 43
10.02
2.2.19 Compressor in ISO dialect mode
The commands COMPON, COMPCURV, COMPCAD are commands in the Siemens language and activate a compressor function grouping several linear blocks to form one machining section. It is now possible to compress linear blocks, too, in ISO dialect mode with this function, if this function is activated in Siemens mode. The blocks must consist of only the following commands:
S Block number S G01, modal or in the block S Axis assignments S Feedrate S Comments
If a block contains other commands (e.g. aux. functions, other G codes, etc.), compression is not performed. Value assignments with $x for G, axes, and feedrate are possible, as is the Skip function.
Example: These blocks are compressed
N5 G290 N10 COMPON N15 G291 N20 G01 X100. Y100. F1000 N25 X100 Y100 F$3 N30 X$3 /1 Y100 N35 X100 (axis 1)
These blocks are not compressed
N5 G290 N10 COMPON N20 G291 N25 G01 X100 G17 ;G17 N30 X100 M22 ;aux. function in the block N35 X100 S200 ;spindle speed in the block
2 Programming
2.2 G commands
Siemens AG, 2002. All rights reserved SINUMERIK 840D/840Di/810D, Description of Functions ISO Dialects (FBFA) – 11.02 Edition
2-43
Page 44
2 Programming
2.2 G commands
2.2.20 Automatic corner override G62
At inside corners with active tool radius compensation it is often better to reduce the feedrate.
G62 only acts at inside corners with active tool radius compensation and active continuous–path operation. It only takes account of corners whose inside angle is smaller than $SC_CORNER_SLOWDOWN_CRIT. The inside angle is determined from the bend in the contour.
The feedrate is reduced by factor $SC_CORNER_SLOWDOWN_OVR: traveled feedrate = F * $SC_CORNER_SLOWDOWN_OVR * feedrate override. The feedrate override is now composed of the multiplied feedrate override from the machine control panel and the override from synchronized actions.
The feedrate reduction is started at distance $SC_CORNER_SLOWDOWN_START before the corner. It ends at distance $SC_CORNER_SLOWDOWN_END after the corner (see Fig. 2-6). An appropriate path is used at curved contours.
Y
10.02
layer to be milled off
Tool center point path
$SC_CORNER_SLOWDOWN_START
$SC_CORNER_SLOWDOWN_END
Inside angle $SC_CORNER_SLOWDOWN_CRIT
Path velocity v
F
F * $SC_CORNER_SLOWDOWN_OVR
$SC_CORNER_SLOWDOWN_START
$SC_CORNER_SLOWDOWN_END
Fig. 2-6 Parameterization of feedrate reduction G62, example of a 90_ corner
Workpiece
Feedrate reduction at corners
Path s
X
2-44
The override value is set in the following setting data:Parameterization
SINUMERIK 840D/840Di/810D, Description of Functions ISO Dialects (FBFA) – 11.02 Edition
Siemens AG, 2002. All rights reserved
Page 45
10.02
2 Programming
2.2 G commands
42520: $SC_CORNER_SLOWDOWN_START 42522: $SC_CORNER_SLOWDOWN_END 42524: $SC_CORNER_SLOWDOWN_OVR 42526: $SC_CORNER_SLOWDOWN_CRIT
The setting data has default value 0.
S If $SC_CORNER_SLOWDOWN_CRIT == 0, the corner deceleration will
only take effect at reversing points.
S If $SC_CORNER_SLOWDOWN_START and
$SC_CORNER_SLOWDOWN_END are equal to 0, the feedrate reduction will be approached with the permissible dynamic response.
S If $SC_CORNER_SLOWDOWN_OVR == 0, a brief stop will be inserted. S $SC_CORNER_SLOWDOWN_CRIT refers to geometry axes with G62. It
defines the maximum inside angle in the current machining plane up to which the corner deceleration will be applied. – G62 is not active on rapid traverse.
Activation
Examples
The function is activated with G62 or G621. The G code is activated either with the corresponding parts program command or with $MC_GCODE_RESET_VALUES[56].
$TC_DP1[1,1]=120 $TC_DP3[1,1]=0. ;length offset vector $TC_DP4[1,1]=0. $TC_DP5[1,1]=0.
N1000 G0 X0 Y0 Z0 F5000 G64 SOFT
N1010 STOPRE N1020 $SC_CORNER_SLOWDOWN_START = 5. N1030 $SC_CORNER_SLOWDOWN_END = 8. N1040 $SC_CORNER_SLOWDOWN_OVR = 20. N1050 $SC_CORNER_SLOWDOWN_CRIT = 100.
N2010 G1 X00 Y30 G90 T1 D1 G64 N2020 G1 X40 Y0 G62 G41; Inside corner to N2030,
but TRC still being selected N2030 G1 X80 Y30; Inside corner to N2040 127 degrees N2040 G1 Y70; Inside corner to N2050 53 degrees N2050 G1 X40 Y40; Outside corner to N2060 N2060 G1 X20 Y70; Inside corner to N2070 97 degrees N2070 G1 X00 Y60; Inside corner to N2080 90 degrees N2080 G1 X20 Y20; Outside corner to N2090,
irrelevant because TRC
deselection N2090 G1 X00 Y00 G40 FENDNORM
M30
Siemens AG, 2002. All rights reserved SINUMERIK 840D/840Di/810D, Description of Functions ISO Dialects (FBFA) – 11.02 Edition
2-45
Page 46
2 Programming
2.3 Subprogram and macro technology
2.3 Subprogram and macro technology
2.3.1 Subprogram technology: M98
10.02
Subprogram calls
SW 6 upwards Until now the number of program executions (number of repeats) has been
Subprogram calls are programmed with M98 in ISO Dialect. For the program syntax, see Fig. 2-7.
M98 P xxxxyyyy
Program number (max. 4 digits)
Number of repetitions (max. 4 digits)
Fig. 2-7 Description of parameters allowed
The program syntax M98 Pxxxxyyyy is used to call a subprogram with the number yyyy and repeat it xxxx times. If the xxxx is not programmed, the subprogram is executed only once. The subprogram name always consists of 4 digits or is extended to 4 digits by adding 0’s. For example, if M98 P21 is programmed, the parts program memory is searched for program name 0021.spf and the subprogram is executed once. To execute the subprogram 3 times, program M98 P30021.
programmed in ISO Dialect M/T in conjunction with the subprogram number at address “P”.
As an alternative, the number of subprogram executions can now also be programmed at address “L”. The number of the subprogram is still programmed as Pxxxx. If the number of executions is programmed at both addresses, the number of executions programmed at address “L” is valid. The number of subprogram executions lies between 1 and 9999.
Example: N20 M98 P20123 ;Subprogram 123.spf will be executed
; twice
N40 M98 P55 L4 ;Subprogram 55.spf will be executed
; four times
N60 M98 P30077 L2 ;Subprogram 77.spf will be executed
; twice ;The number of executions programmed ; at address “P” =3 is ignored
2-46
SINUMERIK 840D/840Di/810D, Description of Functions ISO Dialects (FBFA) – 11.02 Edition
Siemens AG, 2002. All rights reserved
Page 47
10.02
2 Programming
2.3 Subprogram and macro technology
Subprogram termination
Subprogram return jump with “RET”
M99 terminates the subprogram. If M99 Pxxxx is programmed, execution resumes at block number Nxxxx on the return jump to the main program. The block number must always begin with “N”. The system initially searches forwards for the block number (from the subprogram call towards the end of the program). If a matching block number is not found, the parts program is then scanned backwards (towards the start of the program).
If M99 appears without a block number (Pxxxx) in a subprogram, the subprogram is terminated and the processor jumps back to the main program to the block following the subprogram call.
If M99 appears without a block number (Pxxxx) in a main program, the processor jumps back to the start of the main program and runs the program again.
These M commands are not output to the PLC.
V alid only for ISO Dialect T. In the Siemens shell cycles for stock removal (as in ISO Dialect), it is necessary
after roughing to resume program execution in the main program after the contour definition. To achieve this, the shell cycle must contain a subprogram return jump to the block after the end of the contour definition. The RET command has been extended with two optional parameters for skipping the blocks with the contour definition in the stock removal cycles after the subprogram call (with G71–G73).
The command RET (STRING: <block number/label>) is used to resume program execution in the calling program (main program) at the block with <block number/label>.
If program execution is to be resumed at the next block after <block number/label>, the 2nd parameter in the RET command must be > 0; RET ( <block number/label>, 1). If a value > 1 is programmed for the 2nd parameter, the subprogram also jumps back to the block after the block with <block number/label>.
In G70–G73 cycles, the contour to be machined is stored in the main program. The extended RET command is required in order to resume execution after the contour definition in the main program at the end of G70 (finish cut via contour with stock removal cycle). To jump to the next NC block after the contour definition at the end of the shell cycle for G70, the shell cycle must be terminated with the following return syntax: RET (“N” << $C_Q, 1)
Search direction: The search direction for <block number/label> is always forwards first (towards
the end of the program) and then backwards (towards the start of the program).
Siemens AG, 2002. All rights reserved SINUMERIK 840D/840Di/810D, Description of Functions ISO Dialects (FBFA) – 11.02 Edition
2-47
Page 48
2 Programming
2.3 Subprogram and macro technology
10.02
Example
N10 X10. Y20. N20 G71 P30 Q60 U1 W1 F1000 S1500
N10 ... ;Shell cycle for stock removal cycle N20 DEF STRING[6]BACK N30 ... N90 N100 RET (”N”<<$C_Q, 1) ;Return jump to block after
;contour def. -> N70
N30 X50. Z20. N40 X60. N50 Z55. N60 X100. Z70. N70 G70 P30 Q60 N80 G0 X150. Z200. N90 M30
Note
M30 in Siemens mode: is interpreted as a return jump in a subprogram. M30 in ISO Dialect mode: is also interpreted as the end of the parts program in
a subprogram.
2.3.2 Siemens language commands in ISO Dialect mode
Certain Siemens language commands are also required in ISO Dialect mode for Shopmill. These commands are executed in ISO Dialect mode. They include subprogram calls with and without passed parameters (not calls with Lxx, because address L has a different meaning for ISO Dialect), program section repetition and control structures. All other Siemens language commands are denied with an alarm in ISO Dialect mode.
The following Siemens language commands can be programmed when ISO Dialect mode is active:
REPEAT:
REPEAT <Block number> [<Block number>] [P..] REPEAT UNTIL REPEATB <Block number> [P..]
Only block numbers, not labels are allowed as start and end identifiers.
IF – ELSE – ENDIF FOR – ENDFOR WHILE – ENDWHILE IF<Condition> – GOTO F<Condition> CASE
2-48
SINUMERIK 840D/840Di/810D, Description of Functions ISO Dialects (FBFA) – 11.02 Edition
Siemens AG, 2002. All rights reserved
Page 49
10.02
2 Programming
2.3 Subprogram and macro technology
Modal and non–modal subprogram calls
N100 CALL “SHAFT” or N100 MCALL SHAFT or N100 SHAFT
Modal and non–modal subprogram call with parameter passing
N100 MCALL SHAFT (“ABC”; 33.5) or N100 SHAFT (“ABC”; 33.5) subprogram call specifying path N100 CALL”/_N_SPF_DIR/SHAFT or N100 MCALL/_N_SPF_DIR/ SHAFT or N100 PCALL/_N_SPF_DIR/SHAFT
2.3.3 Extending the subprogram call for contour preparation with CONTPRON
In ISO Dialect, the contour definition for stock removal cycles G70 – G73 is not stored separately in a subprogram (as in SINUMERIK), but appears in the parts program (main program). When the cycles are called, the contour definition section is defined by a start and end block number. The cycles receive this block number as a passed parameter. The indirect subprogram call has been extended for Siemens adaptation cycles.
Previously , subprograms were called indirectly with CALL <program name>. The indirect subprogram call has been extended as follows for access to the
contour definition in the main program: CALL [<program name>] BLOCK <start label> TO <end label> If no program name or an empty string is specified as the program name, i.e.
CALL BLOCK <start label> TO <end label>, the search for the program section (start/end label) is made in the program which is currently selected. The search for the labels is also performed in the selected program with MDA, ASUB etc. (i.e. in the case of MDA, the search for the labels is performed not in the MDA buffer but in the program with the selected program name). Programming this syntax directly in a main program has the same effect as repeating a program section in a loop with REPEAT <start label> <end label>, i.e. the search for the start and end label is performed in the program containing the CALL BLOCK ... command.
If a program name is specified, e.g. CALL <progName> BLOCK <start label> TO <end label>, the system searches for the program section (surrounded by the start/end label) in subprogram “progName”.
Example
Siemens AG, 2002. All rights reserved SINUMERIK 840D/840Di/810D, Description of Functions ISO Dialects (FBFA) – 11.02 Edition
Nxx G71 Pxx Q1110 U.. W.. ;ISO Dialect G function calls
; shell cycle CYCLE395.spf
; _N_CYCLE395_SPF
N10 .......
.......
Nxxx CYCLE95(....., “N”<<$C_P, “N”<<$C_Q)
; Stock removal cycle with additional ; parameters for start and end label
2-49
Page 50
2 Programming
2.3 Subprogram and macro technology
STRING[20]
N10 ........
.........
Nxxx .....
Nxxx RET (”N”<<$C_Q, 1) ;Return jump to the next block after
N1120 ....
Nxxx M30
10.02
PROC CYCLE95(....., STRING[20] startlab,
endelab)
Nxxx CONTPRON(...)
N.... CALL “” BLOCK startlab TO endelab
;Read contour definition or
N.... CALL BLOCK startlab TO endelab
;call the contour program
EXECUTE(...)
........
Nxx M17
; the contour definition
Search for start block number
Note
The actual CONTPRON and EXECUTE calls do not have to be modified.
The start block number (start label) of the contour definition is always searched first toward the end of the program (forward) and then toward the start of the program (backward).
If the same block number is programmed more than once, the next block number (label) after the current block in the program in which the contour definition is contained, is recognized as the start of the contour definition (see example). The current block is usually the block in which the stock removal cycle (shell cycle) was called in the main program.
Example
In stock removal cycle CYCLE395, the contour definition which appears between blocks N10–N30 in the main program is to be used (with CALL BLOCK N10 TO N30 in CYCLE395). N40 is the current program line in the main program.
The contour definition block is printed in bold lettering in the example.
N10 X10. Y20. N20 X30. N30 Y10. N40 G71 P10 Q30... ;Call shell cycle for stock removal cycle
... ; (In the stock removal cycle ... ; “CALL BLOCK N10 TO N30” is programmed) ... ; The contour definition is found in the
; lines printed in bold
2-50
SINUMERIK 840D/840Di/810D, Description of Functions ISO Dialects (FBFA) – 11.02 Edition
Siemens AG, 2002. All rights reserved
Page 51
10.02
2.3 Subprogram and macro technology
N50 G90 G54 N60 F1000 G94
N10 X50. Y10. N20 X33. Y11. N30 X10.
N50 ....
N.. .....
N800 G71 P10 Q30 ;Call shell cycle for stock removal cycle
... ; (In the stock removal cycle, “CALL BLOCK N10 TO
; N30” is programmed) ... ; The contour definition is found in ... ; the lines printed in italics
N999 ....
N10 X15. N20 Y25. N30 X33.
N1010 ....
N1020 .....
2.3.4 Macro commands with G65, G66 and G67
2 Programming
ISO Dialect
Siemens
In ISO Dialect mode, macros are called in the parts program with G65 Pxx, G66 Pxx. A macro is a set of parts program blocks that are terminated with M17.
When the subprogram is called, the mode is switched from ISO mode to Siemens mode.
The following commands are used for selection and deselection:
S G65 Macro call, non-modal S G66 Macro call, modal S G67 Deselect modal macro call
G commands G65 Pxx and G66 Pxx are used to start macro xx. G65 calls subprogram Pxx once. G66 activates the Pxx subprogram call modally, and the subprogram is then executed in every block containing axis movements (same as MCALL xx). G67 deactivates the modal subprogram call again (equivalent to G80 for cycle calls).
In a parts program block with G65 or G66, the address Pxx is interpreted as the program number of the subprogram containing the macro functionality. Address Lxx can be used to define the number of passes of the macro. If a number of passes is not programmed in the calling block, the macro is executed once. All further addresses in this parts program block are interpreted (as in ISO Dialect “Macro B”) as passed parameters, and their programmed values are saved in system variables $C_A–$C_Z. These system variables can be read in the subprograms and evaluated for the macro functionality. If further macros are called with parameters within a macro (subprogram), the passed parameters must be saved in internal variables in the subprogram before the new macro call.
Siemens AG, 2002. All rights reserved SINUMERIK 840D/840Di/810D, Description of Functions ISO Dialects (FBFA) – 11.02 Edition
2-51
Page 52
2 Programming
2.3 Subprogram and macro technology
As in the case of the machining cycles, the language mode is switched implicitly to Siemens mode to allow the definition of internal variables. Therefore, if a further macro call appears in the subprogram, ISO Dialect mode must be selected again first.
10.02
System variables for the addresses I, J, K
Because addresses I, J, and K can be programmed up to ten times in a block by macro call, an array index must be used to access the system variables for these addresses. The syntax for these three system variables is then $C_I[..], $C_J[..], $C_K[..]. The values are stored in the array in the order programmed. The number of addresses I, J, K programmed in the block is stored in variables $C_I_NUM, $C_J_NUM, $C_K_NUM.
The passed parameters I, J, K for macro calls are treated as one block, even if individual addresses are not programmed. If a parameter is programmed again or a following parameter has been programmed with reference to the sequence I, J, K, it belongs to the next block. To recognize the programming sequence in ISO mode, system variables $C_I_ORDER, $C_J_ORDER, $C_K_ORDER are set. These are identical arrays to $C_I, $C_K and contain the associated number of parameters.
Example:
N5 I10 J10 K30 J22 K55 I44 K33
set1 set2 set3 $C_I[0]=10 $C_I[1]=44 $C_I_ORDER[0]=1 $C_I_ORDER[1]=3
$C_J[0]=10 $C_J[1]=22 $C_J_ORDER[0]=1 $C_J_ORDER[1]=2
Cycle parameter $C_x_PROG
$C_K[0]=30 $C_K[1]=55 $C_K[2]=33 $C_K_ORDER[0]=1 $C_K_ORDER[1]=2 $C_K_ORDER[2]=3
In ISO dialect 0 mode, the programmed values can be evaluated differently depending on the programming method (integer or real value). The different evaluation is activated via machine data.
If the MD is set, the control will behave as in the following example:
X100. ;X axis is traveled 100 mm (100. with point => real value Y200 ;Y axis is traveled 0.2 mm (200 without point => integer value
If the addresses programmed in the block are passed as parameters for cycles, the programmed values are always real values in the $C_x variables. In the case of integer values, the cycles do not indicate the programming method (real/integer) and therefore no evaluation of the programmed value with the correct conversion factor.
2-52
SINUMERIK 840D/840Di/810D, Description of Functions ISO Dialects (FBFA) – 11.02 Edition
Siemens AG, 2002. All rights reserved
Page 53
10.02
2 Programming
2.3 Subprogram and macro technology
To indicate whether REAL or INTEGER has been programmed, there is the system variable $C_TYP_PROG. $C_TYP_PROG has the same structure as $C_ALL_PROG and $C_INC_PROG. For each address (A–Z) there is one bit. If the value is programmed as an INTEGER, the bit is set to 0, for REAL it is set to 1. If the value is programmed in variable $<number>, bit 2 = 1 is set.
Example:
M98 A100. X100 –> $C_TYP_PROG == 1. Only bit 0 is set because only A is programmed as a REAL.
M98 A100. C20. X100 –> $C_TYP_PROG == 5.
Only bits 1 and 3 are set (A and C). Restrictions: Up to ten I, J, K parameters can be programmed in each block. Variable
$C_TYP_PROG only contains one bit each for I, J, K. For that reason bit 2 is always set to 0 for I, J, and K in $C_TYP_PROG. It is therefore not possible to ascertain whether I, J or K have been programmed as REAL or INTEGER.
Parameters P, L, O, N can only be programmed as integers. A real value generates an NC alarm. For that reason the bit in $C_TYP_PROG is always 0.
Modal macro calls
With modal macro calls, the programmed addresses are only copied into the system variables in the block containing the call (block with G66). The macro is then executed in every block with an axis movement until it is deselected by G67 or a new macro call is programmed with G66. Only the macro parameters are passed in the block containing the call (= block with G66) for modal macros. The macro is executed for the first time in the next block containing an axis movement. (Same procedure as MCALL xx in Siemens mode)
Example of a macro call:
_N_M10_MPF: N10 M3 S1000 F1000
N20 X100. Y50. Z33. N30 G65 P10 F55 X150. Y100. S2000 N40 X50.
N50 ....
N200 M30
Example of a subprogram as macro in Siemens mode:
_N_10_SPF: N10 DEF REAL X_AXIS, Y_AXIS, SPEED, FEEDRATE N15 X_AXIS = $C_X Y_AXIS = $C_Y SPEED = $C_S FEEDRATE = $C_F N20 G01 F=FEEDRATE G95 S=SPEED ... M17
Siemens AG, 2002. All rights reserved SINUMERIK 840D/840Di/810D, Description of Functions ISO Dialects (FBFA) – 11.02 Edition
2-53
Page 54
2 Programming
2.3 Subprogram and macro technology
2.3.5 Mode changing in macro calls with G65 / G66
Until now, automatic switchover to Siemens mode was performed for macro calls with G65/G66. The user now has the choice whether switchover to Siemens mode takes place when the macro starts or not. Switchover to Siemens mode only takes place when the PROC<program name> instruction is used in the first line of the macro program. If this instruction is missing, ISO mode will remain active during execution of the macro program.
The user can therefore decide whether to create local variables (with DEF...) for the purpose of storing transfer variables. It is necessary to switch to Siemens mode to do this using the PROC instruction. The user can also specify that the macro program (e.g. an existing ISO Dialect M/T macro) is executed in ISO mode.
Example of a macro call:
_N_M10_MPF: N10 M3 S1000 F1000 N20 X100. Y50. Z33. N30 G65 P10 F55 X150. Y100. S2000 N40 X50.
N50....
N200 M30
Example of a subprogram as macro in Siemens mode:
_N_0010_SPF: PROC 0010 ;Switchover to Siemens mode N10 DEF REAL X_AXIS, Y_AXIS, SPEED, FEEDRATE N15 X_AXIS=$C_X Y_AXIS=$C_Y SPEED=$C_S FEEDRATE=$C_F N20 G01 F=FEEDRATE G95 S=SPEED
....
N80 M17
Example of a subprogram as macro in ISO mode:
_N_0010_SPF: G290 ;Switchover to Siemens mode
;If transfer variables have to be read N15 X_AXIS=$C_X Y_AXIS=$C_Y SPEED=$C_S N20 G01 F=$C_F G95 S=$C_S N10 G1 X=$C_X Y=$C_Y G291 ;switch to ISO mode N15 M3 G54 T1 N20
....
N80 M99
10.02
2-54
SINUMERIK 840D/840Di/810D, Description of Functions ISO Dialects (FBFA) – 11.02 Edition
Siemens AG, 2002. All rights reserved
Page 55
10.02
2.3.6 Macro call with M function
A macro can be called using M numbers in the same way as G65 (see 2.3.5). 10 M function substitutions are configured with machine data
$MN_EXTERN_M_NO_MAC_CYCLE and $MN_EXTERN_M_NO_MAC_CYCLE_NAME.
Parameter transfer is executed in exactly the same way as with G65. Repetitions can be programmed with address L.
2 Programming
2.3 Subprogram and macro technology
Restrictions
Configuration examples
Only one M function substitution (and/or only one subprogram call) can be executed in each line of a parts program. Conflicts with other subprogram calls are output with alarm 12722. No further M function substitutions are made in the replaced subprogram.
Otherwise, the same restrictions apply as for G65 Conflicts with predefined and other defined M numbers are rejected with an
alarm.
Subprogram M101_MACRO call with M function M101 $MN_EXTERN_M_NO_MAC_CYCLE[0] = 101
$MN_EXTERN_M_NO_MAC_CYCLE_NAME[0] = “M101_MACRO” Subprogram M6_MAKRO call with M function M6. $MN_EXTERN_M_NO_MAC_CYCLE[1] = 6
$MN_EXTERN_M_NO_MAC_CYCLE_NAME[1] = “M6_MACRO” Programming example for tool change with M function:
PROC MAIN ... N10 M6 X10 V20 ... N90 M30
PROC M6_MACRO ... N0010 R10 = R10 + 11.11 N0020 IF $C_X_PROG == 1 GOTOF N40 display($C_X_PROG) N0030 SETAL(61000) ;programmed variable incorrectly
;transferred N0040 IF $C_V == 20 GTOF N60 display($C_V) N0050 SETAL(61001) N0060 M17
Siemens AG, 2002. All rights reserved SINUMERIK 840D/840Di/810D, Description of Functions ISO Dialects (FBFA) – 11.02 Edition
2-55
Page 56
2 Programming
2.3 Subprogram and macro technology
2.3.7 Macro call with G function
A macro can be called using G numbers in the same way as G65 (see 2.3.5). 50 G function substitutions are configured with machine data
$MN_EXTERN_G_NO_MAC_CYCLE and $MN_EXTERN_G_NO_MAC_CYCLE_NAME.
The parameters programmed in the block are saved in the $C_ variables. Address L is used to define the number of times a macro is repeated. The number of the programmed G_macro is stored in variable $C_G. All other G functions programmed in the block are treated like normal G functions. The sequence in which addresses and G functions are programmed in the block is irrelevant and has no effect on the functionality.
All ISO G codes, even G codes with a decimal point (= real value) can be replaced by a macro call.
G functions that are replaced by a macro do not exist in the control and can be redefined with $MN_NC_USER_EXTERN_GCODES_TAB[ ].
10.02
Restrictions
Configuration examples
Only one G/M function substitution (and/or only one subprogram call) can be executed in each line of a parts program. Conflicts with other subprogram calls, e.g. when a modal subprogram call is active, are signaled with alarm 12722.
If a G macro is active no more G/M macros or M subprograms are called. M macros/subprograms are then executed as M functions, and G macros as G functions if the relevant G function exists. Otherwise alarm 12470 is output.
Otherwise, the same restrictions apply as for G65
Subprogram G21_MAKRO call with G function G21 $MN_EXTERN_G_NO_MAC_CYCLE[0] = 21
$MN_EXTERN_G_NO_MAC_CYCLE_NAME[0] = “G21_MACRO” $MN_EXTERN_G_NO_MAC_CYCLE[1] = 123
$MN_EXTERN_G_NO_MAC_CYCLE_NAME[1] = “G123_MACRO” $MN_EXTERN_G_NO_MAC_CYCLE[2] = 421 $MN_EXTERN_G_NO_MAC_CYCLE_NAME[2] = “G123_MACRO”
Programming example:
PROC MAIN ... N0090 G291 ;ISO mode N0100 G1 G21 X10 V20 F1000 G90 ;G21_MACRO.spf, G1, and
;G90 calls activated ;before G21_MACRO.spf
;is called ... N0500 G90 X20 Y30 G123 G1 G54 ;G123_MACRO.spf, G1,
;G54, and G90 calls
;activated before
:G123_MACRO.spf
;is called
2-56
SINUMERIK 840D/840Di/810D, Description of Functions ISO Dialects (FBFA) – 11.02 Edition
Siemens AG, 2002. All rights reserved
Page 57
10.02
2 Programming
2.3 Subprogram and macro technology
... N0800 G90 X20 Y30 G421 G1 G54 ;G421_MACRO.spf, G1,
;G54, and G90 calls
;activated before
;G123_MACRO.spf is called ... N0900 M30
PROC G21_MACRO ... N0010 R10 = R10 + 11.11 N0020 IF $C_X_PROG == 0 N0030 SETAL(61000) ;programmed variable incorrectly
;transferred N0040 ENDIF N0050 IF $C_V_PROG == 0 N0060 SETAL(61001) N0070 ENDIF N0080 IF $C_F_PROG == 0 N0090 SETAL(61002 N0100 ENDIF N0110 G90 X=$C_X V=$C_V N0120 G291 N0130 G21 M6 X100 ;G21–>activates metric system of
;units (no macro call) N0140 G290 ... N0150 M17
PROC G123_MACRO ... N0010 R10 = R10 + 11.11 N0020 IF $C_G == 421 GOTOF label_G421
;macro functionality for G123 N0040 G91 X=$C_X Y=$C_Y F500 ... ... N1990 GOTOF label_end N2000 label_G421: ;macro functionality for G421 N2010 G90 X=$C_X Y=$C_Y F1000 N2020 ... ... N3000 G291 N2010 G123 ;alarm 12470 because G123 is not a G function
;and a macro cannot be called when a macro is ;active. Exception: the macro was called as
;a subprogram with CALL G123_MACRO. N4000 label_end: G290 N4010 M17
Siemens AG, 2002. All rights reserved SINUMERIK 840D/840Di/810D, Description of Functions ISO Dialects (FBFA) – 11.02 Edition
2-57
Page 58
2 Programming
2.3 Subprogram and macro technology
2.3.8 High-speed cycle cutting G05 P..
G05 P.. high-speed cycle cutting takes the form of a subprogram call.
Programming G05 P.. L.. Pxxxxx Subprogram number, max. 10 characters
When called it is not necessary to fill with zeros as is the case
with M98. Lxxxx Number of passes. If L is not programmed, L1 is assumed.
Example: G05 P10123 L3 10123.mpf is passed through three times.
This call can be used to fetch any subprogam. This subprogam can be a precompiled program, but does not have to be. However, only a Siemens parts program can be precompiled.
There is not equivalent of ISO Dialect function G05 in Siemens mode. CYCLE305 enables users to program their own functionality in the context of the Siemens functionality.
CYCLE305.spf is called when programming G05 in the following cases:
10.02
S G05 without P in the block is skipped without an alarm. S G05.1 with and without P is skipped without an alarm. S G05 P0 or P01 are reserved for high-speed remote buffer B. This function is
not supported.
In the cases mentioned, all addresses programmed in the block are defined in cycle parameter $C_xx. When CYCLE305 is called there is no automatic change of mode from ISO to Siemens. If it is intended to process CYCLE305.spf in Siemens mode, the first program line must contain a PROC instruction as in the case of macro calls with G65/G66.
All functions programmed in the block are executed, as previously mentioned in the case of programming G05, that is to say, programmed axes are traversed, auxiliary functions are produced, etc. The programmed addresses are defined in the cycle parameters only for the purpose of supplementary information.
If G05 and a subprogram call (M98 P..) are programmed in the same block, alarm 12722 is produced.
2-58
SINUMERIK 840D/840Di/810D, Description of Functions ISO Dialects (FBFA) – 11.02 Edition
Siemens AG, 2002. All rights reserved
Page 59
10.02
2.3 Subprogram and macro technology
2.3.9 Switchover modes for DryRun and skip levels
Switching over the skip levels (DB21 DBB2) always meant intervening in the program run which until now resulted in a momentary drop in velocity along the path. The same applies when the dry run mode DryRunOff (DryRun = dry-run feedrate DB21.DBB0.BIT6) it switched to DryRunOn and vice versa.
This drop in voltage can now be avoided with a new switchover mode which has a restricted functionality.
With machine data assignment $MN_SLASH_MASK==2 a drop in voltage is no longer necessary when switching skip levels (i.e. a new value in PLC–>NCK–Chan interface DB21.DBB2).
Note
The NCK processes blocks in two stages, preliminary or preprocessing and main processing. The result of preprocessing is put into the preprocessing memory. The main processing stage takes the oldest block from the prepro-cessing memory and traverses its geometry.
2 Programming
Achtung
With machine data assignment $MN_SLASH_MASK==2, preprocessing is switched over when the skip levels are switched! All blocks in the prepro­cessing memory are executed with the old skip level. As a rule, the user has no influence over the level of the preprocessing memory. The user observes the following: The new skip level can take effect at any time after switchover!
Note
The parts program command STOPRE empties the preprocessing memory. If the skip level is switched over before STOPRE, it is certain that all blocks after STOPRE will be switched over . The same applies to an implicit STOPRE.
Switching over DryRun mode results in the same restrictions. With machine data assignment $MN_DRYRUN_MASK==2 no drop in velocity is
necessary when DryRun mode is changed. However, here too, only prepro­cessing is switched over, which results in the above restrictions. Analogously the following applies: Caution DryRun mode can become active any time
after switchover!
Siemens AG, 2002. All rights reserved SINUMERIK 840D/840Di/810D, Description of Functions ISO Dialects (FBFA) – 11.02 Edition
2-59
Page 60
2 Programming
2.3 Subprogram and macro technology
2.3.10 Eight–digit program numbers
Eight–digit program number selection is activated with machine data $MC_EXTERN_FUNCTION_MASK, bit6=1. This function has an effect on M98 (see Chapter 2.3.1), G65/66 (see Chapter 2.3.5), and M96 see Chapter 2.2.13).
y: Number of program runs x: Program number
10.02
Subprogram call M98
Modal and block–by–block macro G65/G66
$MC_EXTERN_FUNCTION_MASK, bit6 = 0 M98 Pyyyyxxxx or M98 Pxxxx Lyyyy program number max. four digits Extension of program number always to four digits with 0 E.g.: M98 P20012 calls 0012.mpf 2 passes
M98 P123 L2 calls 0123.mpf 2 passes
$MC_EXTERN_FUNCTION_MASK, bit6 = 1 M98 Pxxxxxxxx Lyyyy No extension with 0 even if the program number is less than four digits long. It is not possible to program the number of passes and program number in P (Pyyyyxxxxx), the number of passes must always be programmed with L! E.g.: M98 P123 calls 123.mpf 1 pass
M98 P20012 calls 20012.mpf 1 pass,
Caution: This is no longer compatible with the ISO dialect original
M98 P12345 L2 calls 12345.mpf 2 passes
$MC_EXTERN_FUNCTION_MASK, bit6 = 0 G65 Pxxxx Lyyyy Extension of program number always to four digits with 0. Program number with more than four digits triggers an alarm.
$MC_EXTERN_FUNCTION_MASK, bit6 = 1 G65 Pxxxxxxxx Lyyyy No extension with 0 even if the program number is less than four digits long. Program number with more than eight digits triggers an alarm.
Interrupt M96
2-60
$MC_EXTERN_FUNCTION_MASK, bit6 = 0 M96 Pxxxx Extension of program number always to four digits with 0.
$MC_EXTERN_FUNCTION_MASK, bit6 = 1 M96 Pxxxx No extension with 0 even if the program number is less than four digits long. Program number with more than eight digits triggers an alarm.
SINUMERIK 840D/840Di/810D, Description of Functions ISO Dialects (FBFA) – 11.02 Edition
Siemens AG, 2002. All rights reserved
Page 61
10.02
2.4 Tool change and tool offsets
2.4.1 Tool offsets: T, D, M (ISO Dialect M)
2 Programming
2.4 Tool change and tool offsets
Tool data T/D number H number
As Siemens and ISO dialect programs are intended to run alternately in the control they must be implemented with the Siemens tool data memory. In each offset memory that exists for a tool, the length, geometry and wear in each case are specified. In Siemens mode, the offset memory is addressed with T (tool number) and D (cutting edge number), or T/D number for short. In ISO Dialect M programs, the offset memory is addressed with D (radius) or H (length). This is referred to below as the H number. In order to establish a unique assignment between this H number and a T/D number, an element $TC_DPH[t,d] has been added to the offset data set. The H number of the ISO Dialect is entered in this element.
Table 2-6 Example: Tool offset data set
T D/cutting
edge
1 1 10 1 2 11 1 3 12 100.00 250.00 2 1 13 2 2 14 2 3 15
H number $TC_DPH
Radius Length
Example: Siemens program ISO Dialect program N5 T1 N5 T1 N10 G41 D3 N10 G41 H12 or G41 D12
When the H value is programmed in the ISO dialect M program, the system searches for and activates the matching $TC_DPH in the active T after the correction block.
If the correction block does not contain an H number, the compensation cannot be activated in ISO Dialect mode.
If an H is programmed but a correction block with the corresponding H number is not found or the associated tool T is not selected, an alarm is output.
Siemens AG, 2002. All rights reserved SINUMERIK 840D/840Di/810D, Description of Functions ISO Dialects (FBFA) – 11.02 Edition
2-61
Page 62
2 Programming
2.4 Tool change and tool offsets
2.4.2 Possible H numbers
10.02
H = 0
H = eindeutig
Changing the offset memory
All data of the tool edges with H number 0 are not linked. Every tool edge has its own parameters.
An H number in a TO-Einheit must exist only once otherwise clear addressing of the compensation block is not possible. In case an H number has been alloca­ted for a second time, alarm ”17183 channel %1 block %2 H number already exists in T= %3 with D=%4” is given when writing from the program,. The alarm is compensation block compatible with NC Start clear.
Example: N5 $TC_DPH[1,1] = 5
N10 $TC_DPH[2,1] = 5 An attempt to allocate an H number twice via OPI (HMI, PLC) will lead to a ne-
gative acknowledgement when writing.
Existing tool offsets can be overwritten with G10. New tool offsets are not created by G10.
Tool length compensation, geometry: G10 L10 Pxx Ryy Tool length compensation, wear: G10 L11 Pxx Ryy Tool radius compensation, geometry: G10 L12 Pxx Ryy Tool radius compensation, wear: G10 L13 Pxx Ryy
P specifies the H number of the compensation memory and R specifies the value. L1 can be programmed instead of L11.
Active plane
Selecting the tool length
Setting data $SC_TOOL_LENGTH_CONST must be assigned value 17 if the assignment of tool length offsets to geometry axes is to be independent of plane selection. Length 1 is then always assigned to the Z axis.
The tool length and the tool radius are always programmed with D or H. Example:
T D/cutting
edge
2 3 4 10 15
ISO Dialect M: T2 G43 H4 or D4 ;Length selection G42 D4 or H4 ;Radius selection
The offset value must be entered twice for ISO Dialect M programs which are programmed with different D and H numbers.
Example:
H number $TC_DPH
Radius Length
2-62
SINUMERIK 840D/840Di/810D, Description of Functions ISO Dialects (FBFA) – 11.02 Edition
Siemens AG, 2002. All rights reserved
Page 63
10.02
2 Programming
2.4 Tool change and tool offsets
T D/cutting
edge
2 3 4 10 15 2 4 5 10 15
H number $TC_DPH
Radius Length
ISO Dialect M: T2 G43 H4 ;Length offset from T2 D3 G42 D5 ;Radius and length offset from T2 D4
Flat D number
If flat D numbers are active, the T is programmed independently of the H number. The H number is no longer checked for compatibility with the selected tool.
An H number must be assigned to every offset memory, even with flat D numbers.
Tool management If tool management is active, replacement tools have the same H number.
Duplo numbers are used in order to differentiate. Offset D1 is activated for the currently selected tool on H99 with active tool management.
In ISO Dialect M, only numerical expressions are permitted as tool identifiers. Strings are no longer permitted as identifiers. Example: T = “2”, selection with T2.
Siemens AG, 2002. All rights reserved SINUMERIK 840D/840Di/810D, Description of Functions ISO Dialects (FBFA) – 11.02 Edition
2-63
Page 64
2 Programming
2.4 Tool change and tool offsets
10.02
Tool length compensation in multiple axes
Example Tool selection in ISO Dialect M:
Tool length offsets can be activated on multiple axes. However, the resulting tool length compensation cannot be displayed.
The Siemens T and D numbers appear in the display for active T and D numbers. New OPI variables which can be displayed are available for the active ISO Dialect H and D number.
Machine data 22220 $MC_AUXFU_T_SYNC_TYPE is used to define whether the output to PLC takes place during or after the movement. Machine data 20110 $MC_RESET_MODE_MASK, bit 6 can be used to activate tool length compensation beyond a reset.
; (Fanuc 0 M tool offset with T, cutting edge number ; (the offsets are written) ; (with G10)
G290
; Tool offset memory T2 cutting edge 1: N5000 $TC_DP1[2,1]=10 ;type N5000 $ TC_DP1[2,1]=7 ;ISO H number
; Tool offset memory T3 cutting edge 2: N5000 $TC_DP1[3,2]=10 ;type N5000 $TC_DP1[3,2]=3 ;ISO H number
; Tool offset memory T4 cutting edge 3: N5000 $TC_DP1[4,3]=10 ;type N5000 $TC_DP1[4,3]=8 ;ISO H number
G291
;write tools offsets ;-––––––––––––––––––––––– ;T2 cutting edge 1 also writes T4 cutting edge 3, because also H7 G10 L10 P7 R10 G10 L12 P7 R5
; T3 cutting edge 2 G10 L10 P3 R15 G10 L12 P3 R10
N8 G01 G40 F5000 X0 Y0 Z0 N10 X50. N15 50 N17 Z10. N20 X0 N25 Y0 N30 X–10 Y-10
N30 T2 ;Tool 2 N33 G43 H7 Z0 ;H number 7 N35 G41 X0 Y0 Z0 D7 N40 X50. N45 Y50.
2-64
SINUMERIK 840D/840Di/810D, Description of Functions ISO Dialects (FBFA) – 11.02 Edition
Siemens AG, 2002. All rights reserved
Page 65
10.02
2 Programming
2.4 Tool change and tool offsets
N48 Z10. N50 X0 N55 Y0 N60 G40 X-10 Y-10
N65 T3 N68 G43 H3 Z0 N70 G42 X0 Y0 Z0 D3 N75 X50. N77 Y50. N78 Z10. N80 X0 N85 Y0 N90 G40 X-10 Y-10
N95 T4 N98 G43 H8 Z0 N100 G41 X0 Y0 Z0 D8 N105 X50. N110 Y50. N112 Z10. N115 X0 N120 Y0 N125 G40 X-10 Y-10
M30
Machine data 20382 $MC_TOOL_CORR_MOVE_MODE defines whether the compensation is applied in the block containing the selection or the next time the axis is programmed.
2.4.3 Tool offset: T (ISO Dialect T)
The tool data are stored in the Siemens tool data memory. Each tool consists of four entries, one each for the X and Z axes, radius and tool point direction. The range of values for length and radius compensation is
999.999mm. The value range 0–9 is used for the tool point direction, where 0
and 9 are identical. The meaning is equivalent to the tool point direction on Siemens turning tools.
You can use either flat D numbers or the conventional tool compensation memory management.
Tool management can also be used. Selection is made by means of T, whereby T contains the tool number and the
cutting edge number. The H number of ISO Dialect M does not exist. Txxxxyyyy: xxxx = tool number, yyyy = cutting edge number Machine data 10890 $MN_EXTERN_TOOLPROG_MODE, bit 0 is used to
define how the T value is interpreted. Machine data 10888 $MN_EXTERN_DIGITS_TOOL_NO is used to specify the
number of digits for the tool number. The digit positions are counted from the left. Subsequent digits specify the offset number.
If bit 0=1 in MD 10890, the cutting edge number is set equal to the tool number. Example:
Siemens AG, 2002. All rights reserved SINUMERIK 840D/840Di/810D, Description of Functions ISO Dialects (FBFA) – 11.02 Edition
2-65
Page 66
2 Programming
2.4 Tool change and tool offsets
$MN_EXTERN_TOOLPROG_MODE=0 $MN_EXTERN_DIGITS_TOOL_NO=2 T1234 ;Auxiliary function T1234 to PLC
T123 ;Auxiliary function T123 to PLC
$MN_EXTERN_TOOLPROG_MODE, bit 0=1 T12 ;Auxiliary function T12 to PLC
Machine data 20382 $MC_TOOL_CORR_MOVE_MODE defines when the compensation is applied: In the block containing the selection or the next time the axis is programmed.
MD 20110 $MC_RESET_MODE_MASK, bit 6 determines whether or not the tool compensation remains active after a reset.
MD 20360 $MC_TOOL_PARAMETER_DEF_MASK, bit 0 can be used to define that the wear value of the transverse axis is calculated as a diameter value. The geometry offset is always interpreted as a radius value.
10.02
;Tool number 12
;Offset selection D34
;Tool number 12
;Offset selection D3
;Tool number 12
;Offset selection 12
Example Tool selection in ISO Dialect T:
G290 N5000 ;Definition of the tool offset memory D1: N5000 $TC_DP1[1,1]=10 ;Type N5000 $TC_DP2[1,1]=9 ;Tool point direction N5000 $TC_DP6[1,1]=5 ;Radius
N5000 ;Definition of the tool offset memory D2: N5000 $TC_DP1[2,1]=10 ;Type N5000 $TC_DP2[2,1]=1 ;Tool point direction N5000 $TC_DP6[2,1]=5 ;Radius
G291 ;Write tool offset data N3 G10 P1 X10 Z20 Y30 N5 G10 P2 X20 Y20 Z100
N10 G00 G18 X0 Y0 Z0 N10 T0101 ;Tool 1, cutting edge 1 N15 G00 X10 Y10 Z10 N20 T0201 ;Tool 1, cutting edge 1 N25 G00 X10 Y10 Z10 ... M30
Changing the offset memory
2-66
Existing tool offsets can be overwritten with G10. New tool offsets are not created by G10.
G10 P<100 / 10000 X Y R Q Geometry G10 P>100 / 10000 X Y R Q Wear
SINUMERIK 840D/840Di/810D, Description of Functions ISO Dialects (FBFA) – 11.02 Edition
Siemens AG, 2002. All rights reserved
Page 67
04.00
10.02
P100 / 10000 ;MD EXTERN_FUNCTION_MASK, bit 1 is used to select
X Y Z ;Offset values absolute or incremental, depending on U V W ;Incremental offset values
R ;Radius Q ;Tool point direction
2.4.4 Tool-changing cycle
2 Programming
2.4 Tool change and tool offsets
;whether with P<100 or 10000 geometry or wear
;is applicable.
;G90/91
ISO Dialect mode
MD 10717 T_NO_FCT_CYCLE_NAME is used to assign a subprogram to the T command. Every block that contains a T command is executed and the subprogram is subsequently called up. The T value is not output; the T command must be programmed again in the cycle.
System variable $C_T_PROG or $C_D_PROG can be used in the subprogram to check whether the T or D command was programmed. The values can be read out with system variable $C_T or $C_D. If another T command is programmed in the subprogram, no substitution takes place, but the T word is output to the PLC.
Siemens AG, 2002. All rights reserved SINUMERIK 840D/840Di/810D, Description of Functions ISO Dialects (FBFA) – 11.02 Edition
2-67
Page 68
2 Programming
2.4 Tool change and tool offsets
The machine data 10715 M_NO_FCT_CYCLE and 10716 M_NO_FCT_CYCLE_NAME can be used to assign a subprogram to an M function (e.g. M06).
The mapping of M and T programming onto cycle calls has the same effect in ISO Dialect mode as in Siemens mode.
If T and M6 are programmed in the same block, the programmed T number can be scanned with $P_TOOL in the cycle called by M6. The M/T call is also mapped onto the cycle call in the block search. The start of the change cycle after the end of the search run must be initiated by the PLC.
Sequence:
N20 T1234 N30 M6 ;Change tool N40 H3 G43 ;Activate tool length compensation in T1234 N50 T333 ;Tool preselection N60 G1 X10 ;Offset T1234 is active N70 M6 ;Load tool 333, D0 H0 active N80 H4 ;Activate new tool length compensation
N90 .....
10.02
J
2-68
SINUMERIK 840D/840Di/810D, Description of Functions ISO Dialects (FBFA) – 11.02 Edition
Siemens AG, 2002. All rights reserved
Page 69
Cycles and Contour Definition
3.1 Calling cycles in the external CNC system using G commands
3
General description
Cycle parameters
Procedure for cycle call via G command
The functionality of the ISO Dialect cycles is implemented in the standard Siemens cycles: A shell cycle is called from the ISO Dialect program. All addresses programmed in the block are passed to this shell cycle in the form of system variables. The shell cycle matches the data to the standard Siemens cycle and calls it by name. Machine manufacturers can replace these shell cycles with their own cycles.
Various cycle parameters in channel-specific GUD (Global User Data) must be initialized for the machining cycles. The names and meanings of the GUD are listed in Section 3.2.
Part program e.g. ISO Dialect
N10 G... N20 X.. Y.. N30 ... N40 ...
(external CNC system)
Shell cycle
Siemens standard cycle
Fig. 3-1 General cycle call in ISO Dialect mode
Siemens AG, 2002. All rights reserved SINUMERIK 840D/840Di/810D, Description of Functions ISO Dialects (FBFA) – 11.02 Edition
3-69
Page 70
3 Cycles and Contour Definition
3.1 Calling cycles in the external CNC system using G commands
10.02
Shell cycle
!
Modal cycles
The modifications required due to the ISO Dialect programming syntax are made in the shell cycle. This means that the existing SINUMERIK cycles do not have to be changed. The name of the shell cycle is permanently defined.
Procedure:
1. The cycle (e.g. G81) is programmed in ISO Dialect mode
2. Siemens mode is activated automatically and the associated shell cycle is called (see Fig. 3-2)
3. The shell cycle calls the associated Siemens standard cycle
It is not necessary to program G290. The external CNC system is automatically activated on the return jump.
Important The cycles must only be called with G commands.
This ensures that the appropriate cycle parameters are passed to the shell cycle.
The shell cycle must not be activated directly with CALL CYCLE3xx!
If a modal cycle is active, the shell cycle is called in every NC block. If no axis positions (X, Y or Z) are programmed in the NC block, the Siemens standard cycle is not called.
Addresses programmed in the block (F etc.) are activated via the shell cycle. If no feedrate was programmed, for example, the current feedrate is used as the path feed.
Cycle parameters can be programmed in the following blocks while a modal cycle is active. These parameters are copied into the system variables so that the shell cycle uses the modified parameters. Modal cycles are, in contrast to modal macros, already executed in the calling block (e.g. block with G81 etc.).
Deselecting the cycle:
Deselection is performed with G80 or with a function of the 1st G group.
3-70
Example:
N10 G81 X10. Y20. Z–15. R5 F1000
Drilling position X10mm, Y20mm Drilling depth Z-15mm Reference plane 5mm Drilling feed F.. (mm/min or mm/rev)
N20 X50. Y30. R10 Drilling position X50mm, Y30mm,
New reference plane 10mm
N30 G80 Delete cycle G81
SINUMERIK 840D/840Di/810D, Description of Functions ISO Dialects (FBFA) – 11.02 Edition
Siemens AG, 2002. All rights reserved
Page 71
10.02
3.2 Global user data (GUD)
Table 3-1 GUD7 for programmed cycle values (ISO Dialect program data), continued
GUD Description/use CYCLE
Real values _ZFPR[0] Initial plane (current position on 1st call with G..), retraction position
active on G98
_ZFPR[1] Reference plane, retraction position active on G99 (retraction only
possible to initial position with G87).
_ZFPR[2] Final drilling depth, absolute 381M, 383M,
_ZFPR[3] Retraction position, depending on G98/G99 (initial plane/R plane) 381M, 383M,
_ZFPR[4] Drilling feed 381M, 383M,
_ZFPR[5] Dwell time (s) at final depth (G82/G89/G76/G87) 381M, 384M,
_ZFPR[6] 1st drilling depth (single drilling depth) incr. (G73/G83) 383M _ZFPR[7] 1st drilling depth, absolute (G73/G83) 383M _ZFPR[8] Lift-off/infeed distance (G76) 387M _ZFPR[9] Speed for tapping (G74/G84) 384M _ZFPR[20] Initial plane (current position on 1st call) 383T, 384T,
_ZFPR[21] R plane 383T, 384T,
_ZFPR[22] Final drilling depth, absolute 383T, 384T,
_ZFPR[23] Retraction position (1=G98, 2=G99) 383T, 384T,
_ZFPR[24] Thread pitch/drilling feed 376T, 383T,
_ZFPR[25] Dwell time at final depth 383T, 384T,
_ZFPR[26] Speed for tapping 384T _ZFPR[27] End point X 371T, 372T,
_ZFPR[28] End point Z 371T, 372T,
_ZFPR[29] Start point offset X (taper thread) 371T, 372T,
_ZFPR[30] Thread start point X 376T _ZFPR[31] Thread start point Z 376T _ZFPR[32] First drilling depth 383T Integer values _ZFPI[0] Current G code of ISO Dialect drilling cycle 381M, 383M,
_ZFPI[1] M function for spindle start (M3, M4) after spindle stop 381M, 384M _ZFPI[20] Current G code of threading cycle/drilling cycle 383T, 384T,
3 Cycles and Contour Definition
3.2 Global user data (GUD)
381M, 383M, 384M, 387M
381M, 383M, 384M, 387M
384M, 387M
384M, 387M
384M, 387M
387M
385T
385T
385T
385T
384T, 385T
385T
373T, 376T
373T, 376T
376T
384M
385T
Siemens AG, 2002. All rights reserved SINUMERIK 840D/840Di/810D, Description of Functions ISO Dialects (FBFA) – 11.02 Edition
3-71
Page 72
3 Cycles and Contour Definition
3.2 Global user data (GUD)
Table 3-1 GUD7 for programmed cycle values (ISO Dialect program data), continued
GUD CYCLEDescription/use
_ZFPI[21] Spindle direction (3=M3, 4=M4) 383T, 384T,
_ZFPI[22] Stock removal mode Roughing 370T, 371T,
_ZFPI[23] Machining mode Deep hole/Drilling 383T
Table 3-2 GUD7 for cycle setting data (ISO Dialect setting data)
10.02
385T
372T, 373T
GUD
Real values _ZSFR[0] Safety clearance to reference plane 381M, 383M _ZSFR[1] Retraction amount for chipbreaking (G73) 383M _ZSFR[2] Angle offset for oriented spindle stop, tool must be oriented in +X
direction (G76) Retraction direction:
–X G17 plane XY –Z G18 plane ZX –Y G19 plane YZ
_ZSFR[20] Safety clearance to reference plane 383T, 384T _ZSFR[21] Safety clearance to chip break 383T, 385T Integer values _ZSFI[0] 0 = Drilling axis is perpendicular to plane (default)
1 = Drilling axis always “Z”
_ZSFI[1] 0 = Rigid tapping
1 = Tapping with compensating chuck 2 = Deep hole tapping with chipbreaking
3 = Deep hole tapping with swarf removal _ZSFI[2] Retraction speed factor (1–200%) for tapping (G74/G84) 384M _ZSFI[3] Polar coordinates 0 = OFF 1 = ON 381M, 383M,
_ZSFI[20] Deep hole drilling with chip breaking/removal 383T, 385T _ZSFI[22] Factor for retraction speed 384T _ZSFI[23] Dwell time with G95, 0 = seconds, 1 = revolution 383T _ZSFI[24] Number of noncuts 376T _ZSFI[25] Cutting edge angle 376T _ZSFI[26] Thread run-out distance (n*pitch) 376T _ZSFI[27] Min. infeed depth 376T _ZSFI[28] Final machining allowance 376T _ZSFI[29] Distance traversed for grooving cycle 374T _ZSFI[30] Cutting depth for stock removal cycle 371T, 372T _ZSFI[31] Distance traversed for stock removal cycle 371T, 372T _ZSFI[32] X axis infeed value for contour repetition 373T _ZSFI[33] Z axis infeed value for contour repetition 373T
Description/use
387M
381M, 383M, 384M, 387M
384M,387M
384M, 387M
3-72
SINUMERIK 840D/840Di/810D, Description of Functions ISO Dialects (FBFA) – 11.02 Edition
Siemens AG, 2002. All rights reserved
Page 73
10.02
3 Cycles and Contour Definition
3.2 Global user data (GUD)
Table 3-2 GUD7 for cycle setting data (ISO Dialect setting data)
GUD Description/use
_ZSFI[34] Number of divisions for contour repetition 373T _ZSFI[39] G code system 2 = B, 1 = A, 3 = C 300, 328,
330, 370T, 371T, 372T, 373T, 374T, 376T
Siemens AG, 2002. All rights reserved SINUMERIK 840D/840Di/810D, Description of Functions ISO Dialects (FBFA) – 11.02 Edition
3-73
Page 74
3 Cycles and Contour Definition
3.3 Drilling cycles (ISO Dialect M)
3.3 Drilling cycles (ISO Dialect M)
3.3.1 Overview and parameter description
The drilling cycles are modal. While a drilling mode is active, you only have to program the new parameters in order to make parameter modifications.
There is no traversing movement if:
S No value is programmed in the NC block for X, Y and Z S The number of repetitions K = 0 was programmed
The retraction position is valid for all drilling cycles
S G98 Retraction to initial plane S G99 Retraction to reference plane
Overview
Table 3-3 Overview of drilling cycles
10.02
External cycle call Description
G73 X.. Y.. Z.. R.. F.. Q.. Deep hole drilling cycle with chipbreaking G74 X.. Y.. Z.. R.. F.. P.. Counterclockwise tapping cycle G76 X.. Y.. Z.. R.. F.. Q.. P.. Fine drilling cycle G80 Cycle off; the cycle is also deselected by programming a G
G81 X.. Y.. Z.. R.. F.. Drilling cycle; drilling, retraction with G00 G82 X.. Y.. Z.. R.. F.. P.. Drilling cycle; drilling, dwell, retraction with G00 G83 X.. Y.. Z.. R.. F.. Q.. Deep hole drilling cycle with swarf removal G84 X.. Y.. Z.. R.. F.. P.. Clockwise tapping cycle G85 X.. Y.. Z.. R.. F.. Drilling cycle; drilling, retraction with drilling feed G86 X.. Y.. Z.. F.. R.. K.. Drilling cycle, retraction with G00 G87 X.. Y.. Z.. F.. R.. P.. Q.. K.. Reverse countersinking G89 X.. Y.. Z.. F.. R.. P.. K.. Drilling cycle, retraction with machining feed
function of the 1st G group.
3-74
SINUMERIK 840D/840Di/810D, Description of Functions ISO Dialects (FBFA) – 11.02 Edition
Siemens AG, 2002. All rights reserved
Page 75
10.02
3 Cycles and Contour Definition
3.3 Drilling cycles (ISO Dialect M)
Cycle call from ISO Dialect M mode
Shell cycle
Siemens standard cycle
G81 G82 G85 G86
CYCLE381M
CYCLE82 CYCLE85 CYCLE88
G89
G73 G83
G84 G74
G76 G87
CYCLE383M
CYCLE384M
CYCLE387M
CYCLE83
CYCLE3841
CYCLE86 CYCLE861
Switchover to Siemens mode
Fig. 3-2 Assignment of the cycle call in ISO Dialect M mode via shell cycle for Siemens
standard cycle
Example: ISO Dialect M
N10 G81 X100. Z–50. R20 F100
G81 automatically calls the shell cycle CYCLE381M. The calculations are performed in the shell cycle and the standard drilling cycle CYCLE81 is then called.
Parameter description
G7V or G8V X.. Y.. Z.. R.. P.. Q.. F.. K..
Number of repetitions If K was not programmed, the cycle is executed once;
Drill-hole position
Fig. 3-3 Description of parameters allowed for G17 (X/Y plane)
Machining feed
Const. single drilling depth for G73, G83 Lift-off distance for G76
Dwell time at drill-hole depth for G82, G84, G76, G89
Reference plane Drill-hole depth
Siemens AG, 2002. All rights reserved SINUMERIK 840D/840Di/810D, Description of Functions ISO Dialects (FBFA) – 11.02 Edition
3-75
Page 76
3 Cycles and Contour Definition
3.3 Drilling cycles (ISO Dialect M)
Plane
Table 3-4 Definition of the plane
Defined plane Position of hole Depth
G17 X, Y Z G18 Z, X Y G19 Y, Z X
10.02
Z
Drilling tool
Initial plane (G98)
Reference plane (G99)
R (abs.)
Workpiece surface
Z (abs.)
Fig. 3-4 Example of deep hole drilling cycle G83 with defined plane G17
Representation of initial plane, reference plane and parameters
Q
Q
Q
R incr.
Z (incr.)
3-76
SINUMERIK 840D/840Di/810D, Description of Functions ISO Dialects (FBFA) – 11.02 Edition
Siemens AG, 2002. All rights reserved
Page 77
10.02
3.3.2 Description of shell cycle CYCLE381M
In ISO Dialect M mode, the call is performed with G commands G81, G82, G85.
3 Cycles and Contour Definition
3.3 Drilling cycles (ISO Dialect M)
Notes
The drilling axis must be defined via GUD _ZSFI[0] (see Section 3.2). The direction from initial plane to reference plane must be identical to the
direction from reference plane to final depth. GUD _ZSFR[0] can be used to enter a safety clearance. If the safety clearance
was already allowed for when programming the reference plane, the value 0 must be entered in _ZSFR[0].
If no reference plane was programmed, the drilling is performed starting on the initial plane (current position).
The final drilling depth must be programmed. Otherwise, an alarm is displayed. If no feedrate is programmed, the current feedrate is used as the drilling feed.
Note
Alarms are listed with their alarm number and description in Chapter “Alarms”.
3.3.3 Description of shell cycle CYCLE383M
In ISO Dialect M mode, the call is performed with G commands G73, G83.
Notes
The drilling axis must be defined via GUD _ZSFI[0] (see Section 3.2). The direction from initial plane to reference plane must be identical to the
direction from reference plane to final depth. GUD _ZSFR[0] can be used to enter a safety clearance. If the safety clearance
was already allowed for when programming the reference plane, the value 0 must be entered in _ZSFR[0].
If no reference plane was programmed, the drilling is performed (in steps) starting on the initial plane (current position).
The final drilling depth and the single drilling depth Q must be programmed. Otherwise, an alarm is displayed.
If no feedrate is programmed, the current feedrate is used as the drilling feed.
Note
Alarms are listed with their alarm number and description in Chapter “Alarms”.
Siemens AG, 2002. All rights reserved SINUMERIK 840D/840Di/810D, Description of Functions ISO Dialects (FBFA) – 11.02 Edition
3-77
Page 78
3 Cycles and Contour Definition
3.3 Drilling cycles (ISO Dialect M)
10.02
Deep hole drilling with chip removal
Deep hole drilling with chipbreaking
The safety clearance in the standard Siemens cycle is determined by a formula, i.e. it cannot be selected by the user.
For stock removal, retraction is to the reference plane.
Single drilling depth “Q”:
– If “Q” is missing or Q – If Q > total depth, one drilling operation is executed up to the final depth. – If Q
– If Q
The amount of retraction for chipbreaking is defined via GUD _ZSFR[1].
– _ZSFR[1] – _ZSFR[1] 0 Retraction amount is always 1mm
Single drilling depth “Q”:
– If “Q” is missing or Q – If Q > total depth, one drilling operation is executed up to the final depth. – If Q
> total depth/2, the 1st drilling operation is performed with the value
of Q. The remainder is then drilled in one drilling operation.
< total depth/2, the single depth is machined until the remaining
depth < Q/2. The remainder is then subdivided into 2 infeed movements of the same size.
> 0 Retraction amount as entered
< total depth, the single drilling depth is machined until the
remaining depth Q. The remainder is then machined in one drilling operation.
0, an alarm is displayed.
0, an alarm is displayed.
3.3.4 Description of shell cycle CYCLE384M
In ISO Dialect M mode, the call is performed with G commands G74, G84.
Notes
The drilling axis must be defined via GUD _ZSFI[0] (see Section 3.2). The direction from initial plane to reference plane must be identical to the
direction from reference plane to final depth. GUD _ZSFR[0] can be used to enter a safety clearance. If the safety clearance
was already allowed for when programming the reference plane, the value 0 must be entered in _ZSFR[0].
The speed of rotation during retraction can be controlled via GUD _ZSFI[2]. Example: _ZSFI[2]=80, the retraction takes place with 80 % of the drilling speed.
If no reference plane was programmed, the drilling is performed starting on the initial plane (current position).
The final drilling depth must be programmed. Otherwise, an alarm is displayed. If no feedrate is programmed, the current feedrate is used as the drilling feed. If the drilling feed is specified in mm/min (inch/min), the programmed feed value
is converted to the appropriate revolutional feedrate, depending on the speed last programmed, and passed to the standard tapping cycle CYCLE84 as a lead value.
3-78
SINUMERIK 840D/840Di/810D, Description of Functions ISO Dialects (FBFA) – 11.02 Edition
Siemens AG, 2002. All rights reserved
Page 79
10.02
Note
Alarms are listed with their alarm number and description in Chapter “Alarms”.
3.3.5 Description of shell cycle CYCLE387M
In ISO Dialect M mode, the call is performed with G commands G76 and G87.
3 Cycles and Contour Definition
3.3 Drilling cycles (ISO Dialect M)
Notes
The drilling axis must be defined via GUD _ZSFI[0] (see Section 3.2). The direction from initial plane to reference plane must be identical to the
direction from reference plane to final depth. GUD _ZSFR[0] can be used to enter a safety clearance. If the safety clearance
was already allowed for when programming the reference plane, the value 0 must be entered in _ZSFR[0].
The lift-off path is always with reference to the negative direction of the first geometry axis
For plane G17 Lift-off path in –X For plane G18 Lift-off path in –Z For plane G19 Lift-off path in –Y
The angle must be therefore be entered such that the tool tip points in the positive direction (+) in the defined plane after the spindle stop. Example: If plane G17 is active, the tool tip must point in the +X direction.
If no reference plane was programmed, the drilling is performed starting on the initial plane (current position).
The final drilling depth must be programmed. Otherwise, an alarm is displayed. If no feedrate is programmed, the current feedrate is used as the drilling feed. If no lift-off amount is programmed, Q = 0 is set. In this case, the cycle is
executed without lift-off. After retracting to the return plane, the tool is moved back to the center of the
drill-hole and the spindle is started in the direction of rotation for machining.
Note
Alarms are listed with their alarm number and description in Chapter “Alarms”.
Siemens AG, 2002. All rights reserved SINUMERIK 840D/840Di/810D, Description of Functions ISO Dialects (FBFA) – 11.02 Edition
3-79
Page 80
3 Cycles and Contour Definition
3.4 Turning and drilling cycles (ISO Dialect T)
3.4 Turning and drilling cycles (ISO Dialect T)
3.4.1 Turning cycles G70 to G76
Table 3-5 Overview of turning cycles
G command Description
G70 Finishing cycle G71 Stock removal cycle longitudinal axis G72 Stock removal cycle transverse axis G73 Repeat contour G74 Deep hole drilling and recessing in longitudinal axis (Z) G75 Deep hole drilling and recessing in facing axis (X) G76 Multiple thread cutting cycle
The cycle parameters for G71 to G76 can comprise two G commands. Depending on the addresses programmed in the block, the values of the addresses programmed in the NC block are only saved for use in a subsequent cycle call, or the actual cycle is started. The evaluation of the two cases is performed within the shell cycle.
10.00
10.02
Cycle call from ISO Dialect T mode
G70 CYCLE 370T
G71
G72
G73
G74 G75
G76 G76
Switchover to Siemens mode
Fig. 3-5 Assignment of the cycle call in ISO Dialect T mode via shell cycle for Siemens
standard cycle
Shell cycle
CYCLE 371T
CYCLE 372T
CYCLE 373T
CYCLE 374T
CYCLE 376T
Siemens standard cycle
running without standard cycle
CYCLE395
CYCLE395
CYCLE395
CYCLE375T
CYCLE398
3-80
SINUMERIK 840D/840Di/810D, Description of Functions ISO Dialects (FBFA) – 11.02 Edition
Siemens AG, 2002. All rights reserved
Page 81
10.02
Finishing cycle G70
3 Cycles and Contour Definition
3.4 Turning and drilling cycles (ISO Dialect T)
G70 P.. Q..
Block number in main program at which the contour definition ends Block number in main program at which the contour definition begins
Fig. 3-6 Description of parameters allowed
In ISO Dialect mode, the contour in the main program is not skipped with G70. The program is always resumed at the next parts program block following the cycle call.
Example:
When the cycle is called, the contour in N20–N50 is traversed; the parts program continues running at N20 after the end of the cycle. G70 is naturally always called up after the contour definition.
N10 G70 P20 Q50 N20 X100. Z50. N30 X200. N40 Z100. N50 X250. Z111. N60 M30
Blocks N20–N50 are executed once by the finishing cycle and again by the normal program run.
Stock removal cycle, longitudinal axis G71
G71 U.. R..
Retraction path Infeed depth for stock removal
Fig. 3-7 Description of parameters allowed; saving values in GUD
G71 P.. Q.. U.. W.. F.. S.. T..
Tool selection Spindle speed Machining feed Final machining allowance in Z axis Final machining allowance in X axis Block number at which the contour definition ends Block number at which the contour definition begins
Fig. 3-8 Description of parameters allowed; running cycles
Siemens AG, 2002. All rights reserved SINUMERIK 840D/840Di/810D, Description of Functions ISO Dialects (FBFA) – 11.02 Edition
3-81
Page 82
3 Cycles and Contour Definition
3.4 Turning and drilling cycles (ISO Dialect T)
With G71 in ISO Dialect T, the contour is followed with the final machining allowance in the main program after stock removal (to remove any remaining straight edges). The program is always resumed at the parts program block following the last block of the contour definition. parts program blocks between the cycle call and the first block of the contour description are not executed.
N10 G71 P50 Q80 U4 W3 F1000 ... N20 G1 F0.5 G95 S1000 N30 X30. Z10. N40 M30 N50 X100. Z50. N60 X200. N70 Z100. N80 X250. Z111. N90 M30
Blocks N20–N40 are skipped and are not executed. If G71 is called in the parts program after the contour definition, the program goes into an infinite loop. Allowance must be made for the different continuation patterns of the parts program in the shell cycles.
Example: G71 U6 R5 Saving values in GUD
In the example, the values programmed in the shell cycle are read from the system variables ($C_xx) and stored in channel-specific GUD. Separate GUD are available for each cycle (G71–G76); the programmed values therefore remain valid until the next time they are programmed (in an NC block with G71–G76). Case 1 does not have to be programmed, therefore it is advisable to initialize the assigned GUD.
Example: G71 P30 Q50 U3 Starting cycle execution
In the example, the programmed values are only saved in system variables ($C_xx). The system variables are overwritten in every NC block containing a G function for a cycle call. With G71–G73, the cycle always starts running on the G command after which the “P” and “Q” are programmed. With G74–G76, the cycle starts running on the G command after which the X/U or Z/W addresses are programmed. The F, S and T commands in the call line of the cycle are also stored in system variables. A cycle-specific distinction does not therefore have to be made between the addresses. The shell cycle assigns the meaning to the parameters (e.g. for G76, the address F means pitch and not feed). For G70, the feed, speed and tool selection commands (F, S, T) from the program section of the contour definition are relevant.
The same shell cycle is always called in both cases.
10.02
3-82
SINUMERIK 840D/840Di/810D, Description of Functions ISO Dialects (FBFA) – 11.02 Edition
Siemens AG, 2002. All rights reserved
Page 83
10.02
3 Cycles and Contour Definition
3.4 Turning and drilling cycles (ISO Dialect T)
Stock removal cycle, transverse axis G72
Contour repetition G73
Parameters allowed: see G71 (stock removal cycle, longitudinal axis)
G72 W.. R..
Retraction path Infeed depth for stock removal
Fig. 3-9 Description of parameters allowed; saving values in GUD
G73 U.. W.. R..
Number of cuts parallel to the contour Offset from start point to current tool position
in Z axis Offset from start point to current tool position
in X axis
Fig. 3-10 Description of parameters allowed; saving values in GUD
G73 P.. Q.. U.. W.. F.. S.. T..
Tool selection Spindle speed Machining feed Final machining allowance in Z axis Final machining allowance in X axis Block number at which the contour definition ends Block number at which the contour definition begins
Deep hole drilling and recessing in longitudinal axis G74
Fig. 3-11 Description of parameters allowed; running cycles
G74 R..
Retraction path for chipbreaking
Fig. 3-12 Description of parameters allowed; saving values in GUD
Siemens AG, 2002. All rights reserved SINUMERIK 840D/840Di/810D, Description of Functions ISO Dialects (FBFA) – 11.02 Edition
3-83
Page 84
3 Cycles and Contour Definition
3.4 Turning and drilling cycles (ISO Dialect T)
G74 X/U.. Z/W... P.. Q.. R.. F..
Fig. 3-13 Description of parameters allowed; running cycles
Note
The cycle can be used as a drilling or recessing cycle. If the cycle is used for drilling, addresses X/U and P must not be used.
10.02
Machining feed Retraction path at entry base Infeed in longitudinal axis (Z axis) until
chipbreaking Infeed in transverse axis (X axis) for
the next recessing cut Start position in Z axis
Z=absolute position W=incremental position
Start position in X axis X=absolute position or U=incremental position
Deep hole drilling and recessing in the transverse axis G75
G75 R..
Retraction path for chipbreaking
Fig. 3-14 Description of parameters allowed; saving values in GUD
G75 X/U.. Z/W.. P.. Q.. R.. F..
Machining feed Retraction path at recess base Infeed in longitudinal axis (Z axis) until
chipbreaking Amount of infeed in transverse axis (X axis)
until chipbreaking Start position in Z axis
Z=absolute position W=incremental position
Start position in X axis X=absolute position or U=incremental position
3-84
Fig. 3-15 Description of parameters allowed; running cycles
SINUMERIK 840D/840Di/810D, Description of Functions ISO Dialects (FBFA) – 11.02 Edition
Siemens AG, 2002. All rights reserved
Page 85
10.02
Multiple thread cutting cycle G76
3 Cycles and Contour Definition
3.4 Turning and drilling cycles (ISO Dialect T)
Note
The cycle can be used as a drilling or recessing cycle. If the cycle is used for drilling, addresses Z/W and Q must not be used.
G76 Pxxxxxxx Q.. R..
Final machining allowance
Minimum infeed depth; the depth is never below this value during infeed not exceeded
Angle of tool cutting edge Size of the chamfer at the end of the thread in 1/10x
thread pitch Number of finish cuts
Fig. 3-16 Description of parameters allowed; saving values in GUD
G76 X/U.. Z/W.. R.. P.. Q.. F..
Lead Amount of first infeed Thread depth/total infeed in X axis
Radius difference for taper thread
Thread end point in Z axis Z=absolute position W=incremental position
Thread end point in X axis X=absolute position or U=incremental position
Fig. 3-17 Description of parameters allowed; running cycles
Example for address P: G76 P012055 Q4 R0.5
P = 012055
Angle of tool cutting edge = 55 degrees Chamfer at the end of the thread=2.0 x thread pitch
1 finish cut
Siemens AG, 2002. All rights reserved SINUMERIK 840D/840Di/810D, Description of Functions ISO Dialects (FBFA) – 11.02 Edition
3-85
Page 86
3 Cycles and Contour Definition
3.4 Turning and drilling cycles (ISO Dialect T)
3.4.2 Turning cycles G77 to G79
Table 3-6 Overview of turning cycles G77 to G79
G command Description
G77 Longitudinal stock removal G78 Thread cutting G79 Transverse stock removal
These cycle calls are modal and are called in every NC block containing axis movements. The machining movements are defined in the call parameters after the G function. The following parameters are allowed in NC blocks with cycle calls via G77–G79:
10.02
X
Fig. 3-18 Parameters for cycle calls via G77 to G79
ZW
U = End position of contour in X (incr.) Z = End position of contour in Z (abs.) or W = End position of contour in Z (incr.) R = Incremental radius difference to
end position in X for taper turning
R = Machining feed for G77/G79
Thread lead for G78
U
R
Z
3-86
SINUMERIK 840D/840Di/810D, Description of Functions ISO Dialects (FBFA) – 11.02 Edition
Siemens AG, 2002. All rights reserved
Page 87
10.02
Longitudinal stock removal G77
Thread cutting G78
3 Cycles and Contour Definition
3.4 Turning and drilling cycles (ISO Dialect T)
G77 X(U).. Z(W).. R.. F..
Machining feed Incremental offset of end position
in X axis for taper turning Cylinder turning: R not programmed or R=0
Position in Z axis Z=absolute position W=incremental position
Position in X axis X=absolute position U=incremental position
Fig. 3-19 Description of parameters allowed; running cycles
G78 X(U).. Z(W).. R.. F..
Transverse stock removal G79
Lead Incremental offset of end position
in X axis for taper turning Cylinder turning: R not programmed or R=0
Position in Z axis Z=absolute position W=incremental position
Position in X axis X=absolute position U=incremental position
Fig. 3-20 Description of parameters allowed; running cycles
G79 X(U).. Z(W).. R.. F..
Machining feed Incremental offset of end position
in Z axis for taper turning Cylinder turning: R not programmed or R=0
Position in Z axis Z=absolute position W=incremental position
Position in X axis X=absolute position U=incremental position
Fig. 3-21 Description of parameters allowed; running cycles
Siemens AG, 2002. All rights reserved SINUMERIK 840D/840Di/810D, Description of Functions ISO Dialects (FBFA) – 11.02 Edition
3-87
Page 88
3 Cycles and Contour Definition
3.4 Turning and drilling cycles (ISO Dialect T)
3.4.3 Drilling cycles G80 to G89
Table 3-7 Overview of drilling cycles
G command Description
G80 Drilling cycle off G83 Face deep hole drilling G84 Face tapping G85 Face drilling G87 Side deep hole drilling G88 Side tapping G89 Side drilling
10.02
Cycle call from ISO Dialect T mode
G84
Shell cycle
CYCLE 384T
Siemens standard cycle
CYCLE84
G88
G85 G89
G83
CYCLE 385T
CYCLE 383T
CYCLE375T
CYCLE375T
G87
Switchover to Siemens mode
Fig. 3-22 Assignment of the drilling cycle in ISO Dialect T mode via shell cycle for
Siemens standard cycle
G83 X(U).. C(H).. Z(W).. R.. P.. Q.. F.. K.. M.. G84 G85
Drill-hole position
M code for clamping C axis
Number of repetitions If K was not programmed, the cycle is executed once; K=0 The cycle is not executed
Machining feed
Infeed
Dwell time at drill-hole depth
3-88
Distance between return plane and drilling plane
Drill-hole depth
Fig. 3-23 Description of parameters allowed; running cycles
SINUMERIK 840D/840Di/810D, Description of Functions ISO Dialects (FBFA) – 11.02 Edition
Siemens AG, 2002. All rights reserved
Page 89
10.02
3 Cycles and Contour Definition
3.4 Turning and drilling cycles (ISO Dialect T)
G87 Z(W).. C(H).. X(U).. R.. P.. Q.. F.. K.. M.. G88 G89
Drill-hole position
Distance between return plane and drilling plane
Drill-hole depth
Fig. 3-24 Description of parameters allowed; running cycles
The drilling cycles are modal and are executed in every NC block in which axis movements for axes X, Y, and Z are programmed. While a drilling mode is active, you only have to program the new parameters in order to make parameter modifications. The parameters are stored in system variables $C_xx (xx = Nc address) which are read by the cycles.
The cycle is not executed if a G function of the first G group appears after the cycle G function in the same NC block. Only the axes programmed in the NC block are moved. Addresses R, Q, P, K are not copied into the system variables. The feed programmed in this block is activated.
Set M code for C axis
Number of repetitions If K was not programmed, the cycle is executed once; K=0 The cycle is not executed
Machining feed
Infeed
Dwell time at drill-hole depth
X
Fig. 3-25 Drilling cycle
R
Q
Q
Z (X)
Q
Z
Siemens AG, 2002. All rights reserved SINUMERIK 840D/840Di/810D, Description of Functions ISO Dialects (FBFA) – 11.02 Edition
3-89
Page 90
3 Cycles and Contour Definition
3.4 Turning and drilling cycles (ISO Dialect T)
10.02
Modal cycles
All modal cycles are deselected in ISO Dialect mode with G80 or with a G function of the first G group (G00–G03, G33, G34, except for G77–G79).
Cycle parameters can be programmed in the following blocks while a modal cycle is active. These parameters are copied into the system variables so that the shell cycle uses the modified parameters.
Example:
N10 G81 X10. Z15. R5 Q4 P10 F1000 N20 X50. ;Drilling cycle at position X50
3.4.4 Description of shell cycle CYCLE383T
In ISO Dialect T mode, the call is performed with G commands G83 and G87.
Notes
The direction from initial plane to reference plane must be identical to the direction from reference plane to final depth. Otherwise this results in an error message from the Siemens drilling cycle.
In ISO Dialect T, the programmer must take into account the safety clearance when defining the reference plane. In Siemens mode, the safety clearance to the R plane can be specified independently. This possibility has also been implemented for the ISO cycles. GUD _ZSFR[20] can be used if necessary to enter a safety clearance. If the safety clearance was already allowed for when programming the R plane, the value “NULL” must be entered in GUD_ZSFR[20].
GUD_ZSFR[23] is used to specify whether the dwell time for G95 (only in the case of deep hole drilling) must be executed in seconds or revolutions.
A shell cycle is only permitted to be called from the external G code (G83/G87). A call in Siemens mode (after switching over with G290 and calling CYCLE383T) is not permitted.
If the G83/G87 block contains axis names other than X/Z (U/W), this results in the alarm (61811) “ISO axis name is not permitted”.
GUD_ZSFR[2] is used to determine whether the cycle is executed with chip breaking or chip removal.
In ISO Dialect, the constant individual depth is maintained until the remainder is removed on the floor of the drilled hole with an infeed. In Siemens mode, the remainder (less 2*individual depth) on the floor of the drilled hole is subdivided into two equal infeeds.
3-90
Note
Alarms are listed with their alarm number and description in Chapter “Alarms”.
SINUMERIK 840D/840Di/810D, Description of Functions ISO Dialects (FBFA) – 11.02 Edition
Siemens AG, 2002. All rights reserved
Page 91
10.02
3.4 Turning and drilling cycles (ISO Dialect T)
3.4.5 Description of shell cycle CYCLE384T
In ISO Dialect T mode, the call is performed with G commands G84 and G88.
3 Cycles and Contour Definition
Notes
The direction from initial plane to reference plane must be identical to the direction from reference plane to final depth. Otherwise this results in an error message from the Siemens drilling cycle. ISO Dialect does not monitor this.
In ISO Dialect T, the programmer must take into account the safety clearance when defining the reference plane. In Siemens mode, the safety clearance to the R plane can be specified independently. This possibility has also been implemented for the ISO cycles. GUD _ZSFR[20] can be used if necessary to enter a safety clearance. If the safety clearance was already allowed for when programming the R plane, the value “NULL” must be entered in GUD_ZSFR[20].
A shell cycle is only permitted to be called from the external G code (G84/G88). A call in Siemens mode (after switching over with G290 and calling CYCLE384T) is not permitted.
If the G84/G88 block contains axis names other than X/Z (U/W), this results in the alarm (61811) “ISO axis name is not permitted”.
The drilling speed during retraction can be controlled via GUD _ZSFI[22] (value in %). Example: _ZSFI[22]=95, the retraction takes place with 95% of the drilling depth.
Note
Alarms are listed with their alarm number and description in Chapter “Alarms”.
Siemens AG, 2002. All rights reserved SINUMERIK 840D/840Di/810D, Description of Functions ISO Dialects (FBFA) – 11.02 Edition
3-91
Page 92
3 Cycles and Contour Definition
3.4 Turning and drilling cycles (ISO Dialect T)
3.4.6 Description of shell cycle CYCLE385T
In ISO Dialect T mode, the call is performed with G commands G85 and G89.
10.02
Notes
The direction from initial plane to reference plane must be identical to the direction from reference plane to final depth. Otherwise this results in an error message from the Siemens drilling cycle. ISO Dialect does not monitor this.
In ISO Dialect T, the programmer must take into account the safety clearance when defining the reference plane. In Siemens mode, the safety clearance to the R plane can be specified independently. This possibility has also been implemented for the ISO cycles. GUD _ZSFR[20] can be used if necessary to enter a safety clearance. If the safety clearance was already allowed for when programming the R plane, the value “NULL” must be entered in GUD_ZSFR[20].
A shell cycle is only permitted to be called from the external G code (G85/G89). A call in Siemens mode (after switching over with G290 and calling CYCLE385T) is not permitted.
If the G85/G89 block contains axis names other than X/Z (U/W), this results in the alarm (61811) “ISO axis name is not permitted”.
If the G84 block contains axis names other than X/Z (U/W), this results in the alarm (61811) “ISO axis name is not permitted”.
Note
Alarms are listed with their alarm number and description in Chapter “Alarms”.
3-92
SINUMERIK 840D/840Di/810D, Description of Functions ISO Dialects (FBFA) – 11.02 Edition
Siemens AG, 2002. All rights reserved
Page 93
10.02
3.5 System variables
The names of the system variables all begin with $C_ xx. The NC address, whose value is stored in the system variable, appears in the name extension xx. The G number used to call a cycle is always stored in variable $C_G.
For all addresses, bit 0 is set in system variables $C_x_PROG if the address is programmed.
In addition, bit 1 is set in variable $C_x_PROG for axis addresses programmed incrementally.
$C_x_PROG is set to FALSE at the end of the subprogram (M17, RET).
Example 1:
N10 G01 G81 X100. Z–50. R20 F100
Shell cycle CYCLE381M for G81 is called automatically. The calculations are performed in the shell cycle and the Siemens standard drilling cycle CYCLE82 is then called. The G01 command is not required.
The values of the programmed addresses are written into the following system variables:
Address X is written to system variable $C_X; Address Z is written to system variable $C_Z; Address R is written to system variable $C_R; Address F is written to system variable $C_F;
Example 2:
Axis Z is programmed in incremental dimensions (G91)  $C_Z_PROG=3 Axis Z is programmed in absolute dimensions (G90) $C_Z_PROG =1
Example 3: Siemens shell cycle for Gxy
N10 PROC CYCLE377 DISPLOF ;Block display remains at G77 block,
N20 DEF REAL DELTA_X, pos_X, pos_Z, FEED N30 DEF BOOL R_prog, X_prog, Z_prog N50 DELTA_X = 0 N60 IF $C_R_PROG ;Only load DEL TA_X if address R N70 DELTA_X = $C_R ;was programmed N75 ENDIF N110 CYCLE...(DELTA_X, $C_X, $C_Z, $C_R_PROG, $C_X_PROG, $C_Z_PROG, $C_F) ;Call Siemens cycle N230 RET ;End of shell cycle
3 Cycles and Contour Definition
3.5 System variables
;Freeze G code display
Siemens AG, 2002. All rights reserved SINUMERIK 840D/840Di/810D, Description of Functions ISO Dialects (FBFA) – 11.02 Edition
3-93
Page 94
3 Cycles and Contour Definition
3.5 System variables
Table 3-8 List and description of system variables
10.02
Identifier
$C_A REAL Value of programmed address A in ISO Dialect mode for cycle programming $C_B REAL Value of programmed address B in ISO Dialect mode for cycle programming
.... .... .....
$C_G INT G number for cycle calls in external mode $C_H REAL Value of programmed address H in ISO Dialect mode for cycle programming $C_I[ ] REAL Value of programmed address I in ISO Dialect mode for cycle programming and macro
$C_I_ORDER[ ] REAL For description see $C_I[ ], used to define the programming sequence $C_J[ ] REAL For description see $C_I[ ] $C_J_ORDER[ ] REAL For description see $C_I[ ], used to define the programming sequence $C_K[ ] REAL For description see $C_I[ ] $C_K_ORDER[ ] REAL For description see $C_I[ ], used to define the programming sequence $C_L REAL Value of programmed address L in ISO Dialect mode for cycle programming
.... .... ....
$C_Z REAL Value of programmed address Z in ISO Dialect mode for cycle programming $C_TS STRING String of tool name programmed at address T $C_A_PROG INT Address A is programmed in a block with a cycle call.
$C_B_PROG INT Address B is programmed in a block with a cycle call.
.... .... ....
$C_G_PROG INT The shell cycle call is programmed with a G function $C_Z_PROG INT Address Z is programmed in a block with a cycle call.
$C_TS_PROG INT A tool name was programmed at address T
$C_ALL_PROG INT Bitmap of all programmed addresses in a block with a cycle call
$P_EXTGG[n] INT Active G code of the external language $C_INC_PROG INT Bitmap of all programmed incremental addresses in a block with a cycle call
$C_I_NUM INT Cycle programming: Value is always 1 if bit 0 set in $C_I_PROG.
Type Description
programming with G65/G66. Up to 10 items are possible in one block for macro programming. The values are stored in the array in the order in which they are programmed.
0 = not programmed 1 = programmed (absolute) 3 = programmed (incremental)
0 = not programmed 1 = programmed (absolute) 3 = programmed (incremental)
0 = not programmed 1 = programmed (absolute) 3 = programmed (incremental)
TRUE = programmed, FALSE = not programmed
Bit 0 = address A Bit 25 = address Z Bit = 1 address programmed in incremental dimensions Bit = 0 address not programmed
Bit 0 = address A Bit 25 = address Z Bit = 1 address programmed in incremental dimensions Bit = 0 address programmed in absolute dimensions
Macro programming: Number of I addresses programmed in block (max. 10).
3-94
SINUMERIK 840D/840Di/810D, Description of Functions ISO Dialects (FBFA) – 11.02 Edition
Siemens AG, 2002. All rights reserved
Page 95
10.02
3 Cycles and Contour Definition
3.5 System variables
Table 3-8 List and description of system variables
Identifier DescriptionType
$C_J_NUM INT For description see $C_I_NUM $C_K_NUM INT For description see $C_I_NUM $P_AP INT Polar coordinates 0 = OFF 1 = ON $C_TYP_PROG INT Bit map of all programmed addresses in a block with a cycle call
$C_PI INT Program number of the interrupt routine that was programmed with M96
Bit 0 = A Bit 25 = Z Bit = 0 axis programmed as INT Bit = 1 axis programmed as REAL
Siemens AG, 2002. All rights reserved SINUMERIK 840D/840Di/810D, Description of Functions ISO Dialects (FBFA) – 11.02 Edition
3-95
Page 96
3 Cycles and Contour Definition
3.6 Programming contour definitions (ISO Dialect T)
3.6 Programming contour definitions (ISO Dialect T)
Contour definitions can be programmed in both ISO Dialect T mode and Siemens mode.
There are 3 basic shapes of contour
S A straight line
The end point is programmed with a Cartesian coordinate and an angle
S Two straight lines
The transition is programmed with a rounding or chamfer
S Three straight lines
The transitions are programmed with a rounding or chamfer
In the descriptions below, indices are occasionally assigned to the address letters X, Z, A, R and C to establish a unique assignment between the NC block and the associated drawing. These indices do not appear in the NC program. The assignment is always derived uniquely from the block containing the address letter. Address letter Q is used as a placeholder for R or C, where either of these letters can appear. Q can also be omitted. In this case, no chamfer or rounding is inserted at the transition between the two linear sections.
Any number of other NC addresses can be used in blocks defining contours, e.g. address letters for further axes (individual axes or an axis perpendicular to the machining plane), auxiliary function parameters, G codes, velocities, etc.
In the following examples, it is assumed that G18 is active. Programming of contours is also possible without restriction with G17 or G19, however.
10.02
ISO Dialect mode
Siemens mode
Address C is used in ISO Dialect mode both as an axis identifier and as an identifier for a chamfer on the contour.
Address R can be a cycle parameter or an identifier for the radius in a contour. In order to distinguish between these two options, a “,” must be placed in front of
the C or R address during contour definition programming (as in ISO Dialect). A comma does not have to be entered if an angle is programmed before C or R. If a radius and a chamfer are programmed together in the same block, e.g. N333 X100 A10 C20 R15, regardless of the programming sequence, a radius will always be inserted in the contour. The chamfer is ignored.
The identifiers for angle, radius and chamfer are defined by machine data in Siemens mode. This prevents the occurrence of name conflicts. A comma must not be programmed before the identifier for radius or chamfer.
3-96
SINUMERIK 840D/840Di/810D, Description of Functions ISO Dialects (FBFA) – 11.02 Edition
Siemens AG, 2002. All rights reserved
Page 97
10.02
3.6 Programming contour definitions (ISO Dialect T)
Note
MD 10652 for angle: $MN_CONTEUR_DEF_ANGLE_NAME MD 10654 for radius: $MN_RADIUS_NAME MD 10656 for chamfer: $MN_CHAMFER_NAME (applies in Siemens mode only)
3.6.1 End point programming with angles
If address letter A appears in an NC block, one, both or none of the axes on the active plane can be programmed.
If no axis on the active plane is programmed, the block is either the first or the second block of a contour totaling two blocks. If the block is the second block of such a contour definition, the start and end point in the active plane are identical. In this case, the contour merely consists of a movement perpendicular to the active plane.
If one axis on the active plane is programmed, either a single straight line is being described, whose end point is determined exactly by the angle and the programmed Cartesian coordinate, or we are dealing with the second block of a contour totaling two blocks. In the latter case, the missing coordinate will be set equal to the last (modal) position reached.
If two axes on the active plane are programmed, the block is the second block of a contour comprising two blocks. If the current block was not preceded by a block with angle programming without programmed axes of the active plane, the block is not permitted.
Angle A must only be programmed with linear or spindle interpolation. (Spline interpolation only in Siemens mode.)
Alarms are generated in the following situations:
3 Cycles and Contour Definition
S In a contour consisting of two blocks, the active plane was changed during
the transition from the first to the second block.
S In a contour consisting of two straight lines, a valid intermediate point cannot
be generated from the programmed angles.
S Neither linear nor spline interpolation is active in a block with address A. S A block with address A without a programmed axis on the active plane is not
followed by a block with which the end point of the contour can be determined. This is the case if the block is the last block in a program or if the following block contains a preprocessor stop.
S No angle was programmed in the second block of a contour consisting of
two straight lines.
S Both axes on the active plane are programmed in a block with address A
which is not the second block of a contour consisting of two straight lines.
S Programmed Cartesian coordinate and programmed angle are incompatible.
Siemens AG, 2002. All rights reserved SINUMERIK 840D/840Di/810D, Description of Functions ISO Dialects (FBFA) – 11.02 Edition
3-97
Page 98
3 Cycles and Contour Definition
3.6 Programming contour definitions (ISO Dialect T)
3.6.2 Straight line with angle
The end point is defined by specifying the angle A and one of the two coordinates X
Programming syntax:
.. A.. or
X
2
Z2.. A..
or Z2.
2
X
(X2, Z2)
10.02
A
(X1, Z1)
Fig. 3-26 Straight line with angle
Example (Fig. 3-24): Programming in ISO Dialect T mode:
N10 G1 X5. Z70. F1000 G18 N 20 X88.8 A 110 or (Z39.5 A110)
Programming in Siemens mode:
N10 X5. Z70. F1000 G18 N20 X88.8 ANG=110 or (Z39.5 ANG=110)
Z
3-98
SINUMERIK 840D/840Di/810D, Description of Functions ISO Dialects (FBFA) – 11.02 Edition
Siemens AG, 2002. All rights reserved
Page 99
10.02
3 Cycles and Contour Definition
3.6 Programming contour definitions (ISO Dialect T)
X
X88.8, Z39.5)
110 degrees
(X5, 70)
Z
Fig. 3-27 Straight line with angle
3.6.3 Two straight lines
The end point of the first straight line can be programmed either by specifying the Cartesian coordinates or by specifying the angle of the two straight lines relative to the abscissa.
Programming syntax:
N10 A N20 X3.. Z3.. A2..
or N10 X
N20 X
.. (Q..)
1
.. Z1.. (Q..)
1
.. Z3..
3
Siemens AG, 2002. All rights reserved SINUMERIK 840D/840Di/810D, Description of Functions ISO Dialects (FBFA) – 11.02 Edition
3-99
Page 100
3 Cycles and Contour Definition
3.6 Programming contour definitions (ISO Dialect T)
X
(X3, Z3)
C
(X2, Z2)
10.02
A
2
R
A
1
(X1, Z1)
Fig. 3-28 Two straight lines
Example (Fig. 3-26): Programming in ISO Dialect T mode:
N10 G1 X10. Z80. F1000 G18 N20 A 1.48.64 C5.5 N30 X85. Z40. A100
Programming in Siemens mode:
N10 X10. Z80. F1000 G18 N20 ANG=148.65 CHR=5.5 N30 X85. Z40. ANG=100
Z
3-100
SINUMERIK 840D/840Di/810D, Description of Functions ISO Dialects (FBFA) – 11.02 Edition
Siemens AG, 2002. All rights reserved
Loading...