
PROGRAMMING
B–63684EN/01
16. CUSTOM MACRO
291
N1 G01 G41 X100.0 G100 Dd ;
>
> : Block being executed
j : Blocks read into the buffer
N1
N2
N3
N2 #1=100 ;
N3 Y100.0 ;
N4 #2=200 ;
N5 M08 ;
N6 #3=300 ;
N7 X200.0 ;
:
N4
N3
N5
N6
N7
NC statement
execution
Macro statement
execution
Buffer
When the N1 is being executed, the NC statements in the next two blocks
(up to N5) are read into the buffer. Since N5 is a block that involves no
movement, an intersection cannot be calculated. In this case, the NC
statements in the next three blocks (up to N7) are read. The macro
statements (N2, N4, and N6) between N1 and N7 are processed during
execution of N1.
In case of using the following system variables in macro program and you
need to execute the macro program after completing the block execution
just before the macro program, M code which can prevent buffering
(parameter No.3411–3432) or G53 command block is necessary just
before the macro program.
Meaning
Read
Write
Number of
Variable
Note
(In case not to
command M code
preventing buffer-
ing or G53 block.)
Interface signals Read #1000 – #1015 ,
#1032
The data is read at
buffering a macro pro-
gram.
Write #1100 – #1115 ,
#1132
The data is written at
buffering a macro pro-
gram.
Macro alarms Write #3000 Macro alarm is gener-
ated at maximum 2
blocks before a macro
program.
Program stop with
message
Write #3006 Program stops at
maximum 2 blocks
before a macro pro-
gram.
D When the next block
involves no movement in
cutter compensation C
(G41, G42) mode
16.7.2
Caution for Using
System Variables