Commit Graph

10 Commits

Author SHA1 Message Date
Sonny Jeon
3054b2df77 Revamped homing cycle. Axis limits and max travel bug fixes. Build info. Refactored config.h.
- Revamped and improved homing cycle. Now tied directly into the main
planner and stepper code, which enables much faster homing seek rates.
Also dropped the compiled flash size by almost 1KB, meaning 1KB more
for other features.

- Refactored config.h. Removed obsolete defines and configuration
options. Moved lots of “advanced” options into the advanced area of the
file.

- Updated defaults.h with the new homing cycle. Also updated the
Sherline 5400 defaults and added the ShapeOko2 defaults per user
submissions.

- Fixed a bug where the individual axes limits on velocity and
acceleration were not working correctly. Caused by abs() returning a
int, rather than a float. Corrected with fabs(). Duh.

- Added build version/date to the Grbl welcome message to help indicate
which version a user is operating on.

- Max travel settings were not being defaulted into the settings EEPROM
correctly. Fixed.

- To stop a single axis during a multi-axes homing move, the stepper
algorithm now has a simple axis lock mask which inhibits the desired
axes from moving. Meaning, if one of the limit switches engages before
the other, we stop that one axes and keep moving the other.
2013-12-10 22:33:06 -07:00
Sonny Jeon
b562845d9d Deceleration to zero speed improvements. Update defaults.
- A minor issue with deceleration ramps when close to zero velocity.
Should be virtually unnoticeable for most CNC systems, but fixed in
this push and accurate to physics.

- Updated some of the junction deviation defaults. Because the new
stepper algorithm can easily maximize a CNC machine’s capabilities or
simply go much faster, this means the speed in which it enters
junctions has to be a little more constrained. Meaning that, we have to
slow a little bit down more so that we don’t exceed the acceleration
limits of the stepper motors.
2013-12-07 20:08:24 -07:00
Sonny Jeon
a87f25773c Pushed limits active high option. Updated defaults.h. Misc bug fixes. Cleaned up codebase.
- Pushed limit switch active high option (i.e. NC switches).

- Updated defaults.h to be in-line with the new settings.

- Refactored feed hold handling and step segment buffer to be more
generalized in effort to make adding feedrate overrides easier in the
future. Also made it a little more clean.

- Fixed G18 plane select issue. Now ZX-plane, rather than XZ-plane, per
right hand rule.

- Cleaned some of the system settings by more accurately renaming some
of the variables and removing old obsolete ones.

- Declared serial.c rx_buffer_tail to be volatile. No effect, since
avr-gcc automatically does this during compilation. Helps with porting
when using other compilers.

- Updated version number to v0.9b.

- Updates to README.md
2013-12-07 08:40:25 -07:00
Sonny Jeon
4f9bcde40e Merge branch 'dev_2' into dev
Conflicts:
README.md
gcode.c
motion_control.c
planner.c
planner.h
protocol.c
report.c
settings.c
settings.h
stepper.c
stepper.h
2013-10-29 19:10:39 -06:00
Sonny Jeon
3dfffa622d Arc mm_per_segment removed, now in terms of tolerance. Stepper ramp counter variable type corrected.
- Arc mm_per_segment parameter was removed and replaced with an
arc_tolerance parameter, which scales all arc segments automatically to
radius, such that the line segment error doesn't exceed the tolerance.
Significantly improves arc performance through larger radius arc,
because the segments are much longer and the planner buffer has more to
work with.

- Moved n_arc correction from the settings to config.h. Mathematically
this doesn't need to be a setting anymore, as the default config value
will work for all known CNC applications. The error does not accumulate
as much anymore, since the small angle approximation used by the arc
generation has been updated to a third-order approximation and how the
line segment length scale with radius and tolerance now. Left in
config.h for extraneous circumstances.

- Corrected the st.ramp_count variable (acceleration tick counter) to a
8-bit vs. 32-bit variable. Should make the stepper algorithm just a
touch faster overall.
2012-12-19 17:30:09 -07:00
Sonny Jeon
3082fdbb6d Planner execution time halved and bug fixes. Increased step rate limit to 30kHz.
- Planner execute speed has been more than halved from 4ms to 1.9ms
when computing a plan for a single line segment during arc generation.
This means that Grbl can now run through an arc (or complex curve)
twice as fast as before without starving the buffer. For 0.1mm arc
segments, this means about the theoretical feed rate limit is about
3000mm/min for arcs now.

- Increased the Ranade timer frequency to 30kHz, as there doesn't seem
to be any problems with increasing the frequency. This means that the
maximum step frequency is now back at 30kHz.

- Added Zen Toolworks 7x7 defaults.
2012-12-10 18:50:18 -07:00
Sonny Jeon
9ba117c1bb New stepper algorithm. Optimized planner.
- Brand-new stepper algorithm. Based on the Pramod Ranade inverse time
algorithm, but modified to ensure step events are exact. Currently
limited to about 15kHz step rates, much more to be done to enable 30kHz
again.

- Removed Timer1. Stepper algorithm now uses Timer0 and Timer2.

- Much improved step generation during accelerations. Smoother. Allows
much higher accelerations (and speeds) than before on the same machine.

- Cleaner algorithm that is more easily portable to other CPU types.

- Streamlined planner calculations. Removed accelerate_until and
final_rate variables from block buffer since the new stepper algorithm
is that much more accurate.

- Improved planner efficiency by about 15-20% during worst case
scenarios (arcs).

- New config.h options to tune new stepper algorithm.
2012-12-08 15:00:58 -07:00
Sonny Jeon
9e0ce55dbc Updated interface protocol. Fixed M2 bug.
- Updated interface protocol to play nicer with interface programs. All
Grbl responses beginning with '$' signifies a setting. Bracketed '[]'
responses are feedback messages containing either state, parameter, or
general messages. Chevron '<>' response are from the real-time status
messages, i.e. position.

- M2 Program end command was causing a system alarm. Fixed. Thanks
@blinkenlight !
2012-11-19 17:39:40 -07:00
Sonny Jeon
b3f5536530 Updated readme 2012-11-18 21:03:58 -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