Go to file
Sonny Jeon 1fd45791a5 Minor updates to line number feature.
- Changed line number integer types from unsigned to signed int32.
G-code mandates values cannot exceed 99999. Negative values can be used
to indicate certain modes.

- Homing cycle line number changed to -1, as an indicator.

- Fixed a reporting define for the spindle states that was broken by
the last merge.
2014-02-19 07:48:09 -07:00
doc Merge branch 'dev_2' into dev 2013-10-29 19:10:39 -06:00
script No changes. Github commit bug. 2012-06-27 07:06:24 -06:00
sim changed atomic access for updating the acceleration profile 2013-02-22 16:36:27 +01:00
.gitignore Acceleration independence installed. Initial re-work of planner for feedrate overrides. 2012-12-14 08:27:02 -07:00
config.h Minor updates to line number feature. 2014-02-19 07:48:09 -07:00
coolant_control.c Refactoring and lots of bug fixes. Updated homing cycle. 2014-02-09 10:46:34 -07:00
coolant_control.h Lots of re-organization and cleaning-up. Some bug fixes. 2014-01-10 20:22:10 -07:00
COPYING G28/G30 post move bug fix. Altered file permissions. 2012-11-25 22:02:33 -07:00
cpu_map.h Refactoring and lots of bug fixes. Updated homing cycle. 2014-02-09 10:46:34 -07:00
defaults.h Lots of re-organization and cleaning-up. Some bug fixes. 2014-01-10 20:22:10 -07:00
eeprom.c G28/G30 post move bug fix. Altered file permissions. 2012-11-25 22:02:33 -07:00
eeprom.h Merge branch 'dev_2' into dev 2013-10-29 19:10:39 -06:00
gcode.c Minor updates to line number feature. 2014-02-19 07:48:09 -07:00
gcode.h Refactoring and lots of bug fixes. Updated homing cycle. 2014-02-09 10:46:34 -07:00
limits.c Minor updates to line number feature. 2014-02-19 07:48:09 -07:00
limits.h Refactoring and lots of bug fixes. Updated homing cycle. 2014-02-09 10:46:34 -07:00
main.c Refactoring and lots of bug fixes. Updated homing cycle. 2014-02-09 10:46:34 -07:00
Makefile Lots of re-organization and cleaning-up. Some bug fixes. 2014-01-10 20:22:10 -07:00
motion_control.c Minor updates to line number feature. 2014-02-19 07:48:09 -07:00
motion_control.h Minor updates to line number feature. 2014-02-19 07:48:09 -07:00
nuts_bolts.c Lots of re-organization and cleaning-up. Some bug fixes. 2014-01-10 20:22:10 -07:00
nuts_bolts.h Lots of re-organization and cleaning-up. Some bug fixes. 2014-01-10 20:22:10 -07:00
planner.c Minor updates to line number feature. 2014-02-19 07:48:09 -07:00
planner.h Minor updates to line number feature. 2014-02-19 07:48:09 -07:00
print.c Lots of re-organization and cleaning-up. Some bug fixes. 2014-01-10 20:22:10 -07:00
print.h Minor bug fixes: Homing travel calculations. Cycle resuming after spindle and dwell commands. 2013-12-30 22:02:05 -07:00
protocol.c Homing and feed hold bug fixes. 2014-02-15 13:13:46 -07:00
protocol.h Refactoring and lots of bug fixes. Updated homing cycle. 2014-02-09 10:46:34 -07:00
README.md Refactoring and lots of bug fixes. Updated homing cycle. 2014-02-09 10:46:34 -07:00
report.c Minor updates to line number feature. 2014-02-19 07:48:09 -07:00
report.h New build info feature. (per @Analogreality request) 2014-01-05 10:27:34 -07:00
serial.c Lots of re-organization and cleaning-up. Some bug fixes. 2014-01-10 20:22:10 -07:00
serial.h Lots of re-organization and cleaning-up. Some bug fixes. 2014-01-10 20:22:10 -07:00
settings.c Lots of re-organization and cleaning-up. Some bug fixes. 2014-01-10 20:22:10 -07:00
settings.h Homing and feed hold bug fixes. 2014-02-15 13:13:46 -07:00
spindle_control.c Homing and feed hold bug fixes. 2014-02-15 13:13:46 -07:00
spindle_control.h Lots of re-organization and cleaning-up. Some bug fixes. 2014-01-10 20:22:10 -07:00
stepper.c Commenting updates. Minor bug fix with exit of soft limit event. 2014-02-19 07:21:40 -07:00
stepper.h Refactoring and lots of bug fixes. Updated homing cycle. 2014-02-09 10:46:34 -07:00
system.c Commenting updates. Minor bug fix with exit of soft limit event. 2014-02-19 07:21:40 -07:00
system.h Commenting updates. Minor bug fix with exit of soft limit event. 2014-02-19 07:21:40 -07:00

#Grbl

This branch serves only as a developmental platform for working on new ideas that may eventually be installed into Grbl's edge branch. Please do not use as there is no guarantee this code base is up-to-date or working.


Grbl is a no-compromise, high performance, low cost alternative to parallel-port-based motion control for CNC milling. It will run on a vanilla Arduino (Duemillanove/Uno) as long as it sports an Atmega 328. (Other AVR CPUs are unofficially supported as well.)

The controller is written in highly optimized C utilizing every clever feature of the AVR-chips to achieve precise timing and asynchronous operation. It is able to maintain up to 30kHz of stable, jitter free control pulses.

It accepts standards-compliant G-code and has been tested with the output of several CAM tools with no problems. Arcs, circles and helical motion are fully supported, as well as, other basic functional g-code commands. Although canned cycles, functions, and variables are not currently supported (may in the future), GUIs can be built or modified easily to translate to straight g-code for Grbl.

Grbl includes full acceleration management with look ahead. That means the controller will look up to 18 motions into the future and plan its velocities ahead to deliver smooth acceleration and jerk-free cornering.

##Changelog for v0.9 from v0.8

  • ALPHA status: Under heavy development.
  • New stepper algorithm: Complete overhaul of the handling of the stepper driver to simplify and reduce task time per ISR tick. Much smoother operation with the new Adaptive Multi-Axis Step Smoothing (AMASS) algorithm which does what its name implies. Users should audibly hear significant differences in how their machines move and see improved overall performance!
  • Planner optimizations: Planning computations improved four-fold or more by optimizing end-to-end operations. Changes include streaming optimizations by ignoring already optimized blocks and removing redundant variables and computations and offloading them to the stepper algorithm to compute on an ad-hoc basis.
  • Planner stability: Previous Grbl planners have all had a corruption issue in rare circumstances that becomes particularly problematic at high step frequencies and when jogging. The new planner is robust and incorruptible, meaning that we can fearlessly drive Grbl to it's highest limits. Combined with the new stepper algorithm and planner optimizations, this means 5x to 10x performance increases in our testing! This is all achieved through the introduction of an intermediary step segment buffer that "checks-out" steps from the planner buffer in real-time.
  • Acceleration independence: Each axes may be defined with different acceleration parameters and Grbl will automagically calculate the maximum acceleration through a path depending on the direction traveled. This is very useful for machine that have very different axes properties, like the ShapeOko z-axis.
  • Maximum velocity independence: As with acceleration, the maximum velocity of individual axes may be defined. All seek/rapids motions will move at these maximum rates, but never exceed any one axes. So, when two or more axes move, the limiting axis will move at its maximum rate, while the other axes are scaled down.
  • Significantly improved arc performance: Arcs are now defined in terms of chordal tolerance, rather than segment length. Chordal tolerance will automatically scale all arc line segments depending on arc radius, such that the error does not exceed the tolerance value (default: 0.002 mm.) So, for larger radii arcs, Grbl can move faster through them, because the segments are always longer and the planner has more distance to plan with.
  • Soft limits: Checks if any motion command exceeds workspace limits. Alarms out when found. Another safety feature, but, unlike hard limits, position does not get lost, as it forces a feed hold before erroring out.
  • CPU pin mapping: In an effort for Grbl to be compatible with other AVR architectures, such as the 1280 or 2560, a new cpu_map.h pin configuration file has been created to allow Grbl to be compiled for them. This is currently user supported, so your mileage may vary. If you run across a bug, please let us know or better send us a fix! Thanks in advance!
  • New Grbl SIMULATOR by @jgeisler: A completely independent wrapper of the Grbl main source code that may be compiled as an executable on a computer. No Arduino required. Simply simulates the responses of Grbl as if it was on an Arduino. May be used for many things: checking out how Grbl works, pre-process moves for GUI graphics, debugging of new features, etc. Much left to do, but potentially very powerful, as the dummy AVR variables can be written to output anything you need.
  • Homing routine updated: Sets workspace volume in all negative space regardless of limit switch position. Common on pro CNCs. Now tied directly into the main planner and stepper modules to reduce flash space and allow maximum speeds during seeking.
  • Combined limit pins capability: Limit switches can be combined to share the same pins to free up precious I/O pins for other purposes. When combined, users must adjust the homing cycle mask in config.h to not home the axes on a shared pin at the same time.
  • Variable spindle speed output: Available only as a compile-time option through the config.h file. Enables PWM output for 'S' g-code commands. Enabling this feature will swap the Z-limit D11 pin and spindle enable D12 pin to access the hardware PWM on pin D12. The Z-limit pin, now on D12, should work just as it did before.
  • Increased serial baud rate: Default serial baudrate is now 115200, because the new planner and stepper allows much higher processing and execution speeds that 9600 baud was just not cutting it.
  • Feedrate overrides: (Slated for v1.0 release) The framework to enable feedrate overrides is in-place with v0.9, but the minor details has not yet been installed.
  • Jogging controls: (Slated for v1.0 release) Methodology needs to be to figured out first. Could be dropped due to flash space concerns.

The project was initially inspired by the Arduino GCode Interpreter by Mike Ellery