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.
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
| Firmware | UGS |
|---|---|
| grbl 1.1 | Supported |
| grblHAL | Supported from UGS 2.1.27, in grbl 1.1-compatible mode |
grbl settings to know
| Setting | Role |
|---|---|
$100–$102 | Steps per mm (X, Y, Z) |
$110–$112 | Max rate |
$120–$122 | Acceleration |
$20 / $21 | Soft / hard limits |
$22 | Homing enable |
$130–$132 | Max travel |
Workflow
- Install UGS Platform (or UGS Classic); plug the machine in over USB.
- Pick firmware, port and baud rate (often 115,200); Connect.
- Run the setup wizard: motor direction, steps per millimetre, limit switches, homing, soft limits.
- Check settings with
$$(grbl settings list). - Home (
$H) if the machine has limit switches. - Jog to the part zero point; reset zero on X, Y, Z (work zero) — or use a probe for Z.
- Open the G-code (CAM grbl post: Vectric, Fusion, FreeCAD); check the visualizer.
- 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).
| Code | Meaning | What to check |
|---|---|---|
ALARM:1 | Hard 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:2 | Soft 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:3 | Abort 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:4 | Probe 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:5 | Probe 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:6 | Homing failHoming fail. The active homing cycle was reset. | Read the message, fix, then $X (unlock) or $H (home). |
ALARM:7 | Homing failHoming fail. Safety door was opened during homing cycle. | Read the message, fix, then $X (unlock) or $H (home). |
ALARM:8 | Homing 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:9 | Homing 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:10 | Homing 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:1 | Expected 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:2 | Bad 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:3 | Invalid statementGrbl '$' system command was not recognized or supported. | Fix the line (often the post processor) or the named setting. |
error:4 | Value < 0Negative value received for an expected positive value. | Fix the line (often the post processor) or the named setting. |
error:5 | Setting disabledHoming cycle failure. Homing is not enabled via settings. | Fix the line (often the post processor) or the named setting. |
error:6 | Value < 3 usecMinimum step pulse time must be greater than 3usec. | Fix the line (often the post processor) or the named setting. |
error:7 | EEPROM 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:8 | Not 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:9 | G-code lockG-code commands are locked out during alarm or jog state. | Fix the line (often the post processor) or the named setting. |
error:10 | Homing not enabledSoft limits cannot be enabled without homing also enabled. | Fix the line (often the post processor) or the named setting. |
error:11 | Line overflowMax characters per line exceeded. Received command line was not executed. | Fix the line (often the post processor) or the named setting. |
error:12 | Step 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:13 | Check DoorSafety door detected as opened and door state initiated. | Fix the line (often the post processor) or the named setting. |
error:14 | Line 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:15 | Travel exceededJog target exceeds machine travel. Jog command has been ignored. | Fix the line (often the post processor) or the named setting. |
error:16 | Invalid jog commandJog command has no '=' or contains prohibited g-code. | Fix the line (often the post processor) or the named setting. |
error:17 | Setting disabledLaser mode requires PWM output. | Fix the line (often the post processor) or the named setting. |
error:20 | Unsupported commandUnsupported or invalid g-code command found in block. | Fix the line (often the post processor) or the named setting. |
error:21 | Modal 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:22 | Undefined feed rateFeed rate has not yet been set or is undefined. | Fix the line (often the post processor) or the named setting. |
error:23 | Invalid gcode ID:23G-code command in block requires an integer value. | Fix the line (often the post processor) or the named setting. |
error:24 | Invalid 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:25 | Invalid gcode ID:25Repeated g-code word found in block. | Fix the line (often the post processor) or the named setting. |
error:26 | Invalid 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:27 | Invalid gcode ID:27Line number value is invalid. | Fix the line (often the post processor) or the named setting. |
error:28 | Invalid gcode ID:28G-code command is missing a required value word. | Fix the line (often the post processor) or the named setting. |
error:29 | Invalid gcode ID:29G59.x work coordinate systems are not supported. | Fix the line (often the post processor) or the named setting. |
error:30 | Invalid gcode ID:30G53 only allowed with G0 and G1 motion modes. | Fix the line (often the post processor) or the named setting. |
error:31 | Invalid 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:32 | Invalid 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. |
Source: Grbl v1.1 — tableaux officiels des codes d’alarme et d’erreur (dépôt gnea/grbl) · consulted November 26, 2026
Common mistakes
| Message or symptom | Usual cause |
|---|---|
| ALARM after power-up | Homing required ($22=1): run $H |
| ALARM:2 (soft limit) | Program exceeds travel, or zero misplaced |
| Part the wrong size | Wrong steps per mm; calibrate over a long distance |
| Unsupported command | Non-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
- Universal Gcode Sender — official site, consulted November 26, 2026.
- grbl — Wiki, configuration.
- grblHAL.
One guide a week, French-first
New guides, used equipment in Quebec and price moves. No third-party ads.