diff --git a/Marlin/Configuration.h b/Marlin/Configuration.h index 74c03eb04c..379aa1953b 100644 --- a/Marlin/Configuration.h +++ b/Marlin/Configuration.h @@ -171,6 +171,7 @@ const bool Z_ENDSTOPS_INVERTING = true; // set to true to invert the logic of th // #define DEFAULT_XYJERK 20.0 // (mm/sec) #define DEFAULT_ZJERK 0.4 // (mm/sec) +#define DEFAULT_EJERK 5.0 // (mm/sec) //=========================================================================== //=============================Additional Features=========================== @@ -191,7 +192,7 @@ const bool Z_ENDSTOPS_INVERTING = true; // set to true to invert the logic of th //#define ULTRA_LCD //general lcd support, also 16x2 //#define SDSUPPORT // Enable SD Card Support in Hardware Console -//#define ULTIPANEL +#define ULTIPANEL #ifdef ULTIPANEL #define NEWPANEL //enable this if you have a click-encoder panel #define SDSUPPORT diff --git a/Marlin/EEPROMwrite.h b/Marlin/EEPROMwrite.h index bb25ae8960..d639e56399 100644 --- a/Marlin/EEPROMwrite.h +++ b/Marlin/EEPROMwrite.h @@ -38,7 +38,7 @@ template int EEPROM_readAnything(int &ee, T& value) // the default values are used whenever there is a change to the data, to prevent // wrong data being written to the variables. // ALSO: always make sure the variables in the Store and retrieve sections are in the same order. -#define EEPROM_VERSION "V04" +#define EEPROM_VERSION "V05" inline void EEPROM_StoreSettings() { @@ -56,6 +56,7 @@ inline void EEPROM_StoreSettings() EEPROM_writeAnything(i,minsegmenttime); EEPROM_writeAnything(i,max_xy_jerk); EEPROM_writeAnything(i,max_z_jerk); + EEPROM_writeAnything(i,max_e_jerk); #ifdef PIDTEMP EEPROM_writeAnything(i,Kp); EEPROM_writeAnything(i,Ki); @@ -116,6 +117,7 @@ inline void EEPROM_printSettings() SERIAL_ECHOPAIR(" B" ,minsegmenttime ); SERIAL_ECHOPAIR(" X" ,max_xy_jerk ); SERIAL_ECHOPAIR(" Z" ,max_z_jerk); + SERIAL_ECHOPAIR(" E" ,max_e_jerk); SERIAL_ECHOLN(""); #ifdef PIDTEMP SERIAL_ECHO_START; @@ -150,6 +152,7 @@ inline void EEPROM_RetrieveSettings(bool def=false) EEPROM_readAnything(i,minsegmenttime); EEPROM_readAnything(i,max_xy_jerk); EEPROM_readAnything(i,max_z_jerk); + EEPROM_readAnything(i,max_e_jerk); #ifndef PIDTEMP float Kp,Ki,Kd; #endif @@ -179,6 +182,7 @@ inline void EEPROM_RetrieveSettings(bool def=false) mintravelfeedrate=DEFAULT_MINTRAVELFEEDRATE; max_xy_jerk=DEFAULT_XYJERK; max_z_jerk=DEFAULT_ZJERK; + max_e_jerk=DEFAULT_EJERK; SERIAL_ECHO_START; SERIAL_ECHOLN("Using Default settings:"); } diff --git a/Marlin/Marlin.pde b/Marlin/Marlin.pde index de02c88024..e82afabd48 100644 --- a/Marlin/Marlin.pde +++ b/Marlin/Marlin.pde @@ -97,7 +97,7 @@ // M202 - Set max acceleration in units/s^2 for travel moves (M202 X1000 Y1000) Unused in Marlin!! // M203 - Set maximum feedrate that your machine can sustain (M203 X200 Y200 Z300 E10000) in mm/sec // M204 - Set default acceleration: S normal moves T filament only moves (M204 S3000 T7000) im mm/sec^2 also sets minimum segment time in ms (B20000) to prevent buffer underruns and M20 minimum feedrate -// M205 - advanced settings: minimum travel speed S=while printing T=travel only, B=minimum segment time X= maximum xy jerk, Z=maximum Z jerk +// M205 - advanced settings: minimum travel speed S=while printing T=travel only, B=minimum segment time X= maximum xy jerk, Z=maximum Z jerk, E=maximum E jerk // M206 - set additional homeing offset // M220 S- set speed factor override percentage // M221 S- set extrude factor override percentage @@ -1116,6 +1116,7 @@ void process_commands() if(code_seen('B')) minsegmenttime = code_value() ; if(code_seen('X')) max_xy_jerk = code_value() ; if(code_seen('Z')) max_z_jerk = code_value() ; + if(code_seen('E')) max_e_jerk = code_value() ; } break; case 206: // M206 additional homeing offset diff --git a/Marlin/Marlin.suo b/Marlin/Marlin.suo deleted file mode 100644 index 4aca6fed8d..0000000000 Binary files a/Marlin/Marlin.suo and /dev/null differ diff --git a/Marlin/planner.cpp b/Marlin/planner.cpp index 5972dafea5..84c0daeff7 100644 --- a/Marlin/planner.cpp +++ b/Marlin/planner.cpp @@ -74,6 +74,7 @@ float acceleration; // Normal acceleration mm/s^2 THIS IS THE DEFAULT A float retract_acceleration; // mm/s^2 filament pull-pack and push-forward while standing still in the other axis M204 TXXXX float max_xy_jerk; //speed than can be stopped at once, if i understand correctly. float max_z_jerk; +float max_e_jerk; float mintravelfeedrate; unsigned long axis_steps_per_sqr_second[NUM_AXIS]; @@ -531,6 +532,13 @@ void plan_buffer_line(const float &x, const float &y, const float &z, const floa if(block->steps_e != 0) { enable_e0();enable_e1();enable_e2(); } + if (block->steps_e == 0) { + if(feed_ratenominal_speed = block->millimeters * inverse_second; // (mm/sec) Always > 0 block->nominal_rate = ceil(block->step_event_count * inverse_second); // (step/sec) Always > 0 - if (block->steps_e == 0) { - if(feed_rate max_z_jerk/2) vmax_junction = max_z_jerk/2; vmax_junction = min(vmax_junction, block->nominal_speed); - + if(abs(current_speed[E_AXIS]) > max_e_jerk/2) + vmax_junction = min(vmax_junction, max_z_jerk/2); + if ((moves_queued > 1) && (previous_nominal_speed > 0.0)) { float jerk = sqrt(pow((current_speed[X_AXIS]-previous_speed[X_AXIS]), 2)+pow((current_speed[Y_AXIS]-previous_speed[Y_AXIS]), 2)); if((previous_speed[X_AXIS] != 0.0) || (previous_speed[Y_AXIS] != 0.0)) { @@ -717,6 +721,9 @@ void plan_buffer_line(const float &x, const float &y, const float &z, const floa if(abs(current_speed[Z_AXIS] - previous_speed[Z_AXIS]) > max_z_jerk) { vmax_junction *= (max_z_jerk/abs(current_speed[Z_AXIS] - previous_speed[Z_AXIS])); } + if(abs(current_speed[E_AXIS] - previous_speed[E_AXIS]) > max_e_jerk) { + vmax_junction *= (max_e_jerk/abs(current_speed[E_AXIS] - previous_speed[E_AXIS])); + } } block->max_entry_speed = vmax_junction; diff --git a/Marlin/planner.h b/Marlin/planner.h index 8fa4d4ec34..873441bb05 100644 --- a/Marlin/planner.h +++ b/Marlin/planner.h @@ -88,6 +88,7 @@ extern float acceleration; // Normal acceleration mm/s^2 THIS IS THE DE extern float retract_acceleration; // mm/s^2 filament pull-pack and push-forward while standing still in the other axis M204 TXXXX extern float max_xy_jerk; //speed than can be stopped at once, if i understand correctly. extern float max_z_jerk; +extern float max_e_jerk; extern float mintravelfeedrate; extern unsigned long axis_steps_per_sqr_second[NUM_AXIS];