SINUMERIK 840D sl NC programming. Programming Manual (2020) - page 4

 

  Index      Manuals     SINUMERIK 840D sl NC programming. Programming Manual (2020)

 

Search            copyright infringement  

 

   

 

   

 

Content      ..     2      3      4      5     ..

 

 

 

SINUMERIK 840D sl NC programming. Programming Manual (2020) - page 4

 

 

Fundamentals
2.9 Motion commands
ANG=…
X… Z… ANG=…
• Rounding as transition between the straight lines:
ANG=… RND=...
X… Z… ANG=…
• Chamfer as transition between the straight lines:
ANG=… CHR=...
X… Z… ANG=…
Programming of the end point of the first straight line by specifying the coordinates
• Corner as transition between the straight lines:
X… Z…
X… Z…
• Rounding as transition between the straight lines:
X… Z… RND=...
X… Z…
• Chamfer as transition between the straight lines:
X… Z… CHR=...
X… Z…
NC programming
Programming Manual, 10/2020, 6FC5398-2EP40-0BA1
215
Fundamentals
2.9 Motion commands
Meaning
ANG=... :
Identifier for angle programming
The specified value (angle) refers to the abscissa of the active working plane (Z
axis with G18).
RND=... :
Identifier for programming a rounding
The specified value corresponds to the radius of the rounding:
5RXQGLQJ
51'
CHR=... :
Identifier for programming a chamfer
The specified value corresponds to the width of the chamfer in the direction of
motion:
&+5
&KDPIHU
$QJOH ELVHFWRU
X... :
Coordinates in the X direction
Z... :
Coordinates in the Z direction
Note
For further information on the programming of a chamfer or rounding, see "Chamfer, rounding
(CHF, CHR, RND, RNDM, FRC, FRCM) (Page 245)".
NC programming
216
Programming Manual, 10/2020, 6FC5398-2EP40-0BA1
Fundamentals
2.9 Motion commands
Example
Program code
Comment
N10 X10 Z80 F1000 G18
; Approach the starting position.
N20 ANG=148.65 CHR=5.5
; Straight line with angle and chamfer specification.
N30 X85 Z40 ANG=100
; Straight line with angle and end point specification.
N40 ...
2.9.9.4
Contour definitions: Three straight lines
Note
In the following description it is assumed that:
• G18 is active (⇒ active working plane is the Z/X plane).
(However, the programming of contour definitions is also possible without restrictions with
G17 or G19.)
• The following identifiers have been defined for angle, radius and chamfer:
- ANG (angle)
- RND (radius)
- CHR (chamfer)
The end point of the first straight line can be programmed by specifying the Cartesian
coordinates or by specifying the angle of the two straight lines. The end point of the second and
third straight lines must always be programmed with Cartesian coordinates. The intersection of
the straight lines can be designed as a corner, a curve, or a chamfer.
NC programming
Programming Manual, 10/2020, 6FC5398-2EP40-0BA1
217
Fundamentals
2.9 Motion commands
;
&DQ DOVR EH URXQGLQJ
RU FKDPIHU
;
=
$1*
;
=
;
=
$1*
;
=
=
ANG1:
Angle of the first straight line
ANG2:
Angle of the second straight line
X1, Z1:
Start coordinates of the first straight line
X2, Z2:
End point coordinates of the first straight line or
start coordinates of the second straight line
X3, Z3:
End point coordinates of the second straight line or
start coordinates of the third straight line
X4, Z4:
End point coordinates of the third straight line
Note
The programming described here for a three point contour definition can be expanded arbitrarily
for contour definitions with more than three points.
Syntax
Programming of the end point of the first straight line by specifying the angle
• Corner as transition between the straight lines:
ANG=…
X… Z… ANG=…
X… Z…
• Rounding as transition between the straight lines:
ANG=… RND=...
X… Z… ANG=… RND=...
X… Z…
NC programming
218
Programming Manual, 10/2020, 6FC5398-2EP40-0BA1
Fundamentals
2.9 Motion commands
• Chamfer as transition between the straight lines:
ANG=… CHR=...
X… Z… ANG=… CHR=...
X… Z…
Programming of the end point of the first straight line by specifying the coordinates
• Corner as transition between the straight lines:
X… Z…
X… Z…
X… Z…
• Rounding as transition between the straight lines:
X… Z… RND=...
X… Z… RND=...
X… Z…
• Chamfer as transition between the straight lines:
X… Z… CHR=...
X… Z… CHR=...
X… Z…
NC programming
Programming Manual, 10/2020, 6FC5398-2EP40-0BA1
219
Fundamentals
2.9 Motion commands
Meaning
ANG=... :
Identifier for angle programming
The specified value (angle) refers to the abscissa of the active working plane (Z
axis with G18).
RND=... :
Identifier for programming a rounding
The specified value corresponds to the radius of the rounding:
5RXQGLQJ
51'
CHR=... :
Identifier for programming a chamfer
The specified value corresponds to the width of the chamfer in the direction of
motion:
&+5
&KDPIHU
$QJOH ELVHFWRU
X... :
Coordinates in the X direction
Z... :
Coordinates in the Z direction
Note
For further information on the programming of a chamfer or rounding, see " Chamfer, rounding
(CHF, CHR, RND, RNDM, FRC, FRCM) (Page 245) ".
NC programming
220
Programming Manual, 10/2020, 6FC5398-2EP40-0BA1
Fundamentals
2.9 Motion commands
Example
Program code
Comment
N10 X10 Z100 F1000 G18
; Approach the starting position
N20 ANG=140 CHR=7.5
; Straight line with angle and chamfer specifica-
tion.
N30 X80 Z70 ANG=95.824 RND=10
; Straight line to intermediate point with angle
and chamfer specification.
N40 X70 Z50
; Straight line to end point.
2.9.9.5
Contour definitions: End point programming with angle
Function
If the address letter A appears in an NC block, either none, one or both of the axes in the active
plane may also be programmed.
Number of programmed axes
• If no axis of the active plane has been programmed, then this is either the first or second
block of a contour definition consisting of two blocks.
If it is the second block of such a contour definition, then this means that the starting point
and end point in the active plane are identical. The contour definition is then at best a motion
perpendicular to the active plane.
• If exactly one axis of the active plane has been programmed, then this is either a single
straight line whose end point can be clearly defined via the angle and programmed Cartesian
coordinate or the second block of a contour definition consisting of two blocks. In the second
case, the missing coordinate is set to the same as the last (modal) position reached.
• If two axes of the active plane have been programmed, then this is the second block of a
contour definition consisting of two blocks. If the current block has not been preceded by a
block with angle programming without programmed axes of the active plane, then this block
is not permitted.
Angle A may only be programmed for linear or spline interpolation.
2.9.10
Thread cutting
2.9.10.1
Thread cutting with constant lead (G33, SF)
Threads with constant lead can be machined with G33:
• Cylindrical thread ①
• Face thread ②
• Taper thread ③
NC programming
Programming Manual, 10/2020, 6FC5398-2EP40-0BA1
221
Fundamentals
2.9 Motion commands
Note
Technical requirement for thread cutting with G33 is a variable-speed spindle with position
measuring system.
Multiple thread
Multiple thread (thread with offset cuts) can be machined by specifying a starting point offset.
The programming is performed in the G33 block at address SF.
;
6WDUWLQJ SRLQW RIIVHW LQ r
6WDUWLQJ DQJOH
IRU WKUHDGV
VHWWLQJ GDWD
=
Note
If no starting point offset is specified, the "starting angle for thread" defined in the setting data
is used.
Thread chain
A thread chain can be machined with several G33 blocks programmed in succession:
NC programming
222
Programming Manual, 10/2020, 6FC5398-2EP40-0BA1
Fundamentals
2.9 Motion commands
;
VW EORFN
ZLWK *
=
Note
With continuous-path mode G64, the blocks are linked by the look-ahead velocity control in such
a way that there are no velocity jumps.
Direction of rotation of the thread
The direction of rotation of the thread is determined by the direction of rotation of the spindle:
• Clockwise with M3 produces a right-hand thread
• Counter-clockwise with M4 produces a left-hand thread
Syntax
Cylinder thread:
G33 Z… K…
G33 Z… K… SF=…
Face thread:
G33 X… I…
G33 X… I… SF=…
Tapered thread:
G33 X… Z… K…
G33 X… Z… K… SF=…
G33 X… Z… I…
G33 X… Z… I… SF=…
Meaning
G33:
Command for thread cutting with constant lead
X... Y... Z... :
End point(s) in Cartesian coordinates
I... :
Thread lead in X direction
NC programming
Programming Manual, 10/2020, 6FC5398-2EP40-0BA1
223
Fundamentals
2.9 Motion commands
J... :
Thread lead in Y direction
K... :
Thread lead in Z direction
Z:
Longitudinal axis
X:
Transverse axis
Z... K... :
Thread length and lead for cylinder threads
X... I... :
Thread diameter and thread lead for face threads
I... or K... :
Thread lead for tapered threads
The specification (I... or K...) refers to the taper angle:
< 45°:
The thread lead is specified with K... (thread lead in longitu-
dinal direction).
> 45°:
The thread lead is specified with I.. (thread lead in transverse
direction).
= 45°:
The thread lead can be specified with I... or K
SF=... :
Starting point offset (only required for multiple threads)
The starting point offset is specified as an absolute angle position.
Range of values:
0.0000 to 359.999 degrees
Examples
Example 1: Double cylinder thread with 180° starting point offset
;
6WDUWLQJ SRLQW r
=
6WDUWLQJ SRLQW
r
Program code
Comment
N10 G1 G54 X99 Z10 S500 F100 M3
; Work offset, approach starting point, ac-
tivate spindle.
N20 G33 Z-100 K4
; Cylinder thread: End point in Z.
N30 G0 X102
; Retraction to starting position.
N40 G0 Z10
N50 G1 X99
N60 G33 Z-100 K4 SF=180
; 2nd cut: Starting point offset 180°.
N70 G0 X110
; Retract tool.
N80 G0 Z10
NC programming
224
Programming Manual, 10/2020, 6FC5398-2EP40-0BA1
Fundamentals
2.9 Motion commands
Program code
Comment
N90 M30
; End of program
Example 2: Tapered thread with angle less than 45°
;
=
Program code
Comment
N10 G1 X50 Z0 S500 F100 M3
; Approach starting point, activate spindle.
N20 G33 X110 Z-60 K4
; Tapered thread: End point in X and Z, specifi-
cation of thread lead with K... in Z direction
(since angle < 45°).
N30 G0 Z0 M30
; Retraction, end of program.
Further information
Feedrate for thread cutting with G33
From the programmed spindle speed and the thread lead, the control calculates the required
feedrate with which the turning tool is traversed over the thread length in the longitudinal and/
or transverse direction. The feedrate F is not taken into account for G33, the limitation to
maximum axis velocity (rapid traverse) is monitored by the control.
NC programming
Programming Manual, 10/2020, 6FC5398-2EP40-0BA1
225
Fundamentals
2.9 Motion commands
6SHHG
Cylinder thread
The cylinder thread is described by:
• Thread length
• Thread lead
The thread length is entered with one of the Cartesian coordinates X, Y or Z in absolute or
incremental dimensions (for turning machines preferably in the Z direction). Allowance must
also be made for the run-in and run-out paths, across which the feed is accelerated or
decelerated.
The thread lead is entered at addresses I, J, K (K is preferable for turning machines).
;
=
=
Face thread
The face thread is described by:
• Thread diameter (preferably in the X direction)
• Thread lead (preferably with I)
NC programming
226
Programming Manual, 10/2020, 6FC5398-2EP40-0BA1
Fundamentals
2.9 Motion commands
;
,
*UDGLHQW
Tapered thread
The tapered thread is described by:
• End point in the longitudinal and transverse direction (taper contour)
• Thread lead
The taper contour is entered in Cartesian coordinates X, Y, Z in absolute or incremental
dimensions - preferentially in the X and Z direction for machining on turning machines.
Allowance must also be made for the run-in and run-out paths, across which the feed is
accelerated or decelerated.
The specification of the lead depends on the taper angle (angle between the longitudinal axis
and the outside of the taper):
;
r
=
;
! r
=
NC programming
Programming Manual, 10/2020, 6FC5398-2EP40-0BA1
227
Fundamentals
2.9 Motion commands
2.9.10.2
Thread cutting with increasing or decreasing lead (G34, G35)
With the commands G34 and G35, the G33 functionality has been extended with the option of
programming a change in the thread pitch at address F. With G34, this results in a linear increase
and with G35 to a linear decrease of the thread pitch. Commands G34 and G35 can therefore be
used for machining self-tapping threads.
Syntax
Cylinder thread with increasing pitch:
G34 Z… K… F...
Cylinder thread with decreasing pitch:
G35 Z… K… F...
Face thread with increasing pitch:
G34 X… I… F...
Face thread with decreasing pitch:
G35 X… I… F...
Taper thread with increasing pitch:
G34 X… Z… K… F...
G34 X… Z… I… F...
Taper thread with decreasing pitch:
G35 X… Z… K… F...
G35 X… Z… I… F...
Meaning
G34:
Command for thread cutting with linear increasing pitch
G35:
Command for thread cutting with linear decreasing pitch
X... Y... Z... :
End point(s) in Cartesian coordinates
I... :
Thread pitch in X direction
J... :
Thread pitch in Y direction
K... :
Thread pitch in Z direction
F... :
Thread pitch change
If you already know the starting and final pitch of a thread, you can calculate
the thread pitch change to be programmed using the following equation:
NH
ND
)
>PP UHY @
,*
The meanings are as follows:
ke:
Final pitch thread (thread pitch of axis target point coordinate) [mm/
rev]
ka:
Starting thread pitch (programmed under I, J or K) [mm/rev]
IG:
Thread length [mm]
NC programming
228
Programming Manual, 10/2020, 6FC5398-2EP40-0BA1
Fundamentals
2.9 Motion commands
Example
Program code
Comment
N1608 M3 S10
; Spindle on.
N1609 G0 G64 Z40 X216
; Approach starting point.
N1610 G33 Z0 K100 SF=R14
; Thread cutting with constant pitch
(100 mm/rev).
N1611 G35 Z-200 K100 F17.045455
; Pitch decrease: 17.0454 mm/rev2
Pitch at end of block: 50 mm/rev
N1612 G33 Z-240 K50
; Traverse thread block without jerk.
N1613 G0 X218
N1614 G0 Z40
N1615 M17
2.9.10.3
Programmed run-in and run-out path for G33, G34 and G35 (DITS, DITE)
The run-in and run-out path of the thread can be specified in the part program with the DITS
and DITE addresses.
The thread axis is accelerated or braked along the specified path.
=
;
① Run-in/run-out path, depending on the machining direction
Short run-in path
Due to the collar on the thread runin, little room is left for the tool start ramp.
This must therefore be specified shorter via DITS.
Short run-out path
Because of the shoulder at the thread run-out, there is not much room for the tool braking ramp,
introducing a risk of collision between the workpiece and the tool cutting edge. The deceleration
ramp can be specified shorter using DITE. Due to the inertia of the mechanical system, however,
a collision can still occur.
Remedy: Program a shorter thread, reduce the spindle speed.
Note
DITE acts at the end of the thread as a rounding clearance. This achieves a smooth change in
the axis motion.
NC programming
Programming Manual, 10/2020, 6FC5398-2EP40-0BA1
229
Fundamentals
2.9 Motion commands
Effects
The programmed run-in and run-out path only increases the rate of acceleration on the path. If
one of the two paths is set larger than the thread axis needs with active acceleration, the thread
axis is accelerated or decelerated with maximum acceleration.
Syntax
DITS=<Value> DITE=<Value>
Meaning
DITS:
Define thread run-in path
DITE:
Define thread run-out path
<value>:
Only paths, and not positions, are programmed with DITS and DITE.
The programmed run-in/run-out path is handled according to the current dimension
setting (inches, metric).
Example
Program code
Comment
N40 G90 G0 Z100 X10 SOFT M3 S500
N50 G33 Z50 K5 SF=180 DITS=1 DITE=3
; Start of smoothing with Z=53.
N60 G0 X20
Further information
SD42010 $SC_THREAD_RAMP_DISP
When a block containing DITS and/or DITE is inserted in the main run, the programmed run-in/
run-out path is transferred into the setting data SD42010 $SC_THREAD_RAMP_DISP:
• SD42010 $SC_THREAD_RAMP_DISP[ 0 ] = programmed value of DITS
• SD42010 $SC_THREAD_RAMP_DISP[ 1 ] = programmed value of DITE
If no run-in/run-out path is programmed before or in the first thread block, the current value of
the setting data is used.
Behavior following channel / mode group / program end reset
SD 42010 values which have been overwritten by DITS and/or DITE remain active even
following a channel / mode group / program end reset.
Behavior following warm start
In case of a warm start, the setting data is reset to the values which were active before
overwriting by DITS and/or DITE (standard behavior).
If, however, the values programmed with DITS and DITE shall also be active following a warm
restart, the setting data SD42010 $SC_THREAD_RAMP_DISP must be listed in the machine data
MD10710 $MN_PROG_SD_RESET_SAVE_TAB:
NC programming
230
Programming Manual, 10/2020, 6FC5398-2EP40-0BA1
Fundamentals
2.9 Motion commands
MD10710 $MN_PROG_SD_RESET_SAVE_TAB[<n>] = 42010
Behavior if the run-in and/or run-out path is very short
If the run-in and/or run-out path is very short, the acceleration of the thread axis is higher than
the configured value. This causes an acceleration overload on the axis.
Alarm 22280 "Programmed run-in path too short" is then issued for the thread run-in (with the
appropriate configuration in MD11411 $MN_ENABLE_ALARM_MASK). The alarm is purely for
information and has no effect on part program execution.
2.9.10.4
Fast retraction during thread cutting (LFON, LFOF, DILF, ALF, LFTXT, LFWP, LFPOS,
POLF, POLFMASK, POLFMLIN)
The "Rapid retraction during thread cutting (G33)" function can be used to interrupt thread
cutting without causing irreparable damage in the following situations:
• NC stop initiated via DB21, ... DBX7.3
• NC stop implicitly initiated via an alarm
• Switching a fast input (Page 545)
The retraction motion can be programmed via:
• Retraction path and retraction direction (relative)
• Retraction position (absolute)
Note
NC stop signals
During thread cutting, the following NC stop signals do not trigger a rapid retraction:
• DB21, ... DBX3.4 (NC stop axes plus spindles)
• DB21, ... DBX7.2 (NC stop at the block limit)
Tapping
The "Rapid retraction" function cannot be used with tapping (G331/G332).
Syntax
Enable rapid retraction, retraction motion via retraction path and retraction direction:
G33 ... LFON DILF=<value> LFTXT/LFWP ALF=<value>
Enable rapid retraction, retraction motion via retraction position:
POLF[<axis identifier>]=<value> LFPOS
POLFMASK/POLFMLIN(<axis 1 name>,<axis 2 name>, etc.)
G33 ... LFON
Disable rapid retraction during thread cutting:
LFOF
NC programming
Programming Manual, 10/2020, 6FC5398-2EP40-0BA1
231
Fundamentals
2.9 Motion commands
Meaning
LFON:
Enable rapid retraction during thread cutting (G33)
LFOF:
Disable rapid retraction during thread cutting (G33)
DILF= :
Define length of retraction path
The value preset during MD configuration (MD21200 $MC_LIFTFAST_DIST) can be
modified in the part program by programming DILF.
Note:
The configured MD value is always active following NC-RESET.
LFTXT
The retraction direction is controlled in conjunction with ALF with G
LFWP:
commands LFTXT and LFWP.
LFTXT:
The plane in which the retraction motion is executed is calculated from the
path tangent and the tool direction (default setting).
LFWP:
The plane in which the retraction motion is executed is the active working
plane.
ALF= :
The direction is programmed in discrete degree increments with ALF in the plane of
the retraction motion.
With LFTXT, retraction in the tool direction is defined for ALF=1.
For LFWP, the direction in the machining plane is derived from following assignment:
• G17 (X/Y plane)
ALF=1 ; Retraction in the X direction
ALF=3 ; Retraction in the Y direction
• G18 (Z/X plane)
ALF=1 ; Retraction in the Z direction
ALF=3 ; Retraction in the X direction
• G19 (Y/Z plane)
ALF=1 ; Retraction in the Y direction
ALF=3 ; Retraction in the Z direction
For additional information on the programming options with ALF see Chapter "Tra-
versing direction for fast retraction from the contour (Page 547)".
LFPOS:
Retraction of the axis declared with POLFMASK or POLFMLIN to the absolute axis
position programmed with POLF.
POLFMASK:
Release of axes (<axis 1 name>,<axis 1 name>, etc.) for independent re-
traction to absolute position.
POLFMLIN:
Release of axes for retraction to absolute position in linear relation
Note:
Depending on the dynamic response of all the axes involved, the linear relation cannot
always be established before the lift position is reached.
POLF[]:
Define absolute retraction position for the geometry axis or machine axis in the index
Effective:
Modal
=<value>:
In the case of geometry axes, the assigned value is interpreted as a
position in the workpiece coordinate system. In the case of ma-
chine axes, it is interpreted as a position in the machine coordinate
system.
The values assigned can also be programmed as incremental di-
mensions:
=IC<value>
<axis
Identifier of a geometry axis or machine axis.
identifier>:
NC programming
232
Programming Manual, 10/2020, 6FC5398-2EP40-0BA1
Fundamentals
2.9 Motion commands
Note
LFON or LFOF can always be programmed, but the evaluation is performed exclusively during
thread cutting (G33).
Note
POLF with POLFMASK/POLFMLIN are not restricted to thread cutting applications.
Examples
Example 1: Enable rapid retraction during thread cutting
Program code
Comment
N55 M3 S500 G90 G18
; Active machining plane
; Approach the starting position
N65 MSG ("thread cutting")
; Tool infeed
MM_THREAD:
N67 $AC_LIFTFAST=0
; Reset before starting the thread.
N68 G0 Z5
N68 X10
N70 G33 Z30 K5 LFON DILF=10 LFWP ALF=7
; Enable rapid retraction during
thread cutting.
Retraction path = 10 mm
Retraction plane: Z/X (because of G18)
Retraction direction: -X
(with ALF=3: Retraction direction +X)
N71 G33 Z55 X15
N72 G1
; Deselect thread cutting.
N69 IF $AC_LIFTFAST GOTOB MM_THREAD
; If thread cutting has been interrup-
ted.
N90 MSG ("")
N70 M30
Example 2: Switch off rapid retraction before tapping.
Program code
Comment
N55 M3 S500 G90 G0 X0 Z0
N87 MSG ("tapping")
N88 LFOF
; Deactivate rapid retraction before tapping.
N89 CYCLE...
; Tapping cycle with G33.
N90 MSG ("")
NC programming
Programming Manual, 10/2020, 6FC5398-2EP40-0BA1
233
Fundamentals
2.9 Motion commands
Program code
Comment
N99 M30
Example 3: Rapid retraction to absolute retraction position
Path interpolation of X is suppressed in the event of a stop and a motion executed to position
POLF[X] at maximum velocity instead. The motion of the other axes continues to be determined
by the programmed contour or the thread lead and the spindle speed.
Program code
Comment
N10 G0 G90 X200 Z0 S200 M3
N20 G0 G90 X170
N22 POLF[X]=210 LFPOS
N23 POLFMASK(X)
; Activate (enable) rapid retraction from axis X.
N25 G33 X100 I10 LFON
N30 X135 Z-45 K10
N40 X155 Z-128 K10
N50 X145 Z-168 K10
N55 X210 I10
N60 G0 Z0 LFOF
N70 POLFMASK()
; Disable lift for all axes.
M30
2.9.10.5
Convex thread (G335, G336)
The G commands G335 and G336 can be used to turn convex threads (= differing to the
cylindrical form). Application is the machining of extremely large components that sag in the
machine because of their self-weight. Paraxial thread would result in the thread being too small
in the middle of the component. This can be compensated with convex threads.
=
Figure 2-6
Turning a convex thread
NC programming
234
Programming Manual, 10/2020, 6FC5398-2EP40-0BA1
Fundamentals
2.9 Motion commands
Programming
The turning of a convex thread is programmed with G335 or G336:
G335:
Turning of a convex thread on a circular tool path in a clockwise direction
G336:
Turning of a convex thread on a circular tool path in a counter-clockwise direction
The programming is performed first as for a linear thread by specifying the axial block end points
and the pitch via parameters I, J and K (see "Thread cutting with constant lead (G33, SF)
(Page 221)").
An arc is also specified. As for G2/G3, this can be programmed via the center point, radius,
opening angle or intermediate point specification (see "Circular interpolation (Page 188)").
When programming the convex thread with center point programming, the following must be
taken into account: Since I, J and K are used for the pitch in thread cutting, the circle parameters
in the center point programming must be programmed with IR=..., JR=... and KR=
IR=...:
Cartesian coordinate for the circle center point in the X direction
JR=...:
Cartesian coordinate for the circle center point in the Y direction
KR=...:
Cartesian coordinate for the circle center point in the Z direction
Note
IR, JR and KR are the default values of the interpolation parameter names for a convex thread that
can be set via machine data (MD10651 $MN_IPO_PARAM_THREAD_NAME_TAB).
Differences to the default values must be taken from the specifications of the machine
manufacturer.
Optionally, a starting point offset SF can also be specified (see "Thread cutting with constant
lead (G33, SF) (Page 221)").
Syntax
The syntax for the programming of a convex thread therefore has the following general form:
G335/G336 <axis target point coordinate(s)> <pitch> <arc> [<starting
point offset>]
Examples
Example 1: Convex thread in the clockwise direction with end and center point
programming
Program code
Comment
N5 G0 G18 X50 Z50
; Approach starting point.
N10 G335 Z100 K=3.5 KR=25 IR=-20 SF=90
; Turn convex thread in the clock-
wise direction.
NC programming
Programming Manual, 10/2020, 6FC5398-2EP40-0BA1
235
Fundamentals
2.9 Motion commands
[
6WDUWLQJ SRLQW
(QG SRLQW
&HQWHU SRLQW
.5
]
Figure 2-7
Convex thread in the clockwise direction with end and center point programming
Example 2: Convex thread in the counter-clockwise direction with end and center point
programming
Program code
Comment
N5 G0 G18 X50 Z50
; Approach starting point.
N10 G336 Z100 K=3.5 KR=25 IR=20 SF=90
; Turn convex thread in the coun-
ter-clockwise direction.
[
&HQWHU SRLQW
6WDUWLQJ SRLQW
(QG SRLQW
.5
]
Figure 2-8
Convex thread in the counter-clockwise direction with end and center point programming
Example 3: Convex thread in the clockwise direction with end point and radius
programming
Program code
N5 G0 G18 X50 Z50
N10 G335 Z100 K=3.5 CR=32 SF=90
NC programming
236
Programming Manual, 10/2020, 6FC5398-2EP40-0BA1
Fundamentals
2.9 Motion commands
[
6WDUWLQJ SRLQW
(QG SRLQW
&5
&HQWHU SRL
QW
]
Figure 2-9
Convex thread in the clockwise direction with end point and radius programming
Example 4: Convex thread in the clockwise direction with end point and opening angle
programming
Program code
N5 G0 G18 X50 Z50
N10 G335 Z100 K=3.5 AR=102.75 SF=90
[
6WDUWLQJ SRLQW
(QG SRLQW
$5
&HQWHU SR
LQW
]
Figure 2-10
Convex thread in the clockwise direction with end point and opening angle programming
Example 5: Convex thread in the clockwise direction with center point and opening angle
programming
Program code
N5 G0 G18 X50 Z50
N10 G335 K=3.5 KR=25 IR=-20 AR=102.75 SF=90
NC programming
Programming Manual, 10/2020, 6FC5398-2EP40-0BA1
237
Fundamentals
2.9 Motion commands
[
6WDUWLQJ SRLQW
(QG SRLQW
$5
&HQWHU SRLQW
.5
]
Figure 2-11
Convex thread in the clockwise direction with center point and opening angle programming
Example 6: Convex thread in the clockwise direction with end and intermediate point
programming
Program code
N5 G0 G18 X50 Z50
N10 G335 Z100 K=3.5 I1=60 K1=64
[
,QWHUPHGLDWH SRLQW
6WDUWLQJ SRLQW
(QG SRLQW
&HQWHU SRL
QW
]
Figure 2-12
Convex thread in the clockwise direction with end and intermediate point programming
NC programming
238
Programming Manual, 10/2020, 6FC5398-2EP40-0BA1
Fundamentals
2.9 Motion commands
Further information
Permissible arc areas
The arc programmed at G335/G336 must be in an area in which the specified thread main axis
(I, J or K) has the main axis share on the arc over the entire arc:
[
[
r
r
]
]
Permissible areas for the Z axis (pitch programmed
Permissible areas for the X axis (pitch programmed
with K)
with I)
A change of the thread main axis as shown in the following figure is not permitted:
[
6WDUWLQJ SRLQW
(QG SRLQW
r
]
Figure 2-13
Convex thread: Area that is not permissible
Frames
G335 and G336 are also possible with active frames. However, you must ensure that the
permissible arc areas are maintained in the basic coordinate system (BCS).
Supplementary conditions for the circular-path programming
The supplementary conditions described for the circular-path programming with G2/G3 apply
for the circular-path programming under G335/G336 (see "Circular interpolation (Page 188)").
NC programming
Programming Manual, 10/2020, 6FC5398-2EP40-0BA1
239
Fundamentals
2.9 Motion commands
2.9.11
Tapping without compensating chuck
2.9.11.1
Tapping without compensating chuck and retraction motion (G331, G332)
For tapping without compensating chuck, using the G331 and G332commands, the following
traversing motion is executed:
• G331: Tapping in the tapping direction up to the end of thread point
• G332: Retraction motion up to the tapping block G331 with automatic spindle direction of
rotation reversal
Syntax
G331 <axis> <thread pitch>
G331 <axis> <thread pitch> S...
G332 <axis> <thread pitch>
Meaning
G331:
Tapping
The tapped hole is defined by the traversing motion of the axis (drilling depth)
and the thread pitch.
Effectiveness:
Modal
G332:
Retraction motion when tapping
Retraction motion must have the same pitch as when tapping (G331). The
direction of rotation of the spindle is reversed automatically.
Effectiveness:
Modal
<axis>:
Traversing distance/position of the geometry axis (X, Y or Z) at the end of the
thread, e.g. Z50
<Thread pitch>:
Thread pitch I (X), J (Y) or K (Z):
• Positive pitch: Right-handed thread, e.g. K1.25
• Negative pitch: Left-handed thread, e.g. K-1.25
Range of values:
±0.001 to ±2000.00 mm/revolution
S...:
Spindle speed
The last active spindle speed is used if a spindle speed is not specified.
Note
Second gear-stage data block
To achieve effective adaptation of spindle speed and motor torque and be able to accelerate
faster, a second gear-stage data block for two further configurable switching thresholds
(maximum speed and minimum speed) can be preset in axis-specific machine data deviating
from the first gear step data block and also independent of these speed switching thresholds.
The specifications of the machine manufacturer must be observed.
For further information see the "Axes and Spindles" Function Manual.
NC programming
240
Programming Manual, 10/2020, 6FC5398-2EP40-0BA1
Fundamentals
2.9 Motion commands
Examples
• Example: Tapping with G331 / G332 (Page 241)
• Example: Output the programmed drilling speed in the current gear stage (Page 241)
• Example: Application of the second gear-stage data block (Page 242)
• Example: Speed is not programmed, the gearbox stage is monitored (Page 242)
• Example: Gearbox stage cannot be changed, gearbox stage monitoring (Page 243)
• Example: Programming without SPOS (Page 243)
2.9.11.2
Example: Tapping with G331 / G332
Program code
Comment
N10 SPOS[n]=0
; Spindle: Position control mode
; Start position 0 degrees
N20 G0 X0 Y0 Z2
; Axes: Approach starting position
N30 G331 Z-50 K-4 S200
; Tapping in Z,
; Pitch K-4 negative =>
; Direction of spindle rotation: CCW
rotation,
; Spindle speed 200 rpm
N40 G332 Z3 K-4
; Retraction motion in Z,
; Pitch K-4 negative (counterclock-
wise),
; autom. direction of rotation reversal
=>
; Clockwise spindle direction of rota-
tion
N50 G1 F1000 X100 Y100 Z100 S300 M3
; Spindle in spindle operation
2.9.11.3
Example: Output the programmed drilling speed in the current gear stage
Program code
Comment
N05 M40 S500
; Programmed spindle speed: 500 rpm =>
; Gearbox stage 1 (20 to 1028 rpm)
N55 SPOS=0
; Position the spindle
N60 G331 Z-10 K5 S800
; Tapping
; Spindle speed 800 rpm => gearbox stage 1
The appropriate gear stage for the programmed spindle speed S500 with M40 is determined on
the basis of the first gear-stage data block. The programmed drilling speed S800 is output in the
current gear stage and, if necessary, is limited to the maximum speed of the gear stage. No
NC programming
Programming Manual, 10/2020, 6FC5398-2EP40-0BA1
241
Fundamentals
2.9 Motion commands
automatic gear-stage change is possible following an SPOS operation. In order for an automatic
change in gear stage to be performed, the spindle must be in speed-control mode.
Note
If gearbox stage 2 is selected at a spindle speed of 800 rpm, then the switching thresholds for
the maximum and minimum speed must be configured in the relevant machine data of the
second gear-stage data block (see the examples below).
2.9.11.4
Example: Application of the second gear-stage data block
The switching thresholds of the second gear-stage data block for the maximum and minimum
speed are evaluated for G331/G332 and when programming an S value for the active master
spindle. Automatic M40 gear-stage change must be active. The gear stage as determined in the
manner described above is compared with the active gear stage. If they are found to be
different, then the gearbox stage is changed.
Program code
Comment
N05 M40 S500
; Programmed spindle speed: 500 rpm
N50 G331 S800
; Master spindle: Gearbox stage 2 is selected
N55 SPOS=0
; Position the spindle
N60 G331 Z-10 K5
; Tapping
; Spindle acceleration from second gearbox stage data block 2
2.9.11.5
Example: Speed is not programmed, the gearbox stage is monitored
If no speed is programmed when using the second gearbox stage data block with G331, then the
last speed programmed will be used to produce the thread. The gear stage does not change.
However, monitoring is performed in this case to check that the last speed programmed is within
the preset speed range (defined by the maximum and minimum speed thresholds) for the active
gear stage. Otherwise, alarm 16748 is output.
Program code
Comment
N05 M40 S800
; Programmed spindle speed: 800 rpm
N55 SPOS=0
; Position the spindle
N60 G331 Z-10 K5
; Tapping
; Monitoring the spindle speed, 800 rpm
; Gearbox stage 1 is active
; Gearbox stage 2 should be active => Alarm 16748
NC programming
242
Programming Manual, 10/2020, 6FC5398-2EP40-0BA1
Fundamentals
2.9 Motion commands
2.9.11.6
Example: Gearbox stage cannot be changed, gearbox stage monitoring
If the spindle speed is programmed in addition to the geometry in the G331 block when using
the second gear-stage data block, if the speed is not within the preset speed range (defined by
the maximum and minimum speed thresholds) of the active gear stage, it will not be possible
to change gear stages, because the path motion of the spindle and the infeed axis (axes) would
not be retained.
As in the example above, the speed and gearbox stage are monitored in the G331 block and
alarm 16748 is signaled if necessary.
Program code
Comment
N05 M40 S500
; Programmed spindle speed: 500 rpm =>
; Gearbox stage 1
N55 SPOS=0
; Position the spindle
N60 G331 Z-10 K5 S800
; Tapping
; Gearbox stage cannot be changed,
; Monitoring the spindle speed, 800 rpm
; with gearbox stage data set 1: Gearbox stage 2
; should be active => Alarm 16748
2.9.11.7
Example: Programming without SPOS
Program code
Comment
N05 M40 S500
; Programmed spindle speed: 500 rpm =>
; Gearbox stage 1 (20 to 1028 rpm)
N50 G331 S800
; Master spindle: Gearbox stage 2 is selected
N60 G331 Z-10 K5
; Tapping
; Spindle acceleration from second gearbox stage data block 2
Thread interpolation for the spindle starts from the current position, which is determined by the
previously processed section of the part program, e.g. if the gear stage was changed. Therefore,
it might not be possible to remachine the thread.
Note
Please note that when machining with multiple spindles, the drill spindle also has to be the
master spindle. SETMS(<spindle number>) can be programmed to set the drill spindle as
the master spindle.
NC programming
Programming Manual, 10/2020, 6FC5398-2EP40-0BA1
243
Fundamentals
2.9 Motion commands
2.9.12
Tapping with compensating chuck
2.9.12.1
Tapping with compensating check and retraction motion (G63)
For tapping with compensating chuck, using the G63 command, the following traversing
motion is executed:
• G63: Tapping in the tapping direction up to the end of thread point
• G63: Retraction motion with programmed spindle direction of rotation reversal
Note
After a G63block, the last effective interpolation type G0, G1, G2 is active.
Syntax
G63 <axis> <direction of rotation> <speed <feedrate>
Meaning
G63:
Tapping with compensating chuck
Effective:
Non-modal
<Axis>:
Traversing distance/position of the geometry axis (X, Y or Z) at the end of the
thread, e.g. Z50
<Direction of
Direction of spindle rotation:
rotation>:
• M3: Clockwise rotation, right-hand thread
• M4: Counterclockwise rotation, left-hand thread
<Speed>:
Maximum permissible spindle speed while tapping, e.g. S100
<Feedrate>:
Feedrate of the tapping axis F, with F = spindle speed * thread pitch
Example
Tapping an M5 thread:
• Spindle pitch according to the standard: 0.8 mm/rev
• Spindle speed S: 200 rpm
• Feedrate F = 200 rpm * 0.8 mm/rev = 160 mm/min.
Program code
Comment
N10 G1 X0 Y0 Z2 F1000 S200 M3
; Approach starting point
; Spindle clockwise direction of rotation, 200
rpm
N20 G63 Z-50 F160
; Tapping with compensating chuck
; Drilling depth: absolute Z=50mm
; Feedrate: 160 mm/min
NC programming
244
Programming Manual, 10/2020, 6FC5398-2EP40-0BA1
Fundamentals
2.9 Motion commands
Program code
Comment
N30 G63 Z3 M4
; Retraction movement: absolute Z=3mm
; Direction of rotation reversal
; Spindle with counterclockwise direction of
rotation, 200 rpm
2.9.13
Chamfer, rounding (CHF, CHR, RND, RNDM, FRC, FRCM)
Contour corners within the active working plane can be executed as roundings or chamfers.
For optimum surface quality, a separate feedrate can be programmed for chamfer/rounding. If
a feedrate is not programmed, the standard path feedrate F will be applied.
The "Modal rounding" function can be used to round multiple contour corners in the same way
one after the other.
Syntax
Chamfer the contour corner:
G... X... Z... CHR/CHF=<value> FRC/FRCM=<value>
G... X... Z...
Round the contour corner:
G... X... Z... RND=<value> FRC=<value>
G... X... Z...
Modal rounding:
G... X... Z... RNDM=<value> FRCM=<value>
RNDM=0
Note
The technology (feedrate, feedrate type, M commands, etc.) for chamfer/rounding is derived
from either the previous or the next block dependent on the setting of bit 0 in machine data
MD20201 $MC_CHFRND_MODE_MASK (chamfer/rounding behavior). The recommended
setting is the derivation from the previous block (bit 0 = 1).
Meaning
CHF=… :
Chamfer the contour corner
<value>:
Length of the chamfer (unit corresponding to G70/G71)
CHR=… :
Chamfer the contour corner
<value>:
Width of the chamfer in the original direction of motion (unit correspond-
ing to G70/G71)
RND=… :
Round the contour corner
<value>:
Radius of the rounding (unit corresponding to G70/G71)
NC programming
Programming Manual, 10/2020, 6FC5398-2EP40-0BA1
245
Fundamentals
2.9 Motion commands
RNDM=… :
Modal rounding (rounding multiple contour corners in the same way one after the other)
<value>:
Radius of the roundings (unit corresponding to G70/G71)
Modal rounding is deactivated with RNDM=0.
FRC=… :
Non-modal feedrate for chamfer/rounding
<value>:
Feedrate in mm/min (with active G94) or mm/rev (with active G95)
FRCM=… :
Modal feedrate for chamfer/rounding
<value>:
Feedrate in mm/min (with active G94) or mm/rev (with active G95)
FRCM=0 deactivates modal feedrate for chamfer/rounding and activates
the feedrate programmed under F.
Note
Chamfer/rounding too high
If the values programmed for chamfer (CHF/CHR) or rounding (RND/RNDM) are too high for the
contour elements involved, chamfer or rounding will automatically be adapted:
1. If MD11411 $MN_ENABLE_ALARM_MASK bit 4 is set, alarm 10833 "Chamfer or rounding
must be reduces" is output (cancel alarm).
2. The chamfer/rounding is reduced until it fits in the contour corner. This results in at least one
block without motion. At this block, the required motion is stopped.
Note
Chamfer/rounding not possible
No chamfer/rounding is performed if:
• No straight or circular contour is available in the plane
• A movement takes place outside the plane
• The plane is changed
• The number of blocks specified in the machine data that are not to contain any information
about traversing (e.g. only command outputs) is exceeded
Note
FRC/FRCM
FRC/FRCM has no effect if a chamfer is traversed with G0; the command can be programmed
according to the F value without error message.
FRC is only effective if a chamfer/rounding is programmed in the block or if RNDM has been
activated.
FRC overwrites the F or FRCM value in the current block.
The feedrate programmed under FRC must be greater than zero.
FRCM=0 activates the feedrate programmed under F for chamfer/rounding.
If FRCM is programmed, the FRCM value will need to be reprogrammed like F on change
G94 ↔ G95, etc. If only F is reprogrammed and if the feedrate type FRCM > 0 before the change,
an error message will be output.
NC programming
246
Programming Manual, 10/2020, 6FC5398-2EP40-0BA1
Fundamentals
2.9 Motion commands
Examples
Example 1: Chamfer between two straight lines
• MD20201 Bit 0 = 1 (derived from previous
&+5
block).
• G71 is active.
• The width of the chamfer in the direction of
*
motion (CHR) should be 2 mm and the fee-
˞
drate for chamfer 100 mm/min.
&KDPIHU
(J *
$QJOH ELVHFWRU
;
=
Programming can be performed in two ways:
• Programming with CHR
Program code
N30 G1 Z… CHR=2 FRC=100
N40 G1 X…
• Programming with CHF
Program code
N30 G1 Z… CHF=2(cosα*2) FRC=100
N40 G1 X…
NC programming
Programming Manual, 10/2020, 6FC5398-2EP40-0BA1
247
Fundamentals
2.9 Motion commands
Example 2: Rounding between two straight lines
• MD20201 Bit 0 = 1 (derived from previous
block).
*
• G71 is active.
5RXQGLQJ
• The radius of the rounding should be 2 mm
and the feedrate for rounding 50 mm/min.
51'
(J *
;
=
Program code
N30 G1 Z… RND=2 FRC=50
N40 G1 X…
Example 3: Rounding between straight line and circle
The RND function can be used to insert a circle contour element with tangential connection
between the linear and circle contours in any combination.
• MD20201 Bit 0 = 1 (derived from previous
block).
• G71 is active.
5RXQGLQJ
• The radius of the rounding should be 2 mm
*
and the feedrate for rounding 50 mm/min.
51'
(J *
;
=
Program code
NC programming
248
Programming Manual, 10/2020, 6FC5398-2EP40-0BA1
Fundamentals
2.9 Motion commands
Program code
N30 G1 Z… RND=2 FRC=50
N40 G3 X… Z… I… K…
Example 4: Modal rounding to deburr sharp workpiece edges
Program code
Comment
N30 G1 X… Z… RNDM=2 FRCM=50
; Activate modal rounding.
Radius of rounding: 2 mm
Feedrate for rounding: 50 mm/min
N40...
N120 RNDM=0
; Deactivate modal rounding.
Example 5: Apply technology from following block or previous block
• MD20201 Bit 0 = 0: Derived from following block (default setting!)
Program code
Comment
N10 G0 X0 Y0 G17 F100 G94
N20 G1 X10 CHF=2
; Chamfer N20-N30 with F=100 mm/min
N30 Y10 CHF=4
; Chamfer N30-N40 with FRC=200 mm/min
N40 X20 CHF=3 FRC=200
; Chamfer N40-N60 with FRCM=50 mm/min
N50 RNDM=2 FRCM=50
N60 Y20
; Modal rounding N60-N70 with FRCM=50 mm/min
N70 X30
; Modal rounding N70-N80 with FRCM=50 mm/min
N80 Y30 CHF=3 FRC=100
; Chamfer N80-N90 with FRC=100 mm/min
N90 X40
; Modal rounding N90-N100 with F=100 mm/min (de-
selection of FRCM)
N100 Y40 FRCM=0
; Modal rounding N100-N120 with G95 FRC=1 mm/rev
N110 S1000 M3
N120 X50 G95 F3 FRC=1
M02
• MD20201 Bit 0 = 1: Derived from previous block (recommended setting!)
Program code
Comment
N10 G0 X0 Y0 G17 F100 G94
N20 G1 X10 CHF=2
; Chamfer N20-N30 with F=100 mm/min
N30 Y10 CHF=4 FRC=120
; Chamfer N30-N40 with FRC=120 mm/min
N40 X20 CHF=3 FRC=200
; Chamfer N40-N60 with FRC=200 mm/min
NC programming
Programming Manual, 10/2020, 6FC5398-2EP40-0BA1
249
Fundamentals
2.9 Motion commands
Program code
Comment
N50 RNDM=2 FRCM=50
N60 Y20
; Modal rounding N60-N70 with FRCM=50 mm/min
N70 X30
; Modal rounding N70-N80 with FRCM=50 mm/min
N80 Y30 CHF=3 FRC=100
; Chamfer N80-N90 with FRC=100 mm/min
N90 X40
; Modal rounding N90-N100 with FRCM=50 mm/min
N100 Y40 FRCM=0
; Modal rounding N100-N120 with F=100 mm/min
N110 S1000 M3
N120 X50 CHF=4 G95 F3 FRC=1
; Chamfer N120-N130 with G95 FRC=1 mm/rev
N130 Y50
; Modal rounding N130-N140 with F=3 mm/rev
N140 X60
M02
NC programming
250
Programming Manual, 10/2020, 6FC5398-2EP40-0BA1
Fundamentals
2.10 Tool radius compensation
2.10
Tool radius compensation
2.10.1
Tool radius compensation (G40, G41, G42, OFFN)
When tool radius compensation (TRC) is active, the control automatically calculates the
equidistant tool paths for various tools.
(TXLGLVWDQW
6
5
(TXLGLVWDQW
Syntax
G0/G1 X... Y… Z... G41/G42 [OFFN=<value>]
G40 X... Y… Z...
Meaning
G41:
Activate TRC with machining direction left of the contour.
G42:
Activate TRC with machining direction right of the contour.
OFFN=<value>:
Allowance on the programmed contour (normal contour offset) (optional),
e.g. to generate equidistant paths for rough finishing.
G40:
Deactivate TRC.
Note
In the NC block with G40/G41/G42, G0 or G1 has to be active and at least one axis has to be
specified on the selected working plane.
If only one axis is specified on activation, the last position on the second axis is added
automatically and traversed with both axes.
The two axes must be active as geometry axes in the channel. This can be achieved by means
of GEOAX programming.
NC programming
Programming Manual, 10/2020, 6FC5398-2EP40-0BA1
251
Fundamentals
2.10 Tool radius compensation
Examples
Example 1: Milling
:RUNSLHFH
<
&RUUHFWLRQ LQ <
1
;
Program code
Comment
N10 G0 X50 T1 D1
; Only tool length compensation is activated. X50 is
approached without compensation.
N20 G1 G41 Y50 F200
; Radius compensation is activated, point X50/Y50 is
approached with compensation.
N30 Y100
…
Example 2: "Conventional" procedure using milling as an example
"Conventional" procedure:
1. Tool call.
2. Change tool.
3. Activate working plane and tool radius compensation.
NC programming
252
Programming Manual, 10/2020, 6FC5398-2EP40-0BA1
Fundamentals
2.10 Tool radius compensation
<
<
;
=
Program code
Comment
N10 G0 Z100
; Retraction for tool change.
N20 G17 T1 M6
; Tool change
N30 G0 X0 Y0 Z1 M3 S300 D1
; Call tool offset values, select length compensation.
N40 Z-7 F500
; Feed in tool.
N50 G41 X20 Y20
; Activate tool radius compensation, tool machines to
the left of the contour.
N60 Y40
; Mill contour.
N70 X40 Y70
N80 X80 Y50
N90 Y20
N100 X20
N110 G40 G0 Z100 M30
; Retract tool, end of program.
Example 3: Turning
;
=
NC programming
Programming Manual, 10/2020, 6FC5398-2EP40-0BA1
253
Fundamentals
2.10 Tool radius compensation
Program code
Comment
…
N20 T1 D1
; Only tool length compensation is activated.
N30 G0 X70 Z20
; X70 Z20 is approached without compensation.
N40 G42 X20 Z1
; Radius compensation is activated, point X20/Z1 is
approached with compensation.
N50 G1 Z-20 F0.2
…
Example 4: Turning
r
;
5
5
5
5
5
=
Program code
Comment
N5 G0 G53 X280 Z380 D0
; Starting point.
N10 TRANS X0 Z250
; Work offset.
N15 LIMS=4000
; Speed limitation (G96).
N20 G96 S250 M3
; Select constant feedrate
N25 G90 T1 D1 M8
; Select tool selection and offset.
N30 G0 G42 X-1.5 Z1
; Set tool with tool radius compensation.
N35 G1 X0 Z0 F0.25
N40 G3 X16 Z-4 I0 K-10
; Turn radius 10.
N45 G1 Z-12
N50 G2 X22 Z-15 CR=3
; Turn radius 3.
NC programming
254
Programming Manual, 10/2020, 6FC5398-2EP40-0BA1
Fundamentals
2.10 Tool radius compensation
Program code
Comment
N55 G1 X24
N60 G3 X30 Z-18 I0 K-3
; Turn radius 3.
N65 G1 Z-20
N70 X35 Z-40
N75 Z-57
N80 G2 X41 Z-60 CR=3
; Turn radius 3.
N85 G1 X46
N90 X52 Z-63
N95 G0 G40 G97 X100 Z50 M9
; Deselect tool radius compensation and
approach tool change location.
N100 T2 D2
; Call tool and select offset.
N105 G96 S210 M3
; Select constant cutting rate.
N110 G0 G42 X50 Z-60 M8
; Set tool with tool radius compensation.
N115 G1 Z-70 F0.12
; Turn diameter 50.
N120 G2 X50 Z-80 I6.245 K-5
; Turn radius 8.
N125 G0 G40 X100 Z50 M9
; Retract tool and deselect tool radius
compensation.
N130 G0 G53 X280 Z380 D0 M5
; Approach tool change location.
N135 M30
; End of program.
Further information
Calculation of the tool paths
The control requires the following information in order to calculate the tool paths:
• Tool no. (T...), cutting edge no. (D...)
• Machining direction (G41/G42)
• Working plane (G17/G18/G19)
Tool no. (T...), cutting edge no. (D...)
The distance between tool path and workpiece contour is calculated from the milling cutter radii
or cutting edge radii and the specifications of the cutting edge position.
Machining direction (G41/G42)
From this information, the control detects the direction in which the tool path is to be displaced.
NC programming
Programming Manual, 10/2020, 6FC5398-2EP40-0BA1
255
Fundamentals
2.10 Tool radius compensation
3
*
5
6
3
*
5
6
;
=
P
Tool tip
S
Cutting edge center point
R
Cutting edge radius
Figure 2-14
Tool radius compensation when turning with machining direction to the left of the contour
(G41)
5
6
*
3
5
6
*
3
;
=
P
Tool tip
S
Cutting edge center point
R
Cutting edge radius
Figure 2-15
Tool radius compensation when turning with machining direction to the right of the
contour (G42)
NC programming
256
Programming Manual, 10/2020, 6FC5398-2EP40-0BA1
Fundamentals
2.10 Tool radius compensation
*
*
Figure 2-16
Tool radius compensation when milling with machining direction to the left of the contour
(G41)
*
*
Figure 2-17
Tool radius compensation when milling with machining direction to the right of the contour
(G42)
Note
A negative correction value has the same significance as a change of offset side (G41 ↔ G42).
Working plane (G17/G18/G19)
From this information, the control detects the plane and therefore the axis directions in which
it is corrected.
Example: Milling tool
NC programming
Programming Manual, 10/2020, 6FC5398-2EP40-0BA1
257
Fundamentals
2.10 Tool radius compensation
=
/
5
<
;
*
*
5
5
/
/
*
L
Length
R
Radius
Program code
Comment
N10 G17 G41 …
; The tool radius compensation is performed in the X/Y
plane, the tool length compensation is performed in the Z
direction.
Note
On 2-axis machines, tool radius compensation is only possible in "real" planes, usually with G18.
Tool length compensation
The wear parameter assigned to the diameter axis on tool selection can be defined as the
diameter value using an MD. This assignment is not automatically altered when the plane is
subsequently changed. To do this, the tool must be selected again after the plane change.
Tool radius compensation behavior with closed contour
The tool radius compensation behavior with closed contour can be set via the setting date:
NC programming
258
Programming Manual, 10/2020, 6FC5398-2EP40-0BA1
Fundamentals
2.10 Tool radius compensation
SD42496 $SC_CUTCOM_CLSD_CONT
Value
Meaning
FALSE
If two intersections appear on the inside when offsetting an (almost) closed contour,
which consists of two successive circle blocks or one circle block and one linear block, the
intersection positioned closer to the end of block on the first partial contour is selected
in accordance with the standard procedure.
A contour is deemed to be (almost) closed if the distance between the starting point of
the first block and the end point of the second block is less than 10% of the effective
compensation radius, but not more than 1000 path increments (corresponds to 1 mm
with 3 decimal places).
TRUE
In the same situation as described above, the intersection positioned on the first partial
contour closer to the block start is selected.
Change in compensation direction (G41 ↔ G42)
A change in compensation direction (G41 ↔ G42) can be programmed without an intermediate
G40.
*
*
Change of the working plane
It is not possible to change the work plane (G17/G18/G19) when G41/G42 is active.
Change of tool offset data block (D…)
The tool offset data block can be changed in compensation mode.
A changed tool radius already becomes active as from the block containing the new D number.
Note
The radius change or compensation movement is performed across the entire block and only
reaches the new equidistance at the programmed end point.
In the case of linear movements, the tool travels along an inclined path between the starting
point and the end point:
NC programming
Programming Manual, 10/2020, 6FC5398-2EP40-0BA1
259
Fundamentals
2.10 Tool radius compensation
① Programmed contour
② Tool path without changing the tool offset data block in the active block
③ Tool path when the tool offset data block in the active block changes and the tool radius changes
as a result
Circular interpolation produces spiral movements.
Changing the tool radius
The change can be made, e.g. using system variables. The sequence is the same as when
changing the tool offset data block (D…).
Note
The modified values only take effect the next time T or D is programmed. The change does not
apply until the next block.
Compensation mode
Compensation mode may only be interrupted by a certain number of consecutive blocks or M
functions which do not contain traversing commands or positional data in the compensation
plane.
Note
The maximum number of consecutive interruption blocks or M commands can be set via
machine data (see the machine manufacturer's information).
Note
A block with a path distance of zero also counts as an interruption!
See also
Approaching and leaving contour (NORM, KONT, KONTC, KONTT) (Page 260)
2.10.2
Approaching and leaving contour (NORM, KONT, KONTC, KONTT)
Requirement
NC programming
260
Programming Manual, 10/2020, 6FC5398-2EP40-0BA1
Fundamentals
2.10 Tool radius compensation
The KONTC and KONTT commands will only be available if the "Polynomial interpolation" option
has been enabled in the control.
Function
If tool radius compensation is active (G41/G42), the NORM, KONT, KONTC or KONTT command
can be used to adapt the tool's approach and retract paths to the required contour profile or blank
form.
KONTC or KONTT ensure observance of the continuity conditions in all three axes. It is, therefore,
permissible to program a path component perpendicular to the offset plane simultaneously.
Syntax
G41/G42 NORM/KONT/KONTC/KONTT X... Y... Z...
G40 X... Y... Z...
Meaning
NORM:
Activate direct approach/retraction to/from a straight line.
The tool is oriented perpendicular to the contour point.
KONT:
Activate approach/retraction with travel around the starting/end point according to the
programmed corner behavior G450 or G451.
KONTC:
Activate approach/retraction with constant curvature.
KONTT:
Activate approach/retraction with constant tangent.
Note
Only G1 blocks are permissible as original approach/retraction blocks for KONTC and KONTT. The
control replaces these with polynomials for the appropriate approach/retract path.
Supplementary conditions
KONTT and KONTC are not available in 3D variants of tool radius compensation
(CUT3DC, CUT3DCC, CUT3DF). If they are programmed, the control switches internally to NORM
without an error message.
Example
KONTC
The full circle is approached beginning at the circle center point. The direction and curvature
radius at the block end point of the approach block are identical to the values of the next circle.
Infeed takes place in the Z direction in both approach/retraction blocks simultaneously. The
figure below shows the perpendicular projection of the tool path.
NC programming
Programming Manual, 10/2020, 6FC5398-2EP40-0BA1
261
Fundamentals
2.10 Tool radius compensation
1
1
1
Figure 2-18
Perpendicular projection
The associated NC program segment is as follows:
Program code
Comment
$TC_DP1[1,1]=121
; Milling tool
$TC_DP6[1,1]=10
; Radius 10 mm
N10 G1 X0 Y0 Z60 G64 T1 D1 F10000
N20 G41 KONTC X70 Y0 Z0
; Approach
N30 G2 I-70
; Full circle
N40 G40 G1 X0 Y0 Z60
; Retract
N50 M30
At the same time as the curvature is being adapted to the circular path of the full circle, traversing
is performed from Z60 to the plane of the circle Z0:
Figure 2-19
3D representation.
NC programming
262
Programming Manual, 10/2020, 6FC5398-2EP40-0BA1
Fundamentals
2.10 Tool radius compensation
Further information
Approach/retraction with NORM
1. Approach:
If NORM is activated, the tool will move directly to the compensated start position along a
straight line (irrespective of the preset approach angle programmed for the travel
movement) and is positioned perpendicular to the path tangent at the starting point.
7DQJHQW
*
&RPSHQVDWHG
&RPSHQVDWHG
WRRO SDWK
WRRO SDWK
2. Retraction:
The tool is perpendicular to the last compensated path end point and then moves
(irrespective of the preset approach angle programmed for the travel movement) directly in
a straight line to the next uncompensated position, e.g. to the tool change point.
7DQJHQW
*
Modifying approach/retract angles introduces a collision risk:
NC programming
Programming Manual, 10/2020, 6FC5398-2EP40-0BA1
263
Fundamentals
2.10 Tool radius compensation
NOTICE
Risk of collision
Modified approach/retract angles must be taken into account during programming in order
that potential collisions can be avoided.
Approach/retraction with KONT
Prior to the approach, the tool can be located in front of or behind the contour. The path
tangent at the starting point serves as a separation line:
%HKLQG WKH FRQWRXU
3DWK WDQJHQW
,Q IURQW RI WKH FRQWRXU
6WDUWLQJ SRLQW
NC programming
264
Programming Manual, 10/2020, 6FC5398-2EP40-0BA1
Fundamentals
2.10 Tool radius compensation
Accordingly, two scenarios need to be distinguished where approach/retraction with KONT is
concerned:
1. The tool is located in front of the contour.
→ The approach/retract strategy is the same as with NORM.
2. The tool is located behind the contour.
- Approach:
The tool travels around the starting point either along a circular path or over the
intersection of the equidistant paths depending on the programmed corner behavior
(G450/G451).
The commands G450/G451 apply to the transition from the current block to the next
block:
*
*
*
*
In both cases (G450/G451), the following approach path is generated:
$SSURDFK
SRLQW
6WDUWLQJ SRLQW
$SSURDFK SDWK
7RRO UDGLXV
A straight line is drawn from the uncompensated approach point. This line is a tangent to
a circle with circle radius = tool radius. The center point of the circle is on the starting point.
NC programming
Programming Manual, 10/2020, 6FC5398-2EP40-0BA1
265
Fundamentals
2.10 Tool radius compensation
– Retraction:
The same applies to retraction as to approach, but in the reverse order.
Approach/retraction with KONTC
The contour point is approached/exited with constant curvature. There is no jump in
acceleration at the contour point. The path from the start point to the contour point is
interpolated as a polynomial.
Approach/retraction with KONTT
The contour point is approached/exited with constant tangent. A jump in the acceleration can
occur at the contour point. The path from the start point to the contour point is interpolated as
a polynomial.
Difference between KONTC and KONTT
The figure below shows the differences in approach/retraction behavior between KONTT and
KONTC. A circle with a radius of 20 mm about the center point at X0 Y-40 is compensated with
a tool with an external radius of 20 mm. The tool center point therefore moves along a circular
path with radius 40 mm. The end point of the approach blocks is at X40 Y30. The transition
between the circular block and the retraction block is at the zero point. Due to the extended
continuity of curvature associated with KONTC, the retraction block first executes a movement
with a negative Y component. This will often be undesired. This response does not occur with
the KONTT retraction block. However, with this block, an acceleration step change occurs at the
block transition.
If the KONTT or KONTC block is the approach block rather than the retraction block, the contour
is exactly the same, but it is machined in the opposite direction.
NC programming
266
Programming Manual, 10/2020, 6FC5398-2EP40-0BA1
Fundamentals
2.10 Tool radius compensation
2.10.3
Compensation at the outside corners (G450, G451, DISC)
With tool radius compensation activated (G41/G42), command G450 or G451 can be used to
define the course of the compensated tool path when traveling around outside corners:
*
*
3
3
With G450, the tool center point travels
With G451, the tool center point approaches
around the workpiece corner across an arc
the point of intersection of the two equidis-
with tool radius.
tants, which are located at a distance equiva-
lent to the tool radius from the programmed
contour. G451 applies only to circles and
straight lines.
Note
G450/G451 is also used to define the approach path with KONT active and approach point
behind the contour (see "Approaching and leaving contour (NORM, KONT, KONTC, KONTT)
(Page 260)").
The DISC command can be used to distort the transition circles with G450, thereby producing
sharper contour corners.
Syntax
G450 [DISC=<value>]
G451
NC programming
Programming Manual, 10/2020, 6FC5398-2EP40-0BA1
267
Fundamentals
2.10 Tool radius compensation
Meaning
G450:
G450 is used to travel around workpiece corners on a circular path.
DISC:
Flexible programming of the circular path with G450 (optional)
<value>:
Type:
INT
Range of values:
0, 1, 2, ... 100
Meaning:
0
Transition circle
100
Intersection of the equidistant paths (the-
oretical value)
G451:
G451 is used to approach the intersection point of the two equidistant paths in the case of
workpiece corners. The tool backs off from the workpiece corner.
Note
DISC only applies with call of G450, but can be programmed in a previous block without G450.
Both commands are modal.
Example
In the following example, a transition radius is programmed for all outside corners
(corresponding to the programming of the corner behavior in block N30). This prevents the tool
stopping and backing off at the change of direction.
<
<
;
=
Program code
Comment
N10 G17 T1 G0 X35 Y0 Z0 F500
; Starting conditions.
N20 G1 Z-5
; Feed in tool.
N30 G41 KONT G450 X10 Y10
; Activate TRC with KONT approach/retract mode
and corner behavior G450.
N40 Y60
; Mill the contour.
N50 X50 Y30
N60 X10 Y10
NC programming
268
Programming Manual, 10/2020, 6FC5398-2EP40-0BA1
Fundamentals
2.10 Tool radius compensation
Program code
Comment
N80 G40 X-20 Y50
; Deactivate compensation mode, retraction on
transition circle.
N90 G0 Y100
N100 X200 M30
Further information
G450/G451
At intermediate point P*, the control executes operations such as infeed movements or
switching functions. These operations are programmed in blocks inserted between the two
blocks forming the corner.
With G450 the transition circle belongs to the next travel command with respect to the data.
DISC
When DISC values greater than 0 are specified, intermediate circles are shown with a magnified
height - the result is transition ellipses or parabolas or hyperbolas:
',6&
',6&
An upper limit can be defined in machine data - generally DISC=50.
Traversing behavior
When G450 is activated and with acute contour angles and high DISC values, the tool is lifted
off the contour at the corners. In the case of contour angles equal to or greater than 120°, there
is uniform travel around the contour:
NC programming
Programming Manual, 10/2020, 6FC5398-2EP40-0BA1
269
Fundamentals
2.10 Tool radius compensation
65
',6&
',6&
&RQWRXU DQJOH
GHJUHHV
5 ದ WRRO UDGLXV
6 ದ WUDYHUVHG RYHUVKRRW
6 5 ದ QRUPDOL]HG RYHUVKRRW
UHIHUUHG WR WKH WRRO UDGLXV
When G451 is activated and with acute contour angles, superfluous non-cutting tool paths can
result from lift-off movements. A parameter can be used in the machine data to define automatic
switchover to transition circle in such cases.
2.10.4
Smooth approach and retraction
2.10.4.1
Approach and retraction (G140 to G143, G147, G148, G247, G248, G347, G348, G340,
G341, DISR, DISCL, DISRP, FAD, PM, PR)
The SAR (Smooth Approach and Retraction) function is used to achieve a tangential approach to
the start point of a contour, regardless of the position of the start point.
*
*
3URJU FRQWRXU
',65
*
This function is used preferably in conjunction with the tool radius compensation.
NC programming
270
Programming Manual, 10/2020, 6FC5398-2EP40-0BA1
Fundamentals
2.10 Tool radius compensation
When the function is activated, the control calculates the intermediate points in such a way that
the transition to the following block (or the transition from previous block during retraction) is
performed in accordance with the specified parameters.
The approach movement consists of a maximum of four sub-movements. The starting point of
the movement is called P0, the end point P4 in the following. Up to three intermediate points P1,
P2 and P3 can be between these points. Points P0, P3 and P4 are always defined. Intermediate
points P1 and P2 can be omitted, according to the parameters defined and the geometrical
conditions. On retraction, the points are traversed in the reverse direction, i.e. starting at P4 and
ending at P0.
Syntax
Smooth approach:
• With a straight line:
G147 G340/G341 ... DISR=..., DISCL=..., DISRP=... FAD=...
• With a quadrant/semicircle:
G247/G347 G340/G341 G140/G141/G142/G143 ... DISR=... DISCL=...
DISRP=... FAD=...
Smooth retraction:
• With a straight line:
G148 G340/G341 ... DISR=..., DISCL=..., DISRP=... FAD=...
• With a quadrant/semicircle:
G248/G348 G340/G341 G140/G141/G142/G143 ... DISR=... DISCL=...
DISRP=... FAD=...
Meaning
G147:
Approach with a straight line
G148:
Retraction with a straight line
G247:
Approach with a quadrant
G248:
Retraction with a quadrant
G347:
Approach with a semicircle
G348:
Retraction with a semicircle
G340:
Approach and retraction in space (default setting)
G341:
Approach and retraction in the plane
G140:
Approach and retraction direction dependent on the current compensation side
(default setting)
G141:
Approach from the left or retraction to the left
G142:
Approach from the right or retraction to the right
G143:
Approach and retraction direction dependent on the relative position of the start
or end point to the tangent direction
NC programming
Programming Manual, 10/2020, 6FC5398-2EP40-0BA1
271
Fundamentals
2.10 Tool radius compensation
DISR=...:
1. For approach and retraction with straight lines (G147/G148):
Distance of the cutter edge from the starting point of the contour
2. For approach and retraction with circles (G247, G347/G248, G348):
Radius of the tool center point path
Notice:
For REPOS with a semicircle, DISR is the circle diameter
DISCL=...:
Distance of the end point for the fast infeed motion from the machining plane
DISCL=AC(...) Specification of the absolute position of the end point for the fast
infeed motion
DISCL=AC(...):
Specification of the absolute position of the end point for the fast infeed motion
DISRP:
Distance of point P1 (retraction plane) from the machining plane
DISRP=AC(...):
Specification of the absolute position of point P1
FAD=...:
Speed of the slow feed movement
The programmed value acts in accordance with the active feedrate type (G group
15).
FAD=PM(...):
The programmed value is interpreted as linear feedrate (like G94) irrespective of
the active feedrate type.
FAD=PR(...):
The programmed value is interpreted as revolutional feedrate (like G95) irrespec-
tive of the active feedrate type.
Example
7RRO FHQWHUSRLQW SDWK
<
7RRO
3 DSSURDFK
3 UHWUDFW
6HPLFLUFOH
+HOL[
3 UHWUDFW
3 DSSURDFK
;
3 UHWUDFW
3 DSSURDFK
3 UHWUDFW
&RQWRXU
• Smooth approach (block N20 activated)
• Approach with quadrant (G247)
• Approach direction not programmed, G140 applies, i.e. TRC is active (G41)
• Contour offset OFFN=5 (N10)
NC programming
272
Programming Manual, 10/2020, 6FC5398-2EP40-0BA1
Fundamentals
2.10 Tool radius compensation
• Current tool radius=10, and so the effective compensation radius for TRC=15, the radius of
the SAR contour =25, with the result that the radius of the tool center path is equal to DISR=10
• The end point of the circle is obtained from N30, since only the Z position is programmed in
N20
• Infeed movement
- From Z20 to Z7 (DISCL=AC(7)) with rapid traverse.
- Then to Z0 with FAD=200.
- Approach circle in X-Y-plane and following blocks with F1500 (for this velocity to take
effect in the following blocks, the active G0 in N30 must be overwritten with G1,
otherwise the contour would be machined further with G0).
• Smooth retraction (block N60 activated)
• Retraction with quadrant (G248) and helix (G340)
• FAD not programmed, since irrelevant for G340
• Z=2 in the starting point; Z=8 in the end point, since DISCL=6
• When DISR=5, the radius of the SAR contour=20, the radius of the tool center point path=5
Retraction movements from Z8 to Z20 and the movement parallel to the X-Y plane to X70 Y0.
Program code
Comment
$TC_DP1[1,1]=120
;Tool definition T1/D1
$TC_DP6[1,1]=10
; Radius
N10 G0 X0 Y0 Z20 G64 D1 T1 OFFN=5
; (P0 app)
N20 G41 G247 G341 Z0 DISCL=AC(7) DISR=10 F1500 FAD=200
; Approach (P3 app)
N30 G1 X30 Y-10
; (P4 app)
N40 X40 Z2
N50 X50
; (P4 ret)
N60 G248 G340 X70 Y0 Z20 DISCL=6 DISR=5 G40 F10000
; Retraction (P3 ret)
N70 X80 Y0
; (P0 ret)
N80 M30
Further information
Selecting the approach and retraction contour
The approach and retraction contour are selected with the appropriate G command from the
2nd G group:
G147:
Approach with a straight line
G247:
Approach with a quadrant
G347:
Approach with a semicircle
G148:
Retraction with a straight line
G248:
Retraction with a quadrant
G348:
Retraction with a semicircle
NC programming
Programming Manual, 10/2020, 6FC5398-2EP40-0BA1
273
Fundamentals
2.10 Tool radius compensation
3
7RRO
3
:KHQ DSSURDFKLQJ ZLWK
D VWUDLJKW OLQH *
7RRO FHQWHUSRLQW SDWK
3
&RQWRXU
',65
3
3
:KHQ DSSURDFKLQJ ZLWK
TXDUWHU FLUFOH *
',65
7RRO FHQWHUSRLQW SDWK
7RRO
3
&RQWRXU
3
3
:KHQ DSSURDFKLQJ ZLWK
VHPLFLUFOH *
',65
7RRO FHQWHUSRLQW SDWK
7RRO
3
&RQWRXU
Figure 2-20
Approach movements with simultaneous activation of the tool radius compensation
Selecting the approach and retraction direction
Use the tool radius compensation (G140, default setting) to determine the approach and
retraction direction with positive tool radius:
• G41 active → approach from left
• G42 active → approach from right
G141, G142 and G143 provide further approach options.
The G codes are only significant when the approach contour is a quadrant or a semicircle.
NC programming
274
Programming Manual, 10/2020, 6FC5398-2EP40-0BA1
Fundamentals
2.10 Tool radius compensation
Motion steps between start point and end point (G340 and G341).
In all cases, the movements are made up of one or more straight lines and, depending on the G
command for determining the approach contour, an additional straight line or a quadrant or
semicircle. The two variants of the path segmentation are shown in the following figure:
,QIHHG PRYHPHQW
3
3
3
3
6WUDLJKW OLQH FLUFOH
6WUDLJKW OLQH
RU KHOL[
RU FLUFOH
3
3
3
',6&/
3
',6&/
3
3
*
0DFKLQLQJ SODQH
*
$SSURDFK PRYHPHQW GHSHQGHQW RQ *
*
G340:
Approach with a straight line from point P0 to point P1. This straight line is parallel to the
machining plane, if parameter DISRP has not been programmed.
Infeed perpendicular to the machining plane from point P1 to point P3 to the safety clearance
to the machining plane defined by the DISCL parameter.
Approach end point P4 with the curve determined by the G command of the second group
(straight line, circle, helix). If G247 or G347 is active (quadrant or semicircle) and start point P3
is outside the machining plane defined by the end point P4, a helix is inserted instead of a
circle. Point P2 is not defined or coincides with P3.
The circle plane or the helix axis is determined by the plane, which is active in the SAR block
(G17/G18/G19), i.e. the projection of the start tangent is used by the following block, instead
of the tangent itself, to define the circle.
The movement from point P0 to point P3 takes place along two straight lines at the velocity
valid before the SAR block.
G341:
Approach with a straight line from point P0 to point P1. This straight line is parallel to the
machining plane, if parameter DISRP has not been programmed.
Infeed perpendicular to the machining plane from point P1 up to the safety clearance to the
machining plane defined by the DISCL parameter in point P2.
Infeed perpendicular to the machining plane from point P2 to point P3. Approach end point
with the curve determined by the G command of the second group. P3 and P4 are located
within the machining plane, with the result that a circle is always inserted instead of a helix
with G247 or G347.
In all cases that include the position of the active plane G17/G18/G19 (circular plane, helical axis,
infeed motion perpendicular to the active plane), any active rotating frame is taken into account.
NC programming
Programming Manual, 10/2020, 6FC5398-2EP40-0BA1
275
Fundamentals
2.10 Tool radius compensation
Length of the approach straight line or radius for approach circles (DISR)
• Approach/retract with straight lines
DISR specifies the distance of the cutter edge from the starting point of the contour, i.e. the
length of the straight line when TRC is active is the sum of the tool radius and the
programmed value of DISR. The tool radius is only taken into account when it is positive.
The resulting straight line length must be positive, i.e. negative values for DISR are allowed
provided that the absolute value of DISR is less than the tool radius.
• Approach/retract with circles
DISR specifies the radius of the tool center point path. If TRC is activated, a circle is produced
with a radius that results in the tool center point path with the programmed radius.
Distance of point P2 from the machining plane (DISCL)
If the position of point P2 is to be specified by an absolute reference on the axis perpendicular to
the circle plane, the value must be programmed in the form DISCL=AC(...).
The following applies for DISCL=0:
• With G340: The whole of the approach motion now only consists of two blocks (P1, P2 and P3
are combined). The approach contour is formed by P1 to P4.
• With G341: The whole approach contour consists of three blocks (P2 and P3 are combined).
If P0 and P4 are on the same plane, only two blocks result (infeed movement from P1 to P3 is
omitted).
• The point defined by DISCL is monitored to ensure that it is located between P1 and P3, i.e. the
sign must be identical for the component perpendicular to the machining plane in all
motions that possess such a component.
• On detection of a reversal of direction, a tolerance defined by the machine data MD20204
$MC_SAR_CLEARANCE_TOLERANCE is permitted.
Distance of point P1 (retraction plane) from the machining plane (DISRP)
If the position of point P1 is to be specified by an absolute reference on the axis perpendicular to
the machining plane, the value must be programmed in the form DISRP=AC(...).
If this parameter is not programmed, point P1 has the same distance to the machining plane as
point P0, i.e. the approach straight line P0 → P1 is parallel to the machining plane.
The system checks that the point defined by DISRP lies between P0 and P2, i.e. in all movements
that have a component perpendicular to the machining plane (e.g. infeed movements,
approach movements from P3 to P4), this component must have the same leading sign. It is not
permitted to change direction. An alarm is output if this condition is violated.
On detection of a reversal of direction, a tolerance defined by the machine data MD20204
$MC_SAR_CLEARANCE_TOLERANCE is permitted. However, if P1 is outside the range defined by
P0 and P2, but the deviation is less than or equal to this tolerance, it is assumed that P1 is in the
plane defined by P0 or P2.
Programming of the end point
The end point is generally programmed with X... Y... Z...
The programming of the contour end point when approaching differs greatly from that for
retraction. Both cases are therefore treated separately here.
NC programming
276
Programming Manual, 10/2020, 6FC5398-2EP40-0BA1
Fundamentals
2.10 Tool radius compensation
Programming of end point P4 for approach
End point P4 can be programmed in the actual SAR block. Alternatively, P4 can be determined by
the end point of the next traversing block. More blocks can be inserted between an SAR block
and the next traversing block without moving the geometry axes.
Example:
Program code
Comment
$TC_DP1[1,1]=120
;Milling tool T1/D1
$TC_DP6[1,1]=7
;Tool with 7 mm radius
N10 G90 G0 X0 Y0 Z30 D1 T1
N20 X10
N30 G41 G147 DISCL=3 DISR=13 Z=0 F1000
N40 G1 X40 Y-10
N50 G1 X50
N30/N40 can be replaced by:
N30 G41 G147 DISCL=3 DISR=13 X40 Y-10 Z0 F1000
or
N30 G41 G147 DISCL=3 DISR=13 F1000
N40 G1 X40 Y-10 Z0
8S WR WKLV SRLQW
PDFKLQLQJ ZLWK *
IROORZHG E\ *
)
<
=
=
=
;
&RQWRXU
3
',65
Programming of end point P0 for retraction
For retraction, the end point of the SAR contour cannot be programmed in a following block, i.e.
the end position is always taken from the SAR block, irrespective of how many axes have been
NC programming
Programming Manual, 10/2020, 6FC5398-2EP40-0BA1
277
Fundamentals
2.10 Tool radius compensation
programmed. When determining the end point, a distinction is made between the following
three cases:
1. No geometry axis is programmed in the SAR block. In this case, the contour ends at point P1
(if DISRP has been programmed), at point P2 (if DISCL, but not DISRP has been programmed)
or point P3 (if neither DICLS nor DISRP has been programmed).
The position in the axes, which describe the machining plane, is determined by the retraction
contour (end point of the straight line or arc). The axis component perpendicular to this is
defined by DISCL or DISPR. If in this case both DISCL=0 and DISRP=0, the motion is completely
in the plane, i.e. points P0 to P3 coincide.
2. Only the axis perpendicular to the machining plane is programmed in the SAR block. In this
case, the contour ends at point P0. If DISRP has been programmed (i.e. points P0 and P1 do not
coincide), the straight line P1 → P0 is perpendicular to the machining plane. The positions of
the two other axes are determined in the same way as in 1.
3. At least one axis of the machining plane is programmed. The second axis of the machining
plane can be determined modally from its last position in the preceding block.
The position of the axis perpendicular to the machining plane is generated as described in 1. or
2., depending on whether this axis is programmed or not. The position generated in this way
defines the end point P0. If the SAR retraction block is also used to deactivate the tool radius
compensation, in the first two cases, an additional path component is inserted in the machining
plane from P1 to P0 so that no movement is produced when the tool radius compensation is
deactivated at the end of the retraction contour, i.e. this point defines the tool center point and
not a position on a contour to be corrected. In case 3, no special measures are required for
deselection of the tool radius compensation, because the programmed point P0 already directly
defines the position of the tool center point at the end of the complete contour.
The behavior in cases 1 and 2, i.e. when an end point is not explicitly programmed in the
machining plane with simultaneous deselection of the tool radius compensation, is shown in
the following figure:
)ROORZLQJ EORFN ZLWKRXW FRPSHQVDWLRQ
3
3
7RRO FHQWHUSRLQW SDWK
7RRO
3
:$% EORFN
*
*
&RQWRXU SUHYLRXV EORFN
$WWUDFWLRQ ZLWK :$% DQG VLPXOWDQHRXV
GHDFWLYDWLRQ RI WKH WRRO UDGLXV FRPSHQVDWLRQ
NC programming
278
Programming Manual, 10/2020, 6FC5398-2EP40-0BA1
Fundamentals
2.10 Tool radius compensation
Approach and retraction velocities
• Velocity of the previous block (G0)
All motions from P0 up to P2 are executed at this velocity, i.e. the motion parallel to the
machining plane and the part of the infeed motion up to the safety clearance.
• Programming with FAD
Specification of the feedrate for
- G341: Infeed movement perpendicular to the machining plane from P2 to P3
- G340: From point P2 or P3 to P4.
If FAD is not programmed, this part of the contour is traversed at the speed which is active
modally from the preceding block, in the event that no F command defining the speed is
programmed in the SAR block.
• Programmed feedrate F
This feedrate value is effective as of P3 or P2 if FAD is not programmed. If no F word is
programmed in the SAR block, the speed of the previous block is active.
Example:
Program code
Comment
$TC_DP1[1,1]=120
;Milling tool T1/D1
$TC_DP6[1,1]=7
;Tool with 7 mm radius
N10 G90 G0 X0 Y0 Z20 D1 T1
N20 G41 G341 G247 DISCL=AC(5) DISR=13 FAD 500 X40 Y-10 Z=0 F200
N30 X50
N40 X60
<
;
=
*
3
3
*
3
)
3
3
;
)
)
During retraction, the roles of the modally active feedrate from the previous block and the
programmed feedrate value in the SAR block are reversed, i.e. the actual retraction contour is
traversed with the old feedrate and a new speed programmed with the F word applies from P2 up
to P0.
NC programming
Programming Manual, 10/2020, 6FC5398-2EP40-0BA1
279
Fundamentals
2.10 Tool radius compensation
3
3
3
3
3
1R YHORFLW\
SURJUDPPHG
2QO\ ) SURJUDP
2QO\ )$' SURJUDP
) DQG )$'
SURJUDPPHG
5DSLG WUDYHUVH LI * LV DFWLYH RWKHUZLVH ZLWK
WKH ROG RU WKH QHZ ) ZRUG
9HORFLW\ RI WKH SUHYLRXV EORFN
ROG ) ZRUG
:LWK )$' SURJUDP LQIHHG YHORFLW\
:LWK ) SURJUDP QHZ PRGDOO\ HIIHFWLYH
YHORFLW\
9HORFLWLHV LQ :$% VXEEORFNV
ZKHQ DSSURDFKLQJ ZLWK *
3
3
3
3
3
1R YHORFLW\
SURJUDPPHG
2QO\ ) SURJUDP
2QO\ )$' SURJUDP
) DQG )$'
SURJUDPPHG
5DSLG WUDYHUVH LI * LV DFWLYH RWKHUZLVH ZLWK
WKH ROG RU WKH QHZ ) ZRUG
9HORFLW\ RI WKH SUHYLRXV EORFN
ROG ) ZRUG
:LWK )$' SURJUDP LQIHHG YHORFLW\
:LWK ) SURJUDP QHZ PRGDOO\ HIIHFWLYH
YHORFLW\
9HORFLWLHV LQ :$% VXEEORFNV
ZKHQ DSSURDFKLQJ ZLWK *
NC programming
280
Programming Manual, 10/2020, 6FC5398-2EP40-0BA1
Fundamentals
2.10 Tool radius compensation
3
3
3
3
3
1R YHORFLW\
SURJUDPPHG
2QO\ ) SURJUDP
2QO\ )$' SURJUDP
) DQG )$'
SURJUDPPHG
5DSLG WUDYHUVH LI * LV DFWLYH RWKHUZLVH ZLWK
WKH ROG RU WKH QHZ ) ZRUG
9HORFLW\ RI WKH SUHYLRXV EORFN
ROG ) ZRUG
:LWK )$' SURJUDP 5HWUDFWLRQ YHORFLW\
:LWK ) SURJUDP QHZ PRGDOO\ HIIHFWLYH
YHORFLW\
9HORFLWLHV LQ :$% VXEEORFNV
ZKHQ UHWUDFWLQJ
Reading positions
Points P3 and P4 can be read in the WCS as a system variable during approach.
• $P_APR: reading P
•
3
(initial point)
• $P_AEP: reading P
•
4
(contour starting point)
• $P_APDV: read whether $P_APR and $P_AEP contain valid data
2.10.4.2
Approach and retraction with extended retraction strategies (G460, G461, G462)
In certain special geometrical situations, special extended approach and retraction strategies,
compared with the previous implementation with activated collision detection for the approach
and retraction block, are required in order to activate or deactivate tool radius compensation. A
collision detection can result, for example, in a section of the contour not being completely
machined, see following figure:
1
<
7RRO UDGLXV
;
&HQWHUSRLQW SDWK ZLWK WRRO
UDGLXV FRPSHQVDWLRQ
3URJUDPPHG FRQWRXU
1
1
Figure 2-21
Retraction behavior with G460
NC programming
Programming Manual, 10/2020, 6FC5398-2EP40-0BA1
281
Fundamentals
2.10 Tool radius compensation
Syntax
G460
G461
G462
Meaning
G460:
As previously (activation of the collision detection for the approach and retraction block).
G461:
Insertion of a circle in the TRC block, if it is not possible to have an intersection whose center
point is in the end point of the uncorrected block, and whose radius is the same as the tool
radius.
Up to the intersection, machining is performed with an auxiliary circle around the contour
end point (i.e. up to the end of the contour).
G462:
Insertion of a circle in the TRC block, if it is not possible to have an intersection; the block is
extended by its end tangent (default setting).
Machining is performed up to the extension of the last contour element (i.e. until shortly
before the end of the contour).
Note
The approach behavior is symmetrical to the retraction behavior.
The approach/retraction behavior is determined by the state of the G command in the approach/
retraction block. The approach behavior can therefore be set independently of the retraction
behavior.
Examples
Example 1: Retraction behavior with G460
The following example describes only the situation for deactivation of tool radius compensation:
The behavior for approach is exactly the same.
Program code
Comment
G42 D1 T1
; Tool radius 20 mm
G1 X110 Y0
N10 X0
N20 Y10
N30 G40 X50 Y50
Example 2: Approach with G461
Program code
Comment
N10 $TC_DP1[1,1]=120
; Milling tool type
N20 $TC_DP6[1,1]=10
;Tool radius
NC programming
282
Programming Manual, 10/2020, 6FC5398-2EP40-0BA1
Fundamentals
2.10 Tool radius compensation
Program code
Comment
N30 X0 Y0 F10000 T1 D1
N40 Y20
N50 G42 X50 Y5 G461
N60 Y0 F600
N70 X30
N80 X20 Y-5
N90 X0 Y0 G40
N100 M30
Further information
G461
If no intersection is possible between the last TRC block and a preceding block, the offset curve
of this block is extended with a circle whose center point lies at the end point of the uncorrected
block and whose radius is equal to the tool radius.
The control attempts to cut this circle with one of the preceding blocks.
1
<
$X[LOLDU\ FXUYH
;
&HQWHUSRLQW SDWK ZLWK WRRO
UDGLXV FRPSHQVDWLRQ
3URJUDPPHG FRQWRXU
1
1
Figure 2-22
Retraction behavior with G461
Collision monitoring CDON, CDOF
If CDOF is active (see section Collision monitoring, CDON, CDOF), the search is aborted when an
intersection is found, i.e., the system does not check whether further intersections with previous
blocks exist.
If CDON is active, the search continues for further intersections after the first intersection is
found.
An intersection point, which is found in this way, is the new end point of a preceding block and
the start point of the deactivation block. The inserted circle is used exclusively to calculate the
intersection and does not produce a traversing movement.
Note
If no intersection is found, alarm 10751 (collision danger) is output.
G462
If no intersection is possible between the last TRC block and a preceding block, a straight line is
inserted, on retraction with G462 (initial setting), at the end point of the last block with tool
radius compensation (the block is extended by its end tangent).
NC programming
Programming Manual, 10/2020, 6FC5398-2EP40-0BA1
283

 

 

 

 

 

 

 

Content      ..     2      3      4      5     ..