Commit Graph

648 Commits

Author SHA1 Message Date
docwelch
759ff615e2 Add Ramps 1.4 Board Support
Changes based on @jekhor’s work
Uses D8 as the spindle pin
2017-06-26 19:08:06 -05:00
Sonny Jeon
e0efa4bd23 Moved Grbl logo files to separate repo. 2017-03-19 09:35:03 -06:00
Sonny Jeon
9e96e45086 Update README.md 2017-03-19 09:32:04 -06:00
Sonny Jeon
dd2f156364 Update README.md 2017-03-19 09:08:45 -06:00
Sonny Jeon
795d2f657a Pulled in Grbl-328p changes.
- [fix] Spindle enable pin behavior corrected to be independent of the
PWM output. There was some crossover behavior.

- [fix] Tool numbers are now tracking and reporting correctly.

- [fix] G-code parser error when G0 is commanded without a feed rate
word while in inverse time mode.

- [fix] Config file was missing an option for probing behavior.

- [doc] Updated documentation.
2017-01-14 14:35:49 -07:00
Sonny Jeon
c912b82710 Alarm handling bug fix.
- Applied an alarm handling bug fix that would not show the correct
alarm code, nor clear the alarm. It would occasionally go into an
infinite loop and would usually happen during a homing cycle fail.
2016-12-19 22:24:38 -07:00
Sonny Jeon
e4dd12fe58 Spindle PWM update for Mega2560
- Spindle PWM is set with a 16-bit value, rather than 8-bit on a 328p.
Updated stepper.c to reflect this change.
2016-12-19 18:48:40 -07:00
Sonny Jeon
5e3048f3ba Grbl v1.1e port to Mega2560 branch
- v1.1e

- Ported all current changes from the main Grbl 328p repo to the
Mega2560 branch. Main differences are increased planner, RX, TX, and
line buffers. And an optional sleep timeout feature.

- WARNING: Code compiles, but has not been tested.
2016-12-19 16:24:15 -07:00
chamnit
be5faf6eb4 Minor bug fix to certain safety conditions.
- Grbl would become unresponsive, if a safety door is reset when active
and then homed immediately after. A system variable was not properly
restored. Now fixed.
v1.0d.20160831
2016-08-31 22:24:20 -06:00
chamnit
2b82c4254e Planner and printFloat update.
- Planner model update. Improves performance for machines with
different accelerations on each axes. Particularly for 3D carving.

- Print float update to print 13 (from 10) characters. Help reduce
print errors for unusually long floating point values.
2016-05-10 21:45:34 -06:00
chamnit
d5decf8c19 Alarm and safety door bug fix.
- Typo in protocol.c caused a safety door to lock out the system during
an alarm. The correct character should keep that from happening and
bring back the original door/alarm behavior.
2016-04-10 15:06:57 -06:00
Sonny Jeon
e87f4ea229 Update readme and sleep documentation. 2016-04-04 09:31:49 -06:00
chamnit
86935340bd Sleep feature. General re-org and bug fixes.
- New sleep safety feature. If powered components (spindle/coolant) are
enabled and if there is no motion, incoming data, or commands, Grbl
will start a short sleep countdown. Upon elapse, Grbl will depower and
enter a sleep state. If parking is enabled, sleep will also park the
machine. Only a reset will exit sleep and the job will be
unrecoverable. This is purely a safety feature to address serial
disconnection problems.

- Re-organized the cpu-map and default files and put them back into
single files. Makes it easier for OEMs to just drop in their
configuration files for a custom build.

- Introduced a single-file configuration method for OEMs. See config.h
for details. Basically just add the cpu_map and default files to the
bottom of config.h.

- Moved the control pin invert mask to config.h

- Refactored some cpu_map defines to be more descriptive of what they
belong to.

- Added invert coolant pins options to config.h

- Added a new realtime status report. Only a proposal at this time, and
the old classic report is enabled by default. Comment out the
USE_CLASSIC_REALTIME_REPORT define in config.h to use the new report.
Please note that the new report is not finalized and is subject to
change.
2016-04-03 22:56:08 -06:00
chamnit
b29b960c28 EEPROM string checks and re-added some compile options.
- Incremented version to v1.0d, but more changes to come before release.

- EEPROM strings were linked to the LINE_BUFFER_SIZE, which were
increased from 80 to 256. This caused a problem with EEPROM storage and
would corrupt any existing data there. Now fixed to preserve the data
there by limiting the size read or written to EEPROM to 80 characters.

- When EEPROM string length is exceeded, Grbl will respond with a “Line
length exceeded” error.

- Re-added a couple of compile-time options: realtime line numbers and
rate reporting. This is to ensure backward support for GUIs for the
time being. These removal options will go away eventually before they
become hard-coded in. (They will be toggle-able with the status report
mask in settings though.)
2016-03-20 16:42:13 -06:00
Sonny Jeon
061e6097c1 Removed 328p-related code. Enabled options by default.
- Removed all of the 328p-related code, which seemed to clean up things
quite a bit without all those ifdefs everywhere.

- Since the 328p was very memory and flash limited, lots of
compile-time options were disabled by default. These have been now been
enabled by default. As they are considered generally helpful and does
not significantly impact how Grbl runs.

- For example, status reports can now report back real time feed rate
and line number being executed. Variable spindle is standard with a
separate spindle enable pin. Grbl will now check if a user setting has
exceeded the maximum step frequency and report an error, if so. And
finally, M7 flood coolant is enabled.

- In addition, all buffers have been significantly increased to take
advantage of the additional memory available. The planner buffer can
plan up to 36 motions. The serial buffers have been doubled in size
(256/128 bytes RX/TX). And the longest line Grbl can accept is 256
bytes, per the g-code standard (Grbl 328p is limited to 80).

- Removed the cpu_map folder, since this version is strictly Mega2560.
2016-03-19 21:07:42 -06:00
chamnit
ff5f8daa96 Update README 2016-03-19 13:01:39 -06:00
Sonny Jeon
5bfc3a1945 No variable spindle and spindle speed fix.
- Soft limit errors were stuck in a feed hold without notifying the
user why it was in a hold. When resumed, the soft limit error would
kick in. Issue should be fixed to behave as intended to automatically
hold and issue a soft limit alarm once the machine has come to a stop.
2016-03-19 12:41:52 -06:00
Sonny Jeon
81adc202cd Soft limit error bug fix.
- Soft limit errors were stuck in a feed hold without notifying the
user why it was in a hold. When resumed, the soft limit error would
kick in. Issue should be fixed to behave as intended. To automatically
hold and issue a soft limit alarm once the machine has come to a stop.
2016-03-11 09:42:07 -07:00
Sonny Jeon
111d28dc9a Applied master branch bug fixes.
- Planner was under-estimating maximum speeds through straight
junctions in certain cases. The calculations have been updated to be
more accurate.

- Strange sizeof() bug in the most recent releases. Manifested as an
alarm upon a power up even when homing was disabled. Fixed by declaring
sizeof() with struct types, rather than variable names, even though
they were validated to give the same value.

- Spindle speed zero should disable the spindle. Now fixed.

- New configuration option for inverting certain limit pins. Handy for
mixed NO and NC switch machines. See config.h for details.
2016-03-04 13:39:29 -07: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
b9c3461932 Bug fixes.
- G38.x was not printing correctly in the $G g-code state reports. Now
fixed.

- When investigating the above issue, it was noticed that G38.x
wouldn’t show at all, but instead a G0 would be printed. This was
unlike the v0.9j master build. It turned out volatile variables do not
like to be defined inside a C struct. These are undefined on how to be
handled. Once pulled out, all weird issues went away.

- Also changed two ‘sizeof()’ statements in the mc_probe() and
probe_state_monitor() functions to be more robust later on.

- Updated the commit logs to individual files for each minor release.
Forgot to update the generating script to account for this.
2015-09-30 21:32:58 -06:00
Sonny Jeon
d226555810 Minor bug fixes.
- G38.x was not printing correctly in the $G g-code state reports. Now
fixed.

- Potential bug regarding volatile variables inside a struct. It has
never been a problem in v0.9, but ran into this during v1.0
development. Just to be safe, the fixes are applied here.

- Updated pre-built firmwares with these two bug fixes.
2015-09-30 20:53:35 -06: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
965e337405 Parking motion bug fix.
- Parking motion would intermittently complete the queued tool path
upon resuming in certain scenarios. Now fixed.
2015-09-05 13:34:40 -06:00
Sonny Jeon
9575199183 Optional line number reporting bug fix.
- Fixed a bug where it would not compile when USE_LINE_NUMBERS was
enabled.
2015-08-29 16:28:29 -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
90ad129ad2 Update README.md 2015-08-16 22:43:30 -06:00
Sonny Jeon
3a68c22fab Individual control pin invert compile-option.
- Control pins may be individually inverted through a
CONTROL_INVERT_MASK macro. This mask is define in the cpu_map.h file.
2015-08-14 14:13:52 -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
185de02836 Added restore settings defaults command.
- New restore setting defaults command. Only wipes ‘$$’ setting in
EEPROM and reloads them based on the defaults used when Grbl was
compiled. Used with a `$RST` command

NOTE: `$RST` is intentionally not listed in the Grbl ‘$’ help message.
2015-06-18 09:23:17 -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
2e8ed41b11 Another git case-sensitive folder fix.
- I’m now officially annoyed.
2015-05-27 08:32:24 -06:00
Sonny Jeon
d0919142c5 Added X-Carve defaults.
- Added X-Carve 500mm and 1000mm default files.

- Tweaked all default files. Removed obsolete AUTO_START and updated
some JUNCTION_DEVIATION defaults after testing showed these needed to
be reduced slightly.
2015-05-27 08:19:22 -06:00
Sonny Jeon
39a047a35f Merge pull request #710 from buserror/fix-directory-case-sensitivity
Rename Grbl to grbl
2015-05-27 07:49:58 -06:00
Michel Pollet
558e1a2dfc Rename Grbl to grbl
Otherwise compilation fails on linux, or other case sensitive systems

Signed-off-by: Michel Pollet <buserror@gmail.com>
2015-05-27 14:07:53 +01:00
Sonny Jeon
8a84f8987d Updated README 2015-05-26 10:49:37 -06:00
Sonny Jeon
d13f741f7d Merge pull request #706 from grbl/edge
Merge edge branch.
2015-05-26 10:42:03 -06:00
Sonny Jeon
0eb8bca3d9 CoreXY planner bug fix.
- CoreXY motions were moving to the negative value of the intended
target. Now fixed.
2015-05-23 16:40:20 -06:00
Sonny Jeon
993c83d1c8 Moved cpu_map.
- Moved cpu_map files to a cpu_map directory, like the defaults file
organization.
2015-05-23 12:43:52 -06:00
Sonny Jeon
f85c481ded Homing and limit updates. Minor bug fixes.
- Updated new homing cycle to error out when a pull-off motion detects
the limit is still active.

- Created a limits_get_state() function to centralize it. It reports
state as a bit-wise booleans according to axis numbering.

- Updated the print uint8 functions. Generalized it to allow both base2
and base10 printouts, while allowing base2 prints with N_AXIS digits
for limit state status reports. Doing this saved about 100bytes of
flash as well.

- Applied CoreXY status reporting bug fix by @phd0. Thanks!
2015-05-23 11:57:30 -06:00
Sonny Jeon
e704862f11 Merge pull request #702 from ashelly/default-split
Moving defaults to individual files in subdirectory
2015-05-22 16:41:10 -06:00
ashelly
b58e8455c9 Moving defaults to individual files in subdirectory 2015-05-22 17:32:00 -04:00
Sonny Jeon
2beaeeb42b Merge pull request #700 from ashelly/header-split
Header split
2015-05-22 09:19:16 -06:00
ashelly
6558a71fb1 Fixing up comment blocks in headers 2015-05-22 10:48:25 -04:00
ashelly
25cdeb830b Splitting Cpu map into separate files.
Makes comparison, addition of new ones easier
2015-05-22 10:24:48 -04:00
Sonny Jeon
664854b9df Critical M0/2/30 fix. Homing updates.
- Critical fix for M0 program pause. Due to its recent change, it would
cause Grbl to suspend but wouldn’t notify the user of why Grbl was not
doing anything. The state would show IDLE and a cycle start would
resume it. Grbl now enters a HOLD state to better indicate the state
change.

- Critical fix for M2 and M30 program end. As with M0, the state
previously would show IDLE while suspended. Grbl now does not suspend
upon program end and leaves job control to the GUI. Grbl simply reports
a `[Pgm End]` as a feedback message and resets certain g-code modes.

- M2/30 g-code reseting fix. Previously Grbl would soft-reset after an
M2/30, but this was not complaint to the (linuxcnc) g-code standard. It
simply resets [G1,G17,G90,G94,G40,G54,M5,M9,M48] and keeps all other
modes the same.

- M0/M2/M30 check-mode fix. It now does not suspend the machine during
check-mode.

- Minor bug fix related to commands similar to G90.1, but not G90.1,
not reporting an unsupported command.

- Homing cycle refactoring. To help reduce the chance of users
misunderstanding their limit switch wiring, Grbl only moves a short
distance for the locate cycles only. In addition, the homing cycle
pulls-off the limit switch by the pull-off distance to re-engage and
locate home. This should improve its accuracy.

- HOMING_FORCE_ORIGIN now sets the origin to the pull-off location,
rather than where the limit switch was triggered.

- Updated default junction deviation to 0.01mm. Recent tests showed
that this improves Grbl’s cornering behavior a bit.

- Added the ShapeOko3 defaults.

- Added new feedback message `[Pgm End]` for M2/30 notification.

- Limit pin reporting is now a $10 status report option. Requested by
OEMs to help simplify support troubleshooting.
2015-05-17 13:25:36 -06:00