Final minor updates for master release.
- Updated ShapeOko2 defaults based on machine testing of the basic model provided by Inventables. (or close to it.) Should be pretty conservative but much faster than before. For example, X and Y axes are set at (10x) faster at 5000mm/min. It can run much faster than this, but this seems like a safe speed for everyone. - Updated README for master release. - Added some new settings methods for clearing the EEPROM when changing versions. Needs some more work, but it should ok for master release. Should work on it more for the next version.
This commit is contained in:
parent
6af010fe63
commit
b0e9a315fe
33
README.md
33
README.md
@ -1,26 +1,43 @@
|
|||||||
#Grbl - An embedded g-code interpreter and motion-controller for the Arduino/AVR328 microcontroller
|
#Grbl - An embedded g-code interpreter and motion-controller for the Arduino/AVR328 microcontroller
|
||||||
------------
|
|
||||||
|
***
|
||||||
|
|
||||||
Grbl is a no-compromise, high performance, low cost alternative to parallel-port-based motion control for CNC milling. It will run on a vanilla Arduino (Duemillanove/Uno) as long as it sports an Atmega 328.
|
Grbl is a no-compromise, high performance, low cost alternative to parallel-port-based motion control for CNC milling. It will run on a vanilla Arduino (Duemillanove/Uno) as long as it sports an Atmega 328.
|
||||||
|
|
||||||
The controller is written in highly optimized C utilizing every clever feature of the AVR-chips to achieve precise timing and asynchronous operation. It is able to maintain up to 30kHz of stable, jitter free control pulses.
|
The controller is written in highly optimized C utilizing every clever feature of the AVR-chips to achieve precise timing and asynchronous operation. It is able to maintain up to 30kHz of stable, jitter free control pulses.
|
||||||
|
|
||||||
It accepts standards-compliant G-code and has been tested with the output of several CAM tools with no problems. Arcs, circles and helical motion are fully supported, as well as, other basic functional g-code commands. Functions and variables are not currently supported, but may be included in future releases in a form of a pre-processor.
|
It accepts standards-compliant g-code and has been tested with the output of several CAM tools with no problems. Arcs, circles and helical motion are fully supported, as well as, all other primary g-code commands. Macro functions, variables, and most canned cycles are not supported, but we think GUIs can do a much better job at translating them into straight g-code anyhow.
|
||||||
|
|
||||||
Grbl includes full acceleration management with look ahead. That means the controller will look up to 18 motions into the future and plan its velocities ahead to deliver smooth acceleration and jerk-free cornering.
|
Grbl includes full acceleration management with look ahead. That means the controller will look up to 18 motions into the future and plan its velocities ahead to deliver smooth acceleration and jerk-free cornering.
|
||||||
|
|
||||||
* Note on licensing: All previous Grbl versions (v0.8 and prior) are licensed under the MIT software license. The current and future branches of Grbl (v0.9 and after) will remain under GPLv3 licensing until the next version is pushed, where the obsoleted version will then be updated to the MIT-license. This decision was made to ensure Grbl will always be an open-source project while making the code permissive for others.
|
* [Licensing](https://github.com/grbl/grbl/wiki/Licensing): Grbl v0.9 is free software, released under the GPLv3 license. Obsolete versions of Grbl, v0.8 and prior, are released under the permissive MIT-license. This will ensure Grbl will always be an open-source project while making the code permissive for others. However, we are looking into ways to allow Grbl v0.9 for closed-source commercial use.
|
||||||
|
|
||||||
* For more information and help, check out our **[Wiki pages!](https://github.com/grbl/grbl/wiki)** If you find that the information is out-dated, please to help us keep it updated by editing it or notifying our community! Thanks!
|
* For more information and help, check out our **[Wiki pages!](https://github.com/grbl/grbl/wiki)** If you find that the information is out-dated, please to help us keep it updated by editing it or notifying our community! Thanks!
|
||||||
|
|
||||||
* Current Lead Developer: Sonny Jeon, Ph.D. (2011-2014)
|
* Lead Developer [2011 - Current]: Sonny Jeon, Ph.D. (USA)
|
||||||
* The Originator/Creator/Pioneer/Father of Grbl: Simen Svale Skogsrud (2009-2011)
|
|
||||||
|
|
||||||
------------
|
* Lead Developer [2009 - 2011]: Simen Svale Skogsrud (Norway). aka The Originator/Creator/Pioneer/Father of Grbl.
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
|
_**Master Branch:**_
|
||||||
|
* [Grbl v0.9g Atmega328p 16mhz 115200baud](http://bit.ly/1Bfza9D) (Last updated: 2014-08-17)
|
||||||
|
- **IMPORTANT INFO WHEN UPGRADING TO GRBL v0.9g:**
|
||||||
|
- Baudrate is now 115200 (Up from 9600).
|
||||||
|
- Settings WILL be overwritten. Please make sure you have a backup. Also, settings have been renumbered and some have changed how they work. See our [Configuring v0.9 Wiki page](https://github.com/grbl/grbl/wiki/Configuring-Grbl-v0.9) for details.
|
||||||
|
|
||||||
|
_**Archives:**_
|
||||||
|
* [Grbl v0.8c Atmega328p 16mhz 9600baud](http://bit.ly/SSdCJE)
|
||||||
|
* [Grbl v0.7d Atmega328p 16mhz 9600baud](http://bit.ly/ZhL15G)
|
||||||
|
* [Grbl v0.6b Atmega328p 16mhz 9600baud](http://bit.ly/VD04A5)
|
||||||
|
* [Grbl v0.51 Atmega328p 16mhz 9600baud](http://bit.ly/W75BS1)
|
||||||
|
* [Grbl v0.6b Atmega168 16mhz 9600baud](http://bit.ly/SScWnE)
|
||||||
|
* [Grbl v0.51 Atmega168 16mhz 9600baud](http://bit.ly/VXyrYu)
|
||||||
|
|
||||||
|
***
|
||||||
|
|
||||||
##Update Summary for v0.9 from v0.8
|
##Update Summary for v0.9 from v0.8
|
||||||
- **_BETA_ status:** Minor bugs may exist. Under final testing for master release. Please report any issues to administrators so we can push this out quickly!
|
- **IMPORTANT: Default serial baudrate is now 115200! (Up from 9600). And your settings will be over-written! Make sure to have a backup.**
|
||||||
- **IMPORTANT: Default serial baudrate is now 115200! (Up from 9600)**
|
|
||||||
- **_NEW_ Super Smooth Stepper Algorithm:** Complete overhaul of the handling of the stepper driver to simplify and reduce task time per ISR tick. Much smoother operation with the new Adaptive Multi-Axis Step Smoothing (AMASS) algorithm which does what its name implies (see stepper.c source for details). Users should immediately see significant improvements in how their machines move and overall performance!
|
- **_NEW_ Super Smooth Stepper Algorithm:** Complete overhaul of the handling of the stepper driver to simplify and reduce task time per ISR tick. Much smoother operation with the new Adaptive Multi-Axis Step Smoothing (AMASS) algorithm which does what its name implies (see stepper.c source for details). Users should immediately see significant improvements in how their machines move and overall performance!
|
||||||
- **Stability and Robustness Updates:** Grbl's overall stability has been focused on for this version. The planner and step-execution interface has been completely re-written for robustness and incorruptibility by the introduction of an intermediate step segment buffer that "checks-out" steps from the planner buffer in real-time. This means we can now fearlessly drive Grbl to it's highest limits. Combined with the new stepper algorithm and planner optimizations, this translated to **5x to 10x** overall performance increases in our testing! Also, stability and robustness tests have been reported to easily take 1.4 million (yes, **million**) line g-code programs like a champ!
|
- **Stability and Robustness Updates:** Grbl's overall stability has been focused on for this version. The planner and step-execution interface has been completely re-written for robustness and incorruptibility by the introduction of an intermediate step segment buffer that "checks-out" steps from the planner buffer in real-time. This means we can now fearlessly drive Grbl to it's highest limits. Combined with the new stepper algorithm and planner optimizations, this translated to **5x to 10x** overall performance increases in our testing! Also, stability and robustness tests have been reported to easily take 1.4 million (yes, **million**) line g-code programs like a champ!
|
||||||
- **(x4)+ Faster Planner:** Planning computations improved four-fold or more by optimizing end-to-end operations, which included streamlining the computations and introducing a planner pointer to locate un-improvable portions of the buffer and not waste cycles recomputing them.
|
- **(x4)+ Faster Planner:** Planning computations improved four-fold or more by optimizing end-to-end operations, which included streamlining the computations and introducing a planner pointer to locate un-improvable portions of the buffer and not waste cycles recomputing them.
|
||||||
|
10
defaults.h
10
defaults.h
@ -157,16 +157,16 @@
|
|||||||
#define DEFAULT_Z_STEPS_PER_MM (MICROSTEPS_Z*STEP_REVS_Z/MM_PER_REV_Z)
|
#define DEFAULT_Z_STEPS_PER_MM (MICROSTEPS_Z*STEP_REVS_Z/MM_PER_REV_Z)
|
||||||
#define DEFAULT_X_MAX_RATE 5000.0 // mm/min
|
#define DEFAULT_X_MAX_RATE 5000.0 // mm/min
|
||||||
#define DEFAULT_Y_MAX_RATE 5000.0 // mm/min
|
#define DEFAULT_Y_MAX_RATE 5000.0 // mm/min
|
||||||
#define DEFAULT_Z_MAX_RATE 750.0 // mm/min
|
#define DEFAULT_Z_MAX_RATE 500.0 // mm/min
|
||||||
#define DEFAULT_X_ACCELERATION (250.0*60*60) // 25*60*60 mm/min^2 = 25 mm/sec^2
|
#define DEFAULT_X_ACCELERATION (250.0*60*60) // 25*60*60 mm/min^2 = 25 mm/sec^2
|
||||||
#define DEFAULT_Y_ACCELERATION (250.0*60*60) // 25*60*60 mm/min^2 = 25 mm/sec^2
|
#define DEFAULT_Y_ACCELERATION (250.0*60*60) // 25*60*60 mm/min^2 = 25 mm/sec^2
|
||||||
#define DEFAULT_Z_ACCELERATION (50.0*60*60) // 25*60*60 mm/min^2 = 25 mm/sec^2
|
#define DEFAULT_Z_ACCELERATION (50.0*60*60) // 25*60*60 mm/min^2 = 25 mm/sec^2
|
||||||
#define DEFAULT_X_MAX_TRAVEL 200.0 // mm
|
#define DEFAULT_X_MAX_TRAVEL 290.0 // mm
|
||||||
#define DEFAULT_Y_MAX_TRAVEL 200.0 // mm
|
#define DEFAULT_Y_MAX_TRAVEL 290.0 // mm
|
||||||
#define DEFAULT_Z_MAX_TRAVEL 200.0 // mm
|
#define DEFAULT_Z_MAX_TRAVEL 100.0 // mm
|
||||||
#define DEFAULT_STEP_PULSE_MICROSECONDS 10
|
#define DEFAULT_STEP_PULSE_MICROSECONDS 10
|
||||||
#define DEFAULT_STEPPING_INVERT_MASK 0
|
#define DEFAULT_STEPPING_INVERT_MASK 0
|
||||||
#define DEFAULT_DIRECTION_INVERT_MASK ((1<<Y_AXIS)|(1<<Z_AXIS))
|
#define DEFAULT_DIRECTION_INVERT_MASK ((1<<X_AXIS)|(1<<Z_AXIS))
|
||||||
#define DEFAULT_STEPPER_IDLE_LOCK_TIME 255 // msec (0-254, 255 keeps steppers enabled)
|
#define DEFAULT_STEPPER_IDLE_LOCK_TIME 255 // msec (0-254, 255 keeps steppers enabled)
|
||||||
#define DEFAULT_STATUS_REPORT_MASK ((BITFLAG_RT_STATUS_MACHINE_POSITION)|(BITFLAG_RT_STATUS_WORK_POSITION))
|
#define DEFAULT_STATUS_REPORT_MASK ((BITFLAG_RT_STATUS_MACHINE_POSITION)|(BITFLAG_RT_STATUS_WORK_POSITION))
|
||||||
#define DEFAULT_JUNCTION_DEVIATION 0.05 // mm
|
#define DEFAULT_JUNCTION_DEVIATION 0.05 // mm
|
||||||
|
55
settings.c
55
settings.c
@ -66,18 +66,8 @@ void write_global_settings()
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Method to reset Grbl global settings back to defaults.
|
// Method to restore EEPROM-saved Grbl global settings back to defaults.
|
||||||
void settings_reset() {
|
void settings_restore_global_settings() {
|
||||||
// Clear startup lines and build info user data. Parameters should be ok.
|
|
||||||
// TODO: For next version, remove these clears. Only here because line buffer increased.
|
|
||||||
eeprom_put_char(EEPROM_ADDR_BUILD_INFO , 0);
|
|
||||||
#if N_STARTUP_LINE > 0
|
|
||||||
eeprom_put_char(EEPROM_ADDR_STARTUP_BLOCK, 0);
|
|
||||||
#endif
|
|
||||||
#if N_STARTUP_LINE > 1
|
|
||||||
eeprom_put_char(EEPROM_ADDR_STARTUP_BLOCK+(LINE_BUFFER_SIZE+1), 0);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
settings.pulse_microseconds = DEFAULT_STEP_PULSE_MICROSECONDS;
|
settings.pulse_microseconds = DEFAULT_STEP_PULSE_MICROSECONDS;
|
||||||
settings.stepper_idle_lock_time = DEFAULT_STEPPER_IDLE_LOCK_TIME;
|
settings.stepper_idle_lock_time = DEFAULT_STEPPER_IDLE_LOCK_TIME;
|
||||||
settings.step_invert_mask = DEFAULT_STEPPING_INVERT_MASK;
|
settings.step_invert_mask = DEFAULT_STEPPING_INVERT_MASK;
|
||||||
@ -117,6 +107,30 @@ void settings_reset() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Helper function to clear the EEPROM space containing parameter data.
|
||||||
|
void settings_clear_parameters() {
|
||||||
|
uint8_t idx;
|
||||||
|
float coord_data[3];
|
||||||
|
memset(&coord_data, 0, sizeof(coord_data));
|
||||||
|
for (idx=0; idx < SETTING_INDEX_NCOORD; idx++) { settings_write_coord_data(idx, coord_data); }
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Helper function to clear the EEPROM space containing the startup lines.
|
||||||
|
void settings_clear_startup_lines() {
|
||||||
|
#if N_STARTUP_LINE > 0
|
||||||
|
eeprom_put_char(EEPROM_ADDR_STARTUP_BLOCK, 0);
|
||||||
|
#endif
|
||||||
|
#if N_STARTUP_LINE > 1
|
||||||
|
eeprom_put_char(EEPROM_ADDR_STARTUP_BLOCK+(LINE_BUFFER_SIZE+1), 0);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// Helper function to clear the EEPROM space containing the user build info string.
|
||||||
|
void settings_clear_build_info() { eeprom_put_char(EEPROM_ADDR_BUILD_INFO , 0); }
|
||||||
|
|
||||||
|
|
||||||
// Reads startup line from EEPROM. Updated pointed line string data.
|
// Reads startup line from EEPROM. Updated pointed line string data.
|
||||||
uint8_t settings_read_startup_line(uint8_t n, char *line)
|
uint8_t settings_read_startup_line(uint8_t n, char *line)
|
||||||
{
|
{
|
||||||
@ -138,7 +152,7 @@ uint8_t settings_read_build_info(char *line)
|
|||||||
// Reset line with default value
|
// Reset line with default value
|
||||||
line[0] = 0; // Empty line
|
line[0] = 0; // Empty line
|
||||||
settings_store_build_info(line);
|
settings_store_build_info(line);
|
||||||
// No error. Usually only happens once when called for first time.
|
return(false);
|
||||||
}
|
}
|
||||||
return(true);
|
return(true);
|
||||||
}
|
}
|
||||||
@ -274,10 +288,18 @@ uint8_t settings_store_global_setting(uint8_t parameter, float value) {
|
|||||||
void settings_init() {
|
void settings_init() {
|
||||||
if(!read_global_settings()) {
|
if(!read_global_settings()) {
|
||||||
report_status_message(STATUS_SETTING_READ_FAIL);
|
report_status_message(STATUS_SETTING_READ_FAIL);
|
||||||
settings_reset();
|
|
||||||
|
settings_restore_global_settings();
|
||||||
|
|
||||||
|
// Force clear startup lines and build info user data. Parameters should be ok.
|
||||||
|
// TODO: For next version, remove these clears. Only here because line buffer increased.
|
||||||
|
settings_clear_startup_lines();
|
||||||
|
settings_clear_build_info();
|
||||||
|
|
||||||
report_grbl_settings();
|
report_grbl_settings();
|
||||||
}
|
}
|
||||||
// Read all parameter data into a dummy variable. If error, reset to zero, otherwise do nothing.
|
|
||||||
|
// Check all parameter data into a dummy variable. If error, reset to zero, otherwise do nothing.
|
||||||
float coord_data[N_AXIS];
|
float coord_data[N_AXIS];
|
||||||
uint8_t i;
|
uint8_t i;
|
||||||
for (i=0; i<=SETTING_INDEX_NCOORD; i++) {
|
for (i=0; i<=SETTING_INDEX_NCOORD; i++) {
|
||||||
@ -285,7 +307,8 @@ void settings_init() {
|
|||||||
report_status_message(STATUS_SETTING_READ_FAIL);
|
report_status_message(STATUS_SETTING_READ_FAIL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// NOTE: Startup lines are handled and called by main.c at the end of initialization.
|
// NOTE: Startup lines are checked and executed by protocol_main_loop at the end of initialization.
|
||||||
|
// TODO: Build info should be checked here, but will wait until v1.0 to address this. Ok for now.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
|
|
||||||
|
|
||||||
#define GRBL_VERSION "0.9g"
|
#define GRBL_VERSION "0.9g"
|
||||||
#define GRBL_VERSION_BUILD "20140813"
|
#define GRBL_VERSION_BUILD "20140817"
|
||||||
|
|
||||||
// Version of the EEPROM data. Will be used to migrate existing data from older versions of Grbl
|
// Version of the EEPROM data. Will be used to migrate existing data from older versions of Grbl
|
||||||
// when firmware is upgraded. Always stored in byte 0 of eeprom
|
// when firmware is upgraded. Always stored in byte 0 of eeprom
|
||||||
@ -103,6 +103,12 @@ extern settings_t settings;
|
|||||||
// Initialize the configuration subsystem (load settings from EEPROM)
|
// Initialize the configuration subsystem (load settings from EEPROM)
|
||||||
void settings_init();
|
void settings_init();
|
||||||
|
|
||||||
|
// Helper functions to clear and restore EEPROM defaults
|
||||||
|
void settings_restore_global_settings();
|
||||||
|
void settings_clear_parameters();
|
||||||
|
void settings_clear_startup_line();
|
||||||
|
void settings_clear_build_info();
|
||||||
|
|
||||||
// A helper method to set new settings from command line
|
// A helper method to set new settings from command line
|
||||||
uint8_t settings_store_global_setting(uint8_t parameter, float value);
|
uint8_t settings_store_global_setting(uint8_t parameter, float value);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user