-
-
Notifications
You must be signed in to change notification settings - Fork 19.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DELTA do_blocking_move_to() more like the Chartesian one #4361
DELTA do_blocking_move_to() more like the Chartesian one #4361
Conversation
It does not look soo bad. We can see the new double bumps. We can see different probed points. :-) Sadly we can also see a messed up |
How about this?
feedrate_mm_m = (fr_mm_m != 0.0) ? fr_mm_m : XY_PROBE_FEEDRATE_MM_M;
bool has_xy_move = !(x == current_position[X_AXIS] && y == current_position[Y_AXIS]);
float z_first = max(z, current_position[Z_AXIS]); // move up only
if (has_xy_move) NOMORE(z_first, delta_clip_start_height); // stay in the safe zone for XY move
set_destination_to_current();
// Move up or down as needed
if (z_first != current_position[Z_AXIS]) {
destination[Z_AXIS] = z_first;
prepare_move_to_destination_raw(); // ...set_current_to_destination
}
// Move laterally to XY (with interpolation)
if (has_xy_move) {
destination[X_AXIS] = x;
destination[Y_AXIS] = y;
prepare_move_to_destination(); // ...set_current_to_destination
}
// Final Z raise if needed
if (z > current_position[Z_AXIS]) {
destination[Z_AXIS] = z;
prepare_move_to_destination_raw(); // ...set_current_to_destination
} |
Note that if your XYZ final destination is in the "unreachable" zone, the order of moves doesn't matter. The final position will still be off. However, if the final position is reachable, as long as you move Z to the destination first (even at an "unsafe" height), the move will always be doable. So a perfectly viable option is the much simpler: feedrate_mm_m = (fr_mm_m != 0.0) ? fr_mm_m : XY_PROBE_FEEDRATE_MM_M;
set_destination_to_current();
// Move up or down as needed
if (z != current_position[Z_AXIS]) {
destination[Z_AXIS] = z;
prepare_move_to_destination_raw(); // ...set_current_to_destination
}
// Move laterally to XY (with interpolation)
if (x != current_position[X_AXIS] || y != current_position[Y_AXIS]) {
destination[X_AXIS] = x;
destination[Y_AXIS] = y;
prepare_move_to_destination(); // ...set_current_to_destination
} |
A definite cause can always be determined in a deterministic system. |
Did you know? Cartesian is named after René Descartes? |
eeece78
to
fe0c8cd
Compare
2306e0c
to
376a572
Compare
Rebased und pimped up according to #4363 (comment) |
Today's report: Command:
A branch that it's used for testing |
I'm not surprised. Recent changes have been too rushed and thoughtless. We need the magic combination of someone who knows how to code who also owns a Delta. Otherwise we are flailing in the dark. I would rather start from a known working point than from where we are, but I suppose I'm stuck trying to untangle this mess by running the code in my head. I really, really don't want to have to spend so much time on this. I have other things I would much rather be doing. Anyway, I will scrub the code now, and when I figure out how it got cocked-up I will surely let you know. |
Let's see… This is the most obvious error for a start: - #define SET_CURRENT_FROM_STEPPERS() current_position[Z_AXIS] = z_before - stepper.get_axis_position_mm(Z_AXIS) + z_mm
+ #define SET_CURRENT_FROM_STEPPERS() current_position[Z_AXIS] = z_before + stepper.get_axis_position_mm(Z_AXIS) - z_mm In the case of starting from "10mm" height and probing down until it hits the bed at "5mm", the bad code will give you (for example) Then there are these confidence-killing redundancies. No, we don't need to set - current_position[Z_AXIS] += home_bump_mm(Z_AXIS);
- do_blocking_move_to_z(current_position[Z_AXIS], Z_PROBE_SPEED_FAST);
+ do_blocking_move_to_z(current_position[Z_AXIS] + home_bump_mm(Z_AXIS), Z_PROBE_SPEED_FAST); |
@esenapaj I will merge #4373 shortly. It fixes the bug I pointed out above and removes the unnecessary redundancies setting |
Yesterdays extension to do_blocking move_to() does not work because: When calling
And in do_blocking move_to() compare
and try to see |
@Blue-Marlin Precisely. It was never meant to have |
Make DELTA do_blocking_move_to() more like the Cartesian one.
To get the straight lines and to warrant straight down, not subdivided, probing moves.