
Ed. Date Design Description
Date Jan.07.’04 Design. Apprv.
page
-
30/64
FANUC Series 30i-MODEL A
Real time custom macro
A-79350EN
Title
Draw
No.
On the falling edge of the X address signal, a movement on the B-axis is
started and the Y1.0 signal is set to 1.
// ZEDGE [#IOX[1,3] EQ 0] ZDO ;
G91 G00 B10. ;
#IOY[1,0] = 1 ;
ZEND ;
On the rising edge of the G address signal, a movement on the U-axis is
started.
// ZEDGE [#IOG[4,3] EQ 1] ZDO ;
G91 G00 U25. ;
ZEND ;
If the remaining travel distance on the second axis is equal to or less than
10, the rapid traverse override value is changed.
// ZEDGE [#100802 LE 10.] ZDO ;
#IOG[14,0]=0 ;
#IOG[14,1]=1 ;
ZEND ;
Repetition (ZWHILE statement)
After ZWHILE, a conditional statement is coded.
// ZWHILE A B (While A is true, B is executed repeatedly.)
//(n) ZWHILE [<conditional-expression>] <real-time-macro-statement>
While <conditional-expression> is true, the RTM statement specified after
<conditional-expression> is executed.
If <conditional-expression> is not satisfied, the ZWHILE statement is terminated, and
the next block is processed.