- 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.)
- 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.
- 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!
- 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.
- 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.
- 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.
- 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
- 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.
- 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.)
- 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.
- 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.
- 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.
- 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!)
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.
- **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.
- 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!)
- 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.
-
- 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.
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.