Commit Graph

717 Commits

Author SHA1 Message Date
Anders Sandstrom
2917bdfeb5 WIP 2022-01-20 17:37:08 +01:00
Anders Sandstrom
08053a9896 WIP 2022-01-20 17:34:45 +01:00
Anders Sandstrom
0b33512ffd Increase serial buffers.. 2022-01-20 17:29:06 +01:00
Anders Sandstrom
e2de2fb0a8 WIP 2022-01-20 16:55:06 +01:00
Anders Sandstrom
002221ccf1 WIP 2022-01-20 16:32:18 +01:00
Anders Sandstrom
aa5b5f8267 Prefix all grbl files with grbl to avoid conflicts.. 2022-01-20 13:45:18 +01:00
Anders Sandstrom
84ff286e0b Rename limits.h to avoid conflict 2022-01-20 13:33:21 +01:00
Anders Sandstrom
d78e8ef9f6 Integrate as a normal plugin.. WIP 2022-01-20 13:08:08 +01:00
Anders Sandstrom
406b66d020 WIP: tested G0,G1,G2,G4.. 2022-01-19 21:14:47 +01:00
Anders Sandstrom
972f29ec19 WIP 2022-01-19 20:06:00 +01:00
Anders Sandstrom
3f9eb4ea85 add client thread. Fix delay_ms bug ... 2022-01-19 18:05:16 +01:00
Anders Sandstrom
450f553699 Test x,y movement 2022-01-18 15:37:22 +01:00
Anders Sandstrom
6e4bd2410f First parsed G-code commandgit add .! 2022-01-18 15:28:28 +01:00
Anders Sandstrom
6ce6b78ebe WIP: settings to file (eeprom) seems to work 2022-01-18 11:25:10 +01:00
Anders Sandstrom
6ece50c491 First execute as ecmc plugin.. 2022-01-18 10:25:21 +01:00
Anders Sandstrom
4143351780 WIP 2022-01-17 17:13:38 +01:00
Anders Sandstrom
952c0d4cf5 WIP 2022-01-17 16:04:51 +01:00
Anders Sandstrom
e907604e26 WIP: need to check print again.. Maybe keep serial interface.. 2022-01-17 14:04:24 +01:00
Sonny Jeon
bfb67f0c79 Update README.md 2021-01-22 19:13:48 -05:00
Sonny Jeon
eefe2bb95b Update log. 2019-08-30 07:13:51 -04:00
Sonny Jeon
bdc2da9b59 Fixed typo bug effecting dual-axis build with Y. 2019-08-30 07:13:21 -04:00
Sonny Jeon
40eb439bf2 Update grbl.h 2019-08-25 21:13:03 -04:00
Sonny Jeon
cc4c0ffebc Update system.c 2019-08-25 21:04:09 -04:00
Sonny Jeon
b75e5571ee Dual motor support for self-squaring gantry homing.
- New dual motor support feature for gantry CNC machines. An axis motor is  efficiently mirrored to a dedicated set of step and direction pins (D12/D13 or A3/A4) with no detectable loss of performance. Primarily used to independently home both sides of a dual-motor gantry with a pair of limit switches (second shared with Z-axis limit pin). When the limit switches are setup correctly, Grbl will self-square the gantry (and stay square if $1=255 is programmed). Beware use at your own risk! Grbl is not responsible for any damage to any machines.

- Dual axis motors is only supported on the X-axis or Y-axis. And deletes the spindle direction(D13) and optional coolant mist (A4) features to make room for the dual motor step and direction pins.

- Dual axis homing will automatically abort homing if one limit switch triggers and travels more than 5% (default) of the non-dual axis max travel setting. For example, if the X-axis has dual motors and one X-axis triggers during homing, Grbl will abort 5% of the Y-axis max travel and the other X-axis limit fails to trigger. This will help keep any misconfigurations or failed limit switches from damaging the machine, but not completely eliminate this risk. Please take all precautions and test thouroughly before using this.

- Dual axis motors supports two configurations:

- Support for Arduino CNC shield clones. For these, step/dir on pins D12/D13, and spindle enable is moved to A3 (old coolant enable), while coolant enable is moved to A4 (SDA pin). Variable spindle/laser mode option is NOT supported for this shield.

- Support for Protoneer CNC Shield v3.51. Step/dir on pins A3/A4, and  coolant enable is moved to D13 (old spindle direction pin). Variable spindle/laser mode option IS supported for this shield.

- Added Bob's CNC E3 and E4 CNC machine defaults.
2019-07-30 21:51:49 -04:00
Sonny Jeon
bb25d2f97e Update grbl.h 2018-11-12 08:25:57 -07:00
Sonny Jeon
addb1a9813 Update system.c
Correct control pin state checking within pin change interrupt. Improper if-else statements could lead to missed signal.
2018-11-12 08:25:32 -07:00
Sonny Jeon
0b5604bd7b Update gcode.c
If statement bug fix related to jog motion modal group error checking.
2018-11-12 08:20:45 -07:00
Sonny Jeon
332acada88 Spindle/coolant rare bug fixes. Free more flash.
[new] Altered the way default settings are stored and restored. Saved about 300 bytes(!) of flashed size. Should free up enough for certain configurations of CoreXY machines.

[fix] When the optional M7 mist coolant IO was enabled, coolant overrides was not disabling correctly.

[fix] Coolant override states was not restored correctly after a parking motion in certain situations. It would restore programmed state, rather than current overridden state.

[fix] Now allow coolant overrides to operate during jogging motion.

[fix] Invert control pin mask typo.

[new] Added a new build info feedback mechanism for enabling the safety door input pin.
2018-06-14 10:10:58 -06:00
Jon
a84aa1800c Fix apparent error in restore masking that causes the call to coolant_set_state to not re-enable the mist (M7) output if it was previously enabled. (#469) 2018-06-09 17:47:01 -06:00
Sonny Jeon
5c8dcefcbd Updated instructions in fit_nonlinear_spindle.py
- repl.it has changed since the last time fit_nonlinear_spindle.py was tested. Updated instructions.
2018-04-06 13:09:15 -06:00
Sonny Jeon
5967839ab3 Improved fix for rare lowering feed/rapid override bug.
[fix] In the previous hot fix, there was still (rarer) potential for
very small floating point errors incorrectly handle an override
deceleration and crash Grbl. Re-factored the if-then statement in terms
of speed changes, rather than distance, to completely eliminate the
issue.
2017-08-01 10:27:42 -06:00
Sonny Jeon
477a94cd49 Hot fix for rare lowering feed override bug.
[fix] Squashed a very rare bug when lowering the feedrate (or rapid) override. When in the very strict set of circumstances with acceleration settings, override step size, and current speed, an internal calculation would cause Grbl to crash. The fix was an overlooked equality statement that should have been a less than or equal, not a less than.
2017-07-31 17:48:07 -06:00
Sonny Jeon
921e5a9799 Clean up and new streaming script check-mode feature.
[new] The stream.py streaming script now has a check-mode option, where it will place Grbl in $C check mode automatically and then stream the g-code program. It's a very fast way to check if the g-code program has any errors.

[fix] The debug variable was not initialized if the debug option was enabled in config.h

[fix] Updated error_codes CSV file to the same format as the others.
2017-07-17 21:25:42 -06:00
chamnit
790c666ecb New nonlinear spindle speed PWM output model and solution. Updated scripts.
[new] A nonlinear spindle speed/PWM output option via a piecewise
linear fit model. Enabled through config.h and solved by a Python
script in /doc/script

[new] fit_nonlinear_spindle.py. A solver script that can be run on
http://repl.it for free. No Python install necessary. All instructions
are available in the script file comments.

[new] stream.py has been updated to include status reports feedback at
1 second interval.

[fix] stream.py bug fix with verbose mode disabled.
2017-05-31 21:37:21 -06:00
Sonny Jeon
775acac601 Added an error code for laser mode when VARIABLE_SPINDLE is disabled.
- When trying to enable laser mode with $32=1 and VARIABLE_SPINDLE is
disabled, the error code shown was improperly stating it was a homing
failure. Added an new error code specifically for the laser mode being
disabled without VARIABLE_SPINDLE.
2017-03-24 20:18:54 -06:00
Sonny Jeon
43561abaf7 Housekeeping.
- Moved Grbl logo files to a separate repo.

- Added PocketNC FR4 defaults. Needs some additional work though to be
compatible.

- Updated README image links.
2017-03-19 09:27:52 -06:00
Sonny Jeon
b214accc6d Update README.md 2017-03-19 09:09:09 -06:00
Sonny Jeon
849122559b Fixed $G report issue with M7 and M8 both enabled.
[fix] When M7 and M8 are both enabled, $G report would show `M78`,
rather than `M7 M8`. This only effects systems that enable M7 mist
coolant in config.h. Not the default build.
2017-03-02 09:40:23 -07:00
Sonny Jeon
fd2a4ebaee Fixed shared build info code.
- The build info options of “two switches on an axis” and “homing init
lock” shared the same letter ‘L’. The former is now ’T’.
2017-02-27 15:24:51 -07:00
Sonny Jeon
e54444e948 Restrict coincident target updates to M3 constant laser only.
- Restrict M3 forced updates when there is a motion block with a
coincident target. Force syncing of the spindle state can lead to some
pauses during a job that has coincident targets. That’s not
particularly desirable. This ensures M4 dynamic mode is not effected by
this force-sync.
2017-02-23 12:52:35 -07:00
Sonny Jeon
bdc853e557 Fixed issue with M3 laser state changes and coincident targets.
[fix] When in M3 constant laser power mode, a change from G0 to G1
would not set the laser on, if G1 was passed with a coincident target.
Motion controller now checks for a coincident target situation and will
force a spindle sync when detected.
2017-02-23 12:00:20 -07:00
Sonny Jeon
f51268e855 Additional build info in the $I printout.
- [new] Added total available planner buffer blocks (15 shown, but
there are 16. one is used by the ring buffer and to execute system
motions) and serial RX buffer bytes. This information is useful for
GUIs to setup and optimize their streaming protocols easily.

[doc] Updated the interface document to reflect the change.
2017-01-31 18:46:20 -07:00
Sonny Jeon
beaa40583c Tidying up parking override control implementation
[new] Added a default configuration for the parking override control
upon a reset or power-up. By default, parking is enabled, but this may
be disabled via a config.h option.

[fix] Parking override control should be checking if the command word
is passed, rather than the value.
2017-01-29 11:35:51 -07:00
chamnit
e455764079 v1.1f. Parking override control. Spindle enable pin option.
[ver] v1.1f update due to tweaks to interface from new parking override
control.

[new] Parking motion override control via new `M56 P0` and `M56 P1`
command, which disables and enables the parking motion, respectively.
Requires ENABLE_PARKING_OVERRIDE_CONTROL and PARKING_ENABLE enabled in
config.h. Primarily for OEMs.

[new] `M56` appears in the $G report when enabled.

[new] Five new build info identification letters. Some were missing and
a couple are new. Updated the CSV and documentation to reflect these
new items.

[new] Spindle enable pin configuration option to alter its behavior
based on how certain lasers work. By default, Grbl treats the enable
pin separately and leaves it on when S is 0. The new option turns the
enable pin on and off with S>0 and S=0. This only is in effect when a
user enables the USE_SPINDLE_DIR_AS_ENABLE_PIN option.

[fix] M4 is now allowed to work when USE_SPINDLE_DIR_AS_ENABLE_PIN is
enabled. Previously this was blocked and was problematic for laser
folks using M4.

[fix] Properly declared system variables as extern. Not sure how that
went unnoticed or why it worked up until now but it has.

[fix] EXTREMELY RARE. When AMASS is intentionally disabled and sent a
motion command that is _one step_ in length, Grbl would not actuate the
step due to numerical round-off. Applied a fix to prevent the round-off
issue.

[fix] Added a compile-time check for AMASS settings to make sure that
the numerical round-off issue doesn’t effect it. This would only happen
if someone set AMASS max levels to zero. It does not effect AMASS with
its current defaults.

[fix] Wrapped the mc_parking_motion() function in an ifdef for porting
purposes.

[fix] Fixed an issue when in inverse time mode and G0’s would require a
F word. This was not correct.

[fix] Added a note in the defaults.h file that MAX_TRAVEL values must
be positive. Some users were setting this negative and it was causing
issues.
2017-01-28 17:13:06 -07:00
Sonny Jeon
67ab9280d9 Tool number bug fix. Updated documentation.
- [fix] Tool numbers were not being tracked and reported correctly. Now
shows tool number values in $G when programmed.

- [fix] Added a max tool number value check to the g-code parser.

- [doc] Added a new error code for invalid tool number. Updated CSV and
interface documents.

- [doc] Added a implementation note for buffer state in status reports.
Don’t rely on this data for streaming.
2017-01-14 13:54:14 -07:00
Sonny Jeon
30c0f79afd Spindle enable pin with variable spindle option fix.
- [fix] When USE_SPINDLE_DIR_AS_ENABLE_PIN is enabled in config.h, the
enable pin was not being set when spindle speed is zero. This behavior
should now be fixed.
2017-01-03 10:10:35 -07:00
Sonny Jeon
864d1306b9 Fixed homing fail alarm handling. Re-integrated software debouncing.
- [bug] Fixed a homing fail issue, where the alarm was not being set
right, not cleared correctly. It would report the wrong code and enter
an infinite alarm loop. This was due to how alarm codes were altered a
while back. Now updated and fixed to show the right codes.

- [feature] Re-installed optional software debouncing for hard limit
switches. By request.
2016-12-19 22:18:23 -07:00
Sonny Jeon
d5ed3bdb81 Addressed optional PWM min value issue. Updated docs.
- [fix] Spindle PWM minimum value had some typos. Fixed the macros to
compile correctly. Only effects users that enable SPINDLE_MINIMUM_PWM.
The name changed to SPINDLE_PWM_MIN_VALUE for consistency sake.

- Updated the laser documentation.
2016-12-18 19:17:55 -07:00
Sonny Jeon
af17f0071f Updating steam.py streaming script
- Added push message capability to the stream.py streaming script. It
prints out as a `Debug:` string in the output.
2016-12-12 11:49:18 -07:00
Sonny Jeon
5d79103eb9 Updated documentation. 2016-12-11 20:04:17 -07:00