Committer:
Sergunb
Date:
Mon Sep 04 12:04:13 2017 +0000
Revision:
0:8f0d870509fe
Initial commit

Who changed what in which revision?

UserRevisionLine numberNew contents of line
Sergunb 0:8f0d870509fe 1 ### _Grbl v1.1 - Change Summary_
Sergunb 0:8f0d870509fe 2
Sergunb 0:8f0d870509fe 3 --------
Sergunb 0:8f0d870509fe 4
Sergunb 0:8f0d870509fe 5 ### _Specific details are available in the other markdown documents._
Sergunb 0:8f0d870509fe 6 --------
Sergunb 0:8f0d870509fe 7
Sergunb 0:8f0d870509fe 8 #### GUI Interface Tweaks from Grbl v0.9
Sergunb 0:8f0d870509fe 9
Sergunb 0:8f0d870509fe 10 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.
Sergunb 0:8f0d870509fe 11
Sergunb 0:8f0d870509fe 12 - `ok` / `error:x` : Normal send command and execution response acknowledgement. Used for streaming.
Sergunb 0:8f0d870509fe 13
Sergunb 0:8f0d870509fe 14 - `< >` : Enclosed chevrons contains status report data.
Sergunb 0:8f0d870509fe 15
Sergunb 0:8f0d870509fe 16 - `Grbl X.Xx ['$' for help]` : Welcome message indicates initialization.
Sergunb 0:8f0d870509fe 17
Sergunb 0:8f0d870509fe 18 - `ALARM:x` : Indicates an alarm has been thrown. Grbl is now in an alarm state.
Sergunb 0:8f0d870509fe 19
Sergunb 0:8f0d870509fe 20 - `$x=val` and `$Nx=line` indicate a settings printout from a `$` and `$N` user query, respectively.
Sergunb 0:8f0d870509fe 21
Sergunb 0:8f0d870509fe 22 - `[MSG:]` : Indicates a non-queried feedback message.
Sergunb 0:8f0d870509fe 23
Sergunb 0:8f0d870509fe 24 - `[GC:]` : Indicates a queried `$G` g-code state message.
Sergunb 0:8f0d870509fe 25
Sergunb 0:8f0d870509fe 26 - `[HLP:]` : Indicates the help message.
Sergunb 0:8f0d870509fe 27
Sergunb 0:8f0d870509fe 28 - `[G54:]`, `[G55:]`, `[G56:]`, `[G57:]`, `[G58:]`, `[G59:]`, `[G28:]`, `[G30:]`, `[G92:]`, `[TLO:]`, and `[PRB:]` messages indicate the parameter data printout from a `$#` user query.
Sergunb 0:8f0d870509fe 29
Sergunb 0:8f0d870509fe 30 - `[VER:]` : Indicates build info and string from a `$I` user query.
Sergunb 0:8f0d870509fe 31
Sergunb 0:8f0d870509fe 32 - `[OPT:]` : Indicates compile-time option info from a `$I` user query.
Sergunb 0:8f0d870509fe 33
Sergunb 0:8f0d870509fe 34 - `[echo:]` : Indicates an automated line echo from a pre-parsed string prior to g-code parsing. Enabled by config.h option.
Sergunb 0:8f0d870509fe 35
Sergunb 0:8f0d870509fe 36 - `>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.
Sergunb 0:8f0d870509fe 37
Sergunb 0:8f0d870509fe 38 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.
Sergunb 0:8f0d870509fe 39
Sergunb 0:8f0d870509fe 40 Other minor changes and bug fixes that may effect GUI parsing include:
Sergunb 0:8f0d870509fe 41
Sergunb 0:8f0d870509fe 42 - Floating point values printed with zero precision do not show a decimal, or look like an integer. This includes spindle speed RPM and feed rate in mm mode.
Sergunb 0:8f0d870509fe 43 - `$G` reports fixed a long time bug with program modal state. It always showed `M0` program pause when running. Now during a normal program run, no program modal state is given until an `M0`, `M2`, or `M30` is active and then the appropriate state will be shown.
Sergunb 0:8f0d870509fe 44
Sergunb 0:8f0d870509fe 45 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.
Sergunb 0:8f0d870509fe 46
Sergunb 0:8f0d870509fe 47 ----
Sergunb 0:8f0d870509fe 48
Sergunb 0:8f0d870509fe 49 #### Realtime Status Reports Changes from Grbl v0.9
Sergunb 0:8f0d870509fe 50
Sergunb 0:8f0d870509fe 51 - 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.
Sergunb 0:8f0d870509fe 52
Sergunb 0:8f0d870509fe 53 - Data fields are separated by `|` pipe delimiters, rather than `,` commas that were used to separate data values. This should help with parsing.
Sergunb 0:8f0d870509fe 54
Sergunb 0:8f0d870509fe 55 - 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.
Sergunb 0:8f0d870509fe 56 - All available data is always sent to standardize the reports across all GUIs.
Sergunb 0:8f0d870509fe 57 - For unique situations, data fields can be removed by config.h macros, but it is highly recommended to not alter these.
Sergunb 0:8f0d870509fe 58
Sergunb 0:8f0d870509fe 59
Sergunb 0:8f0d870509fe 60 - `MPos:` OR `WPos:` are always included in a report, but not BOTH at the same time.
Sergunb 0:8f0d870509fe 61
Sergunb 0:8f0d870509fe 62 - This reduces transmit overhead tremendously by removing upwards to 40 characters.
Sergunb 0:8f0d870509fe 63 - `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.
Sergunb 0:8f0d870509fe 64 - `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.
Sergunb 0:8f0d870509fe 65 - `WCO:` is simply the sum of the work coordinate system, G92, and G43.1 tool length offsets.
Sergunb 0:8f0d870509fe 66 - Basically, a GUI just needs to retain the last `WCO:` and apply the equation to get the other position vector.
Sergunb 0:8f0d870509fe 67 - `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.
Sergunb 0:8f0d870509fe 68 - Be aware of the following issue regarding `WPos:`.
Sergunb 0:8f0d870509fe 69 - 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.
Sergunb 0:8f0d870509fe 70 - 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.
Sergunb 0:8f0d870509fe 71
Sergunb 0:8f0d870509fe 72
Sergunb 0:8f0d870509fe 73 - The `Hold` and `Door` states includes useful sub-state info via a `:` colon delimiter and an integer value. See descriptions for details.
Sergunb 0:8f0d870509fe 74
Sergunb 0:8f0d870509fe 75 - Limit and other input pin reports have significantly changed to reduce transmit overhead.
Sergunb 0:8f0d870509fe 76 - The data type description is now just `Pn:`, rather than `Lim:000` or `Pin:000|0|0000`
Sergunb 0:8f0d870509fe 77 - It does not appear if no inputs are detected as triggered.
Sergunb 0:8f0d870509fe 78 - 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.
Sergunb 0:8f0d870509fe 79 - For example, a triggered Z-limit and probe pin would report `Pn:ZP`.
Sergunb 0:8f0d870509fe 80
Sergunb 0:8f0d870509fe 81
Sergunb 0:8f0d870509fe 82 - Buffer data (planner and serial RX) reports have been tweaked and combined.
Sergunb 0:8f0d870509fe 83
Sergunb 0:8f0d870509fe 84 - `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.
Sergunb 0:8f0d870509fe 85 - 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.
Sergunb 0:8f0d870509fe 86
Sergunb 0:8f0d870509fe 87
Sergunb 0:8f0d870509fe 88 - Override reports are intermittent since they don't change often once set.
Sergunb 0:8f0d870509fe 89
Sergunb 0:8f0d870509fe 90 - 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.
Sergunb 0:8f0d870509fe 91 - There are two override fields:
Sergunb 0:8f0d870509fe 92 - `Ov:100,100,100` Organized as feed, rapid, and spindle speed overrides in percent.
Sergunb 0:8f0d870509fe 93
Sergunb 0:8f0d870509fe 94 - Accessory states are shown alongside override reports when they are active. Like pin states, an accessory state report `A:SFM` contains a letter indicating an active accessory. Letters `S`, `C`, `F`, and `M` are defined as spindle CW, spindle CCW, flood coolant, and mist coolant, respectively. The pins are directly polled and shown here.
Sergunb 0:8f0d870509fe 95
Sergunb 0:8f0d870509fe 96 - Line numbers, when enabled in config.h, are omitted when:
Sergunb 0:8f0d870509fe 97
Sergunb 0:8f0d870509fe 98 - No line number is passed to Grbl in a block.
Sergunb 0:8f0d870509fe 99 - Grbl is performing a system motion like homing, jogging, or parking.
Sergunb 0:8f0d870509fe 100 - Grbl is executing g-code block that does not contain a motion, like `G20G54` or `G4P1` dwell. (NOTE: Looking to fixing this later.)
Sergunb 0:8f0d870509fe 101
Sergunb 0:8f0d870509fe 102 -------
Sergunb 0:8f0d870509fe 103
Sergunb 0:8f0d870509fe 104 #### New Commands
Sergunb 0:8f0d870509fe 105
Sergunb 0:8f0d870509fe 106 - `$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.
Sergunb 0:8f0d870509fe 107 - 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.
Sergunb 0:8f0d870509fe 108
Sergunb 0:8f0d870509fe 109 - `$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.
Sergunb 0:8f0d870509fe 110
Sergunb 0:8f0d870509fe 111 - 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.
Sergunb 0:8f0d870509fe 112 - NOTE: Parking motions are automatically disabled when laser mode is enabled to prevent burning.
Sergunb 0:8f0d870509fe 113
Sergunb 0:8f0d870509fe 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.