Homing and feed hold bug fixes.
WARNING: Bugs may still exist. This branch is a work in progress and will be pushed to the edge branch when at beta stability. Use at your own risk. - Homing freezing issue fixed. Had to do with the cycle stop flag being set incorrectly after the homing cycles and before the pull-off maneuver. Now resets the stepper motors before this can happen. - Fixed an issue with a rare feed hold failure. Had to do with feed hold ending exactly at the end of a block. The runtime protocol now sets the QUEUED and IDLE states appropriately when this occurs. Still need to clean this code up however, as it’s patched rather than written well. - Updated version build via $I command. - Forgot to comment on a new feature for the last commit. Since steps are integers and millimeters traveled are floats, the old step segment generator ignored the step fraction differences in generating the segment velocities. Didn’t see like it would be much of a big deal, but there were instances that this would be a problem, especially for very slow feed rates. The stepper algorithm now micro-adjusts the segment velocities based on the step fractions not executed from the previous segment. This ensures that Grbl generates the velocity profiles EXACTLY and noticeably improves overall acceleration performance.
This commit is contained in:
13
limits.c
13
limits.c
@ -189,16 +189,16 @@ void limits_go_home(uint8_t cycle_mask)
|
||||
// Check only for user reset. No time to run protocol_execute_runtime() in this loop.
|
||||
if (sys.execute & EXEC_RESET) { protocol_execute_runtime(); return; }
|
||||
} while (STEP_MASK & axislock);
|
||||
|
||||
delay_ms(settings.homing_debounce_delay); // Delay to allow transient dynamics to dissipate.
|
||||
|
||||
// Reverse direction and reset homing rate for locate cycle(s).
|
||||
homing_rate = settings.homing_feed_rate;
|
||||
approach = !approach;
|
||||
|
||||
st_reset(); // Force disable steppers and reset step segment buffer. Ensure homing motion is cleared.
|
||||
plan_reset(); // Reset planner buffer. Zero planner positions. Ensure homing motion is cleared.
|
||||
|
||||
delay_ms(settings.homing_debounce_delay); // Delay to allow transient dynamics to dissipate.
|
||||
|
||||
// Reverse direction and reset homing rate for locate cycle(s).
|
||||
homing_rate = settings.homing_feed_rate;
|
||||
approach = !approach;
|
||||
|
||||
} while (n_cycle-- > 0);
|
||||
|
||||
// The active cycle axes should now be homed and machine limits have been located. By
|
||||
@ -230,7 +230,6 @@ void limits_go_home(uint8_t cycle_mask)
|
||||
// Initiate pull-off using main motion control routines.
|
||||
// TODO : Clean up state routines so that this motion still shows homing state.
|
||||
sys.state = STATE_QUEUED;
|
||||
// protocol_cycle_start();
|
||||
sys.execute |= EXEC_CYCLE_START;
|
||||
protocol_execute_runtime();
|
||||
protocol_buffer_synchronize(); // Complete pull-off motion.
|
||||
|
Reference in New Issue
Block a user