Commit Graph

565 Commits

Author SHA1 Message Date
Martin Poelstra
56c4bfc7b9 Fix function signature of print_uint32_base10(), necessary for compiling simulator. 2015-02-13 22:57:11 +01:00
Sonny Jeon
4bdc20ffb9 Overhauled state machine. New safety door feature.
- Overhauled the state machine and cleaned up its overall operation.
This involved creating a new ‘suspend’ state for what all external
commands, except real-time commands, are ignored. All hold type states
enter this suspend state.

- Removed ‘auto cycle start’ setting from Grbl. This was not used by
users in its intended way and is somewhat redundant, as GUI manage the
cycle start by streaming. It also muddled up how Grbl should interpret
how and when to execute a g-code block. Removing it made everything
much much simpler.

- Fixed a program pause bug when used with other buffer_sync commands.

- New safety door feature for OEMs. Immediately forces a feed hold and
then de-energizes the machine. Resuming is blocked until the door is
closed. When it is, it re-energizes the system and then resumes on the
normal toolpath.

- Safety door input pin is optional and uses the feed hold pin on A1.
Enabled by config.h define.

- Spindle and coolant re-energizing upon a safety door resume has a
programmable delay time to allow for complete spin up to rpm and
turning on the coolant before resuming motion.

- Safety door-style feed holds can be used instead of regular feed hold
(doesn’t de-energize the machine) with a ‘@‘ character. If the safety
door input pin is not enabled, the system can be resumed at any time.
2015-02-11 21:19:00 -07:00
Sonny Jeon
20c7750dab Git fix for empty directory. Makefile updated.
- ‘build’ directory was not being synced by git because it was empty.
Added a .gitignore file in the ‘build’ directory to force git to sync
it but keep it empty.

- Updated the Makefile to not erase the .gitignore.
2015-02-10 22:10:03 -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
3b468f602b Bug fix for certain motions. Re-org of includes.
- Critical bug fix for diagonal motions that continue on the same
direction or return in the exact opposite direction. This issue could
cause Grbl to crash intermittently due to a numerical round-off error.
Grbl versions prior to v0.9g shouldn’t have this issue.

- Reorganized all of the includes used by Grbl. Centralized it into a
single “grbl.h” include. This will help simplify the compiling and
uploading process through the Arduino IDE.

- Added an example .INO file for users to simply open and run when
compiling and uploading through the IDE. More to come later.
2015-02-10 08:25:09 -07:00
Sonny Jeon
23c1e154aa Limit/control pin state reporting option
- As a setup feature, users can compile-in input pin status reporting.
Doesn’t do anything special, just prints the binary for the port. 0’s
and 1’s indicate low and high signals on the pins. It’s a bit cryptic
right now, but it’s just a start.

- Added a max step rate check when writing step/mm and max rate
settings. Should help avoid people misdiagnosing problems associated
with going over the 30kHz step rate limit. Right now not enabled. Takes
up over 100k of flash. Need that room for other things right now.
2015-02-06 20:02:34 -07:00
Sonny Jeon
a358c6de0b Rare planner bug fix and added simulator defaults.
- Planner bug when moving along a diagonal back and forth on the same
path. Rare for the fact that most CAM programs don’t program this type
of motion, neither does jogging. Fixed in this update.

- Added grbl_sim defaults for testing purposes.
2015-02-04 19:12:30 -07:00
Sonny Jeon
bf37ab7e7b Fully configurable pins for NO or NC switches.
- All pins, which include limits, control command, and probe pins, can
now all be configured to trigger as active-low or active-high and
whether the pin has its internal pull-up resistor enabled. This should
allow for just about all types of NO and NC switch configurations.

- The probe pin invert setting hasn’t been added to the Grbl settings,
like the others, and will have to wait until v1.0. But for now, it’s
available as a compile-time option in config.h.

- Fixed a variable spindle bug.
2015-01-17 08:12:37 -07:00
Sonny Jeon
9be7b3d930 Lot of refactoring for the future. CoreXY support.
- Rudimentary CoreXY kinematics support. Didn’t test, but homing and
feed holds should work. See config.h. Please report successes and
issues as we find bugs.

- G40 (disable cutter comp) is now “supported”. Meaning that Grbl will
no longer issue an error when typically sent in g-code program header.

- Refactored coolant and spindle state setting into separate functions
for future features.

- Configuration option for fixing homing behavior when there are two
limit switches on the same axis sharing an input pin.

- Created a new “grbl.h” that will eventually be used as the main
include file for Grbl. Also will help simply uploading through the
Arduino IDE

- Separated out the alarms execution flags from the realtime (used be
called runtime) execution flag variable. Now reports exactly what
caused the alarm. Expandable for new alarms later on.

- Refactored the homing cycle to support CoreXY.

- Applied @EliteEng updates to Mega2560 support. Some pins were
reconfigured.

- Created a central step to position and vice versa function. Needed
for non-traditional cartesian machines. Should make it easier later.

- Removed the new CPU map for the Uno. No longer going to used. There
will be only one configuration to keep things uniform.
2015-01-14 22:14:52 -07:00
Sonny Jeon
7e67395463 Updated variable spindle and new probing. Minor bug fixes.
- Minor bug fix for variable spindle PWM output. Values smaller than
the minimum RPM for the spindle would overflow the PWM value. Thanks
Rob!

- Created an optional minimum spindle PWM low-mark value as a
compile-time option. This is for special circumstances when the PWM has
to be at a certain level to be read by the spindle controller.

- Refactored the new probing commands (G38.3, G38.4, G38.5) code to
work better with the rest of Grbl’s systems.

- Refactored mc_probe() and mc_arc() to accept the mode of the command,
i.e. clockwise vs counter, toward vs away, etc. This is to make these
functions independent of gcode state variables.

- Removed the pull off motion in the probing cycle. This is not an
official operation and was added for user simplicity, but wrongly did
so. So bye bye.

- Created a configure probe invert mask function to handle the
different probe pin setting and probing cycle modes with a single mask.

 - Minor bug fix with reporting motion modes via $G. G38.2 wasn’t
showing up. It now does, along with the other new probing commands.

- Refactored some of the new pin configurations for the future of Grbl.

-
2014-10-01 20:22:16 -06:00
Sonny Jeon
15071385f7 Merge pull request #491 from tmpvar/G38.2+
G38.2+
2014-09-25 19:29:42 -06:00
Elijah Insua
297f4d1dd6 report probe_succeeded with probe status 2014-09-22 20:32:47 -07:00
Elijah Insua
0beacbbb11 add probe_finalize to keep things DRY
this allows the PRB report to be valid when in "no errors" mode and the probe fails
2014-09-22 14:40:21 -07:00
Elijah Insua
5f1eece67d hop over probe pull-off sequence after probe miss
and while "no errors" is enabled (G38.3, G38.5)
2014-09-22 14:35:12 -07:00
Elijah Insua
3392a8b2c8 add/install probe_errors_enabled in mc_probe_cycle 2014-09-22 14:12:25 -07:00
Elijah Insua
b920838109 bump mantissa to uint16_t to enable G38.5 2014-09-22 14:05:35 -07:00
Elijah Insua
5c07acd9fa test only for & PROBE_ACTIVE 2014-09-22 13:39:51 -07:00
Elijah Insua
5406fa939a cleanup global var and push probe mode into probe_get_state 2014-09-22 13:29:02 -07:00
Sonny Jeon
39cf822944 Edit hard limit check at start of homing cycle 2014-09-20 10:41:31 -06:00
Sonny Jeon
041109410a Merge pull request #494 from ashelly/homing-alarm
Alarm if limits engaged on homing start.
2014-09-20 08:52:15 -06:00
Sonny Jeon
d630d4a4cc Merge pull request #493 from alpharesearch/edge
If variable spindle is defined print S value via $G command.
2014-09-20 08:50:52 -06:00
Sonny Jeon
322feba52f Minor settings number overflow bug fix.
- The `x` in `$x=val` would overflow when a value larger than 255 was
entered and passed to Grbl. This resulted with unintended parameters
being set by the overflow value. To fix, simply check for values larger
than 255 and error out.
2014-09-20 08:50:27 -06:00
ashelly
5b97a79b6d No false alarm if other bits in port are set. 2014-09-17 23:41:52 -04:00
Markus Schulz
fd0db24199 If variable spindle is defined print S value via $G command. 2014-09-17 18:56:25 -04:00
Elijah Insua
b89d194466 utilize MOTION_MODE_PROBE_NO_ERROR 2014-09-14 15:42:31 -07:00
Elijah Insua
0f7806938d install G38.{3,4,5} 2014-09-14 15:36:25 -07:00
Elijah Insua
f78eebcebf add MOTION_MODE_PROBE_NO_ERROR 2014-09-14 14:43:10 -07:00
ashelly
4f68edbba2 Alarm if limits engaged on homing 2014-09-08 22:51:41 -04:00
Sonny Jeon
5edf078065 Minor bug fix and CPU pin map update.
- Sometime I HATE github. This push is just here to be able to describe
the last two pushes today that had a merging conflict and lost all of
the commit comments before.

- Setting $10 would cause $11 to be the same value. Missed a break
statement in the switch-case. Oops! Now fixed.

- CPU pin map for the future versions of Grbl introduced, but not yet
finalized. Still working on it and it’s subject to change.

- Added a new high-speed machining test g-code routine written by Todd
Fleming. Mills a pocket at 15,000mm/min. Do not use when connected to
your machine! You’ve been warned!
2014-09-05 15:46:55 -06:00
Sonny Jeon
92ac0f958b Updated README.md 2014-09-05 15:39:48 -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
615093ccd2 Merge pull request #472 from BinaryConstruct/edge
Add defaults for OX CNC
2014-08-24 07:46:07 -06:00
BinaryConstruct
622113b179 Add defaults for OX CNC 2014-08-24 00:28:07 -05:00
Sonny Jeon
fea70d2055 Update README.md 2014-08-22 08:35:01 -06:00
Sonny Jeon
6ad9806584 Updated build date. 2014-08-22 08:32:55 -06:00
Sonny Jeon
ec48571cbe WPos report bug fix when MPos disabled. 2014-08-22 08:31:28 -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
7330742936 Merge branch 'master' into edge 2014-08-17 10:00:59 -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
6af010fe63 Added EEPROM force clear.
- When updating from v0.8, the settings will wipe the startup lines and
build info locations so that it won’t use whatever is already there in
the EEPROM. Parameters (coord offsets) are retained. They should be ok
during an upgrade.
2014-08-13 21:41:46 -06:00
Sonny Jeon
86e7c9764c Update README.md 2014-08-13 21:15:55 -06:00
Sonny Jeon
6fdf10ba06 G28/30 bug fix. Block '$$' during cycle. SO2 defaults.
- A G28/30 bug would cause it to move to machine coordinate [0,0,0] if
no axis words were sent. It was a typo in the new g-code parser. Fixed
and slightly re-written to be more consistent with the program flow.

- Updated the ShapeOko2 defaults based on testing on the real machine.
A little conservative, but it might change again after some more
testing.

- Now blocks ‘$$’ command during a motion, because the printout takes
too long and can starve the segment buffer.
2014-08-13 21:12:37 -06:00
Sonny Jeon
796e136778 XON/XOFF flow control variable typo. 2014-08-08 17:42:17 -06:00
Sonny Jeon
48faf81c40 Moved Grbl Sim to its own repo. 2014-08-07 06:45:09 -06:00
Sonny Jeon
fc0c4f4332 Updated licensing 2014-08-07 05:58:04 -06:00
Sonny Jeon
de5fa07d8a Update README.md 2014-08-05 16:21:18 -06:00
Sonny Jeon
9b9abf1b2f Fixed bug related to very very low feed rates.
- A very very low feed rate command like `G1 X100 F0.01`  would cause
some floating-point round-off error and freeze Grbl into an infinite
loop. To fix it, introduced a MINIMUM_FEED_RATE parameter in config.h
to ensure motions always complete.

- MINIMUM_FEED_RATE is set at 1.0 mm/min by default. It’s recommended
that no rates are below this value, but 0.1mm/min may be ok in some
situations.
2014-08-05 16:17:45 -06:00
Sonny Jeon
955a9f3cf8 Allow '$$' in check mode.
- Now allows the ‘$$’ view Grbl settings while in check mode

- Updated the version build date
2014-08-04 06:25:17 -06:00