Yx z – HEIDENHAIN TNC 360 ISO Programming User Manual
Page 129

6
Subprograms and Program Section Repeats
TNC 360
6-6
6.2
Program Section Repeats
15
5
5
10
Y
X
Z
Example for exercise: Row of holes parallel to X axis
Coordinates
of first hole:
X
=
5 mm
Y
=
10 mm
Spacing between
holes:
IX
=
15 mm
Number of
holes:
N
=
6
Total hole depth:
Z
=
10
Hole diameter:Ø
=
5 mm
Part program
%S66I G71 * .............................................................. Begin program
N10 G30 G17 X+0 Y+0 Z–20 * ................................... Define the workpiece blank
N20 G31 G90 X+100 Y+100 Z+0 *
N30 G99 T1 L+0 R+2.5 * ........................................... Define the tool
N40 T1 G17 S3500 * .................................................. Call the tool
N50 G00 G40 G90 Z+100 M06 * ............................... Retract the spindle and insert the tool
N60 X–10 Y+10 Z+2 M03 * ........................................ Pre-position in the negative X direction
N70 G98 L1 * ............................................................. Beginning of program section to be repeated
N80 G91 X+15 * ......................................................... Move to incremental hole position
N90 G01 G90 Z–10 F100 * ......................................... Drill (absolute value)
N100 G00 Z+2 * ......................................................... Retract the tool
N110 L1,5 * ................................................................ Call LABEL 1; repeat program section between blocks N70
....................................................................................
and N110 five times (for six holes)
N120 Z+100 M02 * .................................................... Retract the tool in Z
N9999 %S66I G71 *