Pro codes · Fanuc

G66 / G67 — Modal macro call (Fanuc)

Modal macro call. G66 calls a macro after every following move block until G67, with the same arguments. It turns any macro into your own "canned cycle": program G66 P9010 R2. Z-10…

By cnccode · Updated
On this page
  1. What it does
  2. Example
  3. Tips
  4. More: macro and system variables
  5. Frequently asked questions
PropertyValue
CodeG66 / G67
ControlFanuc
TopicMacro and system variables
SyntaxG66 P<program> <arguments> … G67

What it does

G66 calls a macro after every following move block until G67, with the same arguments. It turns any macro into your own "canned cycle": program G66 P9010 R2. Z-10., then each X/Y position runs the macro there.

Example

Fanuc
G66 P9010 R2. Z-10. F200. (CUSTOM CYCLE)
X10. Y10.
X30. Y10.
G67

Tips

  • G65 calls once, G66 calls after each move, G66.1 after each block.

Options, numbers and parameters depend on the control model, the software version and the options the machine builder installed. Check the operator and parameter manual of your machine before you use a code for the first time, and run it in single block with low overrides.

Try it without a machine

The Macro B simulator runs variables, G65 calls, #3000 alarms, G10 and system variables block by block.

Open the Macro B simulator

More: macro and system variables

Frequently asked questions

What is G66 / G67 on Fanuc?
Modal macro call. G66 calls a macro after every following move block until G67, with the same arguments. It turns any macro into your own "canned cycle": program G66 P9010 R2. Z-10., then each X/Y position runs the macro there.
Was this page helpful?