
B-63944EN/02 PROGRAMMING 17.REAL-TIME CUSTOM MACRO
- 513 -
Explanation
While <conditional-expression> is true, the command or commands
between ZDO and ZEND after ZWHILE are executed.
If <conditional-expression> is not satisfied, the command after ZEND
is processed.
The same conditional expression and operators as for the ZONCE
statement are used.
While the F address 234.1 signal is 1, an incremental movement on the
U-axis is repeatedly performed, and #RV[0] is incremented by 1 each time.
//1 ZWHILE [#IOF[234,1] EQ 1] ZDO ;
G91 G00 U10. ;
#RV[0] = #RV[0]+1 ;
ZEND ;
17.4.4 Multi-statement (ZDO...ZEND Statement)
- //(n) ZDO ;
<real-time-macro-statement-1> <real-time-macro-statement-2>
<real-time-macro-statement-3> …
ZEND ;
One or multiple statements enclosed in ZDO...ZEND are regarded as a
one RTM statement (multiple-statement structure).
The maximum number of RTM statements in one multi-statement
(between ZDO...ZEND) is subject to change (Because it depends on
the contents of RTM statements).
ZDO...ZEND is used in the following cases:
- When multiple real time statements are handled as a series of
commands
If the workpiece coordinate on the first axis exceeds 30, the rapid traverse
override value is changed.
// ZEDGE [#100101 GT 30.] ZDO ;
#IOG[14,0]=1 ;
#IOG[14,1]=0 ;
ZEND ;
- When an axis control command is specified
On the rising edge of the X signal 7.0, a movement on the V-axis is started.
// ZEDGE [#IOX[7,0] EQ 1] ZDO ;
G91 G00 V35. ;
ZEND ;