CNC Machinist Calculator Ultra

Home › G-codes › Mach3 Mach4 › G66

G66 Modal macro call, Mach4

Mach3 Mach4 G-code · Mill

Mach4. Like G65, but the macro runs again on each following block with new values until G67.

Format

G66 P [A] [B] [C] ...

Addresses

AddressWhat it does
PProgram number of the macro
A B C X Y ZArguments passed as local variables

How it works

Modal. Cancel with G67.

Example program

G0 G20 G90 G54 G17 G40 G49 G80 (SAFE START, INCH)
T1 M6 (TOOL CHANGE)
G43 H1 Z1.0 (LENGTH OFFSET)
G66 P9100 Z-0.25 R0.5 (MODAL MACRO)
…

The full 7-line example is in the app. Example is in inch. Check offsets and clearances first.

Watch out for

Related codes

G65 · G67

G66 on other controls

The same number can mean something different on another control.

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

Every G-code for Mach3 Mach4 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 Mach3 Mach4 G-codes

App Store Google Play