CNC Machinist Calculator Ultra

Home › G-codes › Fanuc › G66

G66 Modal macro call

Fanuc G-code · Mill and lathe

Sets a macro that is called automatically after every move block until G67. Used to run the same routine at a list of positions.

Format

G66 P [L] [arguments]

Addresses

AddressWhat it does
PProgram number of the macro
LNumber of repeats per call
A to ZArguments passed as local variables

How it works

Modal, group 12. Cancel with G67.

Example program

G66 P9020 Z-.25 R.1 F10. (MACRO AT EACH POSITION)
G00 X1. Y1. (CALL AT HOLE 1)
X2. (CALL AT HOLE 2)
G67 (CANCEL MODAL CALL)

Example is in inch. Check offsets and clearances first.

Watch out for

Related codes

G67 · G65

G66 on other controls

The same number can mean something different on another control.

ControlMeaning
Mazak (EIA)Macro modal call
Mitsubishi M70 M80Modal macro call A
Brother SpeedioModal macro call
Fagor 8055 8065Irregular pocket canned cycle
Mach3 Mach4Modal macro call, Mach4
Hurco WinMax (NC)Modal macro call
FadalModal subroutine call

Every G-code for Fanuc in your pocket. The app has the full example programs, search by number or shop word, a line decoder and calculators for tapping, threading and drilling.

Open G66 in the app All Fanuc G-codes

App Store Google Play