Skip to content
Home » Home » grbl error and alarm codes

grbl error and alarm codes

Here is a list of error codes that can be issued by the grbl firmware. In the tables, for the most common errors, I have added the causes and the links to the articles that explain the solutions in more detail. When parameters in $XY format are mentioned, they mean the firmware parameters. For more information, see the firmware article. Some error messages are self-explanatory and are therefore not explained further.

Many of these errors (especially from error 20 and higher) occur when invalid commands have been sent to the laser. It is important that the laser is added as a type “grbl”, and nothing else. Otherwise, unknown commands may be sent. In addition, gcode clustering should be disabled, which the firmware also does not understand.

Alarm Codes

Alarm Code in v1.1+Alarm Message in v1.0+Alarm Description, Causes and Remedy
“1”“Hard limit”“Hard limit has been triggered. Machine position is likely lost due to sudden halt. Re-homing is highly recommended.”
Function is enabled with parameter $21.
During the movement, one of the limit switches was activated. Causes:
– During the job, the switch was activated, which means the job was not positioned correctly or is too large. See articles on coordinate systems.
– The pin on the motherboard was triggered by electrostatic influences (rather not so often). Check cabling and connectors.
“2”“Soft limit”“Soft limit alarm. G-code motion target exceeds machine travel. Machine position retained. Alarm may be safely unlocked.”
Function is activated with parameter $20.
When this error occurs, a motion command has been sent to the laser, which is outside the working area. The working range goes from 0,0 to the size of the parameters $130 and $131. Therefore, it is important to set the two parameters correctly so that the laser cannot drive into the frame. For more information, see Coordinate Systems and Limit Switches.
“3”“Abort during cycle”“Reset while in motion. Machine position is likely lost due to sudden halt. Re-homing is highly recommended.”
Homing cycle was interrupted. Very rare.
“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.”
Only applies if an automatic z-axis is installed and the probe sensor is installed inverted.
“5”“Probe fail”“Probe fail. Probe did not contact the workpiece within the programmed travel for G38.2 and G38.4.”
If a test cycle has been triggered for the automatic z-axis and the sensor has not been triggered for the entire length of the z-axis.
“6”“Homing fail”“Homing fail. The active homing cycle was reset.”
“7”“Homing fail”“Homing fail. Safety door was opened during homing cycle.”
“8”“Homing fail”“Homing fail. Pull off travel failed to clear limit switch. Try increasing pull-off setting or check wiring.”
In order for homing to start, no limit switches must be activated. If this error appears, the switches were detected as pressed when the homing was started. Most common cause: the limit switches must be inverted, this can be done with the parameter $5. See software articles.
“9”“Homing fail”“Homing fail. Could not find limit switch within search distances. Try increasing max travel, decreasing pull-off distance, or check wiring.”
The firmware searches for the limit switches in the set direction. The track being scanned cannot be longer than the maximum size of the work area. So if the laser has traveled further than the set length in $130 or $131 and has not found any limit switches, this alarm is triggered and the laser is stopped.
This error is usually occurs when the limit switches are not recognized by the laser. They are either wired incorrectly or not configured correctly. See limit switches.
“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.”
Only occurs if you have flashed your own firmware version that uses two limit switches per axis. Otherwise must not occur.
Alarm messages

Fehler / Error Codes

Error code in v1.1+Error message in v1.0+Error description and remedy
“1”“Expected command letter”“G-code words consist of a letter and a value. Letter was not found.”
The command to the laser was mistransmitted or an incorrect dialect was used. Check that the electrical (and USB) connection is fine and that the laser has been added as type “grbl”. See software articles.
“2”“Bad number format”“Missing the expected G-code word value or numeric value format is not valid.”
see error 1
“3”“Invalid statement”“Grbl ‘$’ system command was not recognized or supported.”
The command could not be evaluated. The list of valid commands can be found here.
“4”“Value < 0”“Negative value received for an expected positive value.”
see error 1
“5”“Setting disabled”“Homing cycle failure. Homing is not enabled via settings.”
A homing cycle was started, but the homing function was not enabled. This can be done with the parameter $22. This must be set to 1. But only if you also have limit switches. Otherwise, “Auto Home at Startup” must be turned off in LightBurn so that the homing command is not sent. For more information, see the article on limit switches and setting up the software.
“6”“Value < 3 usec”“Minimum step pulse time must be greater than 3usec.”
“7”“EEPROM read fail. Using defaults”“An EEPROM read failed. Auto-restoring affected EEPROM to default values.”
“8”“Not idle”“Grbl ‘$’ command cannot be used unless Grbl is IDLE. Ensures smooth operation during a job.”
An attempt was made to send a command to the firmware while commands are still being processed.
“9”“G-code lock”“G-code commands are locked out during alarm or jog state.”
If certain errors or alarms occur (e.g. hard or soft limits), the firmware may enter the alarm state. To leave it you can either send the command “$X” to the laser, or restart the whole laser (maybe a right-click on the device button in LightBurn already works, otherwise, do a power cycle).
“10”“Homing not enabled”“Soft limits cannot be enabled without homing also enabled.”
“11”“Line overflow”“Max characters per line exceeded. Received command line was not executed.”
“12”“Step rate > 30kHz”“Grbl ‘$’ setting value cause the step rate to exceed the maximum supported.”
“13”“Check Door”“Safety door detected as opened and door state initiated.”
“14”“Line length exceeded”“Build info or startup line exceeded EEPROM line length limit. Line not stored.”
“15”“Travel exceeded”“Jog target exceeds machine travel. Jog command has been ignored.”
A jog command was sent, which would send the laser over the limits of the working area. The command is not executed.
“16”“Invalid jog command”“Jog command has no ‘=’ or contains prohibited g-code.”
“17”“Setting disabled”“Laser mode requires PWM output.”
“20”“Unsupported command”“Unsupported or invalid g-code command found in block.”
see error 1. In addition, it may be that “GCode Clustering” is activated in the device settings of LightBurn. This must be turned off.
“21”“Modal group violation”“More than one g-code command from same modal group found in block.”
see error 20.
“22”“Undefined feed rate”“Feed rate has not yet been set or is undefined.”
see error 1.
“23”“Invalid gcode ID:23”“G-code command in block requires an integer value.”
see error 20.
“24”“Invalid gcode ID:24”“More than one g-code command that requires axis words found in block.”
see error 1.
“25”“Invalid gcode ID:25”“Repeated g-code word found in block.”see
error 1.
“26”“Invalid gcode ID:26”“No axis words found in block for g-code command or current modal state which requires them.”
“27”“Invalid gcode ID:27”“Line number value is invalid.”
“28”“Invalid gcode ID:28”“G-code command is missing a required value word.”
“29”“Invalid gcode ID:29”“G59.x work coordinate systems are not supported.”
“30”“Invalid gcode ID:30”“G53 only allowed with G0 and G1 motion modes.”
“31”“Invalid gcode ID:31”“Axis words found in block when no command or current modal state uses them.”
“32”“Invalid gcode ID:32”“G2 and G3 arcs require at least one in-plane axis word.”
“33”“Invalid gcode ID:33”“Motion command target is invalid.”
“34”“Invalid gcode ID:34”“Arc radius value is invalid.”
“35”“Invalid gcode ID:35”“G2 and G3 arcs require at least one in-plane offset word.”
“36”“Invalid gcode ID:36”“Unused value words found in block.”
“37”“Invalid gcode ID:37”“G43.1 dynamic tool length offset is not assigned to configured tool length axis.”
“38”“Invalid gcode ID:38”“Tool number greater than max supported value.”
Error