---
title: "Fanuc Alarm 021 Illegal Plane Axis Commanded: Fix"
description: "Fanuc alarm 021 means an arc was commanded with an axis outside the active plane. Here is why plane selection causes it and how to fix the offending block."
url: https://gcodepractice.com/journal/fanuc-alarm-021-illegal-plane-axis-commanded/
canonical: https://gcodepractice.com/journal/fanuc-alarm-021-illegal-plane-axis-commanded/
author: "Lawrence Arya"
authorUrl: https://www.linkedin.com/in/vibecoding/
published: 2026-06-04
updated: 2026-06-04
category: "Guides"
tags: ["fanuc", "alarm", "plane", "g02", "troubleshooting"]
lang: en
---

# Fanuc Alarm 021 Illegal Plane Axis Commanded: Fix

> **TL;DR** Fanuc alarm 021, ILLEGAL PLANE AXIS COMMANDED, fires when a circular move (G02 or G03) uses an axis or arc-center word that is not part of the active plane. In G17 the arc lives in X and Y with I and J; using the K center word or arcing in a different axis pair triggers 021. The fix is to select the correct plane with G17, G18, or G19, or use the right arc-center words for the plane you are in.

This is an educational explanation of a common Fanuc alarm, not operating instructions for your specific machine. Always follow your machine's manual and supervisor when clearing an alarm.

Fanuc alarm 021, **ILLEGAL PLANE AXIS COMMANDED**, is an arc problem. The control was asked to cut a circular move (`G02` or `G03`) using an axis that is not part of the plane it is currently set to. It stops rather than try to draw an arc it cannot define.

## Arcs live in a plane

A circular move is a two-axis move, so the control has to know which two axes. That is the whole job of plane selection, explained in [G17, G18, G19 plane selection](/journal/g17-g18-g19-plane-selection-explained/). Each plane allows a specific pair of axes and a specific pair of arc-center words, as documented in the [LinuxCNC reference](https://linuxcnc.org/docs/html/gcode/g-code.html):

| Active plane | Arc axes | Arc-center words |
| --- | --- | --- |
| `G17` (XY) | X, Y | `I`, `J` |
| `G18` (XZ) | X, Z | `I`, `K` |
| `G19` (YZ) | Y, Z | `J`, `K` |

Command anything outside the active row and you get alarm 021.

## What triggers it

| Active plane | Bad block | Why it alarms | Fix |
| --- | --- | --- | --- |
| `G17` (XY) | `G02 X10. K5. ...` | `K` is the Z center word, not in XY | Use `I` and `J` |
| `G17` (XY) | arc moving only X and Z | that arc is in the XZ plane | Switch to `G18` |
| `G18` (XZ) | `G02 ... J5.` | `J` is the Y center word, not in XZ | Use `I` and `K` |
| `G19` (YZ) | `G02 ... I5.` | `I` is the X center word, not in YZ | Use `J` and `K` |

Most real cases are one of these: an arc meant for a vertical plane left running in `G17`, or the wrong center word (`I`, `J`, `K`) for the active plane. The [Fanuc alarm code lists](https://www.helmancnc.com/fanuc-alarm-code-list/) place 021 among the program alarms, and the [Wikipedia G-code overview](https://en.wikipedia.org/wiki/G-code) explains how the arc words map to each plane.

## How to fix it

The alarm names the block, so the fix is quick: decide which plane the arc should be cut in, then make that plane active before the arc. An arc in the front face is `G18`; an arc in the side is `G19`; a normal flat arc is `G17`. Then check that the center words match the plane: `I` and `J` for `G17`, `I` and `K` for `G18`, `J` and `K` for `G19`. This is the same reasoning behind a clean [G02 vs G03](/journal/g02-vs-g03/) move, just with the plane made explicit. Reading the block to spot the mismatch is the same skill as [reading any CNC program](/journal/how-to-read-a-cnc-program-for-beginners/).

## Helical moves are the exception

One case looks like it should alarm but does not: a helix. In `G17`, a `G02` or `G03` that includes a `Z` move alongside the `X`, `Y`, `I`, `J` arc is helical interpolation, an arc in the plane with the `Z` axis feeding straight down at the same time. That is legal when the control supports helical interpolation, because the arc itself still lives in the XY plane and `Z` is just a linear move layered on top. So alarm 021 is about the arc being defined out of plane, not about a third axis ever appearing in the block. If you meant a helix and still get 021, check that your arc-center words are the in-plane pair (`I` and `J`), not `K`.

## Related alarms

Alarm 021 is one of a family of program alarms beginners confuse:

| Alarm | Meaning |
| --- | --- |
| 010 | Improper G-code |
| 021 | Illegal plane axis commanded |

The improper-code case has its own walkthrough in [Fanuc alarm 010 improper G-code](/journal/fanuc-alarm-010-improper-g-code/). Telling these apart quickly is exactly the pattern recognition a practice routine on the [G-code practice hub](/g-code-practice/) builds.

## Bottom line

Fanuc alarm 021 means an arc used an axis or center word outside the active plane. Pick the plane the arc belongs in with `G17`, `G18`, or `G19`, use the matching `I`, `J`, `K` words, and re-run from a safe point.

## Sources

- [HelmanCNC: Fanuc alarm code list](https://www.helmancnc.com/fanuc-alarm-code-list/)
- [LinuxCNC G-code reference (plane selection, arcs)](https://linuxcnc.org/docs/html/gcode/g-code.html)
- [Wikipedia: G-code](https://en.wikipedia.org/wiki/G-code)

## Frequently asked questions

### What is Fanuc alarm 021?
It is a program alarm meaning ILLEGAL PLANE AXIS COMMANDED: a `G02` or `G03` arc used an axis or arc-center word that is not in the active plane, so the control stops at that block.

### What causes illegal plane axis commanded?
Using an arc-center word from another plane, such as `K` while `G17` is active, or commanding the arc in an axis pair that is not the active plane. A straight `Z` added to an XY arc is a helix and is allowed when supported, so the alarm is about the arc being out of plane, not simply about `Z` appearing.

### How do you fix Fanuc alarm 021?
Select the plane the arc belongs in (`G17`, `G18`, or `G19`) before the arc, and use the matching center words: `I` `J` for `G17`, `I` `K` for `G18`, `J` `K` for `G19`. Then re-run from a safe point.

### What is the best way to learn plane and arc codes?
Drill them with active recall. A free app like G-Code Sprint quizzes `G17`, `G18`, `G19`, and the arc codes as quick timed questions and repeats whichever ones you miss.

*G-Code Sprint is a study and practice tool only. Always follow your instructor, employer, machine manual, and shop safety procedures.*

---

Source: https://gcodepractice.com/journal/fanuc-alarm-021-illegal-plane-axis-commanded/
Author: Lawrence Arya — https://www.linkedin.com/in/vibecoding/
