Commit Graph

69 Commits

Author SHA1 Message Date
Sonny Jeon
1720484d76 No changes. Github commit bug. 2012-06-27 07:06:24 -06:00
Sonny Jeon
b51e902530 Program stop support (M0,M1*,M2,M30*), proper position retainment upon reset, misc minor updates.
- Program stop support (M0,M1*,M2,M30*). *Optional stop to be done.
*Pallet shuttle not supported.

- Work position is set equal to machine position upon reset, as
according to NIST RS274-NGC guidelines. G92 is disabled.

- Renamed mc_set_current_position() to mc_set_coordinate_offset().

- Fixed bug in plan_synchronize(). Would exit right before last step is
finished and caused issues with program stops. Now fixed.

- Spindle now stops upon a run-time abort command.

- Updated readme and misc upkeeping.
2012-01-28 20:41:08 -07:00
Sonny Jeon
d27dd13a54 Fix bug with premature step end. Refactored _delay_ms() and square() for better portability.
- Fixed a premature step end bug dating back to Simen's 0.7b edge
version is fixed, from which this code is forked from. Caused by Timer2
constantly overflowing calling the Step Reset Interrupt every 128usec.
Now Timer2 is always disabled after a step end and should free up some
cycles for the main program. Could be more than one way to fix this
problem. I'm open to suggestions.

- _delay_ms() refactored to accept only constants to comply with
current compilers. square() removed since not available with some
compilers.
2012-01-15 18:25:12 -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
e8a6bfd179 Position reporting, refactored system variables, serial print fixes, updated streaming scripts.
- Added machine position reporting to status queries. This will be
further developed with part positioning/offsets and maintaining
location upon reset.

- System variables refactored into a global struct for better
readability.

- Removed old obsolete Ruby streaming scripts. These were no longer
compatible. Updated Python streaming scripts.

- Fixed printFloat() and other printing functions.

- Decreased planner buffer back to 18 blocks and increased TX serial
buffer to 64 bytes. Need the memory space for future developments.

- Begun adding run-time modes to grbl, where block delete toggle, mm/in
reporting modes, jog modes, etc can be set during runtime. Will be
fleshed out and placed into EEPROM when everything is added.
2012-01-06 10:10:41 -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
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