GRBL error and alarm codes
GRBL reports a problem with a line in one of two forms. error:N means GRBL rejected one G-code line or command and the job usually continues or stops at that line. ALARM:N means the machine stopped and is locked; clear the cause, then send $X to unlock or $H to home. The tables below list every code in GRBL 1.1.
Most common on laser engravers
- ALARM:1 (hard limit) and ALARM:2 (soft limit): the job goes outside the work area. Check the work zero and the job size.
- ALARM:9 (homing fail): a limit switch was not found. Check the switch wiring and the homing settings.
- error:9: G-code was sent while the machine is in alarm or jog state. Clear the alarm first.
- error:20: unsupported G-code command. The file was probably made for a different controller.
Alarm codes
| Code | Name | Meaning |
|---|---|---|
ALARM:1 | Hard limit | Hard limit has been triggered. Machine position is likely lost due to sudden halt. Re-homing is highly recommended. |
ALARM:2 | Soft limit | Soft limit alarm. G-code motion target exceeds machine travel. Machine position retained. Alarm may be safely unlocked. |
ALARM:3 | Abort during cycle | Reset while in motion. Machine position is likely lost due to sudden halt. Re-homing is highly recommended. |
ALARM:4 | Probe fail | Probe fail. Probe is not in the expected initial state before starting probe cycle when G38.2 and G38.3 is not triggered and G38.4 and G38.5 is triggered. |
ALARM:5 | Probe fail | Probe fail. Probe did not contact the workpiece within the programmed travel for G38.2 and G38.4. |
ALARM:6 | Homing fail | Homing fail. The active homing cycle was reset. |
ALARM:7 | Homing fail | Homing fail. Safety door was opened during homing cycle. |
ALARM:8 | Homing fail | Homing fail. Pull off travel failed to clear limit switch. Try increasing pull-off setting or check wiring. |
ALARM:9 | Homing fail | Homing fail. Could not find limit switch within search distances. Try increasing max travel, decreasing pull-off distance, or check wiring. |
ALARM:10 | Homing fail | Homing fail. Second dual axis limit switch failed to trigger within configured search distance after first. Try increasing trigger fail distance or check wiring. |
Error codes
| Code | Name | Meaning |
|---|---|---|
error:1 | Expected command letter | G-code words consist of a letter and a value. Letter was not found. |
error:2 | Bad number format | Missing the expected G-code word value or numeric value format is not valid. |
error:3 | Invalid statement | Grbl '$' system command was not recognized or supported. |
error:4 | Value < 0 | Negative value received for an expected positive value. |
error:5 | Setting disabled | Homing cycle failure. Homing is not enabled via settings. |
error:6 | Value < 3 usec | Minimum step pulse time must be greater than 3usec. |
error:7 | EEPROM read fail. Using defaults | An EEPROM read failed. Auto-restoring affected EEPROM to default values. |
error:8 | Not idle | Grbl '$' command cannot be used unless Grbl is IDLE. Ensures smooth operation during a job. |
error:9 | G-code lock | G-code commands are locked out during alarm or jog state. |
error:10 | Homing not enabled | Soft limits cannot be enabled without homing also enabled. |
error:11 | Line overflow | Max characters per line exceeded. Received command line was not executed. |
error:12 | Step rate > 30kHz | Grbl '$' setting value cause the step rate to exceed the maximum supported. |
error:13 | Check Door | Safety door detected as opened and door state initiated. |
error:14 | Line length exceeded | Build info or startup line exceeded EEPROM line length limit. Line not stored. |
error:15 | Travel exceeded | Jog target exceeds machine travel. Jog command has been ignored. |
error:16 | Invalid jog command | Jog command has no '=' or contains prohibited g-code. |
error:17 | Setting disabled | Laser mode requires PWM output. |
error:20 | Unsupported command | Unsupported or invalid g-code command found in block. |
error:21 | Modal group violation | More than one g-code command from same modal group found in block. |
error:22 | Undefined feed rate | Feed rate has not yet been set or is undefined. |
error:23 | Invalid gcode ID:23 | G-code command in block requires an integer value. |
error:24 | Invalid gcode ID:24 | More than one g-code command that requires axis words found in block. |
error:25 | Invalid gcode ID:25 | Repeated g-code word found in block. |
error:26 | Invalid gcode ID:26 | No axis words found in block for g-code command or current modal state which requires them. |
error:27 | Invalid gcode ID:27 | Line number value is invalid. |
error:28 | Invalid gcode ID:28 | G-code command is missing a required value word. |
error:29 | Invalid gcode ID:29 | G59.x work coordinate systems are not supported. |
error:30 | Invalid gcode ID:30 | G53 only allowed with G0 and G1 motion modes. |
error:31 | Invalid gcode ID:31 | Axis words found in block when no command or current modal state uses them. |
error:32 | Invalid gcode ID:32 | G2 and G3 arcs require at least one in-plane axis word. |
error:33 | Invalid gcode ID:33 | Motion command target is invalid. |
error:34 | Invalid gcode ID:34 | Arc radius value is invalid. |
error:35 | Invalid gcode ID:35 | G2 and G3 arcs require at least one in-plane offset word. |
error:36 | Invalid gcode ID:36 | Unused value words found in block. |
error:37 | Invalid gcode ID:37 | G43.1 dynamic tool length offset is not assigned to configured tool length axis. |
error:38 | Invalid gcode ID:38 | Tool number greater than max supported value. |
Source: the official Grbl v1.1 documentation (gnea/grbl, GPLv3). Other firmware such as FluidNC may use extra codes.
Related: send G-code from Android, supported machines.