Wykres commitów

37 Commity (015d5fa19105f90694ca46986fa264893bc7155a)

Autor SHA1 Wiadomość Data
Sonny Jeon 50fbc6e297 Refactoring and lots of bug fixes. Updated homing cycle.
WARNING: There are still some bugs to be worked out. Please use caution
if you test this firmware.

- Feed holds work much better, but there are still some failure
conditions that need to be worked out. This is the being worked on
currently and a fix is planned to be pushed next.

- Homing cycle refactoring: Slight adjustment of the homing cycle to
allow for limit pins to be shared by different axes, as long as the
shared limit pins are not homed on the same cycle. Also, removed the
LOCATE_CYCLE portion of the homing cycle configuration. It was
redundant.

- Limit pin sharing: (See above). To clear up one or two limit pins for
other IO, limit pins can now be shared. For example, the Z-limit can be
shared with either X or Y limit pins, because it’s on a separate homing
cycle. Hard limit will still work exactly as before.

- Spindle pin output fixed. The pins weren’t getting initialized
correctly.

- Fixed a cycle issue where streaming was working almost like a single
block mode. This was caused by a problem with the spindle_run() and
coolant_run() commands and issuing an unintended planner buffer sync.

- Refactored the cycle_start, feed_hold, and other runtime routines
into the runtime command module, where they should be handled here
only. These were redundant.

- Moved some function calls around into more appropriate source code
modules.

- Fixed the reporting of spindle state.
2014-02-09 10:46:34 -07:00
Sonny Jeon cc9afdc195 Lots of re-organization and cleaning-up. Some bug fixes.
- Added a new source and header file called system. These files contain
the system commands and variables, as well as all of the system headers
and standard libraries Grbl uses. Centralizing some of the code.

- Re-organized the include headers throughout the source code.

- ENABLE_M7 define was missing from config.h. Now there.

- SPINDLE_MAX_RPM and SPINDLE_MIN_RPM now defined in config.h. No
uncommenting to prevent user issues. Minimum spindle RPM now provides
the lower, near 0V, scale adjustment, i.e. some spindles can go really
slow so why use up our 256 voltage bins for them?

- Remove some persistent variables from coolant and spindle control.
They were redundant.

- Removed a VARIABLE_SPINDLE define in cpu_map.h that shouldn’t have
been there.

- Changed the DEFAULT_ARC_TOLERANCE to 0.002mm to improve arc tracing.
Before we had issues with performance, no longer.

- Fixed a bug with the hard limits and the software debounce feature
enabled. The invert limit pin setting wasn’t honored.

- Fixed a bug with the homing direction mask. Now is like it used to
be. At least for now.

- Re-organized main.c to serve as only as the reset/initialization
routine. Makes things a little bit clearer in terms of execution
procedures.

- Re-organized protocol.c as the overall master control unit for
execution procedures. Not quite there yet, but starting to make a
little more sense in how things are run.

- Removed updating of old settings records. So many new settings have
been added that it’s not worth adding the code to migrate old user
settings.

- Tweaked spindle_control.c a bit and made it more clear and consistent
with other parts of Grbl.

- Tweaked the stepper disable bit code in stepper.c. Requires less
flash memory.
2014-01-10 20:22:10 -07:00
Sonny Jeon f10bad43b2 Minor bug fixes: Homing travel calculations. Cycle resuming after spindle and dwell commands.
- Homing travel calculations fixed. It was computing the min travel
rather than max.

- Auto-start disable and pausing after spindle or dwell commands.
Related to plan_synchronize() function call. Now fixed, but still need
to work on the system state.

- Pushed a fix to make this branch more Arduino IDE compatible. Removed
extern call in nuts_bolts.c

- Updated the stepper configuration option of enabling or disabling the
new Adaptive Multi-Axis Step Smoothing Algorithm. Now works either way.

- Updated some copyright info.
2013-12-30 22:02:05 -07:00
Sonny Jeon 903b462b2e Merge branch 'dev' of https://github.com/grbl/grbl into dev
Conflicts:
	limits.c
2013-12-29 20:34:51 -07:00
Sonny Jeon b36e30de2e Yet another major stepper algorithm and planner overhaul.
- Overhauled the stepper algorithm and planner again. This time
concentrating on the decoupling of the stepper ISR completely. It is
now dumb, relying on the segment generator to provide the number of
steps to execute and how fast it needs to go. This freed up lots of
memory as well because it made a lot tracked variables obsolete.

- The segment generator now computes the velocity profile of the
executing planner block on the fly in floating point math, instead of
allowing the stepper algorithm to govern accelerations in the previous
code. What this accomplishes is the ability and framework to (somewhat)
easily install a different physics model for generating a velocity
profile, i.e. s-curves.

- Made some more planner enhancements and increased efficiency a bit.

- The changes also did not increase the compiled size of Grbl, but
decreased it slightly as well.

- Cleaned up a lot of the commenting.

- Still much to do, but this push works and still is missing feedholds
(coming next.)
2013-11-22 17:35:58 -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
Jens Geisler ea09ddba99 changed atomic access for updating the acceleration profile
the stepper interrupt is only halted when necessary and for the shortest
time possible (8% cycle time)
2013-02-22 16:36:27 +01:00
Jens Geisler dba26eff91 implemented a mixture of Sonny's MATLAB and my previous grbl planner
ontop of the edge planner
examples run byte for byte identical old and new version
2013-02-20 14:56:47 +01:00
Sonny Jeon bba633101a G28/G30 post move bug fix. Altered file permissions. 2012-11-25 22:02:33 -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 9cabc915ef Runtime command pinned out! Re-organized coolant pins.
- Pinned out cycle start(A2), feed hold(A1), and reset(A0) runtime
commands. These pins are held high with the internal pull-up resistor
enabled. All you have to do is connect a normally-open switch to the
pin and ground. That's it.

- Moved the coolant control pins to A3 (and the optional mist control
to A4).

- Moved all of the MASK defines into the config.h file to centralize
them.
2012-11-04 10:48:57 -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 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 1720484d76 No changes. Github commit bug. 2012-06-27 07:06:24 -06:00
Sonny Jeon e9b28279db Spindle DDR pins init minor fix. 2012-02-12 11:02:23 -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
Simen Svale Skogsrud d5d6298de3 added support for limit switches and homing action 2011-02-20 00:29:56 +01:00
Simen Svale Skogsrud 6dc81b41c9 formatting + moved current position getter to planner 2011-02-11 00:44:18 +01:00
Simen Svale Skogsrud a4c64945e0 refactored stepper_plan -> planner (untested) 2011-02-11 00:34:53 +01:00
Simen Svale Skogsrud 52dda8713e purged an unused method 2011-02-06 23:41:04 +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 0be21a9034 eliminated an annoying constant that broke my cleanly layered abstractions 2011-01-14 16:56:44 +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 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 2be1f473cd first stab at replacing step-buffering with line-buffering 2010-03-02 21:46:51 +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 e257fc195c support for helical motion 2009-02-11 00:37:33 +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 05bacc436e optimized for size, shaved 2k 2009-02-08 21:22:54 +01:00
Simen Svale Skogsrud 50a9f78088 lots and lots of bugfixes after running on reals hardware for the first time 2009-02-03 09:56:45 +01:00
Simen Svale Skogsrud a9d41c6c64 tweaks and bugfixes 2009-01-29 09:58:29 +01:00
Simen Svale Skogsrud ac2e26fda9 added buffered stepping support and the rudiments of the arc-interpolator 2009-01-28 23:48:21 +01:00