grbl-LPC-CoreXY/doc/markdown/change_summary.md
Sonny Jeon ed790c9fa2 v1.1d: Tweaked interface a bit. Added realtime spindle speed and build option data. Minor bug fixes.
- Increment to v1.1d due to interface tweaks.

- Based on GUI dev feedback, the toggle overrides report was removed
and replace with showing “accessory state”. This shows a character if a
particular accessory is enabled, like the spindle or flood coolant.
These can be directly altered by the toggle overrides, so when they
execute, a GUI will be able to observe the state altering as feedback.

- Altered the real-time feed rate to show real-time spindle speed as
well. It was an over-sight on my part. It’s needed because it’s hard to
know what the current spindle speed is when overrides are altering it.
Especially during something like a laser cutting job when its important
to know how spindle speed overrides are effecting things.

- Real-time spindle speed is not shown if VARIABLE_SPINDLE is disabled.
The old real-time feed rate data field will show instead.

- Compile-time option data is now included in another message
immediately following the build info version string, starting with
`[OPT:`. A character code follows the data type name with each
indicating a particular option enabled or disabled. This will help
immensely with debugging Grbl as well as help GUIs know exactly how
Grbl was compiled.

- These interface changes are detailed in the updated documentation.

- Reduced the default planner buffer size from 17 to 16. Needed to free
up some memory…

- For increasing the serial TX buffer size from 90 to 104 bytes. The
addition of real-time spindle speeds and accessory enable data required
a bigger buffer. This is to ensure Grbl is performing at optimal levels.

- Refactored parts of the spindle and coolant control code to make it
more consistent to each other and how it was called. It was a little
messy. The changes made it easier to track what each function call was
doing based on what was calling it.

- Created a couple of new get_state functions for the spindle and
coolant. These are called by the accessory state report to look
directly at the pin state, rather than track how it was set. This
guarantees that the state is reported correctly.

- Updated the g-code parser, parking motion, sleep mode, and spindle
stop calls to refactored spindle and coolant code.

- Added a compile-time option to enable homing individual axes, rather
than having only the main homing cycle. The actual use case for this is
pretty rare. It’s not recommended you enable this, unless you have a
specific application for it. Otherwise, just alter the homing cycle
itself.

- Refactored the printFloat() function to not show a decimal point if
there are no trailing values after it. For example, `1.` now shows `1`.

- Fixed an issue regarding spindle speed overrides no being applied to
blocks without motions.

- Removed the toggle_ovr_mask system variable and replaced with
spindle_stop_ovr system variable. Coolant toggles don’t need to be
tracked.

- Updated README
2016-10-17 23:48:25 -06:00

108 lines
8.5 KiB
Markdown

### _Grbl v1.1 - Change Summary_
--------
### _Specific details are available in the other markdown documents._
--------
#### GUI Interface Tweaks from Grbl v0.9
Grbl v1.1's interface protocol has been tweaked in the attempt to make GUI development cleaner, clearer, and hopefully easier. All messages are designed to be deterministic without needing to know the context of the message. Each can be inferred to a much greater degree than before just by the message type, which are all listed below.
- `ok` / `error:x` : Normal send command and execution response acknowledgement. Used for streaming.
- `< >` : Enclosed chevrons contains status report data.
- `Grbl X.Xx ['$' for help]` : Welcome message indicates initialization.
- `ALARM:x` : Indicates an alarm has been thrown. Grbl is now in an alarm state.
- `$x=val` and `$Nx=line` indicate a settings printout from a `$` and `$N` user query, respectively.
- `[MSG:]` : Indicates a non-queried feedback message.
- `[GC:]` : Indicates a queried `$G` g-code state message.
- `[HLP:]` : Indicates the help message.
- `[G54:]`, `[G55:]`, `[G56:]`, `[G57:]`, `[G58:]`, `[G59:]`, `[G28:]`, `[G30:]`, `[G92:]`, `[TLO:]`, and `[PRB:]` messages indicate the parameter data printout from a `$#` user query.
- `[VER:]` : Indicates build info and string from a `$I` user query.
- `[OPT:]` : Indicates compile-time option info from a `$I` user query.
- `[echo:]` : Indicates an automated line echo from a pre-parsed string prior to g-code parsing. Enabled by config.h option.
- `>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.
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.
----
#### Realtime Status Reports Changes from Grbl v0.9
- Intent of changes is to make parsing cleaner, reduce transmitting overhead without effecting overall Grbl performance, and add more feedback data, which includes three new override values and real-time velocity.
- Data fields are separated by `|` pipe delimiters, rather than `,` commas that were used to separate data values. This should help with parsing.
- The ability to mask and add/remove data fields from status reports via the `$10` status report mask setting has been disabled. Only selecting `MPos:` or `WPos:` coordinates is allowed.
- All available data is always sent to standardize the reports across all GUIs.
- For unique situations, data fields can be removed by config.h macros, but it is highly recommended to not alter these.
- `MPos:` OR `WPos:` are always included in a report, but not BOTH at the same time.
- This reduces transmit overhead tremendously by removing upwards to 40 characters.
- `WCO:0.000,10.000,2.500` A current work coordinate offset is now sent to easily convert between position vectors, where `WPos = MPos - WCO` for each axis.
- `WCO:` is included immediately whenever a `WCO:` value changes or intermittently after every **X** status reports as a refresh. Refresh rates can dynamically vary from 10 to 30 (configurable) reports depending on what Grbl is doing.
- `WCO:` is simply the sum of the work coordinate system, G92, and G43.1 tool length offsets.
- Basically, a GUI just needs to retain the last `WCO:` and apply the equation to get the other position vector.
- `WCO:` messages may only be disabled via a config.h compile-option, if a GUI wants to handle the work position calculations on its own to free up more transmit bandwidth.
- Be aware of the following issue regarding `WPos:`.
- In Grbl v0.9 and prior, there is an old outstanding bug where the `WPos:` work position reported may not correlate to what is executing, because `WPos:` is based on the g-code parser state, which can be several motions behind. Grbl v1.1 now forces the planner buffer to empty, sync, and stops motion whenever there is a command that alters the work coordinate offsets `G10,G43.1,G92,G54-59`. This is the simplest way to ensure `WPos:` is always correct. Fortunately, it's exceedingly rare that any of these commands are used need continuous motions through them.
- A compile-time option is available to disable the planner sync and forced stop, but, if used, it's up to the GUI to handle this position correlation issue.
- The `Hold` and `Door` states includes useful sub-state info via a `:` colon delimiter and an integer value. See descriptions for details.
- Limit and other input pin reports have significantly changed to reduce transmit overhead.
- The data type description is now just `Pn:`, rather than `Lim:000` or `Pin:000|0|0000`
- It does not appear if no inputs are detected as triggered.
- If an input is triggered, ```Pn:``` will be followed by a letter or set of letters of every triggered input pin. `XYZPDHRS` for the XYZ-axes limits, Probe, Door, Hold, soft-Reset, cycle Start pins, respectively.
- For example, a triggered Z-limit and probe pin would report `Pn:ZP`.
- Buffer data (planner and serial RX) reports have been tweaked and combined.
- `Bf:15,128`. The first value is the available blocks in the planner buffer and the second is available bytes in the serial RX buffer.
- Note that this is different than before, where it reported blocks/bytes "in-use", rather than "available". This change does not require a GUI to know how many blocks/bytes Grbl has been compiled with, which can be substantially different on a Grbl-Mega build.
- Override reports are intermittent since they don't change often once set.
- Overrides are included in every 10 or 20 status reports (configurable) depending on what Grbl is doing or, if an override value or toggle state changes, automatically in the next report.
- There are two override fields:
- `Ov:100,100,100` Organized as feed, rapid, and spindle speed overrides in percent.
- `T:SFM` with each letter `S`, `F`, and `M` are defined as spindle stop active, flood coolant toggled, and mist coolant toggled, respectively.
- Line numbers, when enabled in config.h, are omitted when:
- No line number is passed to Grbl in a block.
- Grbl is performing a system motion like homing, jogging, or parking.
- 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.