
7. Notes on using custom macros
7.1 Macro statement processing
For smooth machining, the CNC buffers the next NC statement. In AI nano contour control mode, not only
the next statement but also multiple blocks are buffered.
However, a macro statement such as an expression and conditional branch is processed immediately after
it is buffered (read into the buffer). So, the timing of macro statement execution does not necessarily follow
the specified sequence.
On the contrary, a block where M00, M01, M02, M30 or an M code set in a parameter (No.3411 to 3432) for
suppressing buffering is specified, or a block where a G code such as G53 for suppressing buffering is
specified does not read subsequent blocks into the buffer. So, it is guaranteed that until the execution of
such an M code or G code is completed, no subsequent macro statement is executed.
7.2 Details of NC statement and macro statement execution
> N1 G01 G91 X50.0 Z30.0 F100 ;
N2 #1=100 ;
N3 X100.0 ;
N4 #2=200 ;
N5 Z50.0 ;
:
> : Block being executed
: Block read into the buffer
N1
NC statement
execution
N4
N2
Macro execution
Buffer
N3 N5
In AI nano contour control mode, multiple blocks are buffered. So, during execution of N1, up to 3 blocks of
NC statements are read into the buffer. The macro statements (N2, N4) are processed while N1 is being
executed.
So, the sequence of NC statement and macro statement execution differs from the programmed
sequence.
TITLE
FANUC Series 16i/18i/21i-TB
AI nano contour control
Specifications
EDIT. DATE DESIG. DESCRIPTION
FANUC LTD
SHEET
35/37
DRAW. NO.
A-78962EN (2) is added. 2003.03.27 02
CUST.