CNC Machinist Calculator Ultra

Home › G-codes › Siemens 808D ISO › G66

G66 Macro call, modal

Siemens 808D ISO G-code · Mill, Lathe

On mills: Macro call, modal

Calls macro program P with the arguments after every traversing move until G67 cancels it. Used to repeat an operation at many positions.

Format

G66 P [L] [arguments]

Addresses

AddressWhat it does
PMacro program number
LNumber of runs per call
A to ZArguments passed to the macro

How it works

Modal, group 12. Cancel with G67. Optional function.

Example program

G90 G54 G00 X0. Y0. Z50. (START)
G66 P20 Z-10. R2. F150. (MODAL MACRO 0020 ON)
X20. Y20. (MOVE, THEN MACRO RUNS)
X40. (MOVE, THEN MACRO RUNS)
…

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

Watch out for

On lathes: Macro call, modal

Switches on a modal macro call. The macro runs again after every move block until G67. Arguments are passed as with G65.

Format

G66 P [L] [arguments A to Z]

Addresses

AddressWhat it does
PProgram number of the macro
LNumber of runs per call
A to ZArguments, stored in $C_A to $C_Z

How it works

Modal, G group 12. Cancel with G67.

Example program

G66 P0020 Z-5.0 F0.1 (MODAL MACRO 0020 ON)
G00 X40.0 (MACRO RUNS AT X40)
G00 X30.0 (MACRO RUNS AT X30)
G67 (MODAL MACRO OFF)

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
FanucModal macro call
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 Siemens 808D ISO 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 Siemens 808D ISO G-codes

App Store Google Play