Skip to content

Real Time Commands

Nikos Siatras edited this page Feb 23, 2026 · 9 revisions

Real-time commands are single control characters that may be sent to RabbitGRBL to perform actions immediately, independent of the normal G-code stream.
They can be issued at any time, and RabbitGRBL will react within milliseconds.

Real-Time Commands Overview Table

Command ASCII / Hex Description
Ctrl+X 0x18 Soft Reset
? 0x3F Status Report Query
~ 0x7E Cycle Start / Resume
! 0x21 Feed Hold
0x84 Extended ASCII Safety Door
0x85 Extended ASCII Jog Cancel
0x90 Feed Override Set Feed = 100%
0x91 Feed Override Feed +10%
0x92 Feed Override Feed −10%
0x93 Feed Override Feed +1%
0x94 Feed Override Feed −1%
0x95 Rapid Override Rapid 100%
0x96 Rapid Override Rapid 50%
0x97 Rapid Override Rapid 25%
0x99 Spindle Override Spindle 100%
0x9A Spindle Override Spindle +10%
0x9B Spindle Override Spindle −10%
0x9C Spindle Override Spindle +1%
0x9D Spindle Override Spindle −1%
0x9E Spindle Control Toggle Spindle Stop
0xA0 Coolant Control Toggle Flood Coolant
0xA1 Coolant Control Toggle Mist Coolant

General Characteristics of Real-Time Commands

A real-time command:

  • Executes within tens of milliseconds
  • Is a single raw character (ASCII or extended ASCII)
  • Does not require newline (\n) or carriage return (\r)
  • Is not part of the G-code streaming protocol
  • Is intercepted immediately and never buffered
  • Ignores additional real-time chars until the current one completes
  • Can be bound to a physical button or switch
  • Effect depends on the current machine state (IDLE, RUN, HOLD, JOG, etc.)

ASCII Real-Time Commands

These are typeable from a keyboard and appear in the $ help message.


0x18 (Ctrl+X) — Soft Reset

Immediately halts and safely resets RabbitGRBL without requiring a power cycle.

Behavior:

  • Always accepted, at any time
  • If triggered during motion:
    • Motion stops instantly
    • An ALARM is raised (lost position possible)
  • If triggered while idle:
    • Position may remain valid; homing may not be required
  • Clears planner buffers and modal states
  • Commonly wired to a physical RESET/ABORT button

? — Status Report Query

Requests an immediate status report from RabbitGRBL.

Reply Example:

<Idle|MPos:0.000,0.000,0.000,0.000|FS:0,0|Pn:XYZABCP|WCO:0.000,0.000,0.000,0.000>

Output typically includes:

  • Machine state (Idle, Run, Hold, Alarm, etc.)
  • MPos: Machine coordinates
  • FS: Feed rate and spindle RPM
  • Pn: Active input pins
  • WCO: Work Coordinate Offset* (WCO is sent periodically)*

What is WCO?

WCO (Work Coordinate Offset) is the offset applied by the active work coordinate system (G54–G59).
It represents the difference between machine coordinates and work coordinates.

RabbitGRBL sends:

  • MPos in every status report (deterministic)
  • WCO periodically (not in every report)

To calculate work position:

WPos = MPos - WCO

~ — Cycle Start / Resume

Resumes machine motion after a pause or safety-door event.

Resumes from:

  • Feed Hold (!)
  • Safety door suspend (when door is closed)
  • Program pause (M0)

If parking logic is enabled:

  • Re-enables spindle & coolant
  • Returns to the stored pre-park position
  • Continues execution automatically

May be wired to a Cycle Start button.


! — Feed Hold

Decelerates the machine to a controlled stop, entering HOLD state.

Behavior:

  • Works only in IDLE, RUN, or JOG
  • If jogging:
    • Cancels current jog
    • Flushes queued jog motions
    • Returns to IDLE or DOOR (if door is open)
  • Does not disable spindle or coolant — only motion is suspended
  • May be wired to a Feed Hold button

Extended-ASCII Real-Time Commands

Extended real-time commands use byte values 0x80–0xFF.
These are not typeable from a keyboard; GUIs send them as raw bytes.


0x84 — Safety Door

Simulates/initiates the safety-door condition.

Behavior:

  • Immediately suspends motion into DOOR state
  • Spindle & coolant turn off
  • If moving:
    • Machine decelerates to a stop first
  • During homing:
    • Motion halts and a homing alarm is raised
  • Supersedes HOLD or other suspend states
  • If parking logic is enabled:
    • Machine moves to its predefined park position
  • Jogging:
    • Jog is stopped
    • Remaining jog commands are flushed
    • Machine returns to IDLE when door is closed

0x85 — Jog Cancel

Cancels the jog mode immediately.

Behavior:

  • Triggers an internal feed hold
  • Clears queued jog commands
  • Only valid in JOG state
  • After cancel:
    • Goes to IDLE or DOOR (if door open)

Feed Override Commands

Modify the programmed feed rate in real-time.

  • Affects only feed motions (G1, G2, G3)
  • Does not affect rapid moves or jogs
  • Typical allowed range: 10% — 200%
  • Ignored if the override value does not change

Commands:

  • 0x90 — Set feed override to 100%
  • 0x91 — Increase feed by +10%
  • 0x92 — Decrease feed by −10%
  • 0x93 — Increase feed by +1%
  • 0x94 — Decrease feed by −1%

Rapid Override Commands

Modify the speed of rapid moves (G0/G28/G30).

Commands:

  • 0x95 — Rapid override 100%
  • 0x96 — Rapid override 50%
  • 0x97 — Rapid override 25%

If the rapid override value does not change, the command is ignored.


Spindle Speed Override Commands

Adjust spindle RPM in real-time.

  • Applies whether spindle is ON or OFF
  • Typical range: 10% — 200%
  • Ignored if resulting override has no effect

Commands:

  • 0x99 — Set spindle override to 100%
  • 0x9A — Increase by +10%
  • 0x9B — Decrease by −10%
  • 0x9C — Increase by +1%
  • 0x9D — Decrease by −1%

0x9E — Toggle Spindle Stop

Toggles spindle enable/disable only while in HOLD state.

Behavior:

  • Ignored during active motion (RUN/JOG)
  • Prevents accidental spindle shutoff during cutting
  • After resume (~):
    • Restores previous spindle state
    • Applies configurable delay (e.g., 4s) before motion continues
  • Spindle override values remain active even while spindle is toggled off
  • If safety door opens:
    • Door logic supersedes the spindle stop override

0xA0 — Toggle Flood Coolant

Toggles flood coolant output.

Behavior:

  • Valid in IDLE, RUN, or HOLD
  • Updates coolant modal state (M8/M9)
  • $G parser report will show M8 accordingly

0xA1 — Toggle Mist Coolant

Requires compile-time option ENABLE_M7.

Behavior:

  • Valid in IDLE, RUN, or HOLD
  • Updates coolant modal state (M7/M9)
  • $G report will display updated coolant state

Clone this wiki locally