Skip to content

Additional or extended settings

Terje Io edited this page Apr 22, 2023 · 8 revisions

Plugins and code changes can add to and modify settings and settings availability.
To list all available settings in the controller use the $help settings command from a terminal, or for a specific group of settings $help <group> where <group> is a group from the help topics available. Use $help with no argument to list available topics.

Other useful settings related commands:
$<n> where <n> is a setting number will output the current value.
$$=<n> where <n> is a setting number will output help for the setting.

Windows users may use the ioSender Config app for setting up the controller, this has a UI that presents all available settings in the controller in logical groups with data entry widgets matching the underlying datatype. E.g. bitmaps are represented as checkboxes - there is no need to calculate the value to enter. A short description of each setting is also provided.

For those who are using a WebUI v3 enabled controller: this can also be used for configuration of all settings and it too has an advanced settings UI.

Datatypes:

<n> = integer value
<float> = floating point value
<boolean> = 0 = false, 1 = true
<string> = ASCII string with some limitations for acceptable characters. To be revised.
<axis mask> = bitmask where bit 0 = X, 1 = Y, 2 = Z, 3 = A...
<coolant mask> = bitmask where bit 0 = flood, 1 = mist
<spindle mask> = bitmask where bit 0 = spindle on, 1 = spindle ccw, 2 = spindle pwm
<control mask> = bitmask where bit 0 = reset, 1 = feed hold, 2 = cycle start, 3 = safety door, 4 = block delete, 5 = stop disable, 6 = e-stop, 7 = probe connected
<report mask> = bitmask where bit 0 = machine_position, 1 = buffer_state, 2 = line_numbers, 3 = feed_speed, 4 = pin_state, 5 = work_coord_offset, 6 = overrides, 7 = probe_coordinates, 8 = sync_on_wco_change, 9 = parser_state, 10 = alarm_substate, 11 - run substate

$4=<axis mask> default from INVERT_ST_ENABLE_MASK.
Enable signals can be set independently per axis unlike legacy Grbl where a boolean is used to set inversion for all axes.
NOTE: If the stepper drivers shares the same enable signal only X enable (bit 0) is used.

$10=<report mask> default from INVERT_CONTROL_PIN_MASK.

$14=<control mask> default from INVERT_CONTROL_PIN_MASK.
Invert control input signals.

Bits 4 - 7 cannot be set with $14 when COMPATIBILITY_LEVEL > 1 or the driver does not support the input.

$15=<coolant mask> default from INVERT_COOLANT_FLOOD_PIN and INVERT_COOLANT_MIST_PIN.
Invert coolant output signals.

$16=<spindle mask> default from INVERT_SPINDLE_ENABLE_PIN, INVERT_SPINDLE_CCW_PIN and INVERT_SPINDLE_PWM_PIN.
Invert spindle output signals.

$17=<control mask> default from DISABLE_CONTROL_PINS_PULL_UP_MASK.
Disable control signal pullup, replaces #define DISABLE_CONTROL_PIN_PULL_UP.

$18=<axis mask> default from DISABLE_LIMIT_PINS_PULL_UP_MASK.
Disable limit signals pull up, replaces #define DISABLE_LIMIT_PIN_PULL_UP. Driver may apply pull down instead.

$19=<boolean> default from DISABLE_PROBE_PIN_PULL_UP
Disable probe pull up. Driver may apply pull down instead.

$21=<mask>
Changed from original boolean for enabling hard limits.

bit0 - enable hard limits.  
bit1 - enable strict mode when hard limits enabled, this bit cannot be changed when COMPATIBILITY_LEVEL > 1.

bit 1 defaults to #define CHECK_LIMITS_AT_INIT setting.
NOTE: In strict mode switches will also be checked when $X is issued, if still engaged error 45 will be reported. Homing is still possible, but for $X to work limit switches has to be disengaged or overridden. Homing is still possible, but for $X to work limit switches has to be disengaged or overridden.

$22=<mask>
Changed from original boolean to exclusive bitmask for enabling homing and homing features.

bit0 - enable homing. Only when this bit is set can the other bits be set.  
bit1 - enable single axis homing commands.
bit2 - homing on startup required.
bit3 - set machine origin to 0.
bit4 - two switches shares one input pin.
bit5 - allow manual homing of axes not automatically homed.
bit6 - override locks, allow reset to clear homing on startup required alarm.
bit7 - keep homed status on reset if possible.

$28=<float> default from DEFAULT_G73_RETRACT. Specifies G73 retract distance in mm.

$29=<n> : default from DEFAULT_STEP_PULSE_DELAY, range 0 - 10.
Stepper pulse delay in microseconds, replaces #define STEP_PULSE_DELAY.

$32=<n> default value derived from DEFAULT_LASER_MODE and DEFAULT_LATHE_MODE.
Changed from original boolean for enabling laser mode.

0 - normal mode.  
1 - laser mode.  
2 - lathe mode.

$33=<float> : default from DEFAULT_SPINDLE_PWM_FREQ, range driver dependent.
Spindle PWM frequency i Hz (from LPC port).

$34=<n> : default from DEFAULT_SPINDLE_PWM_OFF_VALUE, range 0 - 100.
Spindle off PWM duty cycle in percent (from LPC port).

$35=<n> : default from DEFAULT_SPINDLE_PWM_MIN_VALUE, range 0 - 100.
Spindle minimum PWM duty cycle in percent.

$36=<n> : default from DEFAULT_SPINDLE_PWM_MAX_VALUE, range 0 - 100.
Spindle maximum PWM duty cycle in percent (from LPC port).

$37=<axis mask> : defaults to all axes.
Defines which steppers is to be deenergized when motion completes. Driver/hardware dependent which are supported. At least X should be, disables all motors.

$38=<n> : default driver dependent.
Spindle encoder pulses per revolution. Usage is driver dependent (for spindle synchronized motion).

$39=<n> : default 1, enable printable realtime command characters.
Set to 0 to disable, when disabled these characters (?, ! and ~) are ignored as realtime commands and added to the input instead when part of a comment or a $-setting.

NOTE: top bit set alternatives are provided as a safer alternative, see config.h.

$40=<boolean> default 0 (off).
Enable soft limits for jogging. When enabled jog targets will be limited to machine travel limits for homed axes.

$43=<n> : default from DEFAULT_N_HOMING_LOCATE_CYCLE, range 0 - 255.
Number of homing locate cycles

$44=<axis mask> : default 0.
$45=<axis mask> : default 0.
$46=<axis mask> : default 0.
$47=<axis mask> : default 0.
$48=<axis mask> : default 0.
$49=<axis mask> : default 0.
Axis priority for homing lowest numbered executed first, number of available settings is same as number of supported axes. Replaces #define HOMING_CYCLE_0 etc.

$50=<float> : default plugin dependent.
Jogging step speed in mm/min. Not used by core, indended use by driver and/or sender. Senders may query this for keyboard jogging modified by CTRL key.

$51=<float> : default plugin dependent.
Jogging slow speed in mm/min. Not used by core, indended use by driver and/or sender. Senders may query this for keyboard jogging.

$52=<float> : default plugin dependent.
Jogging fast speed in mm/min. Not used by core, indended use by driver and/or sender. Senders may query this for keyboard jogging modified by SHIFT key.

$53=<float> : default plugin dependent.
Jogging step distance in mm. Not used by core, indended use by driver and/or sender. Senders may query this for keyboard jogging modified by CTRL key.

$54=<float> : default plugin dependent.
Jogging slow distance in mm. Not used by core, indended use by driver and/or sender. Senders may query this for keyboard jogging.

$55=<float> : default plugin dependent.
Jogging fast distance in mm. Not used by core, indended use by driver and/or sender. Senders may query this for keyboard jogging modified by SHIFT key.

$60=<boolean> : default 1 (on).
Restore default overrides when program ends. Replaces #define RESTORE_OVERRIDES_AFTER_PROGRAM_END.

$61=<boolean> : default 0 (off).
Ignore safety door signal when idle. If on only the spindle (laser) will be switched off. May be useful if positioning a laser head with the lid open is needed.

$62=<boolean> : default 0 (off).
Enable sleep function. Replaces #define SLEEP_ENABLE (ATMega port)

$63=<boolean> : default 0 (on).
Disable laser during hold. Replaces #define DISABLE_LASER_DURING_HOLD.

$64=<boolean> : default 0 (off).
Force grbl to enter alarm mode on startup. Replaces #define FORCE_INITIALIZATION_ALARM.

$65=<boolean> : default 0 (off).
Allow feed rate override during probing. Replaces #define ALLOW_FEED_OVERRIDE_DURING_PROBE_CYCLES.

Network settings:

$70=<mask> : default value driver dependent.
Network Services:

Bit 0: Telnet  
Bit 1: Websocket  
Bit 2: HTTP  
Bit 3: FTP  
Bit 4: DNS
Bit 5: mDNS
Bit 6: SSDP
Bit 7: WebDAV

$71=<string> : max 32 characters, default "GRBL".
Bluetooth device name.

$72=<string> : max 32 characters, default "GRBL serial port".
Bluetooth service name.

$73=<n> : Wifi Mode.

0: NULL  
1: STA - Station  
2: AP - Access Point  
3: APSTA - Access Point + Station

$74=<n> : max 64 characters, default typically empty.
WiFi STA (Station) SSID.

$75=<string> : max 32 characters, default typically empty.
WiFi STA (Station) password.

$76=<string> : max 64 characters, default typically provided by driver.
WiFi AP (Access Point) SSID.

$77=<string> : max 32 characters, default typically provided by driver. If blank then AP is "Open".
WiFi AP (Access Point) password.

$78=<string> : max 3 characters, default empty.
WiFi AP Country (Access Point).

$79=<n> : Default 0, range 0-11.
WiFi AP Channel (Access Point) password.

PID (closed loop control) settings

$80=<float> : default driver dependent.
Spindle PID regulator proportional gain. Usage is driver dependent.

$81=<float> : default driver dependent.
Spindle PID regulator integral gain. Usage is driver dependent.

$82=<float> : default driver dependent.
Spindle PID regulator derivative gain. Usage is driver dependent.

$84=<float> : default driver dependent.
Spindle PID max output error. Usage is driver dependent.

$85=<float> : default driver dependent.
Spindle PID regulator max integral error. Usage is driver dependent.

$90=<float> : default driver dependent.
Spindle synced motion PID regulator proportional gain. Usage is driver dependent.

$91=<float> : default driver dependent.
Spindle synced motion PID regulator integral gain. Usage is driver dependent.

$92=<float> : default driver dependent.
Spindle synced motion PID regulator derivative gain. Usage is driver dependent.

Network interface settings:

Up to three network interfaces can be configured using these settings (driver dependent).
Replace the x in the setting id with 0, 1 or 2 according to which interface to configure:

0: Usually WiFi Station or Ethernet interface.
1: Usually WiFi Access Point interface.
2: Usually Ethernet interface if three interfaces is available.

Refer to driver documentation for actual interface assignments.

$3x0=<string> : max 32 characters, default value driver dependent.
Hostname.

$3x1=<n> : Interface IP mode, default value driver dependent.

0: Static address.
1: DHCP supplied address.
2: Auto IP.

$3x2=<n> : Interface gateway address, default value driver dependent.
IPv4 or IPv6 address, up to 16 octets. May hold IPv4 address as either binary or text.

$3x3=<n> : Interface netmask, default value driver dependent.
IPv4 or IPv6 address, up to 16 octets. May hold IPv4 address as either binary or text.

$3x4=<n> : Interface netmask, default value 255.255.255.0.
IPv4 or IPv6 address, up to 16 octets. May hold IPv4 address as either binary or text.

$3x5=<n> : Telnet port, default value 23. Range 1 - 65536.
Port for serial communication, may be telnet protocol or a simple socket stream.

$3x6=<n> : HTTP port, default value 80. Range 1 - 65536.
Web server port.

$3x7=<n> : Websocket port, default value 81. Range 1 - 65536.
Port for two way communication, typically with web browser. Usually used for serial communication by grbl.

Spindle related settings:

$340=<n> : Spindle at speed tolerance, default 0 percent.
Available for drivers and plugins that supports spindle at speed functionality. If set to a value > 0 then alarm 14 will be issued if the spindle speed is not within tolerance during a timeout delay. The timeout delay defaults to 4 seconds and is currently set from the SAFETY_DOOR_SPINDLE_DELAY symbol.

Manual tool change settings:

Available for drivers that supports manual tool change. Requires machine to be homed. The controlled point (tool tip) will be moved to the original position after touch off for modes 1 - 3.

$TPW command is a shorthand for Tool Probe Workpiece. This command is only available in mode 1 and 2 and when a tool change is pending.

$341=<n> : Manual tool change mode, default value 0.

0: Normal. Manual tool change and touch off via jogging.
1: Manual touch off. Initial move to linear axis home position for tool change, manual or automatic touch off with $TPW command.
2: Manual touch off @ G59.3. Initial move to linear axis home position then to G59.3 position for tool change, manual or automatic touch off with $TPW command.
3: Manual touch off @ G59.3. Initial move to linear axis home position for tool change then to G59.3 position for automatic touch off.
4: Ignore M6.

Note: Mode 1 and 2 requires initial tool offset set when $TPW command is used for touch off. In mode 2 a successful touch off will automatically Note: Mode 3 requires initial tool offset set.

$342=<n> : Probing distance, default 30 mm.
Used in mode 1 and 2 when $TPW command is issued and in mode 3.

$343=<n> : Probing slow feed rate, default 25 mm/min.
Used in mode 1 and 2 when $TPW command is issued and in mode 3 to obtain an accurate tool offset.

$344=<n> : Probing seek feed rate, default 200 mm/min.
Used in mode 1 and 2 when $TPW command is issued and in mode 3 to obtain an initial tool offset. If successful tool is backed off a bit and probing is redone with the slow feed rate from $343.

$344=<n> : Probing seek feed rate, default 200 mm/min.


2023-04-22