Program section repeats -5 – HEIDENHAIN TNC 360 ISO Programming User Manual

Page 128

Advertising
background image

6

Subprograms and Program Section Repeats

6-5

TNC 360

Fig. 6.2:

Flow diagram with program section repeats;

R

= return jump

.

7

1

0

L

% ... *

G98 L1 *

L1,2 *

N9999

% ... *

1

3

5

4

2

R

R

.
.
.
.
.
.
.
.
.
.
.

8

e.g.

7

9

G

ENT

6.2 Program Section Repeats

As with subprograms, program section repeats are
marked with labels.

Principle

The program is executed up to the end of the
labelled program section (block with Ln,m)
(

1

,

2

).

Then the program section between the called
LABEL and the label call is repeated the number of
times entered for m (

3

,

4

).

After the last repetition, the program is resumed
(

5

).

Programming notes

• A program section can be repeated up to 65 534

times in succession.

• The total number of times the program section

will be carried out is always one more than the
programmed number of repetitions.

END

END

Programming and calling a program section repeat

To mark the beginning:

Select the label setting function.

LABEL NUMBER?

Repeat the program section beginning with LABEL 7, for example.

Resulting NC block: G98 L7 *

Number of repetitions

The number of repetitions is entered in the block which calls the label.
This block also identifies the end of the program section.

Repeat the program section from LABEL 7 to this block 10 times. In
this example, the program section will therefore be executed a total of
11 times.

Resulting NC block: L7,10 *

Advertising
This manual is related to the following products: