New stepper algorithm. Optimized planner.
- Brand-new stepper algorithm. Based on the Pramod Ranade inverse time algorithm, but modified to ensure step events are exact. Currently limited to about 15kHz step rates, much more to be done to enable 30kHz again. - Removed Timer1. Stepper algorithm now uses Timer0 and Timer2. - Much improved step generation during accelerations. Smoother. Allows much higher accelerations (and speeds) than before on the same machine. - Cleaner algorithm that is more easily portable to other CPU types. - Streamlined planner calculations. Removed accelerate_until and final_rate variables from block buffer since the new stepper algorithm is that much more accurate. - Improved planner efficiency by about 15-20% during worst case scenarios (arcs). - New config.h options to tune new stepper algorithm.
This commit is contained in:
@ -41,17 +41,15 @@ typedef struct {
|
||||
float entry_speed; // Entry speed at previous-current block junction in mm/min
|
||||
float max_entry_speed; // Maximum allowable junction entry speed in mm/min
|
||||
float millimeters; // The total travel of this block in mm
|
||||
uint8_t recalculate_flag; // Planner flag to recalculate trapezoids on entry junction
|
||||
uint8_t nominal_length_flag; // Planner flag for nominal speed always reached
|
||||
uint8_t recalculate_flag; // Planner flag to recalculate trapezoids on entry junction
|
||||
uint8_t nominal_length_flag; // Planner flag for nominal speed always reached
|
||||
|
||||
// Settings for the trapezoid generator
|
||||
uint32_t initial_rate; // The step rate at start of block
|
||||
uint32_t final_rate; // The step rate at end of block
|
||||
int32_t rate_delta; // The steps/minute to add or subtract when changing speed (must be positive)
|
||||
uint32_t accelerate_until; // The index of the step event on which to stop acceleration
|
||||
uint32_t decelerate_after; // The index of the step event on which to start decelerating
|
||||
uint32_t nominal_rate; // The nominal step rate for this block in step_events/minute
|
||||
|
||||
uint32_t d_next; // Scaled distance to next step
|
||||
} block_t;
|
||||
|
||||
// Initialize the motion plan subsystem
|
||||
|
Reference in New Issue
Block a user