Go to file
Sonny Jeon 559feb97e2 Re-factored system states and alarm management. Serial baud support greater than 57600.
- Refactored system states to be more clear and concise. Alarm locks
processes when position is unknown to indicate to user something has
gone wrong.

- Changed mc_alarm to mc_reset, which now manages the system reset
function. Centralizes it.

- Renamed '$X' kill homing lock to kill alarm lock.

- Created an alarm error reporting method to clear up what is an alarm:
message vs a status error: message. For GUIs mainly. Alarm codes are
negative. Status codes are positive.

- Serial baud support upto 115200. Previous baudrate calc was unstable
for 57600 and above.

- Alarm state locks out all g-code blocks, including startup scripts,
but allows user to access settings and internal commands. For example,
to disable hard limits, if they are problematic.

- Hard limits do not respond in an alarm state.

- Fixed a problem with the hard limit interrupt during the homing
cycle. The interrupt register is still active during the homing cycle
and still signal the interrupt to trigger when re-enabled. Instead,
just disabled the register.

- Homing rate adjusted. All axes move at homing seek rate, regardless
of how many axes move at the same time. This is unlike how the stepper
module does it as a point to point rate.

- New config.h settings to disable the homing rate adjustment and the
force homing upon powerup.

- Reduced the number of startup lines back down to 2 from 3. This
discourages users from placing motion block in there, which can be very
dangerous.

- Startup blocks now run only after an alarm-free reset or after a
homing cycle. Does not run when $X kill is called. For satefy reasons
2012-11-14 17:36:29 -07:00
doc No changes. Github commit bug. 2012-06-27 07:06:24 -06:00
script No changes. Github commit bug. 2012-06-27 07:06:24 -06:00
.gitignore Ignore dependency files 2012-11-05 22:55:49 +01:00
config.h Re-factored system states and alarm management. Serial baud support greater than 57600. 2012-11-14 17:36:29 -07:00
coolant_control.c Minor prescalar optimization. Changed up some defines. 2012-09-21 17:55:02 -06:00
coolant_control.h Added coolant control (M7*, M8, M9). Mist control can be enabled via config.h. 2012-09-21 11:14:13 -06:00
COPYING No changes. Github commit bug. 2012-06-27 07:06:24 -06:00
eeprom.c formatting 2011-01-31 23:04:39 +01:00
eeprom.h No changes. Github commit bug. 2012-06-27 07:06:24 -06:00
gcode.c Re-factored system states and alarm management. Serial baud support greater than 57600. 2012-11-14 17:36:29 -07:00
gcode.h Tweaks. Seek rate updates when set. CCW arc full circle fix. 2012-11-10 12:49:33 -07:00
limits.c Re-factored system states and alarm management. Serial baud support greater than 57600. 2012-11-14 17:36:29 -07:00
limits.h Housekeeping. 2012-11-08 19:23:47 -07:00
main.c Re-factored system states and alarm management. Serial baud support greater than 57600. 2012-11-14 17:36:29 -07:00
Makefile Generate header dependencies and use them in Makefile 2012-11-05 22:54:53 +01:00
motion_control.c Re-factored system states and alarm management. Serial baud support greater than 57600. 2012-11-14 17:36:29 -07:00
motion_control.h Re-factored system states and alarm management. Serial baud support greater than 57600. 2012-11-14 17:36:29 -07:00
nuts_bolts.c Re-factored system states and alarm management. Serial baud support greater than 57600. 2012-11-14 17:36:29 -07:00
nuts_bolts.h Re-factored system states and alarm management. Serial baud support greater than 57600. 2012-11-14 17:36:29 -07:00
planner.c Tweaks and minor bug fixes. Added purge buffer command. 2012-11-04 08:44:54 -07:00
planner.h Housekeeping. 2012-11-08 19:23:47 -07:00
print.c New startup script setting. New dry run, check gcode switches. New system state variable. Lots of reorganizing. 2012-11-03 11:32:23 -06:00
print.h Limit pin internal pull-resistors enabled. Re-wrote read_double() function. Correctly changed all 'double's to 'float's. 2012-10-08 15:57:58 -06:00
protocol.c Re-factored system states and alarm management. Serial baud support greater than 57600. 2012-11-14 17:36:29 -07:00
protocol.h Housekeeping. 2012-11-08 19:23:47 -07:00
readme.textile Tweaks and minor bug fixes. Added purge buffer command. 2012-11-04 08:44:54 -07:00
report.c Re-factored system states and alarm management. Serial baud support greater than 57600. 2012-11-14 17:36:29 -07:00
report.h Re-factored system states and alarm management. Serial baud support greater than 57600. 2012-11-14 17:36:29 -07:00
serial.c Re-factored system states and alarm management. Serial baud support greater than 57600. 2012-11-14 17:36:29 -07:00
serial.h Re-factored system states and alarm management. Serial baud support greater than 57600. 2012-11-14 17:36:29 -07:00
settings.c Re-factored system states and alarm management. Serial baud support greater than 57600. 2012-11-14 17:36:29 -07:00
settings.h More tweaks. Removed dry run. Trimmed all messages to save flash space. 2012-11-07 20:53:03 -07:00
spindle_control.c New startup script setting. New dry run, check gcode switches. New system state variable. Lots of reorganizing. 2012-11-03 11:32:23 -06:00
spindle_control.h Added block delete, opt stop, single block mode. New parser state and parameter feedback. Overhauled '$' command. 2012-11-01 19:48:55 -06:00
stepper.c Housekeeping. 2012-11-08 19:23:47 -07:00
stepper.h Housekeeping. 2012-11-08 19:23:47 -07:00

h1. Grbl - An embedded g-code interpreter and motion-controller for the Arduino/AVR328 microcontroller
    
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. 

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 more than 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. Functions and variables are not currently supported, but may be included in future releases in a form of a pre-processor.

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.8 from v0.7:*
  - *BETA status: _Under development but nearing completion. Code state may change with each push as new features are integrated or when bugs are squashed._*
  - Major structural overhaul to allow for multi-tasking events and new feature sets.
  - Run-time command control: Feed hold (pause), Cycle start (resume), Reset (abort), Status reporting
  - Controlled feed hold with deceleration to ensure no skipped steps and loss of location.
  - After feed hold, cycle accelerations are re-planned and may be resumed.
  - Advanced homing cycle with direction and speed configuration options. (Requires limit switches.) When enabled, homing is required before use to ensure safety.
  - Limit pins are held normal high with internal pull-up resistors. Wiring only requires a normally-open switch connected to ground. (For both ends of an axis, simply wire two in parallel into the same pin.)
  - Hard limits option and plays nice with homing cycle, so switches can be used for both homing and hard limits.
  - New switch commands: Dry-run, block delete, single block mode, optional stop. A check g-code switch has also been added to allow users to error check their programs. This feature can also be used as a "program restart" by enabling the check g-code switch, begin streaming, and disable the check g-code switch at the desired point with minimal additional g-code.
  - Re-factored g-code parser with robust error-checking.
  - 6 work coordinate systems (G54-G59), offsets(G92), and machine coordinate system support. Work coordinate systems are stored in EEPROM and persistent.
  - G10 L2 and L20 work coordinate settings support. L2 sets one or more axes values. L20 sets the current machine position to the specified work origin.
  - G28.1 and G30.1 set home position support. These set the internal EEPROM parameter values to the current machine position. (G28 and G30 no longer perform homing cycle, '$H' does. They move to these stored positions.)
  - Program stop(M0,M1,M2,M30) support.
  - Coolant control(M7*,M8,M9) support. (M7 is a compile-time option).
  - System reset re-initializes grbl without resetting the Arduino and retains machine/home position and work coordinates.
  - Settings overhauled and dozens of new settings and internal commands are now available, when most were compile-time only.
  - New startup line setting. Allows users to store a custom g-code block into Grbl's startup routine. Executes immediately upon startup or reset. May be used to set g-code defaults like G20.
  - Misc bug fixes and removed deprecated acceleration enabled code.  
  - Advanced compile-time options: XON/XOFF flow control (limited support), direction and step pulse time delay, and up to 5 startup lines.
  

*Important note for Atmega 168 users:* Going forward, support for Atmega 168 will be dropped due to its limited memory and speed. However, legacy Grbl v0.51 "in the branch called 'v0_51' is still available for use.

_The project was initially inspired by the Arduino GCode Interpreter by Mike Ellery_