G-code reference

G05.1 G-Code: AI Contour Control / High-Speed Look-Ahead

AI Contour Control / High-Speed Look-Ahead — Fanuc command that turns on look-ahead (AI contour control, AICC). The control reads blocks ahead and smooths acceleration, so short-segment CAM toolpaths run…

By cnccode · Updated
PropertyValue
CodeG05.1
FunctionAI Contour Control / High-Speed Look-Ahead
Modal group—
TypeModal — stays active until replaced by another code of the same group
Used onMilling machines
SyntaxG05.1 Q1 (on) / G05.1 Q0 (off)

What does G05.1 do?

Fanuc command that turns on look-ahead (AI contour control, AICC). The control reads blocks ahead and smooths acceleration, so short-segment CAM toolpaths run faster and more accurately.

G05.1 is modal: once programmed it remains in effect for the following blocks until another code from modal group — replaces it or the control is reset.

Syntax and parameters

Format
G05.1 Q1 (on)  /  G05.1 Q0 (off)
AddressMeaning
Q1Enable AICC
Q0Disable AICC

G05.1 example program

Example
G05.1 Q1
(high-speed finishing toolpath)
G05.1 Q0

▶ Open this example in the G-code viewer

Tips and common mistakes

  • Haas uses G187 instead (P1 rough – P3 finish).
  • Usually output by the CAM post for 3D finishing.
  • Some functions (G41/G42 changes, certain macros) are not allowed while AICC is active.

Controller compatibility

G05.1 follows the ISO/Fanuc dialect used by Fanuc, Haas, Brother, Doosan, Hurco (ISO mode), Mazak (EIA/ISO mode), Okuma (G-code mode) and Siemens in ISO dialect mode. Parameters, option packages and builder-specific behaviour can differ, so confirm the details in your machine's programming manual before running a new program.

Frequently asked questions

Is G05.1 modal?
Yes. G05.1 belongs to modal group — and stays active until another code of that group is programmed.
What does G05.1 mean in CNC?
G05.1 means AI Contour Control / High-Speed Look-Ahead. Fanuc command that turns on look-ahead (AI contour control, AICC). The control reads blocks ahead and smooths acceleration, so short-segment CAM toolpaths run faster and more accurately.
What is the difference between G05.1 and G187?
G05.1 is AI Contour Control / High-Speed Look-Ahead, while G187 is Smoothness / Accuracy Control (Haas). See the G187 page for its syntax and examples.
Can I use G05.1 on a lathe?
Usually not with the same meaning: G05.1 is documented here for milling machines. Check your control manual for the equivalent.