Pro codes · Grbl
$$ $# $G $C $N $J= — Grbl system commands (Grbl)
Grbl system commands. Grbl 1.1 has system commands that are not G-code: $$ lists all settings, $# shows the work offsets and probe result, $G the active modal state, $C turns check mode on…
| Property | Value |
|---|---|
| Code | $$ $# $G $C $N $J= |
| Control | Grbl |
| Topic | Hidden and service |
| Syntax | $$ · $# · $G · $I · $C · $N0=<block> · $J=G91 X10 F500 · $X · $H |
What it does
Grbl 1.1 has system commands that are not G-code: $$ lists all settings, $# shows the work offsets and probe result, $G the active modal state, $C turns check mode on (the program runs without motion and reports errors), $N0= and $N1= store startup blocks that run after every reset, $J= jogs without changing the modal state, $X unlocks after an alarm and $H homes. FluidNC and grblHAL support the same basics.
Example
$C (CHECK MODE ON)
(send the program, read the errors)
$C (CHECK MODE OFF)
$N0=G21 G90 G54 (SAFE START STATE AFTER EVERY RESET)Tips
- Check mode is the fastest way to test a long program on a hobby machine.
- All Grbl errors and alarms are explained in the alarm list.
Careful: Startup blocks run after every reset; do not put motion commands into them.
Options, numbers and parameters depend on the control model, the software version and the options the machine builder installed. Check the operator and parameter manual of your machine before you use a code for the first time, and run it in single block with low overrides.
More: hidden and service
- Parameter 3202 — Protect O8000 and O9000 programs (Fanuc)
- Parameters 6700–6713 — Parts counting set-up (Fanuc)
- M198 — Call a subprogram from external memory (Fanuc)