Fixed minor bugs in planner. Increased max dwell time. Long slope bug stop-gap solution note.

- Fixed the planner TODO regarding minimum nominal speeds. Re-arranged
calculations to be both more efficient and guaranteed to be greater
than zero. - Missed a parenthesis location on the rate_delta
calculation. Should fix a nearly in-perceptible issue with incorrect
acceleration ramping in diagonal directions. - Increased maximum dwell
time from 6.5sec to an 18hour max. A crazy amount more, but that's how
the math works out. - Converted the internal feedrate values to mm/min
only, as it was switching between mm/min to mm/sec and back to mm/min.
Also added a feedrate > 0 check in gcode.c. - Identified the long slope
at the end of rapid de/ac-celerations noted by stephanix. Problem with
the numerical integration truncation error between the exact solution
of estimate_acceleration_distance and how grbl actually performs the
acceleration ramps discretely. Increasing the
ACCELERATION_TICKS_PER_SECOND in config.h helps fix this problem.
Investigating further.
This commit is contained in:
Sonny J
2011-09-18 05:36:55 -06:00
parent 110faae986
commit 6de805441f
5 changed files with 46 additions and 38 deletions

View File

@ -29,13 +29,21 @@
#include "stepper.h"
#include "planner.h"
#define N_ARC_CORRECTION 25 // (0-255) Number of iterations before arc trajectory correction
// Number of arc generation iterations with small angle approximation before exact arc
// trajectory correction. Value must be 1-255.
#define N_ARC_CORRECTION 25
void mc_dwell(uint32_t milliseconds)
// Execute dwell in seconds. Maximum time delay is > 18 hours, more than enough for any application.
void mc_dwell(double seconds)
{
st_synchronize();
_delay_ms(milliseconds);
uint16_t i = floor(seconds);
st_synchronize();
_delay_ms(floor(1000*(seconds-i))); // Delay millisecond remainder
while (i > 0) {
_delay_ms(1000); // Delay one second
i--;
}
}
// Execute an arc in offset mode format. position == current xyz, target == target xyz,