15.1.23 Block repetition
#RPT
This instruction may be used to execute a portion of the program
defined between two blocks which will be identified with labels. The
label of the last block must be programmed alone.
Optionally, it is possible to define the number of repetitions of the
execution; if not defined, it will be repeated once.
The number of blocks to be repeated must be defined in the same
program or subroutine from which this instruction is executed. They
may also be after the program (after function M30)
Up to 20 nesting levels are allowed.
Block repetition
The programming format is:
#RPT [<blk1>,<blk2>,<n>]
Parameter
Meaning
<blk1>
First block.
<blk2>
Last block.
<n>
Optional. Number of repetitions.
Since the labels to identify the blocks may be of two types (number
and name), the #RPT instruction may be programmed as follows:
• The label is the block number.
In the blocks containing the first and last labels, program the ":"
character after the block number. This is required in every label that
is the target of a jump.
N10 #RPT [N50,N70]
N50: G01 G91 X15 F800
X-10 Y-10
X20
X-10 Y10
N70:
• The label is the block name.
N10 #RPT [[BEGIN],[END]]
[BEGIN] G01 G91 F800
X-10 Y-10
X20
X-10 Y10
G90
[END]
Once the repetition is done, the execution resumes at the block after
the one containing the #RPT instruction.
(first block)
(last block)
(first block)
(last block)
Programming manual
15.
CNC 8070
(S
V02.0
)
OFT
X
465
Need help?
Do you have a question about the CNC 8070 and is the answer not in the manual?
Questions and answers