In this section

grblHAL / FluidNC

For grblHAL and FluidNC controllers. The file is the same as for GRBL, with one addition: grblHAL can use a tool table.

What the file looks like

The file starts with comments naming the project, the machine and the tools, then:

G21 G90 G17 G94
G54

Millimetres are G21; a profile that outputs inches writes G20 instead. The spindle starts with S{rpm} M3 followed by a dwell (G4 P seconds) for the spin-up time in your profile, unless spindle control is set to none. Cutting moves are straight lines only — G0 for rapids and G1 for cuts, never arcs — and every line is 80 characters or fewer.

The file ends with:

G0 Z{safe}
M5
M30

Tool changes

  • One file per tool works: run the files in order and change the tool between them.
  • M6 and pause writes T{n} M6 then M0.
  • M6 with G43 writes T{n} M6 and G43 H{h}, where h is the tool's length offset number, taking the tool length from the controller's tool table. Enable and fill the table first — it is your responsibility, and the file trusts it.

Before the first run

Check your firmware's tool-change settings before choosing an M6 mode: what M6 does depends on how your grblHAL or FluidNC build is configured.

Set X and Y zero at the front-left corner of the piece and Z zero on the top of the stock, and run the first file with the tool well above the work and a hand on the feed hold.