Fanuc Series 15i/150i-MA (Programming) Operators Manual

17.CUSTOM MACRO PROGRAMMING B-63324EN/03
- 652 -
17.7 PROCESSING MACRO STATEMENTS
For smooth machining, the CNC prereads the NC statement to be
performed next. This operation is referred to as buffering.
In multi-buffer mode, which is specified by setting MBF (bit 6 of
parameter No. 2401) to 1 or assumed in G5.1Q1 mode, buffering is
performed for the next NC statement, as well as multiple statements in
subsequent blocks according to the settings; for example, statements in
subsequent 5, 15, or 100 blocks are read.
In cutter compensation mode (G41, G42), the NC statements in at least
three subsequent blocks are read to calculate the point of intersection.
Macro statements for arithmetic expressions or conditional branches
are, however, processed as soon as they are buffered (that is, they are
read into the buffer). Therefore, macro statements are not always
executed in the specified order.
Conversely, when a block contains M00, M01, M02, M30, an M code
that prevents buffering set with any of parameters No. 2411 to No.
2418 and No. 2450 to No. 2453, or a G code (such as G53) that prevents
buffering, subsequent blocks are not subjected to read-ahead
processing. This ensures that this M or G code is executed before
subsequent macro statements are executed.
Explanations
- When the next block is not buffered (M codes that prevent buffering, G53, etc.)
CAUTION
To enable a macro statement to be executed upon
completion of the execution of the previous NC
statement, an M or G code that prevents buffering
must be specified immediately before that macro
statement as shown above. Specify this M or G code
as necessary, especially when system variables for
controlling signals, coordinates, offsets, and other
elements are read or written, because these system
variable values may vary depending on when NC
statements are executed.
> N1 G53 X100.0 ;
N2 #100=1
:
> : Block being executed
NC statement execution
Macro statement execution
Buffer
N1
N2

Leave a Reply

Your email address will not be published. Required fields are marked *