beautypg.com

Yx z – HEIDENHAIN TNC 360 User Manual User Manual

Page 127

background image

TNC 360

6-4

6

Subprograms and Program Section Repeats

6.1

Subprograms

Example for exercise: Group of four holes at three different locations

The holes are drilled with cycle 1 PECK
DRILLING. You enter the setup clearance, feed
rate, drilling feed rate etc. once in the cycle.
You can then call the cycle with the
miscellaneous function M99 (see page 8-3).

Coordinates of the first hole in each group:

Group 1

X = 15 mm

Y = 10 mm

Group 2

X = 45 mm

Y = 60 mm

Group 3

X = 75 mm

Y = 10 mm

Spacing of holes:

IX = 20 mm

IY = 20 mm

Total hole depth (DEPTH):

Z = 10 mm

Hole diameter:

Ø

= 5 mm

Part Program

0

BEGIN PGM 360064 MM

1

BLK FORM 0.1 Z X+0 Y+0 Z–20

2

BLK FORM 0.2 X+100 Y+100 Z+0

3

TOOL DEF 1 L+0 R+2.5

4

TOOL CALL 1 Z S1000

5

CYCL DEF 1.0 PECK DRILLING

6

CYCL DEF 1.1 SETUP –2

7

CYCL DEF 1.2 DEPTH –10

8

CYCL DEF 1.3 PECKG –10

9

CYCL DEF 1.4 DWELL 0

10

CYCL DEF 1.5 F100

11

L Z+100 FMAX

12

L X+15 Y+10 R0 FMAX M6 ................................ Move to hole group 1, insert tool

13

L Z+2 FMAX M3 ................................................. Pre-position in the infeed axis

14

CALL LBL 1 ........................................................ Subprogram call (with block 14 the subprogram is executed

once)

15

L X+45 Y+60 FMAX ........................................... Move to hole group 2

16

CALL LBL 1 ........................................................ Subprogram call

17

L X+75 Y+10 FMAX ........................................... Move to hole group 3

18

CALL LBL 1 ........................................................ Subprogram call

19

L Z+100 FMAX M2 ............................................. Retract tool; return to program (M2):

............................................................................

The subprogram is entered after M2

20

LBL 1 .................................................................. Beginning of subprogram

21

L M99 ................................................................. Execute peck drilling cycle for first hole in group

22

L IX+20 FMAX M99 ............................................ Move to position for second hole and drill

23

L IY+20 FMAX M99 ............................................ Move to position for third hole and drill

24

L IX–20 FMAX M99 ............................................ Move to position for fourth hole and drill

25

LBL 0 .................................................................. End of subprogram

26

END PGM 360064 MM

Cycle definition PECKING (see page 8-5)

60

15

45

75

10

3

1

2

20

20

20

5

Y

X

Z

20

20