
B-63322EN/03 NC FUNCTIONS 18.CUSTOM MACRO
- 235 -
- If [<conditional expression>]GOTO n (n = sequence number)
When <conditional expression> is satisfied, the next execution is
done from block with sequence number n.
When <conditional expression> is not satisfied, the next block is
executed.
When the [<IF conditional expression>] is committed, it executes
from block with n unconditionally.
The following <conditional expressions> are available:
#j EQ #k whether #j = #k
#j NE #k whether #j = #k
#j GT #k whether #j > #k
#j LT #k whether #j < #k
#j GE #k whether #j y #k
#j LE #k whether #j x #k
- IF [<conditional expression>] THEN macro statement
If the specified conditional expression is satisfied, a
predetermined macro statement is executed. Only a single macro
statement is executed.
- WHILE (<conditional expression>) DO m (m = 1, 2, 3)
:
END m
While <conditional expression> is satisfied, blocks from DO m to
END m is repeated.
When <conditional expression> is no more satisfied, it is executed
from the block next to END m block.
- Format of custom macro body
The format is the same as the sub program.
- Simple call
G65 P (macro number) L (times to repeat)<argument
assignment> ;
#120=1
WHILE [#120 LE 10] DO 1 ;
#120=#120+1 ;
END
Repeated 10 times.
Example
O Macro number ;
Custom macro body
M99