
PROGRAMMING15. CUSTOM MACRO
B–63614EN/01
326
Example)
O0001 O2000
N1 X10.Y10.; (Mxx ;) Specify preventing buffering M code or G53
N2 M98P2000; N100 #1=#5041; (Reading X axis current position)
N3 Y200.0; N101 #2=#5042; (Reading Y axis current position)
: :
M99;
In above case, the buffering of N2 block is done and the macro program
of O2000 is read and executed during N1 block of main program O1000
execution. Therefore, the current position readings are executed during
axes movements at N1 block. So the unexpected position data can be read
to #1 and #2 because of axes movements. In this case, please specify M
code preventing buffering Mxx ; (or G53 ;) just before N100 block of
O2000. By this, the position data at completing the execution of N1 block
can be read to #1 and #2 because O2000 is executed after completing the
execution of N1 block of O0001.
NOTE
G53 can not be specified during the canned cycle mode. (In
this case, the P/S alarm No.44 is generated.) Therefore, in
order to prevent buffering during the canned cycle mode,
please specify preventing buffering M code.