Wykres commitów

367 Commity (e7cd94e2bc7640137567e0cabd89c871fd22d8bf)

Autor SHA1 Wiadomość Data
Sonny Jeon e7cd94e2bc Merge pull request #318 from EliteEng/dev
PWM Spindle Control and Invert Spindle & Coolant Pins
2014-01-02 16:56:02 -08:00
Rob Brown ce5f94d675 Update spindle_control.c
Updated spindle_control.c due to compile error.
2014-01-03 07:42:22 +08:00
Sonny Jeon f8dd8fa54d Fix for M7/8/9 modal group checks. Updated AMASS frequency cutoffs and code cleaned.
- Updated Grbl version to 0.9c and build number.

- G-code parser was missing modal group violation checks for M7/8/9
commands. Added them.

- Updated the Adaptive Multi-Axis Step Smoothing (AMASS) cutoff
frequencies so that the trade between the 16-bit Timer1 accuracy and
the level step smoothing are somewhat better balanced. (Smoothing isn’t
free, but a higher accuracy timer would provide high cutoff
frequencies.)
2014-01-02 12:12:35 -07:00
Rob Brown c0381799eb PWM Spindle Control and Invert Spindle & Coolant Pins
PWM Spindle Control and Invert Spindle & Coolant Pins
2014-01-02 12:42:22 +08: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 47cd40c8dc Incomplete push but working. Lots more stuff. More to come.
- NEW! An active multi-axis step smoothing algorithm that automatically
adjusts dependent on step frequency. This solves the long standing
issue to aliasing when moving with multiple axes. Similar in scheme to
Smoothieware, but more advanced in ensuring a more consistent CPU
overhead throughout all frequencies while maintaining step exactness.

- Switched from Timer2 to Timer0 for the Step Port Reset Interrupt.
Mainly to free up hardware PWM pins.

- Seperated the direction and step pin assignments, so we can now move
them to seperate ports. This means that we can more easily support 4+
axes in the future.

- Added a setting for inverting the limit pins, as so many users have
request. Better late than never.

- Bug fix related to EEPROM calls when in cycle. The EEPROM would kill
the stepper motion. Now protocol mandates that the system be either in
IDLE or ALARM to access or change any settings.

- Bug fix related to resuming the cycle after a spindle or dwell
command if auto start has been disabled. This fix is somewhat temporary
or more of a patch. Doesn’t work with a straight call-response
streaming protocol, but works fine with serial buffer pre-filling
streaming that most clients use.

- Renamed the pin_map.h to cpu_map.h to more accurately describe what
the file is.

- Pushed an auto start bug fix upon re-initialization.

- Much more polishing to do!
2013-12-30 18:44:46 -07:00
Sonny Jeon 5ab2bb7767 Incomplete dev code push, but working. Lots of updates/fixes/improvements. Much still to polish.
- Ugh. Github just erased my list of improvements and changes due to a
conflict and forcing me to resolve it. Hope this goes through.

- Major stepper algorithm change. Trashed the old v0.9 edge
branch-style stepper algorithm. It’s fine, but it was susceptible to
aliasing noise when moving very slow or very fast. It also had a bit of
CPU overhead. It was written to solve a standing issue with v0.8
master, where it couldn’t generate a smooth acceleration abocve
10-15kHz. But, with new step segment buffer in v0.9c, it inadvertently
fixed the acceleration problem with v0.8 stepper algorithm. So, what
does it mean for you? Smoother stepper pulses and likely higher step
frequencies.

- Stepper algorithm now uses Timer1 and Timer2, instead of Timer0 and
Timer2. Timers 0 and 2 can be swapped if there is an issue.

- With the old v0.8 stepper algorithm, the STEP_DELAY_PULSE
configuration option is also back.

- NEW! Hard limit software debouncing. Grbl now employs the AVR’s
watchdog timer as a way to monitor the hard limit pins and checking
their states after a delay. This is a simple software debouncing
technique and may help alleviate some of the false trigger some users
have been complaining about. BUT, this won’t fix electric noise issues!

- Fixed an issue with the new homing cycle routine where it wasn’t
honoring the acceleration and axis speed limits depending on the homing
cycle mask. Now does. Also, updated the homing direction mask code to
be a little cleaner.

- Moved the main part of the homing cycle control and execution to
motion_control.c, where it fits better.

- Removed the STATE_INIT system state as it was redundant. Made the
system states into bitflags so multiple system states can be checked
via one if statement.

- Reorganized the power-up routine to work with the new system states.
2013-12-29 20:51:48 -07:00
Sonny Jeon bfb8639606 Merge branch 'dev' of https://github.com/grbl/grbl into dev
Conflicts:
	limits.c
2013-12-29 20:36:00 -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 8550d2c3f9 Merge pull request #312 from scottrcarlson/dev
Fixed homing_dir_mask functionality in the re-written homing_cycle.
2013-12-27 12:26:27 -08:00
Scott R Carlson eefc25be91 Hard Limits configured for active high.
Added the use of homing_dir_mask to homing_cycle
2013-12-27 15:09:00 -05:00
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 2f6663a0b9 Reinstated feed holds into new stepper algorithm and planner. Rough draft, but working.
- Reinstated the feed hold feature with the new stepper algorithm and
new optimized planner. It works, but will be re-factored a bit soon to
clean up the code.

- At this point, feedrate overrides may need to be installed in the
v1.0 version of grbl, while this version will likely be pushed to the
edge branch soon and pushed to master after the bugs have been squashed.

- Measured the overall performance of the new planner and stepper
algorithm on an oscilloscope. The new planner is about 4x faster than
before, where it is completing a plan in around 1ms. The stepper
algorithm itself is minutely faster, as it is a little lighter. The
trade-off in the increased planner performance comes from the new step
segment buffer. However, even in the worse case scenario, the step
segment buffer generates a new segment with a typical 0.2 ms, and the
worse case is 1ms upon a new block or replanning the active block.
Added altogether, it’s argubly still twice as efficient as the old one.
2013-12-04 21:49:24 -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 2eb5acaa33 Another merge fix. 2013-10-29 19:43:40 -06:00
Sonny Jeon b8f0a2399e Merge fixes. 2013-10-29 19:28:44 -06:00
Sonny Jeon 4402a9f74a 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:12:09 -06: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 0ac6c87196 Planner function call fix. More clean up. 2013-10-29 18:55:55 -06:00
Sonny Jeon 27297d444b Updated comments. Changed stepper variable names to be more understandable. Added step locking note.
- Updated config comments and stepper code comments for the new changes.

- Changed stepper algorithm variable names to be more understandable in
what they actually do.

- Added a stepper lock note in default.h per user request.

- Started some code layout in handling feed holds and refactoring the
homing routine to use the main stepper algorithm instead of a seperate
version.
2013-10-29 08:31:48 -06:00
Sonny Jeon f7429ec79b Cleaned up stepper and planner code.
- Added some compile-time error checking. Will add more in future
pushes to ensure settings are correct and within parameters that won't
break anything.

- Pushed some master branch changes with MEGA pin settings.

- Cleaned up planner code and comments to clarify some of the new
changes. Still much to do here.

- Cleaned up the new stepper code. May need to abstract some of the
segment buffer more to fix the feed holds (and integrate homing into
the main stepper routine). With what's planned, this should make the
stepper algorithm easier to attach other types of processes to it,
where it is now tightly integrated with the planner buffer and nothing
else.
2013-10-24 22:12:13 -06:00
Sonny Jeon 0cb5756b53 Fine tuning of new stepper algorithm with protected planner. Adaptive step prediction for segment buffer.
- Cleaned up the new stepper algorithm code with more commenting and
better logic flow.

- The new segment buffer now predicts the number of steps each segment
should have to execute over about 8 milliseconds each (based on the
ACCELERATION_TICKS_PER_SECOND setting). So, for when the whole segment
buffer is full, the stepper algorithm has roughly 40 milliseconds of
steps queued before it needs to refilled by the main program.

- Readjusted the max supported step rate back to 30kHz from the lower
development 20kHz. Everything still works amazing great and the test
CNC machine still runs twice as fast with the new stepper algorithm and
planner.

- Upped the standard serial baudrate to 115200 baud, as it is clear
that the bottleneck is the serial interface. Will now support this, as
well as the old 9600 baud, in new firmware builds.
2013-10-14 21:21:56 -06:00
Sonny Jeon 8a10654b1c New stepper subsystem bug fixes.
- New stepper algorithm with the new optimized planner seems to be
working nearly twice as fast as the previous algorithm.

- For one, the planner computation overhead is probably a fraction of
what it used to be with the worst case being about half still.

- Secondly, anytime the planner plans back to the first executing
block, it no longer overwrites the block conditions and allows it to
complete without lost steps. So no matter if the streams slows, the
protected planner should keep the steppers moving without risk of lost
steps (although this still needs to be tested thoroughly and may
audibly sound weird when this happens.)

- It now seems that the bottleneck is the serial baudrate (which is
good!)
2013-10-12 10:35:26 -06:00
Sonny Jeon 805f0f219c Protected buffer works! Vast improvements to planner efficiency. Many things still broken with overhaul.
Development push. Lots still broken.

- Protected planner concept works! This is a critical precursor to
enabling feedrate overrides in allowing the planner buffer and the
stepper execution operate atomically. This is done through a
intermediary segment buffer.

- Still lots of work to be done, as this was a complete overhaul of the
planner and stepper subsystems. The code can be cleaned up quite a bit,
re-enabling some of the broken features like feed holds, and finishing
up some of the concepts

- Pushed some of the fixes from the master and edge branch to here, as
this will likely replace the edge branch when done.
2013-10-09 09:33:22 -06:00
Sonny Jeon 7a175bd2db Push old dev_2 draft to work on other things.
- **NON-FUNCTIONAL**
- Contains an old draft of separating the stepper driver direct access
to the planner buffer. This is designed to keep the stepper and planner
modules independent and prevent overwriting or other complications. In
this way, feedrate override should be able to be installed as well.
- A number of planner optimizations are installed too.
- Not sure where the bugs are. Either in the new planner optimizations,
new stepper module updates, or in both. Or it just could be that the
Arduino AVR is choking with the new things it has to do.
2013-08-19 09:24:22 -06:00
Sonny Jeon 1fa3dad206 Updates to edge/dev. Line buffer increased/planner buffer decreased. Line overflow feedback.
- Increased g-code parser line buffer to 70 characters (from 50) to
prevent some long arc commands from getting truncated.

- Decreased planner buffer from 18 to 17 blocks to free up memory for
line buffer.

- Added a line buffer overflow feedback error (Thanks @BHSPitMonkey!)
2013-04-05 09:21:52 -06:00
Sonny Jeon 08baabc63c Minor updates to code and commenting. 2013-03-28 10:11:41 -06:00
Sonny Jeon 49f703bb2c Update README.md 2013-03-22 08:45:46 -06:00
Sonny Jeon 3c9c516a47 Untested! Soft limits, max travel, homing changes, new settings.
- WARNING: Completely untested. Will later when there is time. Settings
WILL be overwritten, as there are new settings.

- Soft limits installed. Homing must be enabled for soft limits to work
correctly. Errors out much like a hard limit, locking out everything
and bringing up the alarm mode. Only difference is it forces a feed
hold before doing so. Position is not lost.

- IMPORTANT: Homing had to be updated so that soft limits work better
with less CPU overhead. When homing completes, all axes are assumed to
exist in negative space. If your limit switch is other side, the homing
cycle with set this axis location to the max travel value, rather than
zero.

- Update mc_line() to accept an array, rather than individual variables.

- Added an mc_auto_cycle_start() function handle this feature.
Organization only.

-
2013-03-21 19:22:07 -06:00
Sonny Jeon e3cfa93d97 G-code updates for G10 L2 and L20.
- LinuxCNC's g-code definitions changed for G10. Updated to their
descriptions.
2013-03-19 11:33:04 -06:00
Sonny Jeon aae1089051 Pushed minor changes. Thanks @Protoneer! 2013-03-12 18:10:24 -06:00
Sonny Jeon b06643a2e0 Bug fix to-do note on soft limit checks. Not yet completed. 2013-03-01 10:50:36 -07:00
Sonny Jeon 74b2af3c2f Minor changes and added notes to soft limits routines.
- Changed up mc_line to accept an array rather than individual x,y,z
coordinates. Makes some of the position data handling more effective,
especially for a 4th-axis later on.

- Changed up some soft limits variable names.
2013-03-01 09:55:10 -07:00
Sonny Jeon 7951b83294 Merge pull request #193 from bungao/soft_limts
integrating soft limits
2013-02-26 09:35:30 -08:00
Jens Geisler a0f430d188 bugfix: uninitiallized curr_block->new_entry_speed_sqr lead to step loss
in some cases
2013-02-26 08:40:43 +01:00
bungao b75e95c880 integrating soft limits 2013-02-26 13:55:12 +11:00
Sonny Jeon 74bdc32332 Added some prelimary notes to new changes. 2013-02-22 14:11:14 -07:00
Sonny Jeon a85e1b80f7 Push additional updates from @jgeisler0303 2013-02-22 13:23:20 -07: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
Sonny Jeon 67608a5014 Merge pull request #188 from jgeisler0303/new_planner
New planner commits merge into dev branch.
2013-02-20 08:25:03 -08:00
Sonny Jeon 40d8b8bf66 Update README.md 2013-02-20 09:23:12 -07:00
Jens Geisler 87864cce19 added counter for planner steps 2013-02-20 15:04:26 +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 97d18f0ffe Merge bug fixes from recent v0.8c push. Added readme for Grbl Sim. 2013-01-18 17:02:44 -07:00
Sonny Jeon 8a1720e1a1 Merge pull request #167 from tmpvar/simulator-mac
Fix sim makefile so it works on mac
2013-01-18 09:12:03 -08:00
Elijah Insua d0d07b7b0c Fix sim makefile so it works on mac
These changes include a path separator fix and the removal of --gc-sections which causes ld failures, and is not needed on a pc.

This patch also changes how a compiler is selected.  The makefile will now select the system compiler , which should work fine
under mingw and linux.
2013-01-18 09:22:42 -07:00
Sonny Jeon dd06268c3d Merge pull request #112 from jgeisler0303/simulator
Grbl Simulator. Oh yeah.
2013-01-17 12:01:37 -08:00
Jens Geisler 5e76136dd3 relaunch ontop of latest grbl edge
code very messy but tested
2013-01-17 13:06:51 +01:00