Commit Graph

22 Commits

Author SHA1 Message Date
Sonny Jeon
bba633101a G28/G30 post move bug fix. Altered file permissions. 2012-11-25 22:02:33 -07:00
Sonny Jeon
d85238cc9b Homing search sequence now compile-time option. New defaults.h file. Tidying up.
- The homing sequence is now a compile-time option, where a user can
choose which axes(s) move in sequence during the search phase. Up to 3
sequences. Works with the locating phase and the pull-off maneuver.

- New defaults.h file to store user generated default settings for
different machines. Mainly to be used as a central repo, but each set
may be select to be compiled in as a config.h define.
2012-11-18 19:52:16 -07:00
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
Sonny Jeon
00fd09189d Housekeeping.
- Added some more notes to config.h.

- Added the ability to override some of the #defines around Grbl in
config.h, like planner buffer size, line buffer size, serial
send/receive buffers. Mainly to centralize the configurations to be
able to port to different microcontrollers later.
2012-11-08 19:23:47 -07:00
Sonny Jeon
4c711a4af7 New startup script setting. New dry run, check gcode switches. New system state variable. Lots of reorganizing.
(All v0.8 features installed. Still likely buggy, but now thourough
testing will need to start to squash them all. As soon as we're done,
this will be pushed to master and v0.9 development will be started.
Please report ANY issues to us so we can get this rolled out ASAP.)

- User startup script! A user can now save one (up to 5 as compile-time
option) block of g-code in EEPROM memory. This will be run everytime
Grbl resets. Mainly to be used as a way to set your preferences, like
G21, G54, etc.

- New dry run and check g-code switches. Dry run moves ALL motions at
rapids rate ignoring spindle, coolant, and dwell commands. For rapid
physical proofing of your code. The check g-code switch ignores all
motion and provides the user a way to check if there are any errors in
their program that Grbl may not like.

- Program restart! (sort of). Program restart is typically an advanced
feature that allows users to restart a program mid-stream. The check
g-code switch can perform this feature by enabling the switch at the
start of the program, and disabling it at the desired point with some
minimal changes.

- New system state variable. This state variable tracks all of the
different state processes that Grbl performs, i.e. cycle start, feed
hold, homing, etc. This is mainly for making managing of these task
easier and more clear.

- Position lost state variable. Only when homing is enabled, Grbl will
refuse to move until homing is completed and position is known. This is
mainly for safety. Otherwise, it will let users fend for themselves.

- Moved the default settings defines into config.h. The plan is to
eventually create a set of config.h's for particular as-built machines
to help users from doing it themselves.

- Moved around misc defines into .h files. And lots of other little
things.
2012-11-03 11:32:23 -06:00
Sonny Jeon
e0a9054e32 New report module. 6 persistent work coordinates. New G-codes and settings. README and minor bug updates
(NOTE: This push is likely buggy so proceed with caution. Just
uploading to let people know where we're going.)

- New report.c module. Moved all feedback functions into this module to
centralize these processes. Includes realtime status reports, status
messages, feedback messages.

- Official support 6 work coordinate systems (G54-G59), which are
persistently held in EEPROM memory.

- New g-code support: G28.1, G30.1 stores current machine position as a
home position into EEPROM. G10 L20 Px stores current machine position
into work coordinates without needing to explicitly send XYZ words.

- Homing performed with '$H' command. G28/G30 no longer start the
homing cycle. This is how it's supposed to be.

- New settings: Stepper enable invert and n_arc correction installed.

- Updated and changed up some limits and homing functionality. Pull-off
travel will now move after the homing cycle regardless of hard limits
enabled. Fixed direction of pull-off travel (went wrong way).

- Started on designing an internal Grbl command protocol based on the
'$' settings letter. Commands with non numeric characters after '$'
will perform switch commands, homing cycle, jogging, printing
paramters, etc. Much more to do here.

- Updated README to reflect all of the new features.
2012-11-01 09:37:27 -06:00
Sonny Jeon
065ceceb34 New alarm method. Re(re)organized status messages.
- Installed a new 'alarm' method to centralize motion kills across
alarm or reset events. Right now, this is controlled by system abort
and hard limits. But, in the future, a g-code parser error may call
this too as a safety feature.

- Re(re)organized status messages to just print all errors, regardless
from where it was called. This centralizes them into one place.

- Misc messages method installed for any user feedback that is not a
confirmation or error. Mainly so that there is a place to perform
warnings and such.

- New stuff installed and still made the flash size smaller by saving
flash space from clearing out repeated '\r\n' pgmstrings.

- Fixed a bug where hard limits message would print everytime a system
abort was sent.
2012-10-21 19:18:24 -06:00
Sonny Jeon
39e11b696f Hard limits code minor updates.
- Fixed a bug that would not disable the steppers if a user issues a
system abort during a homing cycle.

- Updated the hard limit interrupt to be more correct and to issue a
shutdown for the right situations when the switch has been triggered.

- Added a status message to indicate to the user what happened and what
to do upon a hard limit trigger.
2012-10-18 21:29:07 -06:00
Sonny Jeon
df5bb70b25 Hard limits, homing direction, pull-off limits after homing, status reports in mm or inches, system alarm, and more.
- Thank you statement added for Alden Hart of Synthetos.

- Hard limits option added, which also works with homing by pulling off
the switches to help prevent unintended triggering. Hard limits use a
interrupt to sense a falling edge pin change and immediately go into
alarm mode, which stops everything and forces the user to issue a reset
(Ctrl-x) or reboot.

- Auto cycle start now a configuration option.

- Alarm mode: A new method to kill all Grbl processes in the event of
something catastrophic or potentially catastropic. Just works with hard
limits for now, but will be expanded to include g-code errors (most
likely) and other events.

- Updated status reports to be configurable in inches or mm mode. Much
more to do here, but this is the first step.

- New settings: auto cycle start, hard limit enable, homing direction
mask (which works the same as the stepper mask), homing pulloff
distance (or distance traveled from homed machine zero to prevent
accidental limit trip).

- Minor memory liberation and calculation speed ups.
2012-10-16 21:29:45 -06:00
Sonny Jeon
34f6d2eb4b Minor updates, improvements, and bug fixes.
- Allowed status_message function to be called by others. This is to
centralize all feedback into protocol.c.

- Fixed a bug where line number words 'N' were causing the parser to
error out.

- Allowed homing routine feed rates to move slower than the
MINIMUM_STEP_RATE parameter in config.h.

- Homing performs idle lock at the end of the routine.

- Stepper idle lock time will now not disable the steppers when the
value is set at 255. This is accomodate users who prefer to keep their
axes enabled at all times.

- Moved some defines around to where they need to be.
2012-10-13 13:11:43 -06:00
Sonny Jeon
d8ca4176bf Homing stepper enable bit fix. 2012-10-11 00:06:52 -06:00
Sonny Jeon
32963289fe Homing direction pin bits fixed. Lite refactoring of settings. 2012-10-10 18:01:43 -06:00
Sonny Jeon
4c6f5bec48 Improved homing cycle. New settings: homing enable/rates, debounce and step idle lock time.
- Homing cycle will now cycle twice (spec more/less in config) to
improve repeatability and accuracy by decreasing overshoot.

- New Grbl settings added: Enable/disable homing cycles, homing seek
and feed rates, switch debounce delay, and stepper idle lock time.

- Please note that these settings may change upon the next push, since
there will be more added soon. Grbl *should* not re-write your old
settings, just re-write the new ones. So, make sure you keep these
written down somewhere in case they get lost from a code bug.

- Refactored settings migration to be a little smaller and managable
going forward.
2012-10-09 22:01:10 -06:00
Sonny Jeon
6506b7a338 Fixed an issue with leaving the limit switches during a homing cycle. 2012-10-08 17:39:53 -06:00
Sonny Jeon
ff82489da7 Limit pin internal pull-resistors enabled. Re-wrote read_double() function. Correctly changed all 'double's to 'float's.
- Limit pin internal pull-resistors now enabled. Normal high operation.
This will be the standard going forward.

- Updated all of the 'double' variable types to 'float' to reflect what
happens when compiled for the Arduino. Also done for compatibility
reasons to @jgeisler0303 's Grbl simulator code.

- G-code parser will now ignore 'E' exponent values, since they are
reserved g-code characters for some machines. Thanks @csdexter!

- The read_double() function was re-written and optimized for use in
Grbl. The strtod() avr lib was removed.
2012-10-08 15:57:58 -06:00
Sonny Jeon
d30cb906f8 Updated limit/homing routine. Works, but needs more TLC.
- Added acceleration to the homing routine.

- Homing now accounts for different step rates when moving multiple
axes without exceeding acceleration limits.

- Homing now updates all internal positioning variables to machine zero
after completion.

- "Poor-man's" debounce delay added.

- Updated the delay_us() function to perform faster and more accurate
microsecond delays. Previously, the single increments would add
noticeable time drift for larger delays.

- Fix a bug in the stepper.c prescalar calculations that was changed in
the last commit.

- Other minor fixes.
2012-09-30 19:57:10 -06:00
Sonny Jeon
1720484d76 No changes. Github commit bug. 2012-06-27 07:06:24 -06:00
Sonny Jeon
86cdae0060 Minor updates.
- Updated makefile to be more universally compatible by not requiring
grep or ruby.

- Edited XON/XOFF flow control usage, noting that FTDI-based Arduinos
are known to work, but not Atmega8U2-based Arduino. Still officially
not supported, but added for advanced users.

- Minor edits.
2012-03-05 12:01:02 -07:00
Sonny Jeon
567fbf93ed G54 work coordinate support (w/ G10,G92.1). Re-factored g-code parser with error checking. Minor compiler compatibility changes.
- G54 work coordinate system support. Up to 6 work coordinate systems
(G54-G59) available as a compile-time option.

- G10 command added to set work coordinate offsets from machine
position.

- G92/G92.1 position offsets and cancellation support. Properly follows
NIST standard rules with other systems.

- G53 absolute override now works correctly with new coordinate systems.

- Revamped g-code parser with robust error checking. Providing user
feedback with bad commands. Follows NIST standards.

- Planner module slightly changed to only expected position movements
in terms of machine coordinates only. This was to simplify coordinate
system handling, which is done solely by the g-code parser.

- Upon grbl system abort, machine position and work positions are
retained, while G92 offsets are reset per NIST standards.

- Compiler compatibility update for _delay_us().

- Updated README.
2012-02-11 11:59:35 -07:00
Sonny Jeon
89a3b37e02 Extended position reporting with both home and work coordinates. Home position now retained after reset. Other minor changes/fixes.
- Grbl now tracks both home and work (G92) coordinate systems and does
live updates when G92 is called.
- Rudimentary home and work position status reporting. Works but still
under major construction.
- Updated the main streaming script. Has a disabled periodic timer for
querying status reports, disabled only because the Python timer doesn't
consistently restart after the script exits. Add here only for user
testing.
- Fixed a bug to prevent an endless serial_write loop during status
reports.
- Refactored the planner variables to make it more clear what they are
and make it easier for clear them.
2012-01-10 08:34:54 -07:00
Sonny Jeon
03e2ca7cd5 Initial v0.8 ALPHA commit. Features multi-tasking run-time command execution (feed hold, cycle start, reset, status query). Extensive re-structuring of code for future features.
- ALPHA status. - Multitasking ability with run-time command executions
for real-time control and feedback. - Decelerating feed hold and resume
during operation. - System abort/reset, which immediately kills all
movement and re-initializes grbl. - Re-structured grbl to easily allow
for new features: Status reporting, jogging, backlash compensation. (To
be completed in the following releases.) - Resized TX/RX serial buffers
(32/128 bytes) - Increased planner buffer size to 20 blocks. - Updated
documentation.
2011-12-08 18:47:48 -07:00
Simen Svale Skogsrud
d5d6298de3 added support for limit switches and homing action 2011-02-20 00:29:56 +01:00