- printFloat() function execution doubled in speed. This is a precursor
to status reporting, since GUIs may query real-time position rapidly.
- Decimal places added to settings (for now). This may disappear in
future pushes, but here for testing purposes.
- Homing cycle will now cycle twice (spec more/less in config) to
improve repeatability and accuracy by decreasing overshoot.
- New Grbl settings added: Enable/disable homing cycles, homing seek
and feed rates, switch debounce delay, and stepper idle lock time.
- Please note that these settings may change upon the next push, since
there will be more added soon. Grbl *should* not re-write your old
settings, just re-write the new ones. So, make sure you keep these
written down somewhere in case they get lost from a code bug.
- Refactored settings migration to be a little smaller and managable
going forward.
- Limit pin internal pull-resistors now enabled. Normal high operation.
This will be the standard going forward.
- Updated all of the 'double' variable types to 'float' to reflect what
happens when compiled for the Arduino. Also done for compatibility
reasons to @jgeisler0303 's Grbl simulator code.
- G-code parser will now ignore 'E' exponent values, since they are
reserved g-code characters for some machines. Thanks @csdexter!
- The read_double() function was re-written and optimized for use in
Grbl. The strtod() avr lib was removed.
- Added acceleration to the homing routine.
- Homing now accounts for different step rates when moving multiple
axes without exceeding acceleration limits.
- Homing now updates all internal positioning variables to machine zero
after completion.
- "Poor-man's" debounce delay added.
- Updated the delay_us() function to perform faster and more accurate
microsecond delays. Previously, the single increments would add
noticeable time drift for larger delays.
- Fix a bug in the stepper.c prescalar calculations that was changed in
the last commit.
- Other minor fixes.
- Added coolant control! Flood control (M8) functions on analog pin 0.
Mist control (M7) is compile-time optional and is on analog pin 1. (Use
only if you have multiple coolants on your system). Based on work by
@openpnp.
- Fixed some variable assignments in spindle control.
Added a compile-time only experimental feature that creates a
user-specified time delay between a step pulse and a direction pin set
(in config.h). This is for users with hardware-specific issues
(opto-couplers) that need more than a few microseconds between events,
which can lead to slowly progressing step drift after many many
direction changes. We suggest to try the hack/fix posted in the Wiki
before using this, as this experimental feature may cause Grbl to take
a performance hit at high step rates and about complex curves.
- Updated makefile to be more universally compatible by not requiring
grep or ruby.
- Edited XON/XOFF flow control usage, noting that FTDI-based Arduinos
are known to work, but not Atmega8U2-based Arduino. Still officially
not supported, but added for advanced users.
- Minor edits.
- A latency issue related to USB-to-serial converters on the Arduino
does not allow for XON/XOFF flow control to work correctly on standard
terminal programs. It seems that only specialized UI's or avoiding the
USB port all together solves this problem. However, XON/XOFF flow
control is added for advanced users only as a compile-time option. This
feature is officially *NOT* supported by grbl, but let us know of any
successes with it!
- G54 work coordinate system support. Up to 6 work coordinate systems
(G54-G59) available as a compile-time option.
- G10 command added to set work coordinate offsets from machine
position.
- G92/G92.1 position offsets and cancellation support. Properly follows
NIST standard rules with other systems.
- G53 absolute override now works correctly with new coordinate systems.
- Revamped g-code parser with robust error checking. Providing user
feedback with bad commands. Follows NIST standards.
- Planner module slightly changed to only expected position movements
in terms of machine coordinates only. This was to simplify coordinate
system handling, which is done solely by the g-code parser.
- Upon grbl system abort, machine position and work positions are
retained, while G92 offsets are reset per NIST standards.
- Compiler compatibility update for _delay_us().
- Updated README.
- 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.
- 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.
- 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.
- 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.
- 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.
- 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.
- Added another way to further ensure the long slope deceleration issue
is eliminated. If the stepper rate change is too great near zero, the
stepper rate is adjusted at half increments to the end of travel,
creating a smooth transition. - If the new STEPPER_IDLE_LOCK_TIME is
set as zero, this delay is not compiled at compile-time. - NOTE: The
next update is likely going to be major, involving a full re-write of
the stepper.c program to integrate a simple way to apply pauses,
jogging, e-stop, and feedrate overrides. The interface should be
flexible enough to be easily modified for use with either hardware
switches or software commands. Coming soon.
Added a very short (25 ms) user-definable delay before the steppers are
disabled at the motors are disabled and grbl goes idle. This ensures
any residual inertia at the end of the last motion does not cause the
axes to drift and grbl to lose its position when manually entering
g-code or when performing a tool change and starting the next
operation.
- 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.
- 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.
- 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.
- 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.
- 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.
No changes in functionality. Path vectors moved from ring buffer to
local planner static variables to save 3*(BUFFER_SIZE - 1) doubles in
memory. Detailed comments. Really need to stop micro-updating. Should be
the last until a planner optimization (ala Jens Geisler) has been
completed.
Reverse planner was over-writing the initial/buffer tail entry speed,
which reset the forward planner and caused it to lose track of its
speed. Should now accelerate into short linear segments much nicer now.
Beta pre-processor script used to clean and streamline g-code for
streaming and converts G02/03 arcs into linear segments. Allows for full
acceleration support if the pre-processed g-code is then streamed to
grill, sans G02/03 arcs. Added a simple example streaming script for
Python users.
- Junction jerk now re-defined as junction_deviation. The distance from
the junction to the edge of a circle tangent to both previous and
current path lines. The circle radii is used to compute the maximum
junction velocity by centripetal acceleration. More robust and
simplified way to compute jerk. - Fixed bugs related to entry and exit
factors. They were computed based on the current nominal speeds but not
when computing exit factors for neighboring blocks. Removed factors and
replaced with entry speeds only. Factors now only computed for stepper
trapezoid rate conversions. - Misc: Added min(), next_block_index,
prev_block_index functions for clarity.
Comments, block delete characters, and blank lines are no longer passed
to the gcode parser and should free up some memory by ignoring these
characters. Gcode parser now expects clean gcode only. There was a bug
if there were block deletes or comments not in the first character (i.e.
spindle on/off for proofing geode without turning it on, or a NXX
followed by a comment). This should fix it by bypassing the problem.
Left a commented line for easily turning on and off block deletes for a
later feature, if desired.