Grbl · Homing and limits

Grbl error 9: G-code lock

Most often: machine needs homing after power on. First step: home the machine with $H.

By cnccode · Updated
On this page
  1. What it means
  2. Common causes
  3. How to clear it
  4. Example
  5. Same group: homing and limits
  6. Frequently asked questions

What it means

G-code is locked because of an alarm or a jog. Grbl has refused this line and has not executed it. The position is still right.

Common causes

  • Machine needs homing after power on
  • A limit switch was hit

How to clear it

  1. Home the machine with $H
  2. Only if you know the position: unlock with $X

Example

Gives the alarm
G0 X10 (LOCKED)
Correct
$H
G0 X10

Before you continue: Before you move the axis, look at the tool, the part and the direction. Use a low override and keep one hand on feed hold. A wrong direction makes a small alarm a big repair.

Same group: homing and limits

Numbers of Grbl 1.1. FluidNC and grblHAL use the same basic numbers and add their own. Fanuc and Grbl are names of their owners. This site is independent.

The alarm comes back?

Post the block before the alarm, your control model and what you have checked.

Ask the community

Frequently asked questions

What does Grbl error 9 mean?
G-code is locked because of an alarm or a jog.
How do I fix Grbl error 9?
Home the machine with $H. Only if you know the position: unlock with $X.
Was this page helpful?