Wykres commitów

389 Commity (2168bb1cf97703206e549b3ca2694db96289f77f)

Autor SHA1 Wiadomość Data
Hans Insulander 8a09e2c9c4 Ignore dependency files 2012-11-05 22:55:49 +01:00
Hans Insulander b3b454ee77 Generate header dependencies and use them in Makefile 2012-11-05 22:54:53 +01:00
Sonny Jeon c2b31a06ff Tweaked dry run and check g-code switches. Now resets when toggled off.
- To make managing the code easier and to help ensure a user starts
with a fresh reset, the functionality of check g-code and dry run has
been changed to automatically perform a soft reset when toggled off.
Position will not be lost, unless there is a cycle active. Feed hold
before toggling off it needed.

This is mainly a safety issue. If a user dry runs a program and kills
it mid-program, and then restarts it thinking to run it as normal, the
g-code modes that we're set may not be what they expect, and very bad
things can happen.

- NOTE: Grbl is at 83.5% of flash capacity. Not a lot of room left, but
I think we can squeeze in some more!
2012-11-05 13:32:29 -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 8c0106c247 Tweaks and minor bug fixes. Added purge buffer command.
- Added a purge buffer (and lock) command. This is an advanced option
to clear any queued blocks in the buffer in the event of system
position being lost or homed. These queued blocks will likely not move
correctly if not purged. In typical use, the purging command releases
the homing axes lock in case a user need to move the axes off their
hard limit switches, but position is not guaranteed. Homing is advised
immediately after.

- Created a system-wide sync current position function. Cleans up some
of the repetitive tasks in various places in the code that do the same
thing.

- Removed the clear all switches command '$S'. Not really needed and
helped clean up a sync call.

- Other minor tweaks. Readme updated slightly..
2012-11-04 08:44:54 -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 303cf59f52 Added block delete, opt stop, single block mode. New parser state and parameter feedback. Overhauled '$' command.
NOTE: Another incremental update. Likely buggy, still a ways to go
before everything is installed, such as startup blocks.

- Changed the '$' command to print help. '$$' now prints Grbl settings.
The help now instructs the user of runtime commands, switch toggling,
homing, etc. Jogging will be added to these in v0.9.

- Added switches: block delete, opt stop, and single block mode.

- Now can print the g-code parser state and persistent parameters
(coord sys) to view what Grbl has internally.

- Made the gc struct in the g-code parser global to be able to print
the states. Also moved coordinate system tracking from sys to gc struct.

- Changed up the welcome flag and updated version to v0.8c.

- Removed spindle speed from gcode parser. Not used.
2012-11-01 19:48:55 -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 5d8c3dcbd7 Added misc message to indicate how to exit ALARM mode. 2012-10-21 19:29:18 -06:00
Sonny Jeon 065ceceb34 New alarm method. Re(re)organized status messages.
- Installed a new 'alarm' method to centralize motion kills across
alarm or reset events. Right now, this is controlled by system abort
and hard limits. But, in the future, a g-code parser error may call
this too as a safety feature.

- Re(re)organized status messages to just print all errors, regardless
from where it was called. This centralizes them into one place.

- Misc messages method installed for any user feedback that is not a
confirmation or error. Mainly so that there is a place to perform
warnings and such.

- New stuff installed and still made the flash size smaller by saving
flash space from clearing out repeated '\r\n' pgmstrings.

- Fixed a bug where hard limits message would print everytime a system
abort was sent.
2012-10-21 19:18:24 -06:00
Sonny Jeon 909feb7f79 Re-organized status messages to be more coherent and centralized.
- Reorganized all of the status message feedback from both the g-code
parser and settings modules to be centralized into two message modules:
status feedback from executing a line and warnings for misc feedback.

- Pulled out the printPgmString() messages in settings.c and placed it
into the new module. (settings_dump() not moved).

- Some other minor edits. Renaming defines, comment updates, etc.
2012-10-21 16:55:59 -06:00
Sonny Jeon 39e11b696f Hard limits code minor updates.
- Fixed a bug that would not disable the steppers if a user issues a
system abort during a homing cycle.

- Updated the hard limit interrupt to be more correct and to issue a
shutdown for the right situations when the switch has been triggered.

- Added a status message to indicate to the user what happened and what
to do upon a hard limit trigger.
2012-10-18 21:29:07 -06:00
Sonny Jeon df5bb70b25 Hard limits, homing direction, pull-off limits after homing, status reports in mm or inches, system alarm, and more.
- Thank you statement added for Alden Hart of Synthetos.

- Hard limits option added, which also works with homing by pulling off
the switches to help prevent unintended triggering. Hard limits use a
interrupt to sense a falling edge pin change and immediately go into
alarm mode, which stops everything and forces the user to issue a reset
(Ctrl-x) or reboot.

- Auto cycle start now a configuration option.

- Alarm mode: A new method to kill all Grbl processes in the event of
something catastrophic or potentially catastropic. Just works with hard
limits for now, but will be expanded to include g-code errors (most
likely) and other events.

- Updated status reports to be configurable in inches or mm mode. Much
more to do here, but this is the first step.

- New settings: auto cycle start, hard limit enable, homing direction
mask (which works the same as the stepper mask), homing pulloff
distance (or distance traveled from homed machine zero to prevent
accidental limit trip).

- Minor memory liberation and calculation speed ups.
2012-10-16 21:29:45 -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 00701ff24e Updated delay_us() function to accept long integers 2012-10-12 08:27:14 -06:00
Sonny Jeon 9b4e108905 (2x) speed increase in printFloat() function. Decimal places setting added.
- 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.
2012-10-11 22:43:54 -06:00
Sonny Jeon d8ca4176bf Homing stepper enable bit fix. 2012-10-11 00:06:52 -06:00
Sonny Jeon 32963289fe Homing direction pin bits fixed. Lite refactoring of settings. 2012-10-10 18:01:43 -06:00
Sonny Jeon 4c6f5bec48 Improved homing cycle. New settings: homing enable/rates, debounce and step idle lock time.
- 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.
2012-10-09 22:01:10 -06:00
Sonny Jeon 6506b7a338 Fixed an issue with leaving the limit switches during a homing cycle. 2012-10-08 17:39:53 -06:00
Sonny Jeon 4d8fd7f603 Updated version number to v0.8b to reflect changes. 2012-10-08 16:06:57 -06:00
Sonny Jeon ff82489da7 Limit pin internal pull-resistors enabled. Re-wrote read_double() function. Correctly changed all 'double's to 'float's.
- 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.
2012-10-08 15:57:58 -06:00
Sonny Jeon d30cb906f8 Updated limit/homing routine. Works, but needs more TLC.
- 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.
2012-09-30 19:57:10 -06:00
Sonny Jeon 4224ab4999 Minor prescalar optimization. Changed up some defines. 2012-09-21 17:55:02 -06:00
Sonny Jeon 420c7c2584 Added coolant control (M7*, M8, M9). Mist control can be enabled via config.h.
- 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.
2012-09-21 11:14:13 -06:00
Sonny Jeon 7eb85de821 Merge pull request #120 from tmpvar/configurable-makefile
Add support for overriding DEVICE and PROGRAMMER
2012-09-21 08:32:37 -07:00
Elijah Insua f5b1761406 Add support for overriding DEVICE and PROGRAMMER
By setting environment variables.

example: PROGRAMMER=-c arduino -P /dev/tty.usbmodemfa131 make flash
2012-09-21 00:41:31 -07:00
Sonny Jeon 4d3c720bcc M30 minor bug fix.
Order of operations was off. Now works as intended,
2012-09-19 20:50:24 -06:00
Sonny Jeon 1720484d76 No changes. Github commit bug. 2012-06-27 07:06:24 -06:00
Sonny Jeon 79e0fd594b Added step pulse delay after direction set (Compile-time option only). Updated read me.
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.
2012-06-26 21:48:42 -06:00
Sonny Jeon d3be216931 Minor fix related to spindle_stop() crashing abort in certain cases.
- Updated spindle_stop() to fix abort bug and to be more in line with
v0.8.
2012-03-10 12:34:09 -07:00
Sonny Jeon 86cdae0060 Minor updates.
- 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.
2012-03-05 12:01:02 -07:00
Sonny Jeon d6abf10d49 Minor include related compile fix. Added experimental XON/XOFF flow control. Not officially supported!
- 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!
2012-02-25 09:06:42 -07:00
Sonny Jeon e9b28279db Spindle DDR pins init minor fix. 2012-02-12 11:02:23 -07:00
Sonny Jeon 567fbf93ed G54 work coordinate support (w/ G10,G92.1). Re-factored g-code parser with error checking. Minor compiler compatibility changes.
- 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.
2012-02-11 11:59:35 -07: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 0f0d5a6138 Streaming script argparse bugfix. 2012-01-27 19:51:16 -07:00
Sonny Jeon cebee41f7e Update readme.textile 2012-01-17 18:05:46 -07:00
Sonny Jeon 0c0ee24820 Merge pull request #39 from chamnit/edge
Merging chamnit/grbl edge v0.8a to grbl/grbl edge
2012-01-17 16:36:18 -08: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 6f27e2cdb1 Corrected a minor streaming script character counting bug. 2012-01-09 21:41:02 -07:00
Sonny Jeon f40078110e Updated line in streaming script. 2012-01-09 18:51:53 -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 292fcca67f Re-ordered stepper idle function to first disable interrupt. 2011-11-19 10:08:41 -07:00
Sonny Jeon b5cc033150 Corrected clearing of target and position variable for the go home routine. Thanks Jens! 2011-11-11 13:36:42 -07:00
Sonny Jeon 169c859b9c Delete a new work file shouldn't have been synced. 2011-10-11 21:00:06 -06: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 c98ff4cc2e Forgot something! Comments on what the last change does. 2011-10-07 15:51:40 -06:00