beautypg.com

Subprograms, L b l – HEIDENHAIN TNC 122 User Manual User Manual

Page 44

background image

5

Programming

44

TNC 122

Y

X

60

50

0

0

40

20

40

10

20

8

3

2

1

Example: Inserting a label for a subprogram

Mode of operation: PROGRAMMING AND EDITING

Subprograms

Programming example: Subprogram for slots

Slot lengths:

20 mm + tool diameter

Slot depths:

– 10 mm

Slot diameters:

8 mm (= tool diameter)

Infeed point coordinates
Slot

X = 20 mm

Y = 10 mm

Slot

X = 40 mm

Y = 50 mm

Slot

X = 60 mm

Y = 40 mm

Select the LBL function.

LBL

S E T = E N T / C A L L = L B L

ENT

Select SET to set a label.

L B L ...

ENT

5

The beginning of a subprogram (or a program section repeat) is
now marked with the label. Enter the program blocks for the sub-
program after the LBL block.

Label 0 (LBL 0) is used only to identify the end of a subprogram.

Example: Entering a subprogram call: CALL L

Mode of operation: PROGRAMMING AND EDITING

Enter a label number.
Confirm your entry. The resulting program block is: LBL 5

C A L L L 5 R

R stands for “repetitions” and has no significance for subprogramming. Skip
this prompt by pressing NO ENT. The resulting program block is: CALL L5

Select the LBL function.

LBL

S E T = E N T / C A L L = L B L

LBL

Select CALL to call a label.

C A L L L 0

ENT

5

Enter the label number of the desired subprogram.
Confirm your entry.

NO

ENT

3

This example requires a center-cut end mill (ISO 1641).

2

1