Beam Bench Docs

GRBL essentials

Just enough GRBL to drive a laser. The commands, states, and settings that matter most.

GRBL is the open-source firmware running on most diode and small CO2 laser controllers. Beam Bench talks to it over serial. You do not need to understand GRBL deeply to use Beam Bench, but the moments you will need it (debugging, calibration, recovering from alarm) are easier when you know the basics.

The model

GRBL is a streaming interpreter. The host (Beam Bench, or the Console panel) sends one G-code line at a time. GRBL parses, plans, executes, and acknowledges each line with ok or error:N.

GRBL has a machine state:

StateMeaning
IdleReady for commands.
RunExecuting a move.
HoldPaused mid-move. Resume with ~.
JogExecuting a jog (special non-streamed move).
AlarmSomething went wrong, limit hit, soft limit, etc. Cannot move until cleared.
DoorSafety door is open.
CheckDry-run mode, parses but does not move.
HomeRunning homing cycle.
SleepSleeping.

You see these states reflected in the Laser Control connection bar.

Real-time commands

A handful of single-character commands bypass the parser. They are immediate, not queued:

CharAction
?Status query (returns position, state).
~Resume / cycle start.
!Feed hold (pause).
^X (Ctrl+X byte)Soft reset.

Beam Bench uses these under the hood, the Pause and Stop buttons send ! and reset.

$ settings

GRBL stores config in EEPROM, accessed via $ settings. Common ones:

SettingMeaning
$0Step pulse, microseconds.
$10Status report mask.
$20-$23Soft / hard limits, homing.
$30Maximum spindle / laser S value.
$31Minimum spindle / laser S value.
$32Laser mode.
$100-$102Steps/mm for X / Y / Z.
$110-$112Maximum rate (mm/min) for X / Y / Z.
$120-$122Acceleration (mm/sec²).
$130-$132Maximum travel for X / Y / Z (used for soft limits).

Dump all with $$ in the Console panel. Set with $30=1000.

See Dollar settings reference for the full list.

Laser mode ($32)

$32=1 enables laser mode, which makes GRBL synchronize the laser power changes with the deceleration / acceleration of the motors. With $32=0, the laser fires at the commanded power regardless of how fast the head is moving, bad for engraving consistency.

For any laser project, set $32=1.

Error and alarm codes

When GRBL returns error:N or alarm:N, the number tells you what happened. Common ones:

CodeTypeMeaning
error:1Expected command letter.
error:2Bad number format.
error:9G-code locked out during alarm state.
error:20Unsupported command.
alarm:1Hard limit triggered.
alarm:9Homing failed.

See GRBL error codes troubleshooting.

Homing and unlocking

$H runs the homing cycle (moves to limit switches). After homing, the machine knows where 0,0 is.

When in alarm state, the machine refuses to move. Clear with $X (unlock). Beam Bench's Move panel has an Unlock button that does this.

Job origin via G92

Beam Bench's Start From: User Origin and Start From: Current Position emit a G92 to redefine the current position. The job's coordinates then become relative to that point.

This is the most common way to position a job on a piece of material that is not in a known absolute location.

How Beam Bench handles it

Beam Bench wraps all of this. You do not see GRBL directly during normal operation. The Console panel lets you talk to GRBL when you need to. The Connection Diagnostics panel shows raw TX/RX traffic and connection state for debugging.

On this page