Skip to content

Commit ee65b9a

Browse files
committed
Merge tag 'v1.1f.20170131'
2 parents ed82dd9 + f51268e commit ee65b9a

19 files changed

+320
-104
lines changed

doc/csv/build_option_codes_en_US.csv

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,14 @@
88
"H","Homing single axis commands","Enabled"
99
"L","Two limit switches on axis","Enabled"
1010
"A","Allow feed rate overrides in probe cycles","Enabled"
11+
"D","Use spindle direction as enable pin","Enabled"
12+
"0","Spindle enable off when speed is zero","Enabled"
13+
"S","Software limit pin debouncing","Enabled"
14+
"R","Parking override control","Enabled"
1115
"*","Restore all EEPROM command","Disabled"
1216
"$","Restore EEPROM `$` settings command","Disabled"
1317
"#","Restore EEPROM parameter data command","Disabled"
1418
"I","Build info write user string command","Disabled"
1519
"E","Force sync upon EEPROM write","Disabled"
16-
"W","Force sync upon work coordinate offset change","Disabled"
20+
"W","Force sync upon work coordinate offset change","Disabled"
21+
"L","Homing initialization auto-lock","Disabled"

doc/log/commit_log_v1.1.txt

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,86 @@
1+
----------------
2+
Date: 2017-01-29
3+
Author: Sonny Jeon
4+
Subject: Tidying up parking override control implementation
5+
6+
[new] Added a default configuration for the parking override control
7+
upon a reset or power-up. By default, parking is enabled, but this may
8+
be disabled via a config.h option.
9+
10+
[fix] Parking override control should be checking if the command word
11+
is passed, rather than the value.
12+
13+
14+
----------------
15+
Date: 2017-01-28
16+
Author: chamnit
17+
Subject: v1.1f. Parking override control. Spindle enable pin option.
18+
19+
[ver] v1.1f update due to tweaks to interface from new parking override
20+
control.
21+
22+
[new] Parking motion override control via new `M56 P0` and `M56 P1`
23+
command, which disables and enables the parking motion, respectively.
24+
Requires ENABLE_PARKING_OVERRIDE_CONTROL and PARKING_ENABLE enabled in
25+
config.h. Primarily for OEMs.
26+
27+
[new] `M56` appears in the $G report when enabled.
28+
29+
[new] Five new build info identification letters. Some were missing and
30+
a couple are new. Updated the CSV and documentation to reflect these
31+
new items.
32+
33+
[new] Spindle enable pin configuration option to alter its behavior
34+
based on how certain lasers work. By default, Grbl treats the enable
35+
pin separately and leaves it on when S is 0. The new option turns the
36+
enable pin on and off with S>0 and S=0. This only is in effect when a
37+
user enables the USE_SPINDLE_DIR_AS_ENABLE_PIN option.
38+
39+
[fix] M4 is now allowed to work when USE_SPINDLE_DIR_AS_ENABLE_PIN is
40+
enabled. Previously this was blocked and was problematic for laser
41+
folks using M4.
42+
43+
[fix] Properly declared system variables as extern. Not sure how that
44+
went unnoticed or why it worked up until now but it has.
45+
46+
[fix] EXTREMELY RARE. When AMASS is intentionally disabled and sent a
47+
motion command that is _one step_ in length, Grbl would not actuate the
48+
step due to numerical round-off. Applied a fix to prevent the round-off
49+
issue.
50+
51+
[fix] Added a compile-time check for AMASS settings to make sure that
52+
the numerical round-off issue doesn’t effect it. This would only happen
53+
if someone set AMASS max levels to zero. It does not effect AMASS with
54+
its current defaults.
55+
56+
[fix] Wrapped the mc_parking_motion() function in an ifdef for porting
57+
purposes.
58+
59+
[fix] Fixed an issue when in inverse time mode and G0’s would require a
60+
F word. This was not correct.
61+
62+
[fix] Added a note in the defaults.h file that MAX_TRAVEL values must
63+
be positive. Some users were setting this negative and it was causing
64+
issues.
65+
66+
67+
----------------
68+
Date: 2017-01-14
69+
Author: Sonny Jeon
70+
Subject: Tool number bug fix. Updated documentation.
71+
72+
- [fix] Tool numbers were not being tracked and reported correctly. Now
73+
shows tool number values in $G when programmed.
74+
75+
- [fix] Added a max tool number value check to the g-code parser.
76+
77+
- [doc] Added a new error code for invalid tool number. Updated CSV and
78+
interface documents.
79+
80+
- [doc] Added a implementation note for buffer state in status reports.
81+
Don’t rely on this data for streaming.
82+
83+
184
----------------
285
Date: 2017-01-03
386
Author: Sonny Jeon

doc/markdown/change_summary.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,4 +109,6 @@ On a final note, these interface tweaks came about out of necessity, because mor
109109
- `$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.
110110

111111
- 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.
112-
- NOTE: Parking motions are automatically disabled when laser mode is enabled to prevent burning.
112+
- NOTE: Parking motions are automatically disabled when laser mode is enabled to prevent burning.
113+
114+
- `G56 P1` and `G56 P0` - When enabled in config.h with Grbl's parking motion, these commands enable and disable, respectively, the parking motion. Like all override control commands, these commands are modal and are part of the g-code stream.

doc/markdown/commands.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ This command prints all of the active gcode modes in Grbl's G-code parser. When
6464

6565
These active modes determine how the next G-code block or command will be interpreted by Grbl's G-code parser. For those new to G-code and CNC machining, modes sets the parser into a particular state so you don't have to constantly tell the parser how to parse it. These modes are organized into sets called "modal groups" that cannot be logically active at the same time. For example, the units modal group sets whether your G-code program is interpreted in inches or in millimeters.
6666

67-
A short list of the modal groups, supported by Grbl, is shown below, but more complete and detailed descriptions can be found at LinuxCNC's [website](http://www.linuxcnc.org/docs/2.4/html/gcode_overview.html#sec:Modal-Groups). The G-code commands in **bold** indicate the default modes upon powering-up Grbl or resetting it.
67+
A short list of the modal groups, supported by Grbl, is shown below, but more complete and detailed descriptions can be found at LinuxCNC's [website](http://www.linuxcnc.org/docs/2.4/html/gcode_overview.html#sec:Modal-Groups). The G-code commands in **bold** indicate the default modes upon powering-up Grbl or resetting it. The commands in _italics_ indicate a special Grbl-only command.
6868

6969
| Modal Group Meaning | Member Words |
7070
|:----:|:----:|
@@ -80,6 +80,9 @@ A short list of the modal groups, supported by Grbl, is shown below, but more co
8080
|Program Mode | **M0**, M1, M2, M30|
8181
|Spindle State |M3, M4, **M5**|
8282
|Coolant State | M7, M8, **M9** |
83+
|Override Control | _M56_ |
84+
85+
Grbl supports a special _M56_ override control command, where this enables and disables Grbl's parking motion when a `P1` or a `P0` is passed with `M56`, respectively. This command is only available when both parking and this particular option is enabled.
8386

8487
In addition to the G-code parser modes, Grbl will report the active `T` tool number, `S` spindle speed, and `F` feed rate, which all default to 0 upon a reset. For those that are curious, these don't quite fit into nice modal groups, but are just as important for determining the parser state.
8588

doc/markdown/interface.md

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,9 @@ The real-time control commands, `~` cycle start/resume, `!` feed hold, `^X` sof
6262
One important note are the override command characters. These are defined in the extended-ASCII character space and are generally not type-able on a keyboard. A GUI must be able to send these 8-bit values to support overrides.
6363

6464
#### EEPROM Issues
65-
EEPROM access on the Arduino AVR CPUs turns off all of the interrupts while the CPU reads and writes to EEPROM. This poses a problem for certain features in Grbl, particularly if a user is streaming and running a g-code program, since it can pause the main step generator interrupt from executing on time. Most of the EEPROM access is restricted by Grbl when it's in certain states, but there are some things that developers need to know.
65+
EEPROM access on the Arduino AVR CPUs turns off all of the interrupts while the CPU _writes_ to EEPROM. This poses a problem for certain features in Grbl, particularly if a user is streaming and running a g-code program, since it can pause the main step generator interrupt from executing on time. Most of the EEPROM access is restricted by Grbl when it's in certain states, but there are some things that developers need to know.
6666

67-
* Settings should not be streamed with the character-counting streaming protocols. Only the simple send-response protocol works. This is because during the EEPROM write, the AVR CPU also shuts-down the serial RX interrupt, which means data can get corrupted or lost.
68-
69-
* When changing work coordinates or accessing the `G28`/`G30` predefined positions, Grbl has to fetch them from EEPROM. There is a small chance this access can pause the stepper or serial receive interrupt long enough to cause motion issues, but since it only fetches 12 bytes at a time at 2 cycles per fetch, the chances are very small that this will do anything to how Grbl runs. We just suggest keeping an eye on this and report to us any issues you might think are related to this.
67+
* Settings should not be streamed with the character-counting streaming protocols. Only the simple send-response protocol works. This is because during the EEPROM write, the AVR CPU also shuts-down the serial RX interrupt, which means data can get corrupted or lost. This is safe with the send-response protocol, because it's not sending data after commanding Grbl to save data.
7068

7169
For reference:
7270
* Grbl's EEPROM write commands: `G10 L2`, `G10 L20`, `G28.1`, `G30.1`, `$x=`, `$I=`, `$Nx=`, `$RST=`
@@ -410,16 +408,16 @@ Feedback messages provide non-critical information on what Grbl is doing, what i
410408
- `[VER:]` and `[OPT:]`: Indicates build info data from a `$I` user query. These build info messages are followed by an `ok` to confirm the `$I` was executed, like so:
411409
412410
```
413-
[VER:v1.1d.20161014:Some string]
414-
[OPT:VL]
411+
[VER:v1.1f.20170131:Some string]
412+
[OPT:VL,16,128]
415413
ok
416414
```
417415
418416
- The first line `[VER:]` contains the build version and date.
419417
- A string may appear after the second `:` colon. It is a stored EEPROM string a user via a `$I=line` command or OEM can place there for personal use or tracking purposes.
420-
- The `[OPT:]` line follows immediately after and contains character codes for compile-time options that were either enabled or disabled. The codes are defined below and a CSV file is also provided for quick parsing. This is generally only used for quickly diagnosing firmware bugs or compatibility issues.
418+
- The `[OPT:]` line follows immediately after and contains character codes for compile-time options that were either enabled or disabled and two values separated by commas, which indicates the total usable planner blocks and serial RX buffer bytes, respectively. The codes are defined below and a CSV file is also provided for quick parsing. This is generally only used for quickly diagnosing firmware bugs or compatibility issues.
421419
422-
| `OPT` Code | Setting Description, Units |
420+
| `OPT` Code | Setting Description, Units |
423421
|:-------------:|----|
424422
| **`V`** | Variable spindle enabled |
425423
| **`N`** | Line numbers enabled |
@@ -429,14 +427,19 @@ Feedback messages provide non-critical information on what Grbl is doing, what i
429427
| **`Z`** | Homing force origin enabled |
430428
| **`H`** | Homing single axis enabled |
431429
| **`L`** | Two limit switches on axis enabled |
430+
| **`D`** | Spindle direction pin used as enable pin |
431+
| **`0`** | Spindle enable off when speed is zero enabled |
432+
| **`S`** | Software limit pin debouncing enabled |
433+
| **`R`** | Parking override control enabled |
432434
| **`A`** | Allow feed rate overrides in probe cycles |
433435
| **`*`** | Restore all EEPROM disabled |
434436
| **`$`** | Restore EEPROM `$` settings disabled |
435437
| **`#`** | Restore EEPROM parameter data disabled |
436438
| **`I`** | Build info write user string disabled |
437439
| **`E`** | Force sync upon EEPROM write disabled |
438440
| **`W`** | Force sync upon work coordinate offset change disabled |
439-
441+
| **`L`** | Homing initialization auto-lock disabled |
442+
440443
- `[echo:]` : Indicates an automated line echo from a command just prior to being parsed and executed. May be enabled only by a config.h option. Often used for debugging communication issues. A typical line echo message is shown below. A separate `ok` will eventually appear to confirm the line has been parsed and executed, but may not be immediate as with any line command containing motions.
441444
```
442445
[echo:G1X0.540Y10.4F100]

doc/markdown/laser_mode.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
----
66

7-
Outlined in this document is how Grbl alters its running conditions for the new laser mode to provide both improved performance and enforcing some basic user safety precautions.
7+
Outlined in this document is how Grbl alters its running conditions for the new laser mode to provide both improved performance and attempting to enforce some basic user safety precautions.
88

99
## Laser Mode Overview
1010

@@ -29,16 +29,16 @@ The laser is enabled with the `M3` spindle CW and `M4` spindle CCW commands. The
2929

3030
- **`M3` Constant Laser Power Mode:**
3131

32-
- Constant laser power mode simply keeps the laser power as programmed, regardless if the machine is moving, accelerating, or stopped. This provides better control of the laser state. With a good g-code program, this can lead to more consistent cuts in more difficult materials.
32+
- Constant laser power mode simply keeps the laser power as programmed, regardless if the machine is moving, accelerating, or stopped. This provides better control of the laser state. With a good G-code program, this can lead to more consistent cuts in more difficult materials.
3333

3434
- For a clean cut and prevent scorching with `M3` constant power mode, it's a good idea to add lead-in and lead-out motions around the line you want to cut to give some space for the machine to accelerate and decelerate.
3535

3636
- NOTE: `M3` can be used to keep the laser on for focusing.
3737

3838
- **`M4` Dynamic Laser Power Mode:**
39-
- Dynamic laser power mode will automatically adjust laser power based on the current speed relative to the programmed rate. It'll essentially ensures the amount of laser energy along a cut is consistent even though the machine may be stopped or actively accelerating. This is very useful for clean, precise engraving and cutting on simple materials across a large range of g-code generation methods by CAM programs. It will generally run faster and may be all you need to use.
39+
- Dynamic laser power mode will automatically adjust laser power based on the current speed relative to the programmed rate. It essentially ensures the amount of laser energy along a cut is consistent even though the machine may be stopped or actively accelerating. This is very useful for clean, precise engraving and cutting on simple materials across a large range of G-code generation methods by CAM programs. It will generally run faster and may be all you need to use.
4040

41-
- Grbl calculates laser power based on the assumption that laser power is linear with speed and the material. Often, this is not the case. Lasers can cut differently at varying power levels and some materials may not cut well at a particular speed and/power. In short, this means that dynamic power mode may not work for all situations. Always do a test piece prior to using this with a new material or machine.
41+
- Grbl calculates laser power based on the assumption that laser power is linear with speed and the material. Often, this is not the case. Lasers can cut differently at varying power levels and some materials may not cut well at a particular speed and/power. In short, this means that dynamic power mode may not work for all situations. Always do a test piece prior to using this with a new material or machine.
4242

4343
- When not in motion, `M4` dynamic mode turns off the laser. It only turns on when the machine moves. This generally makes the laser safer to operate, because, unlike `M3`, it will never burn a hole through your table, if you stop and forget to turn `M3` off in time.
4444

@@ -70,20 +70,20 @@ Describe below are the operational changes to Grbl when laser mode is enabled. P
7070
- To have the laser powered during a jog motion, first enable a valid motion mode and spindle state. The following jog motions will inherit and maintain the previous laser state. Please use with caution though. This ability is primarily to allow turning on the laser on a _very low_ power to use the laser dot to jog and visibly locate the start position of a job.
7171

7272

73-
- A `S0` spindle speed of zero will turn off the laser. When programmed with a valid laser motion, Grbl will disable the laser instantaneously without stopping for the duration of that motion and future motions until set greater than zero..
73+
- An `S0` spindle speed of zero will turn off the laser. When programmed with a valid laser motion, Grbl will disable the laser instantaneously without stopping for the duration of that motion and future motions until set greater than zero..
7474

7575
- `M3` constant laser mode, this is a great way to turn off the laser power while continuously moving between a `G1` laser motion and a `G0` rapid motion without having to stop. Program a short `G1 S0` motion right before the `G0` motion and a `G1 Sxxx` motion is commanded right after to go back to cutting.
7676

7777

7878
-----
7979
###CAM Developer Implementation Notes
8080

81-
TODO: Add some suggestions on how to write laser g-code for Grbl.
81+
TODO: Add some suggestions on how to write laser G-code for Grbl.
8282

8383
- When using `M3` constant laser power mode, try to avoid force-sync conditions during a job whenever possible. Basically every spindle speed change must be accompanied by a valid motion. Any motion is fine, since Grbl will automatically enable and disable the laser based on the modal state. Avoid a `G0` and `G1` command with no axis words in this mode and in the middle of a job.
8484

8585
- Ensure smooth motions throughout by turning the laser on and off without an `M3 M4 M5` spindle state command. There are two ways to do this:
8686

87-
- _Program a zero spindle speed `S0`_: `S0` is valid g-code and turns off the spindle/laser without changing the spindle state. In laser mode, Grbl will smoothly move through consecutive motions and turn off the spindle. Conversely, you can turn on the laser with a spindle speed `S` greater than zero. Remember that `M3` constant power mode requires any spindle speed `S` change to be programmed with a motion to allow continuous motion, while `M4` dynamic power mode does not.
87+
- _Program a zero spindle speed `S0`_: `S0` is valid G-code and turns off the spindle/laser without changing the spindle state. In laser mode, Grbl will smoothly move through consecutive motions and turn off the spindle. Conversely, you can turn on the laser with a spindle speed `S` greater than zero. Remember that `M3` constant power mode requires any spindle speed `S` change to be programmed with a motion to allow continuous motion, while `M4` dynamic power mode does not.
8888

8989
- _Program an unpowered motion between powered motions_: If you are traversing between parts of a raster job that don't need to have the laser powered, program a `G0` rapid between them. `G0` enforces the laser to be disabled automatically. The last spindle speed programmed doesn't change, so if a valid powered motion, like a `G1` is executed after, it'll immediately re-power the laser with the last programmed spindle speed when executing that motion.

0 commit comments

Comments
 (0)