Skip to content

First Run Grbl Settings

Terje edited this page Feb 25, 2021 · 3 revisions

First Run Grbl Settings

When a grblHAL build is ready to test, a few changes to the Grbl Settings may be needed.

Input Controls

Standard Grbl inputs are Safety Door, EStop, Cycle Start and Feed Hold. These are typically controlled by switches. In order to encourage good anti-EMI practice, they default to Normally Closed (NC) inputs. This means that grblHAL sees an unconnected pin as "on" and performs the input pin's intended action. With EStop, for example, grblHAL will enter the EStop Alarm State. This prevents grblHAL from accepting all but a few commands.

To resolve this and allow grblHAL to not start in the Alarm state, there are three options.

  • Install NC switches on the 4 inputs

  • Jumper the input pins to ground (0v)

  • Invert the input pins in the $14 Grbl Setting, a standard Grbl bitfield. Set the following bits:

    • Feed Hold - Bit 1 (+2)
    • Cycle Start - Bit 2 (+4)
    • Safety Door - Bit 3 (+8)
    • EStop - Bit 6 (+64)

    Adding these together gives the decimal value setting of $14. In a terminal application talking directly to grblHAL, one enters $14=78 (2+4+8+64).

Note that Safety Door is often disabled in the default builds.

Limit Switches

While these are unlikely to interfere with first tests, they too are NC inputs to encourage good anti-EMI practice. There are similar options to the above shown input controls. The bit fields in the $5 Grbl Setting are assigned as

  • X Limit - Bit 0 (+1)
  • Y Limit - Bit 1 (+2)
  • Z Limit - Bit 2 (+4)
  • and so on

To invert Limit Pins on a 5 Axis machines, one enters $5=31 (1+2+4+8+16) in a terminal application talking directly to grblHAL

Stepper Driver Enables

Depending on the how the stepper driver pins are set up and what the stepper driver expects, you may need to invert the step enable pins via the $4 Grbl Setting. A common problem stemming from this is the stepper motors do not run when commanded. If the target hardware has a single enable for all stepper drivers, $4=1 inverts all of them. If the target hardware has individual step enables for each stepper driver, you will need to use bit field assignments in $4.

  • Axis X - Bit 0 (+1)
  • Axis Y - Bit 1 (+2)
  • Axis Z - Bit 2 (+4)
  • and so on

To invert all Step Enable pins in a 5 Axis machine, one enters $4=31 (1+2+4+8+16) in a terminal application talking directly to grblHAL.

Clone this wiki locally