Commit Graph

63 Commits

Author SHA1 Message Date
Sonny Jeon
9141ad2825 Third time's a charm! No more deceleration issues! Updated grbl version and settings. General cleanup.
- Fleshed out the original idea to completely remove the long slope at
the end of deceleration issue. This third time should absolutely
eliminate it.
- Changed the acceleration setting to kept as mm/min^2 internally,
since this was creating unneccessary additional computation in the
planner. Human readable value kept at mm/sec^2.
- Updated grbl version 0.7d and settings version to 4. NOTE: Please
check settings after update. These may have changed, but shouldn't.
- Before updating the new features (pause, e-stop, federate override,
etc), the edge branch will soon be merged with the master, barring any
immediate issues that people may have, and the edge branch will be the
testing ground for the new grbl version 0.8.
2011-10-11 20:51:04 -06:00
Sonny Jeon
2be0d66872 Fixed long slope at deceleration issue. Moved things into config.h. New MINIMUM_PLANNER_SPEED parameter.
- The long standing issue of a long slope at deceleration is likely
fixed. The stepper program was not tracking and timing the end of
acceleration and start of deceleration exactly and now is fixed to
start and stop on time. Also, to ensure a better acceleration curve fit
used by the planner, the stepper program delays the start of the
accelerations by a half trapezoid tick to employ the midpoint rule. -
Settings version 3 migration (not fully tested, but should work) -
Added a MINIMUM_PLANNER_SPEED user-defined parameter to planner to let
a user change this if problems arise for some reason. - Moved all
user-definable #define parameters into config.h with clear comments on
what they do and recommendations of how to change them. - Minor
housekeeping.
2011-09-24 07:46:41 -06:00
Sonny J
6de805441f Fixed minor bugs in planner. Increased max dwell time. Long slope bug stop-gap solution note.
- Fixed the planner TODO regarding minimum nominal speeds. Re-arranged
calculations to be both more efficient and guaranteed to be greater
than zero. - Missed a parenthesis location on the rate_delta
calculation. Should fix a nearly in-perceptible issue with incorrect
acceleration ramping in diagonal directions. - Increased maximum dwell
time from 6.5sec to an 18hour max. A crazy amount more, but that's how
the math works out. - Converted the internal feedrate values to mm/min
only, as it was switching between mm/min to mm/sec and back to mm/min.
Also added a feedrate > 0 check in gcode.c. - Identified the long slope
at the end of rapid de/ac-celerations noted by stephanix. Problem with
the numerical integration truncation error between the exact solution
of estimate_acceleration_distance and how grbl actually performs the
acceleration ramps discretely. Increasing the
ACCELERATION_TICKS_PER_SECOND in config.h helps fix this problem.
Investigating further.
2011-09-18 05:36:55 -06:00
Sonny J
110faae986 More '%' modulo opertor removals and some housecleaning.
- Serial functions contained quite a few modulo operations that would
be executed with high frequency when streaming. AVR processors are very
slow when operating these. In one test on the Arduino forums, it showed
about a 15x slow down compared to a simple if-then statement. -
Clarified some variable names and types and comments.
2011-09-15 20:32:15 -06:00
Sonny J
4d03c4febc Further planner improvements and misc minor bug fixes. Memory savings and increased buffer size.
- Update grbl version and settings version to automatically reset
eeprom. FYI, this will reset your grbl settings. - Saved
3*BLOCK_BUFFER_SIZE doubles in static memory by removing obsolete
variables: speed_x, speed_y, and speed_z. - Increased buffer size
conservatively to 18 from 16. (Probably can do 20). - Removed expensive!
modulo operator from block indexing function. Reduces significant
computational overhead. - Re-organized some sqrt() calls to be more
efficient during time critical planning cases, rather than non-time
critical. - Minor bug fix in planner max junction velocity logic. -
Simplified arc logic and removed need to multiply for CW or CCW
direction.
2011-09-13 21:57:16 -06:00
Sonny J
ffcc3470a3 Optimized planner re-write. Significantly faster. Full arc support enabled by rotation matrix approach.
- Significant improvements in the planner. Removed or reordered
repetitive and expensive calculations by order of importance:
recalculating unchanged blocks, trig functions [sin(), cos(), tan()],
sqrt(), divides, and multiplications. Blocks long enough for nominal
speed to be guaranteed to be reached ignored by planner. Done by
introducing two uint8_t flags per block. Reduced computational overhead
by an order of magnitude.   - Arc motion generation completely
re-written and optimized. Now runs with acceleration planner. Removed
all but one trig function (atan2) from initialization. Streamlined
computations. Segment target locations generated by vector
transformation and small angle approximation. Arc path correction
implemented for accumulated error of approximation and single precision
calculation of Arduino. Bug fix in message passing.
2011-09-06 19:39:14 -06:00
Simen Svale Skogsrud
c0b4b8309a cleaned up serial completing support for non blocking tx and refactoring formatting functions into a new module 'print' 2011-06-03 15:28:14 +02:00
Simen Svale Skogsrud
defabc80ed renamed wiring_serial to serial to reflect its complete remake 2011-05-31 22:45:38 +02:00
Simen Svale Skogsrud
60f417b570 fixed a double rounding error compensation bug in mc_arc thanks to Etienne Chové 2011-02-23 20:06:55 +01:00
Simen Svale Skogsrud
2c913a00bd acceleration-Grbl now works with atmega 168 by disabling arc motion 2011-02-20 22:13:31 +01:00
Simen Svale Skogsrud
6edbbe322c lowercased boolean constants 2011-02-18 23:04:12 +01:00
Simen Svale Skogsrud
ff73645a14 cleanup, protected some more module variables as static 2011-02-12 00:03:58 +01:00
Simen Svale Skogsrud
33f014aa74 eliminated an abstraction violation where motion_control needed position information from the planner (untested) 2011-02-11 23:01:16 +01:00
Simen Svale Skogsrud
480f898c2b eliminated the mc_line-method and replaced it with a macro forwarding calls directly to the planner (untested) 2011-02-11 00:53:00 +01:00
Simen Svale Skogsrud
6dc81b41c9 formatting + moved current position getter to planner 2011-02-11 00:44:18 +01:00
Simen Svale Skogsrud
07f8623098 smoothed a wrinkle 2011-02-11 00:36:40 +01:00
Simen Svale Skogsrud
a4c64945e0 refactored stepper_plan -> planner (untested) 2011-02-11 00:34:53 +01:00
Simen Svale Skogsrud
c42741032f Refactored line buffering to eliminate state from motion control and centralize tracking of position. UNTESTED: NEEDS TESTING 2011-02-06 23:23:34 +01:00
Simen Svale Skogsrud
cdcc7bf86e cleaned up methods for enabling/disabling acceleration manger 2011-02-06 22:25:01 +01:00
Simen Svale Skogsrud
6d3ff506e8 refactored compile time settings back into a new file called config.h 2011-02-05 00:55:37 +01:00
Simen Svale Skogsrud
d00947a23a renamed config.* to settings.* 2011-02-05 00:45:41 +01:00
Simen Svale Skogsrud
f4b9da1ecb acceleration management is disabled during arc-motions until the two can be made to play nice together 2011-02-03 13:12:47 +01:00
Simen Svale Skogsrud
4b63cf3ab5 small fixes after testing on real hardware. Still no chaining of motions and something odd with arcs 2011-02-03 10:42:00 +01:00
Simen Svale Skogsrud
dad9db1b02 formatting 2011-01-31 23:19:51 +01:00
Simen Svale Skogsrud
4dbe7c4833 added high-level api-call for enabling or disabling the acceleration manager 2011-01-25 22:44:46 +01:00
Simen Svale Skogsrud
49a16cb777 refactored block buffer into separate module motion_plan pending the addition of the actual look ahead planner 2011-01-14 16:45:18 +01:00
Simen Svale Skogsrud
b628a4aabf added basic accelleration management with trapezoid accelleration profiles but no look ahead optimization (coming next patch) 2011-01-14 12:10:18 +01:00
Simen Svale Skogsrud
e0f3dcbe43 stepper.c now has 90% of acelleration support built in except for the planner, still som known conflicts to mark rough spots that need attention later 2011-01-03 00:36:33 +01:00
Simen Svale Skogsrud
703d812b85 rough accelleration stuff 2010-06-28 23:29:58 +02:00
Simen Svale Skogsrud
b8ba8a4231 Added runtime configurable global settings with eeprom persitence 2010-03-07 20:29:18 +01:00
Simen Svale Skogsrud
58ad1ba509 minor edits after verifying refactored grbl on real hardware 2010-03-04 21:18:55 +01:00
Simen Svale Skogsrud
e8f94e6a87 removed void credits 2010-03-03 17:53:46 +01:00
Simen Svale Skogsrud
898b4ca99d further refactoring debris extraction 2010-03-03 17:52:56 +01:00
Simen Svale Skogsrud
7e152851cc general clean up after refactoring 2010-03-03 13:04:51 +01:00
Simen Svale Skogsrud
49ca861dc0 added segmented arc support with configurable segmentation 2010-03-03 01:39:44 +01:00
Simen Svale Skogsrud
df243d2490 successfully maintained 30khz, lots of optimization of code and buffering allocation 2010-03-03 00:26:48 +01:00
Simen Svale Skogsrud
2be1f473cd first stab at replacing step-buffering with line-buffering 2010-03-02 21:46:51 +01:00
Simen Svale Skogsrud
36fd3a9bfb improved the serial protocol, added some debug pins for a while 2010-03-02 08:19:21 +01:00
Simen Svale Skogsrud
a42c03601d Fixed a number of bugs caused by using abs() on floats and long ints. Added support for selectively inverting bits of the stepping port. Debugged, optimized and cleaned up timing code for the step-pulses. 2010-02-27 19:55:09 +01:00
Simen Svale Skogsrud
6ac3b3f2e6 added some gcode to test with 2010-01-07 23:14:29 +01:00
Simen Svale Skogsrud
960444fb97 fixed feed rate calculation 2010-01-06 00:23:28 +01:00
Simen Svale Skogsrud
ed400693b3 fixed feed rate calculation 2010-01-06 00:23:07 +01:00
Simen Svale Skogsrud
2bd984a734 configurations and adjustments to protocol 2009-02-15 12:56:07 +01:00
Simen Svale Skogsrud
bf38fae67b minor edits 2009-02-11 09:28:40 +01:00
Simen Svale Skogsrud
e257fc195c support for helical motion 2009-02-11 00:37:33 +01:00
Simen Svale Skogsrud
8f3a69b37e edit 2009-02-09 20:54:03 +01:00
Simen Svale Skogsrud
c2981be94a added code to estimate steps in arc in order to support helical motion 2009-02-09 15:47:51 +01:00
Simen Svale Skogsrud
2992683c8d optimized for size and did some housekeeping 2009-02-08 22:08:27 +01:00
Simen Svale Skogsrud
05bacc436e optimized for size, shaved 2k 2009-02-08 21:22:54 +01:00
Simen Svale Skogsrud
c07a322589 fixed buffering of pace changes and general cleaning 2009-02-08 20:40:24 +01:00