|
|
Motion commands
4.4 Tool offset functions
Table 4-11
G functions for selecting the plane
G function
Function
G group
G17
Selection of plane X-Y
02
G18
Selection of plane Z-X
02
G19
Selection of plane Y-Z
02
• The selected plane should not be changed if the tool offset is selected, otherwise there is an
error message.
Activation/deactivation of tool radius compensation
A drive command must be programmed with G0 or G1 if an NC block contains G40, G41 or G42.
At least one axis of the selected working plane must be specified in this drive command.
Note
Compensation mode
Compensation mode may only be interrupted by a certain number of consecutive blocks or M
functions which do not contain drive commands or positional data in the compensation plane:
Standard 3.
Note
Machine manufacturer
The number of successive interruptions blocks or M functions can be set via the machine data
20250 CUTCOM_MAXNUM_DUMMY_BLOCKS (refer to machine manufacturer).
Note
A block with path zero is also taken as interruption!
Changeover between G41 and G42 in operation with cutter radius compensation
The offset direction (left or right) can be changed over directly without having to leave the
compensation mode.
The new offset direction is approached with the next block, through an axis motion.
ISO Milling
Programming Manual, 10/2020, 6FC5398-7BP40-3BA1
63
Motion commands
4.4 Tool offset functions
3URJUDPPLQJ H[DPSOH
6HW IRU VZLWFKLQJ WKH RIIVHW GLUHFWLRQ
1
*
*
)
1
*
*
'
*
1
1
*
;
<
)
1
*
*
;
<
1
;
1
1
D *
*
*
1
1
*
1
*
E *
*
1RWH ,I WKH FRQWHQW RI %ORFN 1 LV UHSURGXFHG LQ WZR EORFNV DV VSHFLILHG EHORZ
*
RU *
;
<
WKH RIIVHW GLUHFWLRQ LV DOVR VZLWFKHG RYHU LQ WKH VDPH ZD\
Figure 4-13
Changeover of the tool offset direction at block start and end of block
Deselection of the tool offset
There are two methods of deselecting the tool offset, which can be set through the setting data
42494 $SC_CUTCOM_ACT_DEACT_CTRL.
1. Method A:
If G40 is programmed in a block without axis motion, the tool radius compensation is
deselected only with the next block through an axis motion.
2. Method B:
If G40 is programmed in a block without axis motion, the tool radius compensation is
deselected immediately. In other words, that linear interpolation (G00 or G01) must be active
in the block, because the tool radius compensation can be deselected only with a linear
movement. An alarm is triggered if no linear interpolation is active during the selection of the
tool radius compensation.
ISO Milling
64
Programming Manual, 10/2020, 6FC5398-7BP40-3BA1
Motion commands
4.4 Tool offset functions
Deselection of the compensation mode at an internal angle (smaller than 180°):
Straight line - straight line
3URJUDPPLQJ H[DPSOH
&XWWLQJ WRRO *
*
*
;
)
*
;
<
<
*
6
;
Figure 4-14
Deselection of the compensation mode at an internal angle (straight line - straight line)
Circular arc - straight line
3URJUDPPLQJ H[DPSOH
&XWWLQJ WRRO *
*
*
;
<
,
-
*
*
;
<
*
6
&HQWHU SRLQW
Figure 4-15
Deselection of the compensation mode at an internal angle (circular arc - straight line)
ISO Milling
Programming Manual, 10/2020, 6FC5398-7BP40-3BA1
65
Motion commands
4.4 Tool offset functions
4.4.4
Collision detection
Activation via the NC program
Although the "Collision detection" function is available only in the Siemens mode, it can also be
used in the ISO dialect mode. Activation and deactivation must be undertaken only in the
Siemens mode.
G290
;Activation of the Siemens mode
CDON
;Activation of the detection of bottlenecks
G291
;Activation of the ISO dialect mode
G290
;Activation of the Siemens mode
CDOF
;Deactivation of the detection of bottlenecks
G291
;Activation of the ISO dialect mode
Activation by setting machine data
MD20150 $MC_GCODE_RESET_VALUES[22] = 2: CDON (effective modal)
MD20150 $MC_GCODE_RESET_VALUES[22] = 1: CDOF (not effective modal)
Function
With active CDON (Collision Detection ON) and active tool radius compensation, the control
system monitors tool paths through look-ahead contour calculation. This Look Ahead function
allows possible collisions to be detected in advance and permits the control to actively avoid
them.
With deactivated bottleneck detection (CDOF), a search is made in the previous traversing block
(at inside corners) for a common point of intersection for the current block; if necessary the
search is extended to even earlier blocks. An error message is triggered if no point of intersection
is found with this method.
ISO Milling
66
Programming Manual, 10/2020, 6FC5398-7BP40-3BA1
Motion commands
4.4 Tool offset functions
Figure 4-16
Collision detection
CDOF can be used to avoid the faulty detection of bottlenecks, resulting, for example, from
missing information that is not available in the NC program.
Note
Machine manufacturer
The number of NC blocks that are included in the monitoring can be set via machine data (see
machine manufacturer).
Examples
In the following pages you will find a few examples of critical machining situations that can be
detected by the control system and corrected through changes in the tool paths.
To avoid program interruptions, during program validation only the ones that have the biggest
radius from among all tools should be selected.
In each of the following examples, a tool with a too large radius was selected for machining the
contour.
ISO Milling
Programming Manual, 10/2020, 6FC5398-7BP40-3BA1
67
Motion commands
4.4 Tool offset functions
Detection of bottlenecks
As the selected tool radius for machining this inside contour is too big, the bottlenecks are
bypassed. An alarm is output.
7RRO SDWK
3URJUDPPHG FRQWRXU
Figure 4-17
Detection of bottlenecks
Contour definition shorter than tool radius
The tool traverses the tool angle on a transition circle and then follows exactly the programmed
contour.
7RRO SDWK
3URJUDPPHG FRQWRXU
Figure 4-18
Contour definition shorter than tool radius
ISO Milling
68
Programming Manual, 10/2020, 6FC5398-7BP40-3BA1
Motion commands
4.4 Tool offset functions
Tool radius too large for internal machining
In such cases, a machining of the contour takes place only to the extent possible without
damaging the contour.
7RRO SDWK
3URJUDPPHG FRQWRXU
Figure 4-19
Tool radius too large for internal machining
ISO Milling
Programming Manual, 10/2020, 6FC5398-7BP40-3BA1
69
Motion commands
4.5 S-, T-, M- and B functions
4.5
S-, T-, M- and B functions
4.5.1
Spindle function (S function)
The spindle speed is specified in rpm in Address S. The direction of spindle rotation is selected
with M3 and M4. M3 = right direction of spindle rotation, M4 = left direction of spindle rotation.
The spindle stops with M5. Details are available in the documentation of your machine
manufacturer.
• S commands are modal, i.e., they remain active up to the next S command once they are
programmed. The S command is maintained if the spindle is stopped with M05. If M03 or
M04 is programmed thereafter without specifying an S command, then the spindle starts at
the originally programmed speed.
• If the spindle speed is changed, please pay attention to which gear stage is currently set for
the spindle. Details are available in the documentation of your machine manufacturer.
• The lower limit for the S command (S0 or an S command near S0) depends on the drive motor
and the drive system of the spindle and is different from machine to machine. Negative
values are not permitted for S! Details are available in the documentation of your machine
manufacturer.
4.5.2
Tool function
There are different options of command output for the tool function. Details are available in the
documentation of your machine manufacturer.
4.5.3
Additional function (M function)
The M functions initiate switching operations, such as "Coolant ON/OFF" and other functions on
the machine. Various M functions have already been assigned a fixed functionality by the CNC
manufacturer (see the following section).
Programming
M... Possible values: 0 to 9999 9999 (max. INT value), integer
All free M function numbers can be assigned by the machine manufacturer, e.g. for switching
functions to control the clamping devices or for switching on/off of further machine functions.
See data of the machine manufacturer.
The NC-specific M functions are described below.
M functions to stop operations (M00, M01, M02, M30)
A program stop is triggered with this M function and the machining is interrupted or ended.
Whether the spindle is also stopped depends on the specification of the machine manufacturer.
Details are available in the documentation of your machine manufacturer.
ISO Milling
70
Programming Manual, 10/2020, 6FC5398-7BP40-3BA1
Motion commands
4.5 S-, T-, M- and B functions
M00 (program stop)
The machining is stopped in the NC block with M00. One can now, e.g., remove chips, re-
measure, etc. A signal is output to the PLC. The program can be continued with NC start.
M01 (optional stop)
M01 can be set via
• HMI/dialog box "Program control" or the
• VDI interface
The program processing of the NC is maintained with M01 only if the corresponding signal of the
VDI interface is set or "Program control" was selected in the HMI/dialog box.
M30 or M02 (end of program)
A program is ended with M30 or M02.
Note
A signal is output to the PLC with M00, M01, M02 or M30.
Note
Data on whether spindle is stopped with the commands M00, M01, M02 or M30 or the coolant
supply is interrupted is available in the documentation of your machine manufacturer.
4.5.4
M functions of spindle control
Table 4-12
M functions of spindle control
M function
Function
M19
Positioning the spindle
M29
Changeover of spindle to the axis/open-loop control mode
The spindle is traversed to the spindle position defined in the setting data 43240
$SA_M19_SPOS[spindle number] with M19. The positioning mode is stored in $SA_M19_SPOS.
The M function number for the changeover of the spindle mode (M29) can also be set over a
machine data variable. MD20095 $MC_EXTERN_RIGID_TAPPING_N_NR is used to pre-set the M
function number. Only the M function numbers that are not used as standard M functions can
be assigned. For example, M0, M5, M30, M98, M99 etc are not allowed.
ISO Milling
Programming Manual, 10/2020, 6FC5398-7BP40-3BA1
71
Motion commands
4.5 S-, T-, M- and B functions
4.5.5
M functions for subroutine calls
Table 4-13
M functions for subroutine calls
M function
Function
M98
Subprogram call
M99
Subprogram end
In the ISO mode, the spindle is switched to the axis mode with M29.
4.5.6
Macro call via M function
Via M numbers, one can call a subroutine (macro) similar to G65.
The configuration of a maximum of 10 M functions replacements is undertaken via machine
data 10814 $MN_EXTERN_M_NO_MAC_CYCLE and machine data 10815
$MN_EXTERN_M_NO_MAC_CYCLE_NAME.
Programming takes place identical to G65. Repetitions can be programmed with the L address.
Restrictions
Only one M function replacement (or only one subroutine call) can be executed per part
program line. Conflicts with other subroutine calls are signaled by alarm 12722. There is no
further M function replacement in the replaced subroutine.
Otherwise, the same restrictions are valid as in G65.
Conflicts with pre-defined and other defined M numbers are rejected with an alarm.
Configuration example
Call of subroutine M101_MAKRO via the M101 M function:
$MN_EXTERN_M_NO_MAC_CYCLE[0] = 101
$MN_EXTERN_M_NO_MAC_CYCLE_NAME[0] = "M101_MAKRO"
Call of subroutine M6_MAKRO via the M6 M function:
$MN_EXTERN_M_NO_MAC_CYCLE[1] = 6
$MN_EXTERN_M_NO_MAC_CYCLE_NAME[1] = "M6_MAKRO"
Programming example for tool change with M function:
PROC MAIN
N10
M6 X10 V20
;Call of M6_MAKRO program
N90
M30
PROC M6_MAKRO
ISO Milling
72
Programming Manual, 10/2020, 6FC5398-7BP40-3BA1
Motion commands
4.5 S-, T-, M- and B functions
N0010
R10 = R10 + 11.11
N0020
IF $C_X_PROG == 1 GOTOF N40
;($C_X_PROG)
N0030
SETAL(61000)
;programmed variable not
;transferred correctly
N0040
IF $C_V == 20 GTOF N60
;($C_V)
N0050
SETAL(61001)
N0060
M17
4.5.7
M functions
General M functions
The non-specific M functions are defined by the machine manufacturer. A representative
example of the use of of general M functions is available under. Details are available in the
documentation of your machine manufacturer. If an M command is programmed with an axis
motion in the same block, whether the M function is to be executed at the start or end of the
block on reaching the axis position depends on the machine data setting of the machine
manufacturer. Details are available in the documentation of your machine manufacturer.
Table 4-14
Other general M functions
M function
Function
Remarks
M08
Coolant ON
These M functions are defined by the machine manufacturer.
M09
Coolant OFF
Specification of several M functions in one block
A maximum of five M functions can be programmed in on block. Possible combinations of M
functions and possible restrictions are specified in the documentation of your machine
manufacturer.
Additional auxiliary functions (B functions)
If B is not used as axis identifier, B can be used as extended auxiliary function. B functions are
output to the PLC as auxiliary functions (H functions with the address extension H1=).
Example: B1234 is output as H1=1234.
ISO Milling
Programming Manual, 10/2020, 6FC5398-7BP40-3BA1
73
Motion commands
4.6 Controlling the feedrate
4.6
Controlling the feedrate
4.6.1
Automatic corner override G62
An inside corner with active tool radius compensation is often meaningful to reduce the
feedrate.
G62 operates only on internal corners with active tool radius compensation and active
continuous-path mode. Only the corners whose internal angle is smaller than MD42526
$SC_CORNER_SLOWDOWN_CRIT. The internal angle is defined from the bend in the contour.
The feedrate is lowered by the factor from the setting data 42524
$SC_CORNER_SLOWDOWN_OVR:
traversed feedrate = F * $SC_CORNER_SLOWDOWN_OVR * feedrate override.
The feedrate override comprises of the feedrate override set in the machine control panel
multiplied with the override from synchronized actions.
The feedrate slowdown is started at the distance before the corner registered in the setting data
42520 $SC_CORNER_SLOWDOWN_START. It ends with the distance after the corner (see
following Figure) registered in the setting data 42522 $SC_CORNER_SLOWDOWN_END. An
appropriate path is used for curved contours.
<
;
:RUNSLHFH
/D\HU WR EH PLOOHG RII
7RRO FHQWHU SRLQW SDWK
6&B&251(5B6/2:'2:1B67$57
6&B&251(5B6/2:'2:1B(1'
,QWHUQDO DQJOH ื
6&B&251(5B6/2:'2:1B&5,7
)HHG VORZGRZQ DW FRUQHU
3DWK YHORFLW\ Y
)
)
6&B&251(5B6/2:'2:1B295
6&B&251(5B6/2:'2:1B67$57
3DWK V
6&B&251(5B6/2:'2:1B(1'
Figure 4-20
Parameter assignment of feedrate reduction G62 with the example of a 90°corner
ISO Milling
74
Programming Manual, 10/2020, 6FC5398-7BP40-3BA1
Motion commands
4.6 Controlling the feedrate
Configuration
The override value is set over the following setting data:
42520: $SC_CORNER_SLOWDOWN_START
42522: $SC_CORNER_SLOWDOWN_END
42524: $SC_CORNER_SLOWDOWN_OVR
42526: $SC_CORNER_SLOWDOWN_CRIT
The setting data is preassigned with the value 0.
• If $SC_CORNER_SLOWDOWN_CRIT = 0, the corner deceleration is effective only at reversal
points.
• If $SC_CORNER_SLOWDOWN_START and $SC_CORNER_SLOWDOWN_END are equal to 0,
then the feedrate reduction is approached with the permissible dynamic response.
• If $SC_CORNER_SLOWDOWN_OVR = 0, then a transient stop is inserted.
• $SC_CORNER_SLOWDOWN_CRIT is related to the geometry axes in G62. It defines the
maximum internal angle in the current machining plane up to which the corner deceleration
is used. G62 is not effective in rapid traverse.
Activating
The function is activated via G62. The G code is active either via the corresponding part program
command or as default through MD20150 $MC_GCODE_RESET_VALUES[56].
Example
Tool data in the Siemens mode
$TC_DP1[1,1]=120
$TC_DP3[1,1]=0 ; length compensation vector
$TC_DP4[1,1]=0.
$TC_DP5[1,1]=0.
Setting the setting data in the Siemens mode
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.
Program in the ISO mode
N2010 X00 Y30 G90 T1 D1 G64
N2020 X40 Y0 G62 G41
; Inner corner of N2030,
; but WRK still selected
N2030 X80 Y30
; Inner corner of N2040 127 degree
N2040 Y70
; Inner corner of N2050 53 degree
N2050 X40 Y40
; Outer corner of N2060
N2060 X20 Y70
; Inner corner of N2070 97 degree
ISO Milling
Programming Manual, 10/2020, 6FC5398-7BP40-3BA1
75
Motion commands
4.6 Controlling the feedrate
N2070 Y60
; Inner corner of N2080 90 degree
N2080 X20 Y20
; Outer corner of N2090,
; irrelevant due to WRK deselection
N2090 X00 Y00 G40 G64
; Deselect G62 and on continuous-path mode
M30
4.6.2
Compressor in the ISO dialect mode
The commands COMPON, COMPCURV, COMPCAD are commands of the Siemens language and
they activate a compressor function that combines several linear blocks into one machining
section. If this function is activated in the Siemens mode, even linear blocks in the ISO mode can
be compressed with this function.
The blocks can at the most consist of the following commands:
• Block number
• G01, modal or in block
• Axis assignments
• Feedrate
• Comments
If a block contains other commands (e.g., auxiliary functions, other G codes, etc.), then
compression does not take place.
Value assignments with $x for G, axes and feedrate are possible, just as 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
; Auxiliary function in block
N35
X100 S200
; Spindle speed in block
ISO Milling
76
Programming Manual, 10/2020, 6FC5398-7BP40-3BA1
Motion commands
4.6 Controlling the feedrate
4.6.3
Exact stop (G09, G61), Continuous-path mode (G64), tapping (G63)
The path feedrate is controlled as specified in the table below.
Table 4-15
Control of the path feedrate
Identifier
G function
Efficacy of the G functions
Description
Exact stop
G09
effective only in the block in which
Braking and stop at end
the relevant G function is program-
of block and position
med
control before transition
to the next block
Exact stop
G61
Modal G function; remains effec-
Braking and stop at end
tive till it is deselected via G62, G63
of block and position
or G64.
control before transition
to the next block
Continuous-path mode
G64
Modal G function; remains effec-
No braking at end of
tive till it is deselected via G61, G62
block before transition
or G63.
to the next block
Tapping
G63
Modal G function; remains effec-
No braking at end of
tive till it is deselected via G61, G62
block before transition
or G64.
to the next block; fee-
drate override is not ef-
fective
Format
G09 X... Y... Z...
; Exact stop, non-modal
G61
; Exact stop, modal
G64
; Continuous-path mode
G63
; Tapping
ISO Milling
Programming Manual, 10/2020, 6FC5398-7BP40-3BA1
77
Motion commands
4.6 Controlling the feedrate
ISO Milling
78
Programming Manual, 10/2020, 6FC5398-7BP40-3BA1
Additional functions
5
5.1
Program supporting functions
5.1.1
Fixed drilling cycles
The fixed drilling cycles simplify the creation of new programs for the programmer. Frequently
occurring machining steps can be executed with a G function; without fixed cycles, several NC
blocks must be programmed. Thus fixed drilling cycles shorten the machining program and save
memory space.
In the ISO dialect mode, a shell cycle is called which uses the functionality of the Siemens
standard cycles. This way, the addresses programmed in the NC block are transferred to the shell
cycle via system variables. The shell cycle adjusts this data and calls a Siemens standard cycle.
The fixed drilling cycles are called with the following G functions.
Table 5-1
Overview of drilling cycles
G function
Drilling
Machining at drill-
Retraction
Applications
(-Z direction)
ing base
(+Z direction)
G73
Interrupted working
-
Rapid traverse
High-speed deep-
feedrate (delay possi-
hole drilling
ble at each in-feed)
G74
Cutting feedrate
Spindle stop → Spin-
Cutting feedrate →
Left-hand thread
dle revolution after
dwell time → Spin-
boring (in the oppo-
dwelling in the op-
dle turns in the op-
site direction)
posite direction
posite direction
G76
Cutting feedrate
Spindle positioning
Rapid traverse → Re-
Precision drilling
→ Withdraw lift-off
turn lift-off path,
Boring
path
spindle start
G80
-
-
-
Deselection
G81
Cutting feedrate
-
Rapid traverse
Drilling, Preboring
G82
Cutting feedrate
Dwell
Rapid traverse
Drilling, countersink-
ing
G83
Interrupted working
-
Rapid traverse
Deep-hole drilling
feedrate
G84
Cutting feedrate
Spindle stop→ Spin-
Cutting feedrate →
Tapping
dle start after dwell-
dwell time → Spin-
ing in the opposite
dle turns in the op-
direction
posite direction
G85
Cutting feedrate
-
Cutting feedrate
Boring
G86
Cutting feedrate
Spindle stop
Rapid traverse →
Boring
spindle start
ISO Milling
Programming Manual, 10/2020, 6FC5398-7BP40-3BA1
79
Additional functions
5.1 Program supporting functions
G function
Drilling
Machining at drill-
Retraction
Applications
(-Z direction)
ing base
(+Z direction)
G87
Spindle positioning
Spindle positioning
Rapid traverse → Re-
Boring
→ Withdraw lift-off
after dwelling →
turn lift-off path →
path → Rapid tra-
Withdraw lift-off
Spindle start
verse → Return lift-off
path
path → Spindle run
right → Cutting fee-
drate
G89
Cutting feedrate
Dwell
Cutting feedrate
Boring
Explanations
On using fixed cycles, the sequence of operation in general is always as described below:
•
1. Working cycle
Positioning in X-Y plane with cutting feedrate or rapid traverse rate
•
2. Working cycle
Rapid traverse movement to plane R
•
3. Working cycle
Machining up to drilling depth Z
•
4. Working cycle
Machining at drilling base
•
5. Working cycle
Return up to plane R with cutting feedrate or rapid traverse rate
•
6. Working cycle
Rapid retraction with rapid traverse rate to positioning plane X-Y
:RUNLQJ F\FOH
,QLWLDO SODQH
:RUNLQJ F\FOH
:RUNLQJ F\FOH
3ODQH 3RLQW 5
:RUNLQJ F\FOH
:RUNLQJ F\FOH
5DSLG WUDYHUVH
:RUNLQJ F\FOH
)HHG
Figure 5-1
Sequence of operations in the drilling cycle
ISO Milling
80
Programming Manual, 10/2020, 6FC5398-7BP40-3BA1
Additional functions
5.1 Program supporting functions
If the term "drill" is used in this Chapter, it refers only to the working cycle that are executed with
the help of fixed cycles, even though naturally there are fixed cycles for tapping, boring or drilling
cycles too.
Definition of the current plane
In drilling cycles, one generally assumes that the current coordinate system in which the
machining operation is to be executed, is defined through the selection of plane G17, G18 or
G19 and activation of a programmable work offset. Drilling axis is then always the application of
this coordinate system.
Before calling the cycle, one must always select a tool length compensation. It is always
effective perpendicular to the selected plane and remains active even beyond the end of the
cycle.
Table 5-2
Positioning plane and drilling axis
G function
Positioning plane
Drilling axis
G17
Xp-Yp plane
Zp
G18
Zp-Xp plane
Yp
G19
Yp-Zp plane
Xp
Xp: X axis or an axis parallel to the X axis
Yp: Y axis or an axis parallel to the Y axis
Zp: Z axis or an axis parallel to the Z axis
Note
Whether the Z axis should always be used as the drilling axis can be defined with MD55800
$SCS_ISO_M_DRILLING_AXES_IS_Z. The Z axis is then always the drilling axis, if
$SCS_ISO_M_DRILLING_AXES_IS_Z is equal to "1".
ISO Milling
Programming Manual, 10/2020, 6FC5398-7BP40-3BA1
81
Additional functions
5.1 Program supporting functions
Execution of a fixed cycle
The following is necessary to execute a fixed cycle:
1. Cycle call
G73, 74, 76, 81 to 89
as a function of the desired machining
2. Data format G90/91
*
DEVROXWH FRPPDQG
*
LQFUHPHQWDO FRPPDQG
5
5
3RLQW 5
3RLQW 5
=
=
3RLQW =
=
3RLQW =
Figure 5-2
Absolute/incremental command G90/G91
ISO Milling
82
Programming Manual, 10/2020, 6FC5398-7BP40-3BA1
Additional functions
5.1 Program supporting functions
3. Drilling mode
G73, G74, G76 and G81 to G89 are modal G functions and they remain active till they are
deselected. The selected drilling cycle is called in each block. The complete parameter
assignment of the drilling cycles must be programmed only during the selection (e.g., G81).
Only the parameters that are supposed to change are to be programmed In the following
blocks.
4. Positioning/reference plane (G98/G99)
While using the fixed cycles, the retraction plane for the Z-axis is defined with G98/99. G98/
G99 are modal G functions. The closed position is normally G98.
*
5HWXUQ WR LQLWLDO SODQH
*
5HWXUQ WR SODQH 3RLQW 5
,QLWLDO SODQH
3ODQH 3RLQW 5
Figure 5-3
Plane for the return point (G98/G99)
Repeat
If several holes are drilled at uniform spacing, the number of repetitions is specified with "K". "K"
is effective only in the block in which it is programmed. If the drilled hole position is programmed
as absolute (G90), drilling is done at the same position again; hence the drilled hole position is
to be specified as incremental (G91).
Comments
A cycle call remains active till it is deselected again with the G functions G80, G00, G01, G02 or
G03 or another cycle call.
ISO Milling
Programming Manual, 10/2020, 6FC5398-7BP40-3BA1
83
Additional functions
5.1 Program supporting functions
Symbols and numbers
The individual fixed cycles are explained in the following sections. The following symbols are
used in the numbers occurring in these explanations:
3RVLWLRQLQJ 5DSLG WUDYHUVH *
&XWWLQJ IHHG /LQHDU LQWHUSRODWLRQ *
0DQXDO IHHG
0
2ULHQWHG VSLQGOH VWRS
7KH VSLQGOH VWRSV DW D GHILQHG URWDU\ SRVLWLRQ
7UDYHUVH 5DSLG WUDYHUVH *
3
'ZHOO
Figure 5-4
Icons in the numbers
5.1.2
Deep hole drilling cycle with chip breakage (G73)
The tool drills at the programmed spindle speed and feedrate to the entered final drilling depth.
Deep hole drilling is performed with a depth infeed of a maximum defined depth executed
several times, increasing gradually until the final drilling depth is reached. Optionally, the twist
drill can be retracted after each infeed depth either to the reference plane + safety clearance for
chip removal or by the length of the programmed retraction path for chip breakage.
Format
G73 X.. Y... R... Q... F... K... ;
X,Y: Drilled hole position
Z: Distance from Point R to the base of the drilled hole
R: Distance from the initial plane to plane R
Q: Single drilling depth
F: Feedrate
K: Number of repetitions
ISO Milling
84
Programming Manual, 10/2020, 6FC5398-7BP40-3BA1
Additional functions
5.1 Program supporting functions
*
*
*
*
,QLWLDO SODQH
3RLQW 5
3RLQW 5
3ODQH ಯ3RLQW 5ಯ
T
T
G
G
T
T
G
G
T
T
3RLQW =
3RLQW =
Figure 5-5
Deep hole drilling cycle with chip breakage (G73)
Explanations
On using the G73 cycle, the retraction motion takes place after the drilling with rapid traverse.
The safety clearance can be specified with GUD _ZSFR[0]. The retraction amount from chip
breaking (d) is defined with GUD _ZSFR[1]:
_ZSFR[1] > 0 Retraction amount as input
_ZSFR[1] v 0 Retraction amount in chip breaking is always 1 mm
The in-feed takes place by using the cutting depth for each cutting Q which is incremented with
the retraction amount d as second in-feed.
A rapid drilling infeed results with this drilling cycle. Chip removal takes place through the
retraction motion.
ISO Milling
Programming Manual, 10/2020, 6FC5398-7BP40-3BA1
85
Additional functions
5.1 Program supporting functions
Restrictions
Changeover of the axes
Before changing over the drilling axis, one must first deselect the fixed cycle.
Deep-hole drilling
The drilling cycle is executed only if an axis motion, e.g., is programmed with X, Y, Z or R.
Q/R
Always program Q and R in one block with an axis motion, otherwise the programmed values will
not be stored modally.
Deselection
The G functions of Group 01 (G00 to G03) and G73 should not be used together in one block,
as otherwise G73 is deselected
Example
M3 S1500
;Rotary motion of stem
G90 G0 Z100
G90 G99 G73 X200. Y-150. Z-100. ;Positioning, drilled hole 1,
R50. Q10. F150.
;then return to Point R
Y-500.
;Positioning, drilled hole 2,
;then return to Point R
Y-700.
;Positioning, drilled hole 3,
;then return to Point R
X950.
;Positioning, drilled hole 4,
;then return to Point R
Y-500.
;Positioning, drilled hole 5,
;then return to Point R
G98 Y-700.
;Positioning, drilled hole 6,
;then return to initial plane
G80
;Deselection of the fixed cycle
G28 G91 X0 Y0 Z0
;Return to reference position
M5
;Spindle stop
5.1.3
Fine drilling cycle (G76)
Precision drilling takes place with the fine drilling cycle.
ISO Milling
86
Programming Manual, 10/2020, 6FC5398-7BP40-3BA1
Additional functions
5.1 Program supporting functions
Format
G76 X... Y... R... Q... P... F... K... ;
X,Y: Drilled hole position
Z_: Distance from point R to the bottom of the hole
R_: Distance from the initial plane to plane "Point R"
Q_: Amount of offset at the bottom of a hole
P_: Dwell time at the bottom of a hole
F_: Feedrate
K_: Number of repetitions
*
*
*
*
,QLWLDO SODQH
6SLQGOH FRXQWHUFORFNZLVH
3RLQW 5
3RLQW 5
3ODQH ಯ3RLQW 5ಯ
3
3
0
3RLQW =
0
3RLQW =
T
T
Figure 5-6
Fine drilling cycle (G76)
2ULHQWHG VSLQGOH VWRS
7RRO
2IIVHW T
ISO Milling
Programming Manual, 10/2020, 6FC5398-7BP40-3BA1
87
Additional functions
5.1 Program supporting functions
WARNING
Address Q:
Address Q is a modal value that is stored in fixed cycles. Please ensure that this address is also
used as interface for the cycles G73 and G83!
Explanations
The spindles stops at a fixed spindle position after the bottom of a hole is reached. The tool is
returned opposite the tool tip.
The safety clearance can be specified with GUD _ZSFR[0]. The lift-off path can be specified with
_ZSFI[5].
G17
G18
G19
_ZSFI[5] = 1
+X
+Z
+Y
_ZSFI[5] = 0 or 2
-X
-Z
-Y
_ZSFI[5] = 3
+Y
+X
+Z
_ZSFI[5] = 4
-Y
-X
-Z
The angle must therefore be specified in GUD7 _ZSFR[2] in such a way that the tool tip points at
the opposite direction after the spindle stop, for the lift-off path.
Restrictions
Changeover of the axes
Before changing over the drilling axis, one must first deselect the fixed cycle.
Boring
The drilling cycle is executed only if an axis motion is programmed, e.g. with X, Y, Z or R.
Q/R
Always program Q and R only in one block with a retracting movement, otherwise the
programmed values are not stored modally.
Only one positive value is to be specified in each case for the value of Address Q. If a negative
value is specified for Q, the sign is ignored. Q is set as equal to "0" if no lift-off path is
programmed. In this case, the cycle is executed without lifting.
Deselection
The G functions of Group 01 (G00 to G03) and G76 should not be used together in one block,
as otherwise G76 is deselected.
ISO Milling
88
Programming Manual, 10/2020, 6FC5398-7BP40-3BA1
Additional functions
5.1 Program supporting functions
Example
M3 S300
;Rotary motion of stem
G90 G0 Z100
G90 G99 G76 X200. Y-150. Z-100. ;Positioning, drilling of drilled hole 1,
R50. Q10. P1000 F150.
;then return to point R and
;for 1 s stop at the bottom of a hole
Y-500.
;Positioning, drilled hole 2,
;then return to point R
Y-700.
;Positioning, drilled hole 3,
;then return to point R
X950.
;Positioning, drilled hole 4,
;then return to point R
Y-500.
;Positioning, drilled hole 5,
;then return to point R
G98 Y-700.
;Positioning, drilled hole 6,
;then return to initial plane
G80
;Deselection of the fixed cycle
G28 G91 X0 Y0 Z0
;Return to reference position
M5
;Spindle stop
5.1.4
Drilling cycle, preboring (G81)
This cycle can be used for centering and preboring. The retraction motion starts immediately
with rapid traverse rate on reaching the drilling depth Z.
Format
G81 X... Y... Z... R... F... K... ;
X,Y: Drilled hole position
Z: Distance from point R to the bottom of the hole
R: Distance from the initial plane to plane R
F: Cutting feedrate
K: Number of repetitions
ISO Milling
Programming Manual, 10/2020, 6FC5398-7BP40-3BA1
89
Additional functions
5.1 Program supporting functions
*
*
*
*
,QLWLDO SODQH
3RLQW 5
3RLQW 5
3ODQH ಯ3RLQW 5ಯ
3RLQW =
3RLQW =
Figure 5-7
Drilling cycle, preboring (G81)
Restrictions
Changeover of the axes
Before changing over the drilling axis, one must first deselect the fixed cycle.
Drilling
The drilling cycle is executed only if an axis motion is programmed, e.g. with X, Y, Z or R.
R
Always program R only in one block with an axis motion, otherwise the programmed values are
not stored modally.
Deselection
The G functions of Group 01 (G00 to G03) and G76 should not be used together in one block,
as otherwise G76 is deselected.
Example
M3 S1500
;Spindle rotation
G90 G0 Z100
G90 G99 G81 X200. Y-150. Z-100. ;Positioning, drilled hole 1,
R50. F150.
;then return to point R and
;for 1 s stop at the bottom of the hole
ISO Milling
90
Programming Manual, 10/2020, 6FC5398-7BP40-3BA1
Additional functions
5.1 Program supporting functions
Y-500.
;Positioning, drilled hole 2,
;then return to point R
Y-700.
;Positioning, drilled hole 3,
;then return to point R
X950.
;Positioning, drilled hole 4,
;then return to point R
Y-500.
;Positioning, drilled hole 5,
;then return to point R
G98 Y-700.
;Positioning, drilled hole 6,
;then return to initial plane
G80
;Deselection of the fixed cycle
G28 G91 X0 Y0 Z0
;Return to reference position
M5
;Spindle stop
5.1.5
Drilling cycle, preboring (G82)
This cycle can be used for normal drilling. A programmed dwell time can be active on reaching
the drilling depth Z; the retraction motion is then executed in rapid traverse.
Format
G82 X... Y... R... P... F... K... ;
X,Y: Drilled hole position
Z: Distance from point R to the bottom of the hole
R: Distance from the initial plane to plane R
P: Dwell time at the bottom of a hole
F: Feedrate
K: Number of repetitions
ISO Milling
Programming Manual, 10/2020, 6FC5398-7BP40-3BA1
91
Additional functions
5.1 Program supporting functions
*
*
*
*
,QLWLDO SODQH
3RLQW 5
3RLQW 5
3ODQH ಯ3RLQW 5ಯ
3RLQW =
3RLQW =
Figure 5-8
Drilling cycle, countersink cycle (G82)
Restrictions
Changeover of the axes
Before changing over the drilling axis, one must first deselect the fixed cycle.
Drilling
The drilling cycle is executed only if an axis motion, e.g. is programmed with X, Y, Z or R.
R
Always program R only in one block with an axis motion, otherwise the programmed values are
not stored modally.
Deselection
The G functions of Group 01 (G00 to G03) and G82 should not be used together in one block,
as otherwise G82 is deselected.
Example
M3 S2000
;Rotary motion of stem
G90 G0 Z100
G90 G99 G82 X200. Y-150. Z-100. ;Positioning, drilled hole 1,
R50. P1000 F150.
;stop on the bottom of a hole for 1 s
;then return to point R
ISO Milling
92
Programming Manual, 10/2020, 6FC5398-7BP40-3BA1
Additional functions
5.1 Program supporting functions
Y-500.
;Positioning, drilled hole 2,
;then return to point R
Y-700.
;Positioning, drilled hole 3,
;then return to point R
X950.
;Positioning, drilled hole 4,
;then return to point R
Y-500.
;Positioning, drilled hole 5,
;then return to point R
G98 Y-700.
;Positioning, drilled hole 6,
;then return to initial plane
G80
;Deselection of the fixed cycle
G28 G91 X0 Y0 Z0
;Return to reference position
M5
;Spindle stop
5.1.6
Deep hole drilling cycle with chip removal (G83)
The cycle "Deep hole drilling with chips removal" can, e.g., be used for deep hole drilling with
recutting.
Format
G83 X... Y... R... Q... F... K... ;
X,Y: Drilled hole position
Z: Distance from point R to the bottom of the hole
R: Distance from the initial plane to plane R
Q: Cutting depth for each cutting feedrate
F: Feedrate
K: Number of repetitions
ISO Milling
Programming Manual, 10/2020, 6FC5398-7BP40-3BA1
93
Additional functions
5.1 Program supporting functions
*
*
*
*
,QLWLDO SODQH
3RLQW 5
3RLQW 5
3ODQH ಯ3RLQW 5ಯ
T
T
G
G
T
T
G
G
T
T
3RLQW =
3RLQW =
Figure 5-9
Deep hole drilling cycle with chip removal (G83)
Restrictions
Explanations
After the programmed cutting depth is reached for each cutting feedrate Q, the return to the
reference plane R takes place in rapid traverse. The approach motion for a renewed step is also
executed in rapid traverse, around the path (d) that can be set in GUD7 _ZSFR[10]. The path and
the cutting depth for each cutting feedrate Q are traversed with cutting feedrate. Q is
incremental without having to specify signs.
Changeover of the axes
Before changing over the drilling axis, one must first deselect the fixed cycle.
Drilling
The drilling cycle is executed only if an axis motion, e.g. X, Y, Z or R is programmed.
Q/R
Always program Q and R in one block with an axis motion, otherwise the programmed values will
not be stored modally.
Deselection
The G functions of Group 01 (G00 to G03) and G83 should not be used together in one block,
as otherwise G83 is deselected.
ISO Milling
94
Programming Manual, 10/2020, 6FC5398-7BP40-3BA1
Additional functions
5.1 Program supporting functions
Example
M3 S2000
;Rotary motion of stem
G90 G0 Z100
G90 G99 G83 X200. Y-150. Z-100. ;Positioning, drilled hole 1,
R50. Q10. F150.
;then return to point R
Y-500.
;Positioning, drilled hole 2,
;then return to point R
Y-700.
;Positioning, drilled hole 3,
;then return to point R
X950.
;Positioning, drilled hole 4,
;then return to point R
Y-500.
;Positioning, drilled hole 5,
;then return to point R
G98 Y-700.
;Positioning, drilled hole 6,
;then return to initial plane
G80
;Deselection of the fixed cycle
G28 G91 X0 Y0 Z0
;Return to reference position
M5
;Spindle stop
Note
If _ZSFR[10]
•
> 0 = Value is used for the derivative path "d" (minimum distance 0.001)
•
= 0 The derivative path is 30 mm and the value of the derivative path is always 0.6 mm. The
drilling depth/50 formula is always used for larger drilling depths (maximum value 7 mm).
5.1.7
Drilling cycle (G85)
Format
G85 X... Y... R... F... K... ;
X,Y: Drilled hole position
Z: Distance from point R to the bottom of the hole
R: Distance from the initial plane to plane R
F: Feedrate
K: Number of repetitions
ISO Milling
Programming Manual, 10/2020, 6FC5398-7BP40-3BA1
95
Additional functions
5.1 Program supporting functions
*
*
*
*
,QLWLDO SODQH
3RLQW 5
3RLQW 5
3ODQH ಯ3RLQW 5ಯ
3RLQW =
3RLQW =
Figure 5-10
Drilling cycle (G85)
Explanations
A traversing movement takes place to point R in rapid traverse after the positioning along the X
and Y axis. Drilling takes place from point R to point Z. On reaching point Z, a retraction motion
to point R takes place with cutting feedrate.
Restrictions
Changeover of the axes
Before changing over the drilling axis, one must first deselect the fixed cycle.
Drilling
The drilling cycle is executed only if an axis motion, e.g. is programmed with X, Y, Z or R.
R
Always program R only in one block with an axis motion, otherwise the programmed values are
not stored modally.
Deselection
The G functions of Group 01 (G00 to G03) and G85 should not be used together in one block,
as otherwise G85 is deselected.
Example
M3 S150
;Rotary motion of stem
ISO Milling
96
Programming Manual, 10/2020, 6FC5398-7BP40-3BA1
Additional functions
5.1 Program supporting functions
G90 G0 Z100
G90 G99 G85 X200. Y-150. Z-100. ;Positioning, drilled hole 1,
R50. F150.
;then return to point R
Y-500.
;Positioning, drilled hole 2,
;then return to point R
Y-700.
;Positioning, drilled hole 3,
;then return to point R
X950.
;Positioning, drilled hole 4,
;then return to point R
Y-500.
;Positioning, drilled hole 5,
;then return to point R
G98 Y-700.
;Positioning, drilled hole 6,
;then return to initial plane
G80
;Deselection of the fixed cycle
G28 G91 X0 Y0 Z0
;Return to reference position
M5
;Spindle stop
5.1.8
Boring cycle (G86)
Format
G86 X... Y... R... F... K... ;
X,Y: Drilled hole position
Z: Distance from point R to the bottom of the hole
R: Distance from the initial plane to point R
F: Feedrate
K: Number of repetitions
*
*
*
*
6SLQGOH
&RXQWHUFORFNZLVH
,QLWLDO SODQH
6SLQGOH
&RXQWHUFORFNZLVH
3RLQW 5
3RLQW 5
3ODQH ಯ3RLQW 5ಯ
3
3RLQW =
3
3RLQW =
6SLQGOH VWRS
6SLQGOH VWRS
Figure 5-11
Boring cycle (G86)
ISO Milling
Programming Manual, 10/2020, 6FC5398-7BP40-3BA1
97
Additional functions
5.1 Program supporting functions
Explanations
Point R is approached in rapid traverse after positioning the X and Y axes. Drilling takes place
from point R to point Z. The tool returns in rapid traverse mode after the spindle is stopped at the
bottom of a hole.
Restrictions
Changeover of the axes
Before changing over the drilling axis, one must first deselect the fixed cycle.
Drilling
The drilling cycle is executed only if an axis motion, e.g. is programmed with X, Y, Z or R.
R
Always program R only in one block with an axis motion, otherwise the programmed values are
not stored modally.
Deselection
The G functions of Group 01 (G00 to G03) and G86 should not be used together in one block,
as otherwise G86 is deselected.
Example
M3 S150
;Rotary motion of stem
G90 G0 Z100
G90 G99 G86 X200. Y-150. Z-100. ;Positioning, drilled hole 1,
R50. F150.
;then return to point R
Y-500.
;Positioning, drilled hole 2,
;then return to point R
Y-700.
;Positioning, drilled hole 3,
;then return to point R
X950.
;Positioning, drilled hole 4,
;then return to point R
Y-500.
;Positioning, drilled hole 5,
;then return to point R
G98 Y-700.
;Positioning, drilled hole 6,
;then return to initial plane
G80
;Deselection of the fixed cycle
G28 G91 X0 Y0 Z0
;Return to reference position
M5
;Spindle stop
ISO Milling
98
Programming Manual, 10/2020, 6FC5398-7BP40-3BA1
Additional functions
5.1 Program supporting functions
5.1.9
Boring cycle, reverse countersinking (G87)
This cycle can be used for precision drilling.
Format
G87 X... Y... R... Q... P... F... K... ;
X,Y: Drilled hole position
Z: Distance from bottom of the hole to point Z
R: Distance from the initial plane to plane R (bottom of a hole)
Q: Tool offset amount
P: Dwell time
F: Feedrate
K: Number of repetitions
*
*
*
*
T
0
6SLQGOH FRXQWHUFORFNZLVH
,V QRW XVHG
0
3RLQW =
S
6SLQGOH FRXQWHUFORFNZLVH
3RLQW 5
Figure 5-12
Boring cycle, reverse countersinking (G87)
ISO Milling
Programming Manual, 10/2020, 6FC5398-7BP40-3BA1
99
Additional functions
5.1 Program supporting functions
2ULHQWHG VSLQGOH VWRS
7RRO
2IIVHW T
WARNING
Address Q:
Address Q (gear change at the base of a drilled hole) is a modal value that is stored in fixed
cycles. Please ensure that this address is also used as interface for the cycles G73 and G83!
Explanations
The spindle stops at a fixed rotary position after positioning along the X and Y axis. The tool
travels in the direction opposite to that of the tool tip. It is positioned on the bottom of a hole
(Point R) at rapid traverse.
Finally, the tool is shifted in the direction of the tool tip and the spindle is moved with clockwise
rotation. Boring takes place along the Z axis in the positive direction up to point Z.
The spindles stops at a fixed spindle position after the bottom of a hole is reached. The tool is
returned opposite the tool tip.
The safety clearance can be specified with GUD _ZSFR[0].
The lift-off path can be specified with _ZSFI[5].
G17
G18
G19
_ZSFR[5] = 1
+X
+Z
+Y
_ZSFI[5] = 0 or 2
-X
-Z
-Y
_ZSFI[5] = 3
+Y
+X
+Z
_ZSFI[5] = 4
-Y
-X
-Z
The angle must therefore be specified in GUD7 _ZSFR[2] in such a way that the tool tip points at
the opposite direction after the spindle stop for the lift-off path.
Example:
If plane G17 is activated, the tool tip must point in direction +X.
ISO Milling
100
Programming Manual, 10/2020, 6FC5398-7BP40-3BA1
Additional functions
5.1 Program supporting functions
Restrictions
Changeover of the axes
Before changing over the drilling axis, one must first deselect the fixed cycle.
Boring
The drilling cycle is executed only if an axis motion is programmed, e.g. with X, Y, Z or R.
Q/R
Always program Q and R in one block with an axis motion, otherwise the programmed values will
not be stored modally.
Only one positive value is to be specified in each case for the value of Address Q. If a negative
value is specified for "Q", the sign is ignored. "Q" is set as equal to "0" if no lift-off path is
programmed. In this case, the cycle is executed without lifting.
Deselection
The G functions of Group 01 (G00 to G03) and G87 should not be used together in one block,
as otherwise G87 is deselected.
Example
M3 S400
;Rotary motion of stem
G90 G0 Z100
G90 G87 X200. Y-150. Z-100.
;Positioning, drilled hole 1,
R50. Q3. P1000 F150.
;orientation towards initial plane,
;then travel 3 mm,
;halt for 1 s at point Z
Y-500.
;Positioning, drilled hole 2
Y-700.
;Positioning, drilled hole 3
X950.
;Positioning, drilled hole 4
Y-500.
;Positioning, drilled hole 5
G98 Y-700.
;Positioning, drilled hole 6
G80
;Deselection of the fixed cycle
G28 G91 X0 Y0 Z0
;Return to reference position
M5
;Spindle stop
5.1.10
Drilling cycle (G89), return with G01
Format
G89 X... Y... R... P... F... K... ;
ISO Milling
Programming Manual, 10/2020, 6FC5398-7BP40-3BA1
101
Additional functions
5.1 Program supporting functions
X,Y: Drilled hole position
Z: Distance from point R to the bottom of the hole
R: Distance from the initial plane to point R
P: Dwell time at the bottom of a hole
F: Feedrate
K: Number of repetitions
*
*
*
*
,QLWLDO SODQH
3ODQH ಯ3RLQW 5ಯ
3RLQW 5
3RLQW 5
3
3RLQW =
3
3RLQW =
Figure 5-13
Boring cycle (G89)
Explanations
This cycle is similar to G86, with the only exception that here, a dwell time at the bottom of the
hole is still available.
Before programming G89, the spindle must be started with an M function.
Restrictions
Changeover of the axes
Before changing over the drilling axis, one must first deselect the fixed cycle.
Drilling
The drilling cycle is executed only if an axis motion, e.g. is programmed with X, Y, Z or R.
R
Always program R only in one block with an axis motion, otherwise the programmed values are
not stored modally.
ISO Milling
102
Programming Manual, 10/2020, 6FC5398-7BP40-3BA1
Additional functions
5.1 Program supporting functions
Deselection
The G functions of Group 01 (G00 to G03) and G89 should not be used together in one block,
as otherwise G89 is deselected.
Example
M3 S150
;Rotary motion of stem
G90 G0 Z100
G90 G99 G89 X200. Y-150. Z-100. ;Positioning, drilled hole 1,
R50. P1000 F150.
;then 1 s stop at the bottom of a hole
Y-500.
;Positioning, drilled hole 2,
;then return to point R
Y-700.
;Positioning, drilled hole 3,
;then return to point R
X950.
;Positioning, drilled hole 4,
;then return to point R
Y-500.
;Positioning, drilled hole 5,
;then return to point R
G98 Y-700.
;Positioning, drilled hole 6,
;then return to initial plane
G80
;Deselection of the fixed cycle
G28 G91 X0 Y0 Z0
;Return to reference position
M5
;Spindle stop
5.1.11
Cycle "Tapping without compensating chuck" (G84)
The tool drills at the programmed spindle speed and feedrate to the entered final thread depth.
With G84 you can produce rigid tapping.
Note
G84 can be used if the spindle to be used for the drilling operation is technically able to be
operated in the position-controlled spindle mode.
Format
G84 X... Y... Z... R... P... F... K... ;
X,Y: Drilled hole position
Z: Distance from point R to the bottom of the hole
R: Distance from the initial plane to plane R
P: Dwell time at the bottom of the hole and at point R during return
F: Cutting feedrate
K: Number of repetitions (if necessary)
ISO Milling
Programming Manual, 10/2020, 6FC5398-7BP40-3BA1
103
Additional functions
5.1 Program supporting functions
*
*
*
*
6SLQGOH VWRS
6SLQGOH VWRS
,QLWLDO SODQH
6SLQGOH FRXQWHUFORFNZLVH
6SLQGOH VWRS
6SLQGOH FRXQWHUFORFNZLVH
6SLQGOH VWRS
3
3
3ODQH ಯ3RLQW 5ಯ
3RLQW 5
3RLQW 5
3RLQW =
3RLQW =
3
3
6SLQGOH VWRS
6SLQGOH FRXQWHUFORFNZLVH
6SLQGOH FRXQWHUFORFNZLVH 6SLQGOH FRXQWHUFORFNZLVH
Figure 5-14
Tapping without compensating chuck (G84)
Explanations
The cycle creates the following sequence of motions:
• Approach of reference plane shifted by the amount of the safety clearance with G0.
• Oriented spindle stop and transfer of spindle in the Axis mode.
• Tapping to the final drilling depth.
• Execution of dwell time at thread depth.
• Retraction to the reference plane and reversion of direction of rotation brought forward by
the safety clearance.
• Retraction to the retraction plane with G0.
During tapping, rapid traverse override and spindle override are accepted at 100%.
The speed of rotation can be affected during the retraction with GUD _ZSFI[2]. Example:
_ZSFI[2]=120; the retraction takes place at 120% of the speed during tapping.
Restrictions
Changeover of the axes
Before changing over the drilling axis, one must first deselect the fixed cycle. An alarm is output
if the drilling axis in the "Drilling without compensating chuck" mode is changed over.
ISO Milling
104
Programming Manual, 10/2020, 6FC5398-7BP40-3BA1
Additional functions
5.1 Program supporting functions
Tapping
The drilling cycle is executed only if an axis motion, e.g. is programmed with X, Y, Z or R.
R
Always program R only in one block with an axis motion, otherwise the programmed values are
not stored modally.
Deselection
The G functions of Group 01 (G00 to G03) and G84 should not be used together in one block,
as otherwise G84 is deselected.
S command
An error message is displayed if the specified gear stage is one step higher than the maximum
permissible value.
F function
An error message is displayed if the value specified for the cutting feedrate exceeds the
maximum permissible value.
Unit of the F command
Metric input
Input in inch
Remarks
G94
1 mm/min
0.01 inch/min
Decimal point programming is per-
mitted
G95
0.01 mm/rev
0.0001 inch/rev
Decimal point programming is per-
mitted
Example
Feedrate for the Z axis 1.000 mm/min
Spindle speed 1,000 rev/min
Thread lead 1.0 mm
<Programming as feedrate per minute>
S100 M3
G94
;Feedrate per minute
G00 X100.0 Y100.0
;Positioning
G84 Z-50.0 R-10.0 F1000
;Tapping without compensating chuck
<Programming as revolutional feedrate>
G95
; Rev. feedrate
G98 Y-700.
;Positioning, drilled hole 6,
;then return to initial plane
ISO Milling
Programming Manual, 10/2020, 6FC5398-7BP40-3BA1
105
Additional functions
5.1 Program supporting functions
G00 X100.0 Y100.0
;Positioning
G84 Z-50.0 R-10.0 F1.0
;Tapping without compensating chuck
5.1.12
"Drilling a left-hand thread without compensating chuck" cycle (G74)
The tool drills at the programmed spindle speed and feedrate to the entered final thread depth.
With G74 you can produce left rigid tapping.
Note
G74 can be used if the spindle to be used for the drilling operation is technically able to be
operated in the position-controlled spindle mode.
Format
G74 X... Y... Z... R... P... F... K... ;
X,Y: Drilled hole position
Z: Distance from point R to the bottom of the hole
R: Distance from the initial plane to point R
P: Dwell time at the bottom of the hole and at point R during return
F: Cutting feedrate
K: Number of repetitions (if necessary)
*
*
*
*
6SLQGOH VWRS
6SLQGOH VWRS
,QLWLDO SODQH
6SLQGOH FRXQWHUFORFNZLVH
6SLQGOH VWRS
6SLQGOH FRXQWHUFORFNZLVH
6SLQGOH VWRS
3
3
3RLQW 5
3RLQW 5
3RLQW =
3RLQW =
3
3
6SLQGOH VWRS
6SLQGOH FRXQWHUFORFNZLVH
6SLQGOH FRXQWHUFORFNZLVH 6SLQGOH FRXQWHUFORFNZLVH
Figure 5-15
"Drilling a left-hand thread without compensating chuck" cycle (G74)
ISO Milling
106
Programming Manual, 10/2020, 6FC5398-7BP40-3BA1
Additional functions
5.1 Program supporting functions
Explanations
The cycle creates the following sequence of motions:
• Approach of reference plane shifted by the amount of the safety clearance with G0.
• Oriented spindle stop and transfer of spindle in the Axis mode.
• Tapping to the final drilling depth.
• Execution of dwell time at thread depth.
• Retraction to the reference plane and reversion of direction of rotation brought forward by
the safety clearance.
• Retraction to the retraction plane with G0.
During tapping, rapid traverse override and spindle override are accepted at 100%.
The speed of rotation can be affected during the retraction with GUD _ZSFI[2]. Example:
_ZSFI[2]=120; the retraction takes place at 120% of the speed during tapping.
Restrictions
Changeover of the axes
Before changing over the drilling axis, one must first deselect the fixed cycle. An alarm is output
if the drilling axis in the "Drilling without compensating chuck" mode is changed over.
Tapping
The drilling cycle is executed only if an axis motion, e.g. is programmed with X, Y, Z or R.
R
Always program R only in one block with an axis motion, otherwise the programmed values are
not stored modally.
Deselection
The G functions of Group 01 (G00 to G03) and G84 should not be used together in one block,
as otherwise G84 is deselected.
S command
An error message is displayed if the specified gear stage is one step higher than the maximum
permissible value.
F function
An error message is displayed if the value specified for the cutting feedrate exceeds the
maximum permissible value.
ISO Milling
Programming Manual, 10/2020, 6FC5398-7BP40-3BA1
107
Additional functions
5.1 Program supporting functions
Unit of the F command
Metric input
Input in inch
Remarks
G94
1 mm/min
0.01 inch/min
Decimal point program-
ming is permitted
G95
0.01 mm/rev
0.0001 inch/rev
Decimal point program-
ming is permitted
Example
Feedrate for the Z axis 1.000 mm/min
Spindle speed 1,000 rev/min
Thread lead 1.0 mm
<Programming as feedrate per minute>
S100 M3
G94
;Feedrate per minute
G00 X100.0 Y100.0
;Positioning
G84 Z-50.0 R-10.0 F1000
;Tapping without compensating chuck
<Programming as revolutional feedrate>
G95
; Rev. feedrate
G98 Y-700.
;Positioning, drilled hole 6,
;then return to initial plane
G00 X100.0 Y100.0
;Positioning
G84 Z-50.0 R-10.0 F1.0
;Tapping without compensating chuck
5.1.13
Left or right tapping cycle (G84 or G74)
Due to the chips adhering to the tool and an increased resistance associated with this, it may be
difficult to perform the deep-hole tapping without compensating chuck. In such cases the
tapping cycle with chip breakage or chip removal is helpful.
The cutting movement is executed in this cycle until the root is reached. There are a total of two
tapping cycles for this: Deep-hole tapping with chip breakage and deep-hole tapping with chip
removal.
Cycles G84 and G74 can be selected as follows using MD55802 $SCS_ISO_M_DRILLING_TYPE:
2: Deep-hole tapping with chip breakage
3: Deep-hole tapping with chip removal
Format
G84 (or G74) X... Y... Z... R... P... Q... F... K... ;
X,Y: Drilled hole position
Z: Distance from point R to the bottom of the hole
ISO Milling
108
Programming Manual, 10/2020, 6FC5398-7BP40-3BA1
Additional functions
5.1 Program supporting functions
R: Distance from the initial plane to "Point R"
P: Dwell time at the bottom of the hole and at point R for return
Q: Cutting depth for each cutting feedrate
F: Feedrate
K: Number of repetitions
*
*
*
*
*
*
G UHWUDFWLRQ SDWK
,QLWLDO SODQH
3RLQW 5
3RLQW 5
T
T
G
G
T
T
G
G
T
T
3RLQW =
3RLQW =
Figure 5-16
Deep-hole tapping with chip breakage (2)
ISO Milling
Programming Manual, 10/2020, 6FC5398-7BP40-3BA1
109
Additional functions
5.1 Program supporting functions
1. The tool is traversed with the programmed feedrate.
2. The retraction velocity can be influenced by means of MD55804
$SCS_ISO_M_RETRACTION_FACTOR.
G 3DWK IRU VWDUWLQJ WKH FXWWLQJ SURFHVVHV
,QLWLDO SODQH
3RLQW 5
3RLQW 5
T
T
G
G
T
T
G
G
T
T
3RLQW =
3RLQW =
Figure 5-17
Deep-hole drilling with chip removal (3)
Deep-hole tapping with chip breakage/removal
After positioning along the X and Y axes, there is a traversing movement at rapid traverse to
point R. The machining is done from point R onwards with a cutting depth Q (cutting depth per
cutting feedrate). Finally, the tool is retracted by the distance d. If a value not equal to 100 % is
specified in $SCS_ISO_M_RETRACTION_FACTOR, it can be specified whether the retraction is
overlaid or not. The spindle stops as soon as point Z is reached; the direction of rotation is finally
reversed and a retraction is executed. The retraction distance d is set in MD55802
$SCS_ISO_M_DRILLING_TYPE.
Note
If "0" is specified in $SCS_ISO_M_DRILLING_TYPE, the default setting for the retraction distance
of 1 mm or 1 inch is effective.
If 0 mm or 0 inch is to be specified, a value less than the travel triggering should be specified.
5.1.14
Deselection of a fixed cycle (G80)
Fixed cycles can be deselected with G80.
ISO Milling
110
Programming Manual, 10/2020, 6FC5398-7BP40-3BA1
Additional functions
5.1 Program supporting functions
Format
G80;
Explanations
All modal cycles are deselected in the ISO mode with G80 or with a G function of the 1st group
(G00, G03, G33, G34, ...).
5.1.15
Program example with a tool length compensation and fixed cycles
5HIHUHQFH SRVLWLRQ
<
;
WR
'ULOOLQJ D KROH RI
PP GLDPHWHU
WR
'ULOOLQJ D KROH RI
PP GLDPHWHU
WR
'ULOOLQJ D KROH RI
PP GLDPHWHU GHSWK
PP
<
5HWUDFWLRQ SRVLWLRQ
,QLWLDO SODQH
;
7
7
7
ISO Milling
Programming Manual, 10/2020, 6FC5398-7BP40-3BA1
111
Additional functions
5.1 Program supporting functions
Figure 5-18
Program example (drilling cycle)
Offset value +200.0 is set in TO No. 11, +190.0 is set in TO No. 15 and +150.0 is set in tool offset
No. 30.
Sample program
;
N001 G49
; Deselect the tool length compensation
N002 G10 L10 P11 R200.
; Setting the tool offset 11 to +200.
N003 G10 L10 P15 R190.
; Setting the tool offset 15 to +190.
N004 G10 L10 P30 R150.
; Setting the tool offset 30 to +150.
N005 G92 X0 Y0 Z0
; Setting the coordinates at the reference posi-
; tion
N006 G90 G00 Z250.0 T11 M6
; Tool change
N007 G43 Z0 H11
; Initial plane, tool length compensation
N008 S30 M3
; Spindle start
N009 g99 G81 X400.0 Y-350.0 Z-153.0
; Positioning, then drill #1
R-97.0 F1200
N010 Y-550.0
; Positioning, then drilling #2 and return to
; plane point R
N011 G98 Y-750.0
; Positioning, then drilling #3 and return to
; initial plane
N012 G99 X1200.0
; Positioning, then drilling #4 and return to
; plane point R
N013 Y-550.0
; Positioning, then drilling #5 and return to
; plane point R
N014 G98 Y-350.0
; Positioning, then drilling #6 and return to
; initial plane
N015 G00 X0 Y0 M5
; Return to reference position,
; Spindle stop
N016 G49 Z250.0 T15 M6
; Deselection of tool length compensation, tool
; change
N017 G43 Z0 H15
; Initial plane, tool length compensation
N018 S20 M3
; Spindle start
N019 G99 G82 X550.0 Y-450.0 Z-130.0
; Positioning, then drilling #7 and return to
R-97.0 P300 F700
; plane point R
N020 G98 Y-650.0
; Positioning, then drilling #8 and return to
; initial plane
N021 G99 X1050.0
; Positioning, then drilling #9 and return to
; plane point R
N022 G98 Y-450.0
; Positioning, then drilling #10 and return to
; initial plane
N023 G00 X0 Y0 M5
; Return to reference position,
; Spindle stop
N024 G49 Z250.0 T30 M6
; Deselection of tool length compensation, tool
; change
N025 G43 Z0 H30
; Initial plane, tool length compensation
N026 S10 M3
; Spindle start
ISO Milling
112
Programming Manual, 10/2020, 6FC5398-7BP40-3BA1
Additional functions
5.1 Program supporting functions
N027 G85 G99 X800.0 Y-350.0 Z-153.0
; Positioning, then drilling #11 and return to
R47.0 F500
; plane point R
N028 G91 Y-200.0 K2
; Positioning, then drilling #12 and 13, and re-
; turn to plane point R
N029 G28 X0 Y0 M5
; Return to reference position,
; Spindle stop
N030 G49 Z0
; Deselect the tool length compensation
N031 M30
; End of the program
5.1.16
Multiple-start threads with G33
Multiple-start threads are programmed with the G code G33 in the ISO dialect mode.
Format
G33 X.. Z.. F.. Q..
X.. Z.. = End point of the tread
F.. = Thread lead
Q.. = Starting angle
Threads with offset slides are programmed by specifying the mutually offset start points in the
G33 block. The starting point offset is specified as the absolute angle position under the address
"Q". The associated setting data ($SD_THREAD_START_ANGLE) is changed appropriately.
Example:
Q45000 means: Start offset 45.000 degree
Range of values: 0.0000 to 359,999 degrees
The start angle must always be programmed as an integer. The input resolution of the angular
data is 0.001 degree.
Example:
N200 X50 Z80 G01 F.8 G95 S500 M3
N300 G33 Z40 F2 Q180000
A thread with a lead of 2 mm and a starting point offset of 180 degree is produced.
ISO Milling
Programming Manual, 10/2020, 6FC5398-7BP40-3BA1
113
Additional functions
5.2 Programmable data input (G10)
5.2
Programmable data input (G10)
5.2.1
Changing the tool offset value
Existing tool offsets can be overwritten via G10. It is not possible to create new tool offsets.
Format
G10 L10 P... R... ; Tool length compensation, geometry
G10 L11 P... R... ; Tool length compensation, wear and tear
G10 L12 P... R... ; Tool radius compensation, geometry
G10 L13 P... R... ; Tool radius compensation, wear and tear
P: Number of tool offset memory
R: Value statement
L1 can also be programmed instead of L11.
5.2.2
Working area limitation (G22, G23)
G22/G23
G22/G23 limits the working area (working area, working space) in which the tool can traverse,
limited to the channel axis. The areas outside the working area limitations defined with G22/G23
are inhibited for any tool movement.
While using the commands G22 and G23, a protection zone as per the setting in the machine
data must be available and it must be active.
18190 $MN_NUM_PROTECT_AREA_NCK = 1
28210 $MC_NUM_PROTECT_AREA_ACTIVE = 1
Further, the following machine data must be set:
18190 $MN_NUM_PROTECT_AREA_NCK = 2 (minimum)
28210 $MC_NUM_PROTECT_AREA_ACTIVE = 2 (minimum)
One upper limit (G23) and a lower limit (G22) is defined for each axis for the working area. These
values are effective right away and they remain active even after RESET or POWER ON.
Consideration of the tool radius must be activated separately. This takes place over MD21020
$MC_WORKAREA_WITH_TOOL_RADIUS.
If the tool reference point lies outside the working area limitation defined by the working space
or if this area is left, the program sequence is stopped.
ISO Milling
114
Programming Manual, 10/2020, 6FC5398-7BP40-3BA1
Additional functions
5.2 Programmable data input (G10)
=
<
*
=
*
=
%DVLF FRRUGLQDWH V\VWHP
;
Status at Power ON
Whether the working area limitation is activated or deactivated is defined in the following
machine data:
$MC_EXTERN_GCODE_RESET_VALUES[3]
Normally, this MD is set to Value 2 (G23).
5.2.3
M function for calling subroutines (M98, M99)
This function can be used if subprograms are stored in the part program memory. Subprograms
that are registered in the memory and whose program numbers are assigned can be called and
executed any number of times.
Commands
The following M functions are used to call the subprograms.
Table 5-3
M functions for calling subprograms
M function
Function
M98
Subprogram call
M99
End of subprogram
ISO Milling
Programming Manual, 10/2020, 6FC5398-7BP40-3BA1
115
Additional functions
5.2 Programmable data input (G10)
Subprogram call (M98)
• M98 P nnn mmmm
m: Program no. (max. 4 digits)
n: No. of repetitions (max. 4 digits)
• If for example, M98 P21 is programmed, the part program memory is browsed by program
name 21.mpf and the subprogram is executed once. To call the subprogram three times, one
must program M98 P30021. An alarm is output if the specified program number is not found.
• A nesting of subprograms is possible, up to 16 subprograms are allowed. An alarm is output
if more subprogram levels are assigned than is allowed.
End of subprogram (M99)
A subprogram is ended with the command M99 Pxxxx and program processing is continued in
Block No. Nxxxx. The control system first searches forward for the block number (from the
subprogram call up to the end of the program). If no matching block number is found, the part
program is eventually searched in the reverse direction (in the direction of the start of the part
program).
If M99 is without a block number (Pxxxx) in a main program, the control goes to the start of the
main program and the main program is processed afresh. In case of M99 with navigation to the
block number in the main program (M99xxxx), the block number is always searched from the
start of program.
M99 does not reset the program runtime. An activated workpiece counter is not incremented.
ISO Milling
116
Programming Manual, 10/2020, 6FC5398-7BP40-3BA1
Additional functions
5.3 Eight-digit program number
5.3
Eight-digit program number
An eight-digit program number selection is activated with the machine data 20734
$MC_EXTERN_FUNCTION_MASK, Bit 6=1. This function affects M98, G65/66 and M96.
y: Number of program runs
x: Program number
Subprogram call
$MC_EXTERN_FUNCTION_MASK, Bit 6 = 0
M98 Pyyyyxxxx or
M98 Pxxxx Lyyyy
Max. four-digit program number
Addition of program number always to 4 digits with 0
Example:
M98 P20012: calls 0012.mpf 2 flows
M98 P123 L2: calls 0123.mpf 2 flows
$MC_EXTERN_FUNCTION_MASK, Bit 6 = 1
M98 Pxxxxxxxx Lyyyy
There is no extension with 0, even if the program number has less than 4 digits.
The programming of number of passes and program number in P(Pyyyyxxxxx) is not possible,
the number of passes must always be programmed with L!
Example:
M98 P123: calls 123.mpf 1 Pass
M98 P20012: calls 20012.mpf 1 Pass
Caution: This is no longer compatible with ISO dialect original
M98 P12345 L2: calls 12345.mpf 2 Passes
Modal and blockwise Macro G65/G66
$MC_EXTERN_FUNCTION_MASK, Bit 6 = 0
G65 Pxxxx Lyyyy
Addition of program number to 4 digits with 0. Program number with more than 4 digits leads
to an alarm.
$MC_EXTERN_FUNCTION_MASK, Bit 6 = 1
G65 Pxxxx Lyyyy
There is no extension with 0, even if the program number has less than 4 digits. A program
number with more than 8 digits leads to an alarm.
ISO Milling
Programming Manual, 10/2020, 6FC5398-7BP40-3BA1
117
Additional functions
5.3 Eight-digit program number
Interrupt M96
Does not function in SINUMERIK 802D sl.
$MC_EXTERN_FUNCTION_MASK, Bit6 = 0
M96 Pxxxx
Addition of program number always to 4 digits with 0
$MC_EXTERN_FUNCTION_MASK, Bit6 = 1
M96 Pxxxx
There is no extension with 0, even if the program number has less than 4 digits. A program
number with more than 8 digits leads to an alarm.
ISO Milling
118
Programming Manual, 10/2020, 6FC5398-7BP40-3BA1
Additional functions
5.4 Polar coordinates (G15, G16)
5.4
Polar coordinates (G15, G16)
When programming in polar coordinates, the positions in the coordinate system are defined
with a radius and/or angle. Polar coordinate programming is selected with G16. It is deselected
again with G15. The first axis of the plane is interpreted as polar radius, the second axis as polar
angle.
Format
G17 (G18, G19) G90 (G91) G16
;Polar coordinates command ON
G90 (G91) X... Y... Z...
;Polar coordinates command
G15
;Polar coordinates command OFF
G16: Polar coordinates command
G15: Deselection of polar coordinates command
G17, G18, G19: Selecting the plane
G90: The pole is located on the workpiece zero.
G91: The pole is located at the current position.
X, Y, Z: First axis: Radius of polar coordinate, second axis: Angle of polar coordinate
Example
N5 G17 G90 X0 Y0 F5000
N10 G16 X50 Y90
;Polar coordinates ON
;the pole is the workpiece zero
;Position X=0 and Y=50 in the Cartesian coordinate system
N20 G90 Y0
;No X in the block
;Pole angle =0, radius= of the last programmed PolarRa-
dius=50
;Position X=50 and Y=0
N30 Y36.87
;The pole is at the workpiece zero
;Pole angle =36.87, radius=50
;Position X=40 and Y=30
G15
The polar radius is always taken as absolute value, while the polar angle can be interpreted as
absolute value as well as incremental value.
ISO Milling
Programming Manual, 10/2020, 6FC5398-7BP40-3BA1
119
Additional functions
5.5 Polar coordinates interpolation (G12.1, G13.1)
5.5
Polar coordinates interpolation (G12.1, G13.1)
An interpolation between a rotary axis and a linear axis in the machining plane is switched on or
off via G12.1 and G13.1. Another possible linear axis lies vertical to this plane.
This function corresponds to the TRANSMIT function in the Siemens mode.
Note
A detailed description of the TRANSMIT function can be found in the NC Function Description
"SINUMERIK 840D sl, Extended Functions", Section "Kinematic Transformation (M1)" and in the
work planning Programming Manual (PGA) "SINUMERIK 840D sl" in Section "Transformation".
G12.1 is based on the Siemens function TRANSMIT. Appropriate machine data is to be set for this.
Format
G12.1
;Selection of polar coordinates interpolation
G13.1
;Deselection of polar coordinates interpolation
CAUTION
Plane selection
On specifying G12.1, the relevant previously used plane (G17, G18, G19) is deselected.
Operation with polar coordinates interpolation is deselected via NC RESET, where the
previously active plane is activated again.
Possible G functions in operation with polar coordinates interpolation
G01: Linear interpolation
G02, G03: Circular interpolation
G04: Dwelling, exact stop
G40, G41, G42: Cutter radius compensation
G65, G66, G67: Customer macro command
G90, G91: Absolute command, incremental command
G94, G95: Feedrate per minute, revolutional feedrate
ISO Milling
120
Programming Manual, 10/2020, 6FC5398-7BP40-3BA1
Additional functions
5.5 Polar coordinates interpolation (G12.1, G13.1)
Example
5RWDU\ D[LV &
1
1
1
1
; D[LV
1
1
1
1
1
= D[LV
Figure 5-19
Example of polar coordinates interpolation
N010 T0101
N20 G94
N30 G90
N40 G291
N100 G00 X60. C0. Z50.
N200 G12.1
N201 G42 G01 X20. F1000.
N202 Y10.
N203 G03 X10. Y20. R14.
N204 G01 X-20.
N205 Y-10.
N206 G03 X-10.0 Y-20.0 R14.
N207 G01 X20.
N208 Y0
N209 G40 X60.
N210 G13.1
N300 G00 Z50
N180 M30
Note
No geo axis interchange (parallel axes with G17 (G18. G19) should be active.
ISO Milling
Programming Manual, 10/2020, 6FC5398-7BP40-3BA1
121
Additional functions
5.6 Measuring functions
5.6
Measuring functions
5.6.1
Rapid lift with G10.6
A retraction position for the rapid lifting of a tool can be activated with G10.6 <Axis position>
(e.g., in case of tool breakage). The retraction motion itself is started with a digital signal. The
2nd rapid input of NC is used as the start signal.
Another rapid input (1-8) can also be selected with machine data 10820
$MN_EXTERN_INTERRUPT_NUM_RETRAC (1 - 8).
The interrupt program (ASUB) CYCLE3106.spf must always be available for the rapid retraction
with G10.6. If the CYCLE3106.spf is not available in the part program memory, the Alarm 14011
"Program CYCLE3106 not available or not released for processing" is output with G10.6 in a part
program block.
The response of the control system after the rapid retraction is defined in ASUB CYCLE3106.spf.
If the axes and the spindle are stopped after the rapid retraction, M0 and M5 must be
programmed in CYCLE3106.spf. If CYCLE3106.spf is a dummy program that contains only M17,
the part program is continued without any interruption after the rapid retraction.
If the rapid retraction is activated with the programming G10.6 <Axis position>, then the change
in the input signal of the 2nd NC rapid input from 0 to 1 aborts the current movement and the
position programmed in the G10.6 block is moved at rapid traverse. Here, the positions are
approached as absolute or incremental, as programmed in the G10.6 block.
The function is deactivated with G10.6 (without position specification). Rapid retraction via the
input signal of the 2nd rapid NC input is blocked.
Restrictions
Only one axis can be programmed for rapid retraction.
5.6.2
Measuring with "delete distance-to-go" (G31)
Measuring with "Delete distance-to-go possible" is activated by specifying "G31 X... Y... Z... F... ;".
The linear interpolation is interrupted and the distance-to-go of the axes is deleted if, during the
linear interpolation, the measurement input of the 1st probe is active. The program is continued
with the next block.
Format
G31 X... Y... Z... F... ;
G31: Non-modal G function (operates only in the block in which it is programmed)
ISO Milling
122
Programming Manual, 10/2020, 6FC5398-7BP40-3BA1
Additional functions
5.6 Measuring functions
PLC signal "Measurement input = 1"
With the rising edge of the measurement input 1, the current axis positions are stored in the axial
system parameters or $AA_MM[<Axis>], $AA_MW[<Axis>]. These parameters can be read in the
Siemens mode.
$AA_MW[X]
Saving the coordinate value of the X axis in the workpiece coordinate system
$AA_MW[Y]
Saving the coordinate value of the Y axis in the workpiece coordinate system
$AA_MW[Z]
Saving the coordinate value of the Z axis in the workpiece coordinate system
$AA_MM[X]
Saving the coordinate value of the X axis in the machine coordinate system
$AA_MM[Y]
Saving the coordinate value of the Y axis in the machine coordinate system
$AA_MM[Z]
Saving the coordinate value of the Z axis in the machine coordinate system
Note
Alarm 21700 is output if G31 is activated when the measuring signal is still active.
Program continuation after the measuring signal
If incremental axis positions are programmed in the next block, these axis positions are related
to the measuring point, i.e. the reference point of the incremental position is the axis position
at which the delete distance-to-go was executed by the measuring signal.
If the axis positions in the next block are programmed as absolute, then the programmed
positions are approached.
Note
No cutter radius compensation should be active in a block containing G31. Hence, the cutter
radius compensation is to be deselected before programming of G31, with G40.
ISO Milling
Programming Manual, 10/2020, 6FC5398-7BP40-3BA1
123
Additional functions
5.6 Measuring functions
Example
G31 with incremental position specification
*
*
;
)
<
7KH PHDVXULQJ VLJQDO LV DFWLYDWHG KHUH
<
$FWXDO WUDYHUVLQJ PRYHPHQW
;
7UDYHUVH ZLWKRXW PHDVXULQJ VLJQDO
Figure 5-20
G31 with incremental position specification of one axis
G31 is an absolute position specification
*
*
;
)
<
<
7KH PHDVXULQJ VLJQDO LV DFWLYDWHG KHUH
;
$FWXDO WUDYHUVLQJ PRYHPHQW
7UDYHUVH ZLWKRXW PHDVXULQJ VLJQDO
Figure 5-21
G31 with absolute position specification of one axis
G31 is an absolute command for 2 axes.
ISO Milling
124
Programming Manual, 10/2020, 6FC5398-7BP40-3BA1
Additional functions
5.6 Measuring functions
*
*
;
)
;
<
<
7KH PHDVXULQJ VLJQDO LV DFWLYDWHG KHUH
$FWXDO WUDYHUVLQJ PRYHPHQW
7UDYHUVH ZLWKRXW PHDVXULQJ VLJQDO
;
Figure 5-22
G31 is an absolute command for 2 axes
5.6.3
Measuring with G31, P1 - P4
The function is not available for 828D and 808D.
Function G31 P1 (.. P4) is different from G31 in that different inputs for the measuring signal can
be selected with P1 to P4. Several inputs can also be monitored on a rising edge of a measuring
signal simultaneously. The assignment of the inputs to the addresses P1 to P4 is defined using
machine data.
Format
G31 X... Y... Z... F... P... ;
X, Y, Z: End point
F... Feedrate
P...: P1 - P4
Explanation
The digital inputs are assigned to the addresses P1 to P4 via machine data as follows:
P1: $MN_EXTERN_MEAS_G31_P_SIGNAL[0]
P2: $MN_EXTERN_MEAS_G31_P_SIGNAL[1]
P3: $MN_EXTERN_MEAS_G31_P_SIGNAL[2]
P4: $MN_EXTERN_MEAS_G31_P_SIGNAL[3]
Explanations for selection (P1, P2, P3 or P4) can be found in the documentation provided by your
machine manufacturer.
ISO Milling
Programming Manual, 10/2020, 6FC5398-7BP40-3BA1
125
Additional functions
5.6 Measuring functions
Programming Guide Work Preparation, Chapter 4.8 "Extended measuring function" explains in
which system variables the measurement results can be read.
G31 P1..4 is internally mapped to MESA.
5.6.4
Interrupt program with M96, M97
M96
A subprogram can be defined as an interrupt routine with the M96 P<Program No.>.
The start of this program is triggered by an external signal. To start the interrupt routine, the 1st
rapid NC input is used from among the eight inputs available in the Siemens mode. Another
rapid input (1 to 8) can also be selected with MD10818 $MN_EXTER_INTERRUPT_NUM_ASUP.
Format
M96 Pxxxx
;Activation of program interrupt
M97
;Deactivation of program interrupt
M97 and M96 P_ must be alone in the block.
So that on triggering the interrupt, the cover cycle CYCLE396 is called first and it calls the
interrupt program programmed with Pxxxx in the ISO mode. At the end of the cover cycle, the
machine data 10808 $MN_EXTERN_INTERRUPT_BITS_M96, Bit 1 is evaluated and either
positioned on the interruption point with REPOS or continued with the next block.
End of interruption (M97)
The interrupt program is deactivated with M97. Only after the next activation with M96 can the
interrupt routine be started with the external signal.
If the interrupt program programmed with M96 Pxx is to be called directly with the interrupt
signal (without intermediate step with CYCLE396), then machine data 20734
$MC_EXTERN_FUNCTION_MASK, Bit 10 must be set. The subprogram programmed with Pxx is
then called in the Siemens mode during a signal change from 0 -> 1.
The M function numbers for the interrupt function are set through machine data. Machine data
10804 $MN_EXTERN_M_NO_SET_INT is used to determine the M number for activating an
interrupt routine, machine data 10806 $MN_EXTERN_M_NO_DISABLE_INT is used to determine
the M number for suppressing an interrupt routine.
Only the M functions not reserved for standard M functions can be used. The default of the M
functions is M96 and M97. To activate the function, one must set bit 0 in machine data 10808
$MN_EXTERN_INTERRUPT_BITS_M96. The M functions are not output to the PLC. The M
functions are interpreted as normal auxiliary functions if Bit 0 is not set.
At the end of the interrupt program, one normally traverses to the end position of the part
program block following the interruption block. If the part program is to be processed further
from the interruption point, there must be a REPOS instruction at the end of the interrupt
program, e.g. REPOSA. For this, the interrupt program must be written in the Siemens mode.
ISO Milling
126
Programming Manual, 10/2020, 6FC5398-7BP40-3BA1
Additional functions
5.6 Measuring functions
The M function for activating and deactivating an interrupt program must be alone in the block.
The system issues Alarm 12080 (syntax error) if addresses other than "M" and "P" are
programmed in the block.
Machine data
The response of the interrupt program function can be determined from the following machine
data:
MD10808 $MN_EXTERN_INTERRUPT_BITS_M96:
Bit 0 = 0
Interrupt program is not possible as M96/M97 are normal M functions.
Bit 0 = 1
Activation of an interrupt program with M96/M97 is allowed.
Bit 1 = 0
The part program is processed further with the end position of the block immediately after the
interruption block (REPOSL RMEBL).
Bit 1 = 1
The part program is continued from the interruption position (REPOSL RMIBL).
Bit 2 = 0
The interrupt signal interrupts the current block immediately and starts the interrupt routine.
Bit 2 = 1
The interrupt routine is started only at the end of the block.
Bit 3 = 0
The execution cycle is interrupted immediately after an interrupt signal arrives.
Bit 3 = 1
The interrupt program is started only at the end of the execution cycle (evaluation in the shell
cycles).
Bit 3 is evaluated in the shell cycles,and the cycle sequence is adapted accordingly.
Bit 1 is evaluated in cover cycle CYCLE396.
If the interrupt program is not called via the cover cycle CYCLE396,
($MC_EXTERN_FUNCTION_MASK, Bit 10 = 1) must be evaluated with Bit 1. If Bit 1 = TRUE,
REPOSL RMIBL must be used for positioning on the interruption point, otherwise REPOSL RMEBL
must be used for positioning on the block end position.
Example:
N100 M96 P1234
;Activate ASUB 1234spf. In the case of a rising edge of
;1. rapid input, the program
;1234.spf is started
N300 M97
;Deactivation of ASUB
Restrictions
The interrupt routine is treated as a normal subprogram. In other words, to be able to execute
interrupt routines, at least one subprogram level must be free. (16 program levels are available,
plus two levels that are reserved for the ASUB interrupt programs.)
ISO Milling
Programming Manual, 10/2020, 6FC5398-7BP40-3BA1
127
Additional functions
5.6 Measuring functions
The interrupt routine is started only during an edge change of the interrupt signal from 0 to 1.
If the interrupt signal remains permanently on 1, then the interrupt program is not restarted any
more.
5.6.5
"Tool life control" function
Tool life monitoring and workpiece count can be undertaken with Siemens Tool Management.
ISO Milling
128
Programming Manual, 10/2020, 6FC5398-7BP40-3BA1
Additional functions
5.7 Macro programs
5.7
Macro programs
Macros may consist of several part program blocks that are completed with M99. In principle,
macros are subroutines that are called with G65 Pxx or G66 Pxx in the part program.
Macros that are called with G65 are non-modal. Macros that are called with G68 are modal and
are deselected again with G67.
5.7.1
Differences with subroutines
Macro programs (G65, G66) can be used to specify parameters that can be evaluated in the
macro programs. No parameters can be specified in subroutine calls (M98).
5.7.2
Macro program call (G65, G66, G67)
Macro programs are generally executed immediately after their call.
The procedure of calling a macro program is described in the following table.
Table 5-4
Format for calling a macro program
Call method
Command code
Remarks
Simple call
G65
Modal call (a)
G66
Deselection through G67
Simple call (G65):Format
G65 P_ L_ ;
A macro program to which a program number was assigned with "P" is called and executed "L"
times by specifying "G65 P ... L... <Argument>; ".
The required parameters must be programmed in the same block (with G65).
Explanation
In a part program block containing G65 or G66, the address Pxx is interpreted as program
number of the subroutine in which the macro functionality is programmed. The number of
passes of the macro can be defined with the address Lxx. All other addresses in this part program
block are interpreted as transfer parameters and their programmed values are stored in the
system variables $C_A to $C_Z. These system variables can be read in the subroutine and
evaluated for the macro functionality. If other macros with parameter transfer are called in a
macro (subroutine), then the transfer parameters in the subroutine must be saved in internal
variable before the new macro call.
To enable internal variable definitions, one must switch automatically to the Siemens mode
during macro call. One can do this by inserting the instruction PROC<Program name> in the
ISO Milling
Programming Manual, 10/2020, 6FC5398-7BP40-3BA1
129
Additional functions
5.7 Macro programs
first line of the macro program. If another macro call is programmed in the subroutine, then the
ISO-dialect-mode must be reselected in advance.
Table 5-5
The P and L command
Address
Description
Number of digits
P
Program number
4 to 8 digits
L
Number of repetitions
System variables for the addresses I, J, K
As the addresses I, J, and K can be programmed up to 10 times in a block containing macro call,
the system variables of these addresses must be accessed with an array index. The syntax of
these three system variables thus is $C_I[..], $C_J[..], $C_K[..]. The values remain in the
programmed sequence in the array. The number of I, J, K addresses programmed in the block is
given in the variables $C_I_NUM, $C_J_NUM, $C_K_NUM.
The transfer parameters I, J, K for macro calls are treated in each case as one block even if the
individual addresses are not programmed. If a parameter is reprogrammed, or a following
parameter based on the I, J, K sequence was programmed, it belongs to the next block.
The system variables $C_I_ORDER, $C_J_ORDER, $C_K_ORDER are set to detect the
programming sequence in the ISO mode. These are identical arrays of $C_I, $C_K and they
contain the associated numbers of the parameters.
Note
The transfer parameters can be read only in the subroutine in the Siemens mode.
Example:
N5 I10 J10 K30 J22 K55 I44 K33
Block1 Block2 Block3
$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
$C_K[0]=30
$C_K[1]=55
ISO Milling
130
Programming Manual, 10/2020, 6FC5398-7BP40-3BA1
Additional functions
5.7 Macro programs
$C_K[2]=33
$C_K_ORDER[0]=1
$C_K_ORDER[1]=2
$C_K_ORDER[2]=3
Cycle parameter $C_x_PROG
In the ISO-dialect-0 mode, the programmed values can be evaluated in different ways,
depending on the programming method (integer or actual value). The different evaluation is
activated through a machine data.
If the MD is set, the control system responds as in the following example:
X100 ; X axis is traversed by 100 mm (100. with point) => actual value
Y200 ; Y-axis is traversed by 0.2 mm (200 without point) => integer value
If the addresses programmed in the block are used as transfer parameters of cycles, then the
programmed values always exist as real values in the $C_x variables. For integer values, one
cannot take recourse to the programming method (real/integer) in the cycles any more, and
therefore there is no evaluation of the programmed values with the correct conversion factor.
There are two system variables $C_TYP_PROG. $C_TYP_PROG for information as to whether
REAL or INTEGER programming was undertaken. The structure is the same as that of
$C_ALL_PROG and $C_INC_PROG. If the value is programmed as INTEGER, then Bit is set to 0, for
REAL it is set to 1. If the value is programmed over a variable $<Number>, then the
corresponding bit is also set to 1.
Example:
P1234 A100. X100 -> $C_TYP_PROG == 1.
Only Bit 0 is present, because only A was programmed as REAL.
P1234 A100. C20. X100 -> $C_TYP_PROG == 5.
Bit 1 and Bit 3 (A and C) are present.
Restrictions:
A maximum of ten I, J, K parameters can be programmed in each block. Only one bit each is
provided for I, J, K in the variable $C_TYP_PROG. Hence in $C_TYP_PROG the corresponding bit
for I, J and K is always set to 0. Therefore it cannot be derived whether I, J or K is programmed
as REAL or as INTEGER.
Modal call (G66, G67)
A modal macro program is called with G66. The specified macro program is executed only if the
specified conditions are fulfilled.
• The modal macro program is activated on specifying "G66 P... L... <Parameters>;". The
transfer parameters are handled as in G65.
• G66 is deselected by G67.
ISO Milling
Programming Manual, 10/2020, 6FC5398-7BP40-3BA1
131
|