Marlin - DEFAULT_XYJERK March 07, 2013 07:02PM |
Registered: 11 years ago Posts: 195 |
Re: Marlin - DEFAULT_XYJERK March 11, 2013 10:46PM |
Registered: 11 years ago Posts: 469 |
Re: Marlin - DEFAULT_XYJERK March 11, 2013 11:02PM |
Registered: 11 years ago Posts: 195 |
Re: Marlin - DEFAULT_XYJERK March 13, 2013 04:10PM |
Registered: 11 years ago Posts: 469 |
Re: Marlin - DEFAULT_XYJERK March 13, 2013 04:52PM |
Registered: 11 years ago Posts: 142 |
Re: Marlin - DEFAULT_XYJERK March 13, 2013 07:57PM |
Registered: 12 years ago Posts: 939 |
Re: Marlin - DEFAULT_XYJERK March 14, 2013 12:43AM |
Registered: 11 years ago Posts: 195 |
#define DEFAULT_XYJERK 20.0 // (mm/sec)
max_xy_jerk=DEFAULT_XYJERK;
extern float max_xy_jerk; //speed than can be stopped at once, if i understand correctly.(that is the actual comment you can find in the git grabbed source)
// Start with a safe speed float vmax_junction = max_xy_jerk/2; float vmax_junction_factor = 1.0; if(fabs(current_speed[Z_AXIS]) > max_z_jerk/2) vmax_junction = min(vmax_junction, max_z_jerk/2); if(fabs(current_speed[E_AXIS]) > max_e_jerk/2) vmax_junction = min(vmax_junction, max_e_jerk/2); vmax_junction = min(vmax_junction, block->nominal_speed); float safe_speed = vmax_junction; if ((moves_queued > 1) && (previous_nominal_speed > 0.0001)) { float jerk = sqrt(pow((current_speed[X_AXIS]-previous_speed[X_AXIS]), 2)+pow((current_speed[Y_AXIS]-previous_speed[Y_AXIS]), 2)); // if((fabs(previous_speed[X_AXIS]) > 0.0001) || (fabs(previous_speed[Y_AXIS]) > 0.0001)) { vmax_junction = block->nominal_speed; // } if (jerk > max_xy_jerk) { vmax_junction_factor = (max_xy_jerk/jerk); } if(fabs(current_speed[Z_AXIS] - previous_speed[Z_AXIS]) > max_z_jerk) { vmax_junction_factor= min(vmax_junction_factor, (max_z_jerk/fabs(current_speed[Z_AXIS] - previous_speed[Z_AXIS]))); } if(fabs(current_speed[E_AXIS] - previous_speed[E_AXIS]) > max_e_jerk) { vmax_junction_factor = min(vmax_junction_factor, (max_e_jerk/fabs(current_speed[E_AXIS] - previous_speed[E_AXIS]))); } vmax_junction = min(previous_nominal_speed, vmax_junction * vmax_junction_factor); // Limit speed to max previous speed } block->max_entry_speed = vmax_junction;
float jerk = sqrt(pow((current_speed[X_AXIS]-previous_speed[X_AXIS]), 2)+pow((current_speed[Y_AXIS]-previous_speed[Y_AXIS]), 2));Pretty obvious, jerk is treated as the hypotenuse of a right angle triangle formed by:
if (jerk > max_xy_jerk) { vmax_junction_factor = (max_xy_jerk/jerk); }the speed factor is set to your DEFAULT_XYJERK divided to the obtained jerk from the triangle above. Other, if jerk does not exceed your set DEFAULT_XYJERK, nothing happens. Furthermore and finally, this vmax_junction_factor value is used to calculate the vmax_junction:
vmax_junction = min(previous_nominal_speed, vmax_junction * vmax_junction_factor); // Limit speed to max previous speedso the max speed at junction will be the minimum value between previous_nominal_speed and vmax_junction * DEFAULT_XYJERK / jerk.
Re: Marlin - DEFAULT_XYJERK March 15, 2013 10:48AM |
Registered: 12 years ago Posts: 258 |
Re: Marlin - DEFAULT_XYJERK March 15, 2013 11:06AM |
Registered: 11 years ago Posts: 195 |
Re: Marlin - DEFAULT_XYJERK March 15, 2013 11:26AM |
Registered: 11 years ago Posts: 142 |
Re: Marlin - DEFAULT_XYJERK March 15, 2013 09:46PM |
Registered: 11 years ago Posts: 469 |
Re: Marlin - DEFAULT_XYJERK June 01, 2017 03:00PM |
Registered: 7 years ago Posts: 3 |
Re: Marlin - DEFAULT_XYJERK June 02, 2017 12:45AM |
Registered: 11 years ago Posts: 469 |
Quote
patxystage1
I had an interesting experience with this jerk setting. I am building an XYZ stage using 3 ball screw driver linear actuators. For the longest time my motors were jamming when I went anywhere beyond 4 mm/s. Without knowing the effect, I decided to try changing the jerk setting from the default value of 20 to 1 and was able to get to the speed I wanted (5 mm/s).
Based on the above discussion it seems like the jerk is similar to acceleration, in that it is the maximum change in speed between 2 points (i.e. in gcode, if you're specifying coordinates, each point is a set of coordinates). If this is the case then what is the difference between jerk and acceleration?