CoupeFab

Open source · control

UGS and grbl: connect, set up and run a job on a small CNC router

Universal Gcode Sender with grbl or grblHAL: connecting, setup wizard, $$ settings, homing, jogging, work zero, probing and sending the program.

Reviewed 3 min read Level : Beginner DraftWritten by CoupeFab from the official documents cited. Technical review by Michaël Brassard pending.

grbl is open-source firmware that turns a small board (often Arduino) into a CNC control; grblHAL is its evolution for more powerful 32-bit boards. Universal Gcode Sender (UGS) is the most used open-source interface to drive them from a PC.

Compatibility

FirmwareUGS
grbl 1.1Supported
grblHALSupported from UGS 2.1.27, in grbl 1.1-compatible mode

grbl settings to know

SettingRole
$100–$102Steps per mm (X, Y, Z)
$110–$112Max rate
$120–$122Acceleration
$20 / $21Soft / hard limits
$22Homing enable
$130–$132Max travel

Workflow

  1. Install UGS Platform (or UGS Classic); plug the machine in over USB.
  2. Pick firmware, port and baud rate (often 115,200); Connect.
  3. Run the setup wizard: motor direction, steps per millimetre, limit switches, homing, soft limits.
  4. Check settings with $$ (grbl settings list).
  5. Home ($H) if the machine has limit switches.
  6. Jog to the part zero point; reset zero on X, Y, Z (work zero) — or use a probe for Z.
  7. Open the G-code (CAM grbl post: Vectric, Fusion, FreeCAD); check the visualizer.
  8. Send, hand near the emergency stop.

Error codes and alarms

Codes taken only from public manuals and official documents, with the source under each table. Exact numbers and meanings can vary with software version and machine builder: when in doubt, your machine’s manual wins.

Grbl — Grbl 1.1 (hobby routers and lasers, UGS, LightBurn) 46

Grbl 1.1 returns “ALARM:n” or “error:n”. After a limit alarm or a stop while moving, re-home ($H).

Grbl — Grbl 1.1 (hobby routers and lasers, UGS, LightBurn)
CodeMeaningWhat to check
ALARM:1Hard limitHard limit has been triggered. Machine position is likely lost due to sudden halt. Re-homing is highly recommended.Read the message, fix, then $X (unlock) or $H (home).
ALARM:2Soft limitSoft limit alarm. G-code motion target exceeds machine travel. Machine position retained. Alarm may be safely unlocked.Read the message, fix, then $X (unlock) or $H (home).
ALARM:3Abort during cycleReset while in motion. Machine position is likely lost due to sudden halt. Re-homing is highly recommended.Read the message, fix, then $X (unlock) or $H (home).
ALARM:4Probe failProbe 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.Read the message, fix, then $X (unlock) or $H (home).
ALARM:5Probe failProbe fail. Probe did not contact the workpiece within the programmed travel for G38.2 and G38.4.Read the message, fix, then $X (unlock) or $H (home).
ALARM:6Homing failHoming fail. The active homing cycle was reset.Read the message, fix, then $X (unlock) or $H (home).
ALARM:7Homing failHoming fail. Safety door was opened during homing cycle.Read the message, fix, then $X (unlock) or $H (home).
ALARM:8Homing failHoming fail. Pull off travel failed to clear limit switch. Try increasing pull-off setting or check wiring.Read the message, fix, then $X (unlock) or $H (home).
ALARM:9Homing failHoming fail. Could not find limit switch within search distances. Try increasing max travel, decreasing pull-off distance, or check wiring.Read the message, fix, then $X (unlock) or $H (home).
ALARM:10Homing failHoming fail. Second dual axis limit switch failed to trigger within configured search distance after first. Try increasing trigger fail distance or check wiring.Read the message, fix, then $X (unlock) or $H (home).
error:1Expected command letterG-code words consist of a letter and a value. Letter was not found.Fix the line (often the post processor) or the named setting.
error:2Bad number formatMissing the expected G-code word value or numeric value format is not valid.Fix the line (often the post processor) or the named setting.
error:3Invalid statementGrbl '$' system command was not recognized or supported.Fix the line (often the post processor) or the named setting.
error:4Value < 0Negative value received for an expected positive value.Fix the line (often the post processor) or the named setting.
error:5Setting disabledHoming cycle failure. Homing is not enabled via settings.Fix the line (often the post processor) or the named setting.
error:6Value < 3 usecMinimum step pulse time must be greater than 3usec.Fix the line (often the post processor) or the named setting.
error:7EEPROM read fail. Using defaultsAn EEPROM read failed. Auto-restoring affected EEPROM to default values.Fix the line (often the post processor) or the named setting.
error:8Not idleGrbl '$' command cannot be used unless Grbl is IDLE. Ensures smooth operation during a job.Fix the line (often the post processor) or the named setting.
error:9G-code lockG-code commands are locked out during alarm or jog state.Fix the line (often the post processor) or the named setting.
error:10Homing not enabledSoft limits cannot be enabled without homing also enabled.Fix the line (often the post processor) or the named setting.
error:11Line overflowMax characters per line exceeded. Received command line was not executed.Fix the line (often the post processor) or the named setting.
error:12Step rate > 30kHzGrbl '$' setting value cause the step rate to exceed the maximum supported.Fix the line (often the post processor) or the named setting.
error:13Check DoorSafety door detected as opened and door state initiated.Fix the line (often the post processor) or the named setting.
error:14Line length exceededBuild info or startup line exceeded EEPROM line length limit. Line not stored.Fix the line (often the post processor) or the named setting.
error:15Travel exceededJog target exceeds machine travel. Jog command has been ignored.Fix the line (often the post processor) or the named setting.
error:16Invalid jog commandJog command has no '=' or contains prohibited g-code.Fix the line (often the post processor) or the named setting.
error:17Setting disabledLaser mode requires PWM output.Fix the line (often the post processor) or the named setting.
error:20Unsupported commandUnsupported or invalid g-code command found in block.Fix the line (often the post processor) or the named setting.
error:21Modal group violationMore than one g-code command from same modal group found in block.Fix the line (often the post processor) or the named setting.
error:22Undefined feed rateFeed rate has not yet been set or is undefined.Fix the line (often the post processor) or the named setting.
error:23Invalid gcode ID:23G-code command in block requires an integer value.Fix the line (often the post processor) or the named setting.
error:24Invalid gcode ID:24More than one g-code command that requires axis words found in block.Fix the line (often the post processor) or the named setting.
error:25Invalid gcode ID:25Repeated g-code word found in block.Fix the line (often the post processor) or the named setting.
error:26Invalid gcode ID:26No axis words found in block for g-code command or current modal state which requires them.Fix the line (often the post processor) or the named setting.
error:27Invalid gcode ID:27Line number value is invalid.Fix the line (often the post processor) or the named setting.
error:28Invalid gcode ID:28G-code command is missing a required value word.Fix the line (often the post processor) or the named setting.
error:29Invalid gcode ID:29G59.x work coordinate systems are not supported.Fix the line (often the post processor) or the named setting.
error:30Invalid gcode ID:30G53 only allowed with G0 and G1 motion modes.Fix the line (often the post processor) or the named setting.
error:31Invalid gcode ID:31Axis words found in block when no command or current modal state uses them.Fix the line (often the post processor) or the named setting.
error:32Invalid gcode ID:32G2 and G3 arcs require at least one in-plane axis word.Fix the line (often the post processor) or the named setting.

See all 46 codes Grbl →

Source: Grbl v1.1 — tableaux officiels des codes d’alarme et d’erreur (dépôt gnea/grbl) · consulted November 26, 2026

Search a code across all brands →

Common mistakes

Message or symptomUsual cause
ALARM after power-upHoming required ($22=1): run $H
ALARM:2 (soft limit)Program exceeds travel, or zero misplaced
Part the wrong sizeWrong steps per mm; calibrate over a long distance
Unsupported commandNon-grbl post (unsupported codes)

FAQ

Can grbl drive a plasma table?

Yes for simple builds, but with no native height control. For plasma, prefer a control with THC — see LinuxCNC/QtPlasmaC or FireControl.

Sources

Spotted an error or want something added? Tell us →

One guide a week, French-first

New guides, used equipment in Quebec and price moves. No third-party ads.

CASL compliance: the box is not pre-checked. Nothing is sent without this express consent.