Independent CNC repair and technical reference Contact

FANUC G66.1 argument handling: a coordinate block need not execute its original move first

Published Updated

Compare 30i-A G66 and G66.1 to distinguish calls after motion from argument passing for each NC block. A custom coordinate mapping shows why X and Y addresses alone do not prove that the original endpoint is reached first.

Contents
  1. G66 calls after movement; G66.1 passes block data to a macro
  2. An original coordinate-mapping example
  3. Changing to G66 does not preserve the interface

In a custom machining cycle, a line containing X and Y may look like an ordinary positioning block while merely passing two numbers to a macro. The key to G66.1 is not simply making more calls: it changes the use of address data in subsequent NC blocks.

G66 calls after movement; G66.1 passes block data to a macro

According to the FANUC 30i/31i/32i-A user's manual B-63944EN/03, §16.7.2–16.7.3, pages 532–539 (public mirror of the original manual), G66 calls a macro after an axis-movement block executes. G66.1 calls a macro for each NC command block, using address data such as X, Y and F as arguments rather than directly executing them first. O, file names, N and G codes have additional rules; it is incorrect to say that every character is handled as an ordinary argument.

The following compares only ordinary NC blocks after the respective mode has been entered, without nesting. Mode-control blocks such as G67 retain their own semantics:

Data in subsequent blockG66G66.1
X20.0 Y30.0Execute under the active motion mode, then call the macroPass X and Y as arguments; this does not execute the original move first
F250. onlyNo axis movement, so this block does not trigger the modal callStill calls the macro as an NC command block, with F as an argument

An original coordinate-mapping example

Assume a machine builder defines a macro interface solely for illustration: after X and Y are supplied, the macro explicitly produces absolute positioning to (X+5,Y−3), with units, coordinate system and compensation otherwise established. Input (20,30) gives target (25,27). In G66.1 mode, this must not be interpreted as first moving to (20,30) and then to (25,27). The first pair is interface input; the macro body determines whether and how movement occurs.

This mapping is neither a fixed FANUC function nor a complete executable program. It illustrates how the same addresses can describe original axis movement or input data for a custom cycle. Identify the call mode before interpreting them.

Changing to G66 does not preserve the interface

G66 arguments are set in the G66 specifying block; the data in each subsequent motion block are not freshly used as call arguments. Replacing G66.1 with G66 therefore changes call timing and may change the data received by the macro. Counting calls alone cannot validate the replacement.

When analysing an existing program, start with three columns: source-block addresses, values actually passed to the macro, and motion finally generated by the macro. If F is only passed in and the macro never uses it, the F written in the calling block cannot be assumed to take effect as an ordinary feed block. For custom cycles, the correct endpoint also depends on internal absolute/incremental mode, units and restoration conventions. This article provides no parameter procedure for rebinding G codes. Related resources are in the OPTION section.

Related technical articles

FANUC optional rotary-axis control: how the sign of an absolute command selects directionFANUC direction-dependent high-speed position switches: why one coordinate can give different outputsFANUC flexible synchronization: matching speed and aligning phase are separate conditions