v1.1c: New sleep mode. Laser mode and other bug fixes.

- New $SLP sleep mode that will disable spindle, coolant, and stepper
enable pins. Allows users to disable their steppers without having to
alter their settings. A reset is required to exit and re-initializes in
alarm state.

- Laser mode wasn’t updating the spindle PWM correctly (effected
spindle speed overrides) and not checking for modal states either.
Fixed both issues.

- While in laser mode, parking motions are ignored, since the power off
delay with the retract motion would burn the material. It will just
turn off and not move. A restore immediately powers up and resumes. No
delays.

- Changing rpm max and min settings did not update the spindle PWM
calculations. Now fixed.

- Increased default planner buffer from 16 to 17 block. It seems to be
stable, but need to monitor this carefully.

- Removed software debounce routine for limit pins. Obsolete.

- Fixed a couple parking motion bugs. One related to restoring
incorrectly and the other the parking rate wasn’t compatible with the
planner structs.

- Fixed a bug caused by refactoring the critical alarms in a recent
push. Soft limits weren’t invoking a critical alarm.

- Updated the documentation with the new sleep feature and added some
more details to the change summary.
This commit is contained in:
Sonny Jeon
2016-10-11 17:07:44 -06:00
parent e2e2bb5242
commit d1037268c8
20 changed files with 176 additions and 202 deletions

View File

@ -1,3 +1,21 @@
----------------
Date: 2016-09-28
Author: Sonny Jeon
Subject: New jog cancel real-time command. Parser typo fix from last push.
- Added a new jog cancel real-time command. Rather than depending on a
feed hold to cancel a jogging motion, this realtime command can be used
instead. The main advantage is if a feed hold is used, you can
accidentally hold the machine right when Grbl returns to IDLE after
completing a jog. And the GUI doesnt have to worry about tracking this
either.
- Fixed a typo in the g-code parser edits from the last push. Was
causing the G10 set coordinate system command to not work correctly.
- Updated the documentation with the jog cancel command.
----------------
Date: 2016-09-27
Author: Sonny Jeon

View File

@ -2,7 +2,7 @@
--------
### _Specific details are available in the interface.md document._
### _Specific details are available in the other markdown documents._
--------
#### GUI Interface Tweaks from Grbl v0.9
@ -33,7 +33,9 @@ Grbl v1.1's interface protocol has been tweaked in the attempt to make GUI devel
- `>G54G20:ok` : The open chevron indicates startup line execution. The `:ok` suffix shows it executed correctly without adding an unmatched `ok` response on a new line.
On a final note, this interface tweak came about out of necessity, as more data is being sent back from Grbl and it is capable of doing many more things. It's not intended to be altered again in the near future, if at all. This is likely the only and last major change to this. If you have any comments or suggestions before Grbl v1.1 goes to master, please do immediately so we can all vet the new alteration before its installed.
In addition, all `$x=val` settings, `error:`, and `ALARM:` messages no longer contain human-readable strings, but rather codes that are defined in other documents. The `$` help message is also reduced to just showing the available commands. Doing this saves incredible amounts of flash space. Otherwise, the new overrides features would not have fit.
On a final note, these interface tweaks came about out of necessity, because more data is being sent back from Grbl, it is capable of doing many more things, and flash space is at a premium. It's not intended to be altered again in the near future, if at all. This is likely the only and last major change to this. If you have any comments or suggestions before Grbl v1.1 goes to master, please do immediately so we can all vet the new alteration before its installed.
----
@ -92,3 +94,13 @@ On a final note, this interface tweak came about out of necessity, as more data
- Grbl is executing g-code block that does not contain a motion, like `G20G54` or `G4P1` dwell. (NOTE: Looking to fixing this later.)
-------
#### New Commands
- `$SLP` - Grbl v1.1 now has a sleep mode that can be invoked by this command. It requires Grbl to be in either an IDLE or ALARM state. Once invoked, Grbl will de-energize all connected systems, including the spindle, coolant, and stepper drivers. It'll enter a suspend state that can only be exited by a reset. When reset, Grbl will re-initiatize in an ALARM state because the steppers were disabled and position can not be guaranteed.
- NOTE: Grbl-Mega can invoke the sleep mode at any time, when the sleep timeout feature is enabled in config.h. It does so when Grbl has not received any external input after a timeout period.
- `$J=line` New jogging commands. This command behaves much like a normal G1 command, but there are some key differences. Jog commands don't alter the g-code parser state, meaning a GUI doesn't have to manage it anymore. Jog commands may be queued and cancelled at any time, where they are automatically flushed from the planner buffer without requiring a reset. See the jogging documentation on how they work and how they may be used to implement a low-latency joystick or rotary dial.
- Laser mode `$` setting - When enabled, laser mode will move through consecutive G1, G2, and G3 motion commands that have different spindle speed values without stopping. A spindle speed of zero will disable the laser without stopping as well. However, when spindle states change, like M3 or M5, stops are still enforced.
- NOTE: Parking motions are automatically disabled when laser mode is enabled to prevent burning.

View File

@ -23,7 +23,7 @@ The start up message always prints upon startup and after a reset. Whenever you
Every string Grbl receives is assumed to be a G-code block/line for it to execute, except for some special system commands Grbl uses for configuration, provide feedback to the user on what and how it's doing, or perform some task such as a homing cycle. To see a list of these system commands, type `$` followed by an enter, and Grbl will respond with:
```
[HLP:$$ $# $G $I $N $x=val $Nx=line $J=line $C $X $H ~ ! ? ctrl-x]
[HLP:$$ $# $G $I $N $x=val $Nx=line $J=line $SLP $C $X $H ~ ! ? ctrl-x]
```
- _**NOTE:** Grbl v1.1's new override real-time commands are not included in the help message. They use the extended-ASCII character set, which are not easily type-able, and require a GUI that supports them. This is for two reasons: Establish enough characters for all of the overrides with extra for later growth, and prevent accidental keystrokes or characters in a g-code file from enacting an override inadvertently. _
@ -249,6 +249,8 @@ Feedback messages provide non-critical information on what Grbl is doing, what i
- `[MSG:Pgm End]` - M2/30 program end message to denote g-code modes have been restored to defaults according to the M2/30 g-code description.
- `[MSG:Restoring defaults]` - Appears as an acknowledgement message when restoring EEPROM defaults via a `$RST=` command. An 'ok' still appears immediately after to denote the `$RST=` was parsed and executed.
- `[MSG:Sleeping]` - Appears as an acknowledgement message when Grbl's sleep mode is invoked by issuing a `$SLP` command when idle. Note that Grbl-Mega may invoke this at any time when the sleep timer option has been enabled and the timeout has been exceeded. Grbl may only be exited by a reset in the sleep state and will automatically enter an alarm state since the steppers were disabled.
- **Queried Feedback Messages:**
@ -362,7 +364,7 @@ Feedback messages provide non-critical information on what Grbl is doing, what i
- **Machine State:**
- Valid states types: `Idle, Run, Hold, Jog, Alarm, Door, Check, Home`
- Valid states types: `Idle, Run, Hold, Jog, Alarm, Door, Check, Home, Sleep`
- Sub-states may be included via `:` a colon delimiter and numeric code.