EasyManua.ls Logo

Fagor 8070 BL - Conditional Block Repetition ($WHILE)

Fagor 8070 BL
444 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
Programming manual.
CNC 8070
22.
STATEMENTS AND INSTRUCTIONS
Flow controlling instructions
·438·
(REF: 1709)
22.2.5 Conditional block repetition ($WHILE)
$WHILE <CONDITIONN> ... $ENDWHILE
The following parameter is defined in this instruction:
While the condition is true, it executes the blocks contained between $WHILE and
$ENDWHILE. The condition is analyzed at the beginning of each new repetition.
The $BREAK instruction lets ending block repetition even if the stop condition is not met.
The execution of the program will continue at the block after $ENDWHILE.
The $CONTINUE instruction starts the next repetition even when the current one has not
finished. The blocks programmed after $CONTINUE up to $ENDWHILE will be ignored in
this repetition.
<condition> It may be a comparison between two numbers, parameters or arithmetic
expressions whose result is a number.
...
N20 $WHILE P1<= 10
N30 P1=P1+1
N40...
N50...
N60 $ENDWHILE
...
While P1 is smaller than or equal to 10, it executes blocks N30 through N50.
...
N20 $WHILE P1<= 10
N30...
N40 $IF P2==2
N50 $BREAK
N60 $ENDIF
N70...
N80 $ENDWHILE
...
Block repetition stops if P1 is greater than 10, or if P2 = 2.
...
N20 $WHILE P1<= 10
N30...
N40 $IF P0==2
N50 $CONTINUE
N60 $ENDIF
N70...
N80...
N80 $ENDWHILE
...
If P0=2, it ignores blocks N70 through N80 and it starts a new repetition at N20.

Table of Contents

Related product manuals