G66/G67: Modal macro and cancellation
Activates a modal macro call that runs in subsequent blocks until cancelled.
For reference only: syntax changes with the control, the post-processor and the machine parameters. Check the official manual and run a simulation before cutting. Legal notice.
- Family
- Macros
- Machine
- Milling, Turning, Mill-turn
- Risk
- High
- Example
- G66 P9010 A5. / G67
G66 P9010 A5. / G67Parameters
- P
- Macro que se ejecuta después de cada bloque de movimiento mientras G66 esté activa.
- L
- Repeticiones.
- A … Z
- Argumentos, con la misma tabla de variables que G65.
Machine: Milling, Turning, Mill-turnRisk: High
Fanuc
G66 P... argumentos / G67- High risk if G67 is forgotten: the macro may continue to run.
Haas
- Requires macros enabled; check compatibility per model.
Other codes in Macros
See the full list of G and M codesFrequently Asked Questions (FAQ)
What does G66/G67 mean in a CNC program?
Activates a modal macro call that runs in subsequent blocks until cancelled. In the catalogue it appears as "Modal macro and cancellation", within the Macros family.
How is G66/G67 written on each control?
Fanuc: G66 P... argumentos / G67. The exact syntax depends on the control version and the machine parameters: always confirm with the manufacturer's manual.
Can you give me an example of G66/G67?
G66 P9010 A5. / G67 — Activates a modal macro call that runs in subsequent blocks until cancelled.
Which machines use G66/G67?
G66/G67 is used in: Milling, Turning, Mill-turn.
What should you watch out for with G66/G67?
High risk: a mistake here can cause a crash, a broken tool or an out-of-tolerance part. Simulate the program and dry-run it before cutting.
Related tools
CNC G-code Simulator
CNC IDE: editing with G/M tooltips, line inspector, conversion between controls and 2D/3D toolpath.
CNC Alarms Guide
CNC Alarms and Solutions Guide. Enter the error code or symptom to find the cause and how to repair it at the machine.
Calculate cycle time
Estimate CNC turning and milling cycle time from G-code. Calculate parts per hour with a breakdown of cutting, rapids, canned cycles and tool changes.