Programming manual
486
CNC 8070
15.
STATEMENTS AND
IN
STRUCTI
O
NS
Fl
ow c
ont
ro
lli
n
g
i
n
st
ru
ct
io
n
s
(S
OFT
V02.0
X
)
484
15.2.4 Block repetition ($FOR)
$FOR <n> = <expr1>,<expr2>,<expr3>... $ENDFOR
The following parameters are defined in this instruction.
When executing this instruction, <n> takes the value of <expr1> and
it changes its value up to the value of <expr2>, in steps indicated by
<expr3>. At each step, it executes the blocks contained between
$FOR and $ENDFOR.
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 $ENDFOR.
The $CONTINUE instruction starts the next repetition even when the
current one has not finished. The blocks programmed after
$CONTINUE up to $ENDFOR will be ignored in this repetition.
<n>
It may be an arithmetic parameter of a write variable.
<expr>
It may be a number, parameter or arithmetic expressing
whose result is a number.
...
N20 $FOR P1=0,10,2
N30...
N40...
N50...
N60 $ENDFOR
N70...
It executes blocks N30 through N50 from P1=0 until P1=10, in steps of 2
(thus 6 times).
...
N12 $FOR V.P.VAR_NAME=20,15,-1
N22...
N32...
N42 $ENDFOR
N52...
It executes blocks N22 through N32 in steps of -1 (thus 5 times) from
V.P.VAR_NAME=20 to V.P.VAR_NAME=15.
...
N20 $FOR P1= 1,10,1
N30...
N40 $IF P2==2
N50 $BREAK
N60 $ENDIF
N70...
N80 $ENDFOR
...
Block repetition stops if P1 is greater than 10, or if P2 = 2.
Содержание CNC 8070
Страница 1: ...CNC 8070 REF 0504 SOFT V02 0X PROGRAMMING MANUAL Soft V02 0x Ref 0504...
Страница 2: ......
Страница 4: ......
Страница 6: ......
Страница 12: ......
Страница 14: ......
Страница 16: ......
Страница 22: ......
Страница 26: ......
Страница 28: ......
Страница 30: ......
Страница 32: ......
Страница 34: ......
Страница 54: ...Programming manual 20 CNC 8070 1 CREATING A PROGRAM Parameters constants and expressions SOFT V02 0X 20...
Страница 62: ...Programming manual 28 CNC 8070 2 MACHINE OVERVIEW Home search SOFT V02 0X 28...
Страница 154: ...Programming manual 120 CNC 8070 6 TOOL PATH CONTROL Manual intervention G200 G201 G202 SOFT V02 0X 120...
Страница 178: ...Programming manual 144 CNC 8070 7 GEOMETRY ASSISTANCE General scaling factor SOFT V02 0X 144...
Страница 188: ...Programming manual 154 CNC 8070 8 ADDITIONAL PREPARATORY FUNCTIONS Probing G100 SOFT V02 0X 154...
Страница 360: ...Programming manual 326 CNC 8070 12 CYCLE EDITOR Random multiple machining SOFT V02 0X 326...
Страница 446: ...Programming manual 412 CNC 8070 14 CNC VARIABLES Alphabetical listing of variables SOFT V02 0X 412...
Страница 556: ...CNC 8070 16 PROBING CANNED CYCLES SOFT V02 0X 522 Programming manual...