Files
forgefirm/docs/LIGHTBURN.md
T
ScottW514 3025996c86 Prove the M101 dose-model switch; record the judged dose curves
The stream harness gains rules 18 to 21: the floor is derived from the
selected model's config key at the arm and a typed $35 is overwritten;
M101 switches the rendering exactly at the boundary in both directions
with no continuous FIRE at full duty across it; a refused switch (the
spindle on) leaves the stream unchanged, and the harness resyncs with
an empty line because the core skips G-code after an error until the
sender resyncs; M2 reverts a program-scoped switch and Q1 holds. The
analog sessions pin laser_floor_analog at the density floor so the
existing duty expectations stand, and the density ladder's unfloored
run moves from a chained $35 write to the laser_floor_density key.

The catalog's laser.power-floor becomes model-aware: it reads the
configured model and the floor keys from forgectrl, switches to the
configured model with M101 so the derivation runs without a fire, and
expects $35 to be that model's floor. The new laser.power-model-switch
switches to each model with the spindle off, checks the reported
message and $35 after each switch, and checks the M2 revert. The new
mswitch bench drill runs the switch on the machine in one armed run.

Docs follow: BRINGUP's Laser control section describes the switch, the
derived floors and the measured dose response of both models; the
MOTION settings table gains the five keys; LIGHTBURN gains a Power
models section and drops the stale 30 percent floor advice; SAFETY
names the switch's refusal rule; the CAMPAIGN-LOG records the judged
depth-witness runs of 2026-08-30 and the switch's host and bench proof.
2026-08-30 15:08:34 -04:00

228 lines
12 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# LightBurn setup & operation (ForgeFIRM)
## Before you cut — safety (read this first)
ForgeFIRM replaces the factory software, **not** the factory safety rules. The
machine contains a Class 4 CO₂ laser emitting invisible 10.6 µm infrared at
roughly 45 W. **Jobs sent from LightBurn fire the laser.**
- **Eyes.** The enclosure and lid glass are the eye-safety barrier. Never
defeat the lid switches or the Pro's remote-interlock plug, and never
operate with any cover removed. Direct or reflected 10.6 µm radiation
blinds and burns.
- **Fumes.** Vent the exhaust to the outdoors, always. Laser-cutting fumes
are toxic and flammable.
- **Materials.** Never cut PVC, vinyl, or any chlorinated plastic — they
release chlorine gas that corrodes the machine and injures your lungs.
Know what your material is before you cut it.
- **Fire.** Never leave a running job unattended. Small flare-ups are normal
with some materials; sustained flame is not. Keep a fire extinguisher
(CO₂ preferred) within reach and know how you will open the lid and
smother a fire before you start.
- **Stop means stop.** Opening the lid cancels the job (the beam is cut by
the hardware the same instant); LightBurn's Stop aborts it; the big button
pauses it. If anything looks wrong, stop first and diagnose second.
The laser fires only inside an operator-armed window:
- **Starting a job that fires: press the button.** At the first
laser-on command of a job the machine unlocks its laser latch,
lights the big button **white**, and pauses the incoming gcode until
you **press the button** (the same press the factory firmware
requires). LightBurn simply waits; press the button and the job
runs. If nobody presses within `laser_button_timeout_s` (default
300 s) the job aborts with alarm 3. Stop in LightBurn (soft reset)
cancels the wait at any time. Opening the lid (or a Pro's interlock
loop) while the button is lit cancels the job the same way — the
message names the reason, the latch relocks, and a press with the lid
open never arms; the job ends for LightBurn (a clean cancel, no alarm to
clear); close the lid and start again.
- One press covers one job — power changes and M5/M3 toggles do not
re-prompt. The window relocks when the job ends (program end
`M2`/`M30`), when the sender connection changes, or after
`laser_disarm_s` (default 60 s) with the spindle off — counting even
while a job sits paused in Hold or with the lid open; the next job
prompts again. Both timeouts are machine settings (keys in
`/data/forgefirm.conf`, set through the control panel's settings API);
the defaults suit normal use.
- S-value scale: `$30` defaults to 1000, so set LightBurn's S-max to
1000. 100 % power = S1000. Use M4 (variable/dynamic) mode for cuts
and engraves.
- The machine forces the cut fan profile on while armed and
continuously verifies coolant flow; a flow fault or over-temperature
pauses/blocks firing (messages appear in LightBurn's console).
- The hardware safety chain stands above all of this: lid open,
interlock open, or power faults make firing physically impossible
regardless of software state.
## One-time device setup
Prerequisite: the controller is running on the board (see BRINGUP.md;
`grblHAL_glowforge` on TCP port 23 at your machine's IP address, shown
below as `<machine-ip>`).
1. **Laser window → Devices → Create Manually** (skip auto-find; it
scans serial ports).
2. Device type: **grblHAL** if your LightBurn version lists it,
otherwise **GRBL** — both speak the right protocol.
3. Connection: **Ethernet/TCP**. IP address: **`<machine-ip>`**
(LightBurn uses TCP port 23 for GRBL devices, which is exactly where
the controller listens).
4. Name: e.g. `Glowforge ForgeFIRM`. Work area: **X 495 mm, Y 279 mm**.
5. **Origin**: pick the corner where the head sits after parking at
home — **rear-left as you face the machine** (the top-left dot in
the selector). This is what keeps jobs un-mirrored: machine +X runs
right, +Y runs from the rear rail toward you.
6. **Auto-home on startup: NO** — LightBurn would issue `$H` at every
connect, and the working homing method runs a multi-minute session.
`$H` itself works and is selected by the `homing_mode` setting in the
machine's web control panel: `gfcloud` (Glowforge web-service vision
homing — the working method; X/Y home to the factory corner, Z to the
hall sensor; requires a signed-in Glowforge session), `switches`
(physical limit switches, once installed), or `none` (`$H` is
rejected). Run `$H` deliberately from the Console tab when you want a
true machine origin.
7. Finish. If a stale device profile already exists, edit its IP
instead of creating a new one.
8. Device Settings (wrench icon): **S-Value Max = 1000** (matches $30).
9. Optional backup: File → Export Devices → saves a `.lbdev` you can
re-import later (the format is not editable text; export is the way
to make one).
## Job start mode (important on an unhomed machine)
In the Laser window set **Start From: Current Position**, and set the
**Job Origin** dot to the same corner as the machine origin (top-left
dot). The job then runs into the bed from wherever the head currently
sits — absolute machine zero never matters, which is the forgiving mode
when you have not homed.
(`Absolute Coords` also works after a successful `$H`, or if the head
was parked at the home corner when the controller started. After any
Stop/alarm the absolute frame is stale until you re-home with `$H` or
restart the controller with the head re-parked.)
## Operating basics
- **Frame** traces the job's bounding box at travel speed — do it
before every Start. There are **no limit switches**: framing is your
crash protection.
- **Start** runs the job. Travels run up to 200 mm/s; anything faster
in a layer is clamped by the controller ($110/$111 = 12000 mm/min).
- **Pause** = grbl feed hold: motion parks within ~0.4 s (0.2 s stream
queue + deceleration); Resume continues exactly. **The big button does
the same**: one press while a job runs pauses it (LightBurn shows Hold),
the next press resumes it — the factory's pause/resume, on the machine.
Two things to know before you pause a cut. **Resume where it stopped:**
there is no backtrack in GRBL mode, so the beam restarts from where the
deceleration ended and accelerates away from a standstill — at constant
power (`M3`) that leaves a deeper spot you can see, while `M4` scales power
with speed and mostly hides it. **Don't leave it paused:** the armed window
has an idle grace (`laser_disarm_s`, default 60 s) that counts down through
a hold, so a job left paused disarms itself and the resume asks for the
button again before it can fire.
- **Opening the lid (or a Pro's interlock loop) during a job cancels it**,
as the factory firmware does: the head parks with a controlled
deceleration (the hardware cut the beam the instant the lid moved), the
console reports the reason, the job ends for LightBurn (the controller
resets — position is kept, no alarm), and the head returns on its own to
where the job started, lid open or not. Close the lid and start again
from LightBurn; the next job asks for the button, which is also what
re-arms the machine's hardware button latch. The `lid_policy` setting on
the control panel's GRBL tab can select the stock Grbl behavior instead
(Door hold, Resume once closed). At idle, while jogging, or during homing
the lid is yours to open and close freely — the controller does nothing
there (the hardware blocks the beam anyway), so a lid cycle while loading
material never leaves LightBurn waiting.
- **Stop** = soft reset: motion aborts with a controlled deceleration
and grblHAL raises an alarm with **position declared lost** (the
stream queue means up to ~40 mm of in-flight difference). It leaves the
head where it stopped — the return to the job start belongs to the lid
and interlock policy alone, so Stop never moves the machine on its own.
Recovery: unlock (`$X` in Console or LightBurn's prompt), jog the head
clear, and carry on in Current Position mode. Restart the controller with
the head re-parked if you want a clean absolute frame.
- **Move tab**: jogging (set a sane speed, e.g. 6000 mm/min), Get
Position, distance buttons.
- **Console tab**: raw grbl — `?` status, `$$` settings, `$X` unlock,
`$J=G91X10F1200` jog.
## Power models
The controller has two ways to turn a layer's power into light, and a job
can pick either.
- **Density** (the default): every pulse is full power, and the power
setting decides how many ticks of each 710 us period fire. This is what
the factory does. Every power level marks, low levels included, because
no pulse is ever too weak to strike; the trade is that the response is
not linear: on this machine 80 % gives about half the light of 100 %, 60 %
about a third, 30 % about a fourteenth.
- **Analog**: the beam runs continuously and the power setting sets the PWM
duty. Close to linear above 30 %, with a floor at the duty the tube lases
at (16 %), below which nothing marks. The finish on acrylic is the same
as density's.
The default model is set on the control panel (GRBL tab, "Laser power
model"). A job selects its own with a line in its G-code, with the laser
off:
M5 ; beam off (the switch is refused while the spindle is on)
M101 P0 ; analog for this program (M101 P1 = density)
M3 ...
Put it in the job's start G-code (Edit -> Device Settings -> GCode -> Start
G-Code in LightBurn) or between sections of a job. It reverts to the panel
default when the program ends (`M2`) or on Stop, so a job never leaves the
machine in a model you did not pick; `M101 P0 Q1` typed in the Console
sticks until the next `M101` or a controller restart. The console reports
every switch and every arm with the model and its floor, and `$35` (the
power floor) is set by the controller from the selected model: do not type
it, it is overwritten at the next job.
## Air assist / fans
Each cut/engrave layer has an **Air Assist** toggle (in the layer's cut
settings). Turning it on makes LightBurn emit M8/M9 around that layer,
which drives the machine's full cut-profile ventilation: air assist to
full, exhaust and intake fans to factory run speeds, then a ~15 s
cooldown after the layer before returning to idle. Leave it ON for
anything that will eventually involve the beam; expect real fan noise.
## Dry runs (motion only, no fire)
**Setting a low power value does NOT make a job inert — any laser layer
prompts for the arm button and then fires.** The motion-only modes are:
- **Frame** and jogging — never fire.
- A job whose layers emit no laser-on command: turn the layer's
**Output** off in the cut settings, or send gcode that stays in `M5`.
- A job run with the laser latch left locked (never press the arm
button): the job pauses at the white-button prompt and aborts after
`laser_button_timeout_s` — useful only to confirm the prompt itself.
If the white arm prompt appears and you did not intend to fire, press
**Stop** in LightBurn.
## A good first job
First a dry run, then a light cut on scrap:
1. Draw a rectangle (~100 × 60 mm) with a circle inside.
2. Double-click the layer color bar (bottom): mode **Line**, speed
**50 mm/s** (= 3000 mm/min; check Edit → Settings for your speed
units). For the dry run turn the layer's **Output** off.
3. Park the head where the job's rear-left corner should be (or leave
it at home), **Frame**, watch the perimeter trace, then **Start**.
Expected behavior: darting travels at up to 200 mm/s, smooth 50 mm/s
tracing of the shapes, silky and near-silent motion (factory currents +
decay mode), and the head finishing per the job's return setting.
4. For the live pass: put scrap material on the bed (never an empty
honeycomb over the fan grill), re-enable the layer's **Output**, set
power to **20 %** (any nonzero power marks under the default power
model; 20 % is a light pass on scrap), turn the layer's **Air Assist**
on, close the lid, **Frame**, **Start**, and press the white button
when it lights. Watch the whole job.