Commit Graph

49 Commits

Author SHA1 Message Date
Sonny Jeon
0746a5a1d7 Organizational updates. Mega2560 support moved.
- Mega2560 support has been moved to the Grbl-Mega
[project](http://github.com/gnea/grbl-Mega/) to clean up the code and
make future developments easier with increased flash and RAM. All new
developments between the 328p and Mega2560 will be synced when it makes
sense to.

- OEM single file compile configuration option. Before OEMs needed to
alter three files. Provided a way to just alter the config.h file to
contain everything for a particular Grbl build. See config.h for more
details.

- Removed defaults and cpu_map directories and reverted back to
defaults.h and cpu_map.h to contain all definitions. This should help
reduce some headaches and the previous implementation inadvertently
created. Also, it makes the single file config.h possible.

- Moved (and tweaked) the invert control pin mask define and placed
into config.h, rather than in the cpu_map.h file. Makes more sense
there.
2016-03-30 11:58:47 -06:00
Sonny Jeon
5eee10845b Pin state reporting of all pins. Flash optimization.
- New pin state realtime reporting feature. Instead of `Lim:000` for
limit state reports, the new feature shows `Pin:000|0|0000`, or
something similar. The `|` delimited fields indicate xyz limits, probe,
and control pin states, where 0 is always not triggered, and 1 is
triggered. Invert masks ARE accounted for.
  Each field may be enabled or disabled via the `$10` status report
setting. The probe and control pin flags are bits 5 and 6, respectively.

- Remove the now deprecated `REPORT_CONTROL_PIN_STATE` option in
config.h

- The old limit pin reports `Lim:000` may be re-enabled by commenting
out `REPORT_ALL_PIN_STATES` in config.h.

- Incremented the version letter (v1.0c) to indicate the change in
reporting style.

- Replaced all bit_true_atomic and bit_false_atomic macros with
function calls. This saved a couple hundred bytes of flash.
2015-11-09 21:54:26 -07:00
Sonny Jeon
dade712f0e Updated G28/G30 intermediate motion behavior.
- G28 and G30’s behavior has been updated from the old NIST g-code
standard to LinuxCNC’s. Previously when an intermediate motion was
programmed, the NIST standard would move all axes to the final G28/30
stored coordinates. LinuxCNC states it only moves the axes specified in
the command.

  For example, suppose G28’s stored position is (x,y,z) = (1,2,3) for
simplicity, and we want to do an automated z-axis tool retraction and
then park at the x,y location. `G28 G91 Z5` will first move the Z axis
5mm(or inches) up, then move Z to position 3 in machine coordinates.
Next, the command `G28 G91 X0 Y0` would skip the intermediate move
since distance is zero, but then move only the x and y axes to machine
coordinates 1 and 2, respectively. The z-axis wouldn’t move in this
case, since it wasn’t specified.

This change is intended to make Grbl more LinuxCNC compatible while
making commands, like the shown tool retraction, much easier to
implement.
2015-09-24 11:35:27 -06:00
Sonny Jeon
9152d1429c Update README 2015-08-27 21:41:31 -06:00
Sonny Jeon
b3a53a4683 v1.0 Beta Release.
- Tons of new stuff in this release, which is fairly stable and well
tested. However, much more is coming soon!

- Real-time parking motion with safety door. When this compile option
is enabled, an opened safety door will cause Grbl to automatically feed
hold, retract, de-energize the spindle/coolant, and parks near Z max.
After the door is closed and resume is commanded, this reverses and the
program continues as if nothing happened. This is also highly
configurable. See config.h for details.

- New spindle max and min rpm ‘$’ settings! This has been requested
often. Grbl will output 5V when commanded to turn on the spindle at its
max rpm, and 0.02V with min rpm. The voltage and the rpm range are
linear to each other. This should help users tweak their settings to
get close to true rpm’s.

- If the new max rpm ‘$’ setting is set = 0 or less than min rpm, the
spindle speed PWM pin will act like a regular on/off spindle enable
pin. On pin D11.

- BEWARE: Your old EEPROM settings will be wiped! The new spindle rpm
settings require a new settings version, so Grbl will automatically
wipe and restore the EEPROM with the new defaults.

- Control pin can now be inverted individually with a
CONTROL_INVERT_MASK in the cpu_map header file. Not typical for users
to need this, but handy to have.

- Fixed bug when Grbl receive too many characters in a line and
overflows. Previously it would respond with an error per overflow
character and another acknowledge upon an EOL character. This broke the
streaming protocol. Now fixed to only respond with an error after an
EOL character.

- Fixed a bug with the safety door during an ALARM mode. You now can’t
home or unlock the axes until the safety door has been closed. This is
for safety reasons (obviously.)

- Tweaked some the Mega2560 cpu_map settings . Increased segment buffer
size and fixed the spindle PWM settings to output at a higher PWM
frequency.

- Generalized the delay function used by G4 delay for use by parking
motion. Allows non-blocking status reports and real-time control during
re-energizing of the spindle and coolant.

- Added spindle rpm max and min defaults to default.h files.

- Added a new print float for rpm values.
2015-08-27 21:37:19 -06:00
Sonny Jeon
0427fd5b9f Version bump to v0.9j
- Version bump requested by OEMs to easily determine whether the
firmware supports the new EEPROM reset feature. Other than that, no
significant changes.
2015-07-17 08:19:57 -06:00
Sonny Jeon
cc38ae2471 Restore parameters minor bug fix.
- `$RST=#` was not wiping the G30 positions from EEPROM. Minor but now
fixed.
2015-06-25 15:05:47 -06:00
Sonny Jeon
81505e6a81 New EEPROM restore functions.
- Tweaked the previous EEPROM restore implementation and added new
functionality.

- `$RST=$` restores the `$$` grbl settings back to firmware defaults,
which are set when compiled.

- `$RST=#` restores the `$#` parameters in EEPROM. At times it’s useful
to clear these and start over, rather than manually writing each entry.

-`$RST=*` wipe all of the data in EEPROM that Grbl uses and restores
them to defaults. This includes `$$` settings, `$#` parameters, `$N`
startup lines, and `$i` build info string.

NOTE: This doesn’t write zeros throughout the EEPROM. It only writes
where Grbl looks for data. For a complete wipe, please use the Arduino
IDE’s EEPROM clear example.

- Refactored the restore and wipe functions in settings.c to
accommodate the new commands.
2015-06-20 10:27:24 -06:00
Sonny Jeon
e6db564511 Updated README 2015-06-18 09:27:13 -06:00
Sonny Jeon
e14cff3ddc Added G61 exact path support.
- G61 exact path is the Grbl default path control mode, so it’s now
added as a supported g-code.
2015-05-29 21:32:45 -06:00
Sonny Jeon
8a84f8987d Updated README 2015-05-26 10:49:37 -06:00
Sonny Jeon
4c20a2173f Commit history, logo license, full-arc fix.
- Commit history added to repo, as an easier way for people to see view
the changes over time.

- Grbl logo copyright license added. All rights reserved with regards
to the Grbl logo.

- G2/3 full circles would sometime not execute. The problem was due to
numerical round-off of a trig calculation. Added a machine epsilon
define to help detect and correct for this problem. Tested and should
not effect general operation of arcs.
2015-03-29 11:35:16 -06:00
Sonny Jeon
4841dff712 Update README.md 2015-03-27 08:57:05 -06:00
Sonny Jeon
353df7b0a0 Update README.md 2015-03-26 20:47:24 -06:00
Sonny Jeon
b1afeb4547 Update README.md 2015-03-16 08:24:09 -06:00
Sungeun Jeon
87cf6c888b Updated README 2015-03-15 22:04:27 -06:00
Sonny Jeon
b3140351c8 Create README.md 2015-03-15 22:03:33 -06:00
Sungeun Jeon
46c943f13d Merge branch 'edge' 2015-03-15 22:01:10 -06:00
Sungeun Jeon
3d06897e47 Updated README.
- Also altered the G38.X reporting to save some bytes.
2015-03-15 21:57:21 -06:00
Sonny Jeon
76730176da Arduino IDE compatibility and minor homing fixes
- Added an include in the right spot, if a user tries to compile and
upload Grbl through the Arduino IDE with the old way.

- Fixed a minor bug with homing max travel calculations. It was causing
simultaneous axes homing to move slow than it did before.
2015-03-04 06:50:26 -07:00
Sonny Jeon
85b0c7a8b4 G91.1 support. Fixed a config.h option.
- G91.1 support added. This g-code sets the arc IJK distance mode to
incremental, which is the default already. This simply  helps reduce
parsing errors with certain CAM programs that output this command.

- Max step rate checks weren’t being compiled in if the option was
enabled. Fixed now.

- Alarm codes were not displaying correctly when GUI reporting mode was
enabled. Due to unsigned int problem. Changed codes to positive values
since they aren’t shared with other codes.
2015-02-25 08:29:56 -07:00
Sonny Jeon
d034dc2181 Improved homing limit search handling.
- Instead of a single overall max travel for a search distance for the
homing limit switches. The homing cycle now applies the max travel of
each axis to the search target. Generally makes more sense this way and
saved more than a 100bytes of flash too.
2015-02-15 19:23:16 -07:00
Sonny Jeon
fd02c3a47e Updated README with new logo sized for github. 2015-02-13 18:48:15 -07:00
Sonny Jeon
5a547dbb33 Update README.md 2015-02-13 18:45:55 -07:00
Sonny Jeon
b237ad566a File re-organization. New Makefile.
- Re-organized source code files into a ‘grbl’ directory to lessen one
step in compiling Grbl through the Arduino IDE.

- Added an ‘examples’ directory with an upload .INO sketch to further
simplify compiling and uploading Grbl via the Arduino IDE.

- Updated the Makefile with regard to the source code no longer being
in the root directory. All files generated by compiling is placed in a
separate ‘build’ directory to keep things tidy. The makefile should
operate in the same way as it did before.
2015-02-10 19:30:40 -07:00
Sonny Jeon
429163a033 Update README.md 2014-11-05 07:52:14 -07:00
Sonny Jeon
e0e105a143 Update README.md 2014-10-29 09:17:46 -06:00
Sonny Jeon
e30d65052e Update README.md 2014-10-28 13:07:15 -06:00
Sonny Jeon
5459faf551 Update README.md 2014-10-28 11:37:45 -06:00
Sonny Jeon
2d12929499 Merge branch 'master' of https://github.com/grbl/grbl
Conflicts:
	README.md
2014-09-05 15:38:17 -06:00
Sonny Jeon
359e6a89e3 Update README.md 2014-08-18 09:28:35 -06:00
Sonny Jeon
9ff7433e2d Update README.md 2014-08-17 17:43:24 -06:00
Sonny Jeon
f298cd925d Updated bitly link to master firmware 2014-08-17 10:01:56 -06:00
Sonny Jeon
b0e9a315fe Final minor updates for master release.
- Updated ShapeOko2 defaults based on machine testing of the basic
model provided by Inventables. (or close to it.) Should be pretty
conservative but much faster than before. For example, X and Y axes are
set at (10x) faster at 5000mm/min. It can run much faster than this,
but this seems like a safe speed for everyone.

- Updated README for master release.

- Added some new settings methods for clearing the EEPROM when changing
versions. Needs some more work, but it should ok for master release.
Should work on it more for the next version.
2014-08-17 09:10:52 -06:00
Sonny Jeon
fc0c4f4332 Updated licensing 2014-08-07 05:58:04 -06:00
Sonny Jeon
71f333ddca Settings refactoring. Bug fixes. Misc new features.
This is likely the last major change to the v0.9 code base before push
to master. Only two minor things remain on the agenda (CoreXY support,
force clear EEPROM, and an extremely low federate bug).

- NEW! Grbl is now compile-able and may be flashed directly through the
Arduino IDE. Only minor changes were required for this compatibility.
See the Wiki to learn how to do it.

- New status reporting mask to turn on and off what Grbl sends back.
This includes machine coordinates, work coordinates, serial RX buffer
usage, and planner buffer usage. Expandable to more information on user
request, but that’s it for now.

- Settings have been completely renumbered to allow for future new
settings to be installed without having to constantly reshuffle and
renumber all of the settings every time.

- All settings masks have been standardized to mean bit 0 = X, bit 1 =
Y, and bit 2 = Z, to reduce confusion on how they work. The invert
masks used by the internal Grbl system were updated to accommodate this
change as well.

- New invert probe pin setting, which does what it sounds like.

- Fixed a probing cycle bug, where it would freeze intermittently, and
removed some redundant code.

- Homing may now be set to the origin wherever the limit switches are.
Traditionally machine coordinates should always be in negative space,
but when limit switches on are on the opposite side, the machine
coordinate would be set to -max_travel for the axis. Now you can always
make it [0,0,0] via a compile-time option in config.h. (Soft limits
routine was updated to account for this as well.)

 - Probe coordinate message immediately after a probing cycle may now
be turned off via a compile-time option in config.h. By default the
probing location is always reported.

- Reduced the N_ARC_CORRECTION default value to reflect the changes in
how circles are generated by an arc tolerance, rather than a fixed arc
segment setting.

- Increased the incoming line buffer limit from 70 to 80 characters.
Had some extra memory space to invest into this.

- Fixed a bug where tool number T was not being tracked and reported
correctly.

- Added a print free memory function for debugging purposes. Not used
otherwise.

- Realtime rate report should now work during feed holds, but it hasn’t
been tested yet.

- Updated the streaming scripts with MIT-license and added the simple
streaming to the main stream.py script to allow for settings to be sent.

- Some minor code refactoring to improve flash efficiency. Reduced the
flash by several hundred KB, which was re-invested in some of these new
features.
2014-07-26 15:01:34 -06:00
Sonny Jeon
1c74be0625 Update README.md 2014-07-12 10:50:02 -06:00
Sonny Jeon
48dc1902a7 Update README.md 2014-07-12 10:40:39 -06:00
Sonny Jeon
89df0f28c8 Update README.md 2014-07-12 10:39:40 -06:00
Sonny Jeon
ac7db2c8b2 Updated README 2014-07-12 10:33:55 -06:00
Sonny Jeon
1969f8b057 Updated README 2014-07-11 10:14:08 -06:00
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
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
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
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
40d8b8bf66 Update README.md 2013-02-20 09:23:12 -07: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
5e7c25d480 Updated README. Max step rate back at 30kHz. Acceleration minor bug fix.
- Returned the max step rate to 30kHz. The new arc algorithm works uses
so much less CPU overhead, because the segments are longer, that the
planner has no problem computing through them.

- Fixed an issue with the acceleration independence scaling. Should now
work with accelerations above 400mm/sec^2 or so.

- Updated README
2012-12-21 08:51:36 -07:00
Sonny Jeon
cc4df3e14b Acceleration independence installed. Initial re-work of planner for feedrate overrides.
NOTE: This push is a work-in-progress and there are known bugs that
need to be fixed, like homing acceleration being incompatible. Released
for testing. Settings will definitely be overwritten, as new settings
were needed.

- Acceleration independence installed in planner. Each axis can now
have different accelerations and Grbl will maximize the accelerations
depending on the direction its moving. Very useful for users like on
the ShapeOko with vastly different Z-axis properties.

- More planner optimizations and re-factoring. Slightly improved some
of the older calculations, but new acceleration calculations offset
these improvements. Overall no change in processing speed.

- Removed planner nominal length checks. It was arguable whether or not
this improved planner efficiency, especially in the worst case scenario
of arcs.

- Updated readme and changed to markdown format.
2012-12-14 08:27:02 -07:00