Prechádzať zdrojové kódy

Disabled TMC2130 feedrate and acceleration limits (should be properly limited with M201-M203)

Robert Pelnar 5 rokov pred
rodič
commit
007717bfd2

+ 4 - 0
Firmware/planner.cpp

@@ -954,6 +954,7 @@ Having the real displacement of the head, we can calculate the total movement le
   {
     current_speed[i] = delta_mm[i] * inverse_second;
 #ifdef TMC2130
+#ifdef FEEDRATE_LIMIT
 	float max_fr = max_feedrate[i];
 	if (i < 2) // X, Y
 	{
@@ -970,6 +971,7 @@ Having the real displacement of the head, we can calculate the total movement le
 	}
     if(fabs(current_speed[i]) > max_fr)
       speed_factor = min(speed_factor, max_fr / fabs(current_speed[i]));
+#endif //FEEDRATE_LIMIT
 #else //TMC2130
     if(fabs(current_speed[i]) > max_feedrate[i])
       speed_factor = min(speed_factor, max_feedrate[i] / fabs(current_speed[i]));
@@ -1015,6 +1017,7 @@ Having the real displacement of the head, we can calculate the total movement le
 	if (block->steps_z.wide && (block->acceleration_st > axis_steps_per_sqr_second[Z_AXIS])) block->acceleration_st = axis_steps_per_sqr_second[Z_AXIS];
 	if (block->steps_e.wide && (block->acceleration_st > axis_steps_per_sqr_second[E_AXIS])) block->acceleration_st = axis_steps_per_sqr_second[E_AXIS];
 #else // SIMPLE_ACCEL_LIMIT
+#ifdef ACCEL_LIMIT
 	if (tmc2130_mode == TMC2130_MODE_SILENT)
 	{
 		if ((block->steps_x.wide > block->step_event_count.wide / 2) || (block->steps_y.wide > block->step_event_count.wide / 2))
@@ -1033,6 +1036,7 @@ Having the real displacement of the head, we can calculate the total movement le
       block->acceleration_st = axis_steps_per_sqr_second[Z_AXIS];
     if(((float)block->acceleration_st * (float)block->steps_e.wide / (float)block->step_event_count.wide) > axis_steps_per_sqr_second[E_AXIS])
       block->acceleration_st = axis_steps_per_sqr_second[E_AXIS];
+#endif // ACCEL_LIMIT
 #endif // SIMPLE_ACCEL_LIMIT
 #else //TMC2130
     // Limit acceleration per axis

+ 8 - 6
Firmware/variants/1_75mm_MK3-EINSy10a-E3Dv6full.h

@@ -96,15 +96,17 @@
 #define MANUAL_FEEDRATE {2700, 2700, 1000, 100}   // set the speeds for manual moves (mm/min)
 
 //Silent mode limits
-#define SILENT_MAX_ACCEL  960 // max axxeleration in silent mode in mm/s^2
-#define SILENT_MAX_ACCEL_ST (100*SILENT_MAX_ACCEL) // max accel in steps/s^2
-#define SILENT_MAX_FEEDRATE 172  //max feedrate in mm/s, because mode switched to normal for homming , this value limits also homing, it should be greater (172mm/s=9600mm/min>2700mm/min)
+//#define SILENT_MAX_ACCEL  960 // max axxeleration in silent mode in mm/s^2
+//#define SILENT_MAX_ACCEL_ST (100*SILENT_MAX_ACCEL) // max accel in steps/s^2
+//#define SILENT_MAX_FEEDRATE 172  //max feedrate in mm/s, because mode switched to normal for homming , this value limits also homing, it should be greater (172mm/s=9600mm/min>2700mm/min)
 
 //Normal mode limits
-#define NORMAL_MAX_ACCEL 2500 // Y-axis max axxeleration in normal mode in mm/s^2
-#define NORMAL_MAX_ACCEL_ST (100*NORMAL_MAX_ACCEL) // max accel in steps/s^2
-#define NORMAL_MAX_FEEDRATE 200  //max feedrate in mm/s, because mode switched to normal for homming , this value limits also homing, it should be greater (172mm/s=9600mm/min>2700mm/min)
+//#define NORMAL_MAX_ACCEL 2500 // Y-axis max axxeleration in normal mode in mm/s^2
+//#define NORMAL_MAX_ACCEL_ST (100*NORMAL_MAX_ACCEL) // max accel in steps/s^2
+//#define NORMAL_MAX_FEEDRATE 200  //max feedrate in mm/s, because mode switched to normal for homming , this value limits also homing, it should be greater (172mm/s=9600mm/min>2700mm/min)
 
+//#define FEEDRATE_LIMIT                 //limitation method for normal/silent
+//#define ACCEL_LIMIT                 //limitation method for normal/silent
 //#define SIMPLE_ACCEL_LIMIT          //new limitation method for normal/silent
 
 //number of bytes from end of the file to start check