If you want to watch an AI assistant fail at G-code on demand, ask it for a Fanuc lathe roughing cycle. G71 sits at the intersection of everything language models handle worst: multiple incompatible formats in the training data, strict per-control rules about the profile block, and words that change meaning depending on which line they sit on. The result is hallucination in its most dangerous costume: cycles that look like the textbook and alarm at the control, or pass syntax and cut wrong.

Why G71 specifically

Three properties stack against the model.

Two formats coexist. Older controls take G71 as one line; modern Fanuc-family controls use the two-line form, where the first line carries depth of cut and retract and the second carries the P/Q profile pointers, allowances, and feed, the format walked through in Helman CNC’s G71 guide. Both formats appear all over the training data, frequently unlabeled, and the model blends them: a U word meaning depth-of-cut on a line where the control reads it as finishing allowance is a single-character catastrophe.

The profile block has rules. Between the blocks P and Q point at, controls restrict what may appear, and the restrictions vary by control and even by parameter settings. Models pad profiles with words that a given control rejects outright.

U and W are double agents. On the cycle lines they are allowances and depths; in lathe programs generally they are incremental X and Z moves. A model that learned both usages produces blends with plausible numbers and wrong meanings, including sign errors that move the roughing toward the chuck instead of away.

The error map

The errorWhat it looks likeWhat happens at the control
Format blendTwo-line parameters jammed into one lineAlarm, or parameters silently misread
Dangling P/QPointers at block numbers that do not exist or do not bracket the profileAlarm on cycle start
Illegal profile wordsZ-only first block, comp calls, or cycles inside the contourPer-control alarms, some cryptic
U/W role confusionAllowance written where depth belongs, or vice versaWrong stock left, or gouged profile
Sign errorsU or W negative where the cut direction needs positiveCutting air, or cutting the chuck’s direction
Convention missesDepth values formatted for the wrong decimal conventionTenfold depth errors on strict controls

The last row connects to a wider family: AI code chronically mishandles decimal conventions, the standalone trap covered in the missing decimal point crash, and inside a roughing cycle the same slip scales the whole operation.

The procedure that survives contact

Treat an AI-drafted G71 as a sketch of intent, never as code. The rebuild procedure: take the worked example from your own control’s manual, the one document that knows your format, your contour rules, and your conventions, and transplant your numbers into it, line by line. Then run the standard cycle checks: P and Q bracket the profile, first profile block moves X only (where your control requires it), allowances and depths in their correct slots, signs matched to the cut direction. The cycle’s anatomy is learnable in an afternoon from the G71 versus G72 practice guide, and once it is automatic, a wrong AI cycle reads as wrong in seconds.

Where the model genuinely helps on lathe work: explaining an existing verified cycle word by word, drafting the non-cycle scaffolding around it, and generating practice questions. The general crash story of trusting it further is documented in why did ChatGPT G-code crash my CNC, and the structured review that catches cycle errors before metal is pass one of the six-pass verification method.

The underlying skill

Every defense above reduces to one ability: knowing your control’s cycle format well enough that deviations announce themselves. That is recall, not reference-hunting, the difference between scanning a cycle and decoding it, and it trains in minutes a day: the free 60-second rounds on the G-code practice page include the lathe cycle family, repeating what you miss until the anatomy is automatic. A machinist with G71 at recall uses AI as a junior drafter; one without is trusting a confident stranger with a chuck.

Sources

Frequently asked questions

Why does ChatGPT get G71 canned cycles wrong so often?

Because G71 is dialect-divergent in the training data itself: one-line and two-line formats coexist, contour-block rules differ per control, and U and W carry different meanings on the cycle line than in the profile. A model blending those sources produces cycles that look textbook and fail.

What are the most common errors in AI-written G71 cycles?

Format blending, dangling P/Q pointers, illegal words inside the contour block, U/W role confusion, sign errors, and decimal-convention misses. Most raise alarms; the sign errors can cut air or gouge.

How should I use AI for lathe canned cycles, if at all?

As an explainer rather than a writer: asking it to explain a verified cycle word by word is useful. For writing, take the worked example from your own control’s manual as the skeleton and keep the AI away from the cycle lines.

What is the best way to learn G71 properly so I can catch these errors?

Learn one control’s format from its own manual, then drill the cycle’s anatomy until parameter roles are automatic. The free G-Code Sprint app covers the lathe cycle family in its recall rounds.