Setting up the software for GRBL

Motor tuning

In this tab you can configure all the parameters so that your stepper motors run smoothly.

[X,Y,Z] Acceleration, mm/sec^2

This sets the axes acceleration parameters in mm/second/second. Simplistically, a lower value makes Grbl ease slower into motion, while a higher value yields tighter moves and reaches the desired feed rates much quicker. Much like the max rate setting, each axis has its own acceleration value and are independent of each other. This means that a multi-axis motion will only accelerate as quickly as the lowest contributing axis can.

Again, like the max rate setting, the simplest way to determine the values for this setting is to individually test each axis with slowly increasing values until the motor stalls. Then finalize your acceleration setting with a value 10-20% below this absolute max value. This should account for wear, friction, and mass inertia. We highly recommend that you dry test some G-code programs with your new settings before committing to them. Sometimes the loading on your machine is different when moving in all axes together.

[X,Y,Z] Max rate, mm/min

This sets the maximum rate each axis can move. Whenever Grbl plans a move, it checks whether or not the move causes any one of these individual axes to exceed their max rate. If so, it'll slow down the motion to ensure none of the axes exceed their max rate limits. This means that each axis has its own independent speed, which is extremely useful for limiting the typically slower Z-axis.

The simplest way to determine these values is to test each axis one at a time by slowly increasing max rate settings and moving it. For example, to test the X-axis, send Grbl something like G0 X50 with enough travel distance so that the axis accelerates to its max speed. You'll know you've hit the max rate threshold when your steppers stall. It'll make a bit of noise, but shouldn't hurt your motors. Enter a setting a 10-20% below this value, so you can account for wear, friction, and the mass of your workpiece/tool. Then, repeat for your other axes.

NOTE: This max rate setting also sets the G0 seek rates.

[X,Y,Z] steps/mm

Grbl needs to know how far each step will take the tool in reality. To calculate steps/mm for an axis of your machine you need to know:

  • The mm traveled per revolution of your stepper motor. This is dependent on your belt drive gears or lead screw pitch.

  • The full steps per revolution of your steppers (typically 200)

  • The microsteps per step of your controller (typically 1, 2, 4, 8, or 16). Tip: Using high microstep values (e.g., 16) can reduce your stepper motor torque, so use the lowest that gives you the desired axis resolution and comfortable running properties.

The steps/mm can then be calculated like this:

steps_per_mm = (steps_per_revolution * microsteps) / mm_per_rev

Compute this value for every axis and write these settings to Grbl.

Step pulse, microseconds

Stepper drivers are rated for a certain minimum step pulse length. Check the data sheet or just try some numbers. You want the shortest pulses the stepper drivers can reliably recognize. If the pulses are too long, you might run into trouble when running the system at very high feed and pulse rates, because the step pulses can begin to overlap each other. We recommend something around 10 microseconds, which is the default value.

Step idle delay, milliseconds

Every time your steppers complete a motion and come to a stop, Grbl will delay disabling the steppers by this value. OR, you can always keep your axes enabled (powered so as to hold position) by setting this value to the maximum 255 milliseconds. Again, just to repeat, you can keep all axes always enabled by setting $1=255.

The stepper idle lock time is the time length Grbl will keep the steppers locked before disabling. Depending on the system, you can set this to zero and disable it. On others, you may need 25-50 milliseconds to make sure your axes come to a complete stop before disabling. This is to help account for machine motors that do not like to be left on for long periods of time without doing something. Also, keep in mind that some stepper drivers don't remember which micro step they stopped on, so when you re-enable, you may witness some 'lost' steps due to this. In this case, just keep your steppers enabled via $1=255.

Step port invert

This setting inverts the step pulse signal. By default, a step signal starts at normal-low and goes high upon a step pulse event. After a step pulse time set by his value, the pin resets to low, until the next step pulse event. When inverted, the step pulse behavior switches from normal-high, to low during the pulse, and back to high. Most users will not need to use this setting, but this can be useful for certain CNC-stepper drivers that have peculiar requirements. For example, an artificial delay between the direction pin and step pulse can be created by inverting the step pin.

Direction port invert

This setting inverts the direction signal for each axis. By default, Grbl assumes that the axes move in a positive direction when the direction pin signal is low, and a negative direction when the pin is high. Often, axes don't move this way with some machines. This setting will invert the direction pin signal for those axes that move the opposite way.

This invert mask setting works exactly like the step port invert mask and stores which axes to invert as bit flags. To configure this setting, you simply need to send the value for the axes you want to invert.

Step enable invert

By default, the stepper enable pin is high to disable and low to enable. If your setup needs the opposite, just invert the stepper enable pin by select "Invert" option. (May need a power cycle to load the change.)

Spindle

The spindle setup page contains settings for the main spindle in your machine. The spindle is a spindle with PWM control, also you can setup to switch the spindle on/off. In this case, setup Min.Speed and Max.Speed with the same value.

Max speed, RPM

This sets the spindle speed for the maximum 5V PWM pin output. For example, if you want to set 10000rpm at 5V, set 10000. For 255rpm at 5V, set 255. If a program tries to set a higher spindle RPM greater than the max value spindle speed, Grbl will just output the max 5V, since it can't go any faster. By default, Grbl linearly relates the max-min RPMs to 5V-0.02V PWM pin output in 255 equally spaced increments. When the PWM pin reads 0V, this indicates spindle disabled. Note that there are additional configuration options are available in config.h to tweak how this operates.

Min speed, RPM

This sets the spindle speed for the minimum 0.02V PWM pin output (0V is disabled). Lower RPM values are accepted by Grbl but the PWM output will not go below 0.02V, except when RPM is zero. If zero, the spindle is disabled and PWM output is 0V.

Laser mode

When enabled, Grbl will move continuously through consecutive G1, G2, or G3 motion commands when programmed with a S spindle speed (laser power). The spindle PWM pin will be updated instantaneously through each motion without stopping. Please read the GRBL laser documentation and your laser device documentation prior to using this mode. Lasers are very dangerous. They can instantly damage your vision permanantly and cause fires. Grbl does not assume any responsibility for any issues the firmware may cause, as defined by its GPL license.

When disabled, Grbl will operate as it always has, stopping motion with every S spindle speed command. This is the default operation of a milling machine to allow a pause to let the spindle change speeds.


1% Speed, 10% Speed

This say the increment to use in the Run / Manual Control tab when you click on overrides panel.

Commands

The commands setup page contains you will can customize the gcode commands that will be executed when press the buttons in UltimateCNC interface. Also, if you need, you can use semicolon to execute multiple commands.


If you don't know Gcode language, don't worry about it, because by default, the UltimateCNC come in with a common gcode commands preconfigured. But, for advanced user than he wants high level of customitzation using UltimateCNC he will can.

Commands

Virtual Homing

This feature allow configure your home position in machine coordinates when your machine haven't switch limits installed.

UltimateCNC will read the current machine position and throw alarm when detect that your machine is out of limits. The position is allways saved in your computer when the software is closed. Later, when start the UltimateCNC will put your machine in 0 position. If the software is closed incorrectly or forced to close, UltimateCNC automatically will disable the Virtual Homming.

We recommend use this feature with caution.

To enable this feature you need follow this instructions:

  • Move axes X,Y to the coordinates that you want at position 0,0

  • Move axis Z to max. top.

  • Press SET ORIGIN button.

  • Configure the machine position: topRight, topLeft, ...

  • Configure width (x) of the cnc machine

  • Configure height (y) of the cnc machine

  • Configure depth (z) of the cnc machine

  • Press ON in toogleButton to enable

  • Restart the UltimateCNC

The width, height and depth is configured in GRBL Settings:

When you start the UltimateCNC with Virtual Homing enabled it show you a confirmation to start the Homing cycle:

Virtual Homing is great feature, but we recommend that you install switch limits in your machine because it is the correct way to protect your machine. If you have bad configuration of stepper motors or Grbl lose steps, Virtual Homing will not be able protect your machine.

Virtual Homing is useful when you need have you machine referenced to a origin point, but you shouldn't use it if you want to safe your machine.