
Ed. Date Design Description
Date Jan.07.’04 Design. Apprv.
page
-
33/64
FANUC Series 30i-MODEL A
Real time custom macro
A-79350EN
Title
Draw
No.
Nesting
ZONCE, ZEDGE, ZWHILE, and ZDO...ZEND cannot be nested and overlapped.
For details, see the following:
Endless loop
An endless loop is formed if the conditional expression enclosed in brackets after the
ZWHILE statement is always satisfied.
Example) In the example below, #RV[0] is counted up unconditionally.
// ZWHILE [1] #RV[1]=#RV[1]+1 ;
Processing
1. ZONCE, ZEDGE, ZWHILE, and
ZDO...ZEND may be used any numbe
// ZWHILE […] ZDO ;
ZEND ;
:
Processing
// ZONCE[…] ZDO ;
ZEND ;
:
2. One ZDO...ZEND range must
not overlap another
ZDO...ZEND range.
Processing
// ZONCE […] ZDO ;
ZEND ;
Processing
// ZWHILE […] ZDO ;
:
ZEND ;
3. ZONCE, ZEDGE, ZWHILE, and
ZDO...ZEND must not be nested.
// ZWHILE […] ZDO ;
:
ZONCE […] ZDO ;
:
ZEDGE […] ZDO ;
Processin
ZEND ;
:
ZEND ;
:
ZEND ;