
Ed. Date Design Description
Date Jan.07.’04 Design. Apprv.
page
-
9/64
FANUC Series 30i-MODEL A
Real time custom macro
A-79350EN
Title
Draw
No.
//3 #RV[0]=3
//5 #RV[0]=5
// #RV[0]=10
So, the value of #RV[0] is 10.
Example 3) Priority of one-shot RTM commands
When the following program is executed, the value of #RV[0] is undefined, that is, 1,
2, or 3.
O0001 ;
//#RV[0]=1 ;
//#RV[0]=2 ;
//#RV[0]=3 ;
G04P10 ;
M30 ;
Even if a priority is applicable, the order of execution or the order of termination can
change when an RTM statement includes a control code, ZWHILE or ZEDGE, or axis
control command.
Example 4)
The RTM command priority of #RV[0]=1 in a modal command with its ID value being
1 is higher than the priority of #RV[1]=1 in a modal command with its ID value being 2.
However, #RV[0]=1 is executed after the end of the execution of the block specifying
the axis control command G91 G00 X10., so that #RV[1]=1 is actually executed
earlier than #RV[0]=1.
O0001 ;
//1 ZDO ;
G91 G00 X10. ;
#RV[0]=1 ;
ZEND ;
//2 #RV[1]=1 ;
G04 P10 ;
M30 ;
Example 5)
In the RTM command priority, ZEDGE in a modal command with its ID value being 1
is always a false control code (detailed later). The RTM command priority of
#RV[0]=1 in a modal command with its ID value being 1 is higher than the priority of
#RV[1]=1 and #RV[2]=1 in a modal command with their ID values being 2. However,
#RV[0]=1 is executed after the condition of ZEDGE becomes true (that is, at the
second time or later), so that #RV[1]=1 and #RV[2]=1 are executed earlier than
#RV[0]=1.
O0001 ;
//1 ZEDGE [ #IOG[234.0] EQ 1 ] #RV[0]=1 ;
//2 ZDO ;