You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/** * Raise Z to a minimum height to make room for a probe to move * * zprobe_zoffset: Negative of the Z height where the probe engages * z_raise: The probing raise distance * * The zprobe_zoffset is negative for a switch below the nozzle, so * multiply by Z_HOME_DIR (-1) to move enough away from the bed.*/inlinevoiddo_probe_raise(float z_raise) {
#if ENABLED(DEBUG_LEVELING_FEATURE)
if (DEBUGGING(LEVELING)) {
SERIAL_ECHOPAIR("do_probe_raise(", z_raise);
SERIAL_ECHOLNPGM(")");
}
#endiffloat z_dest = home_offset[Z_AXIS] + z_raise;
if ((Z_HOME_DIR) < 0 && zprobe_zoffset < 0)
z_dest -= zprobe_zoffset;
if (z_dest > current_position[Z_AXIS])
do_blocking_move_to_z(z_dest);
}
To better see what is going on:
/** * Raise Z to a minimum height to make room for a probe to move * * zprobe_zoffset: Negative of the Z height where the probe engages * z_raise: The probing raise distance * * The zprobe_zoffset is negative for a switch below the nozzle.*/inlinevoiddo_probe_raise(float z_raise) {
float z_dest = home_offset[Z_AXIS]; // This is bed level/* if ((Z_HOME_DIR) < 0 && zprobe_zoffset < 0) // if nozzle is above the probes trigger point z_dest -= zprobe_zoffset; // raise by the distance between nozzle ant trigger point. // That's wrong. The distance must be larger. There is a additional // way the probe needs from touching the bed to the trigger point. // While we are at it. if ((Z_HOME_DIR) < 0 && zprobe_zoffset > 0) // if nozzle is pressing on the bed when triggered z_dest += zprobe_zoffset; // raise by the distance between nozzle ant trigger point // to be at least at bed level.*/// Together this isif (Z_HOME_DIR) < 0)
z_dest += abs(zprobe_zoffset); // raise by the distance between nozzle ant trigger point
z_dest += z_raise; // Now raise by the amount of the highest obstacle.
#if ENABLED(DEBUG_LEVELING_FEATURE)
if (DEBUGGING(LEVELING)) {
SERIAL_ECHOPAIR("do_probe_raise(", z_raise);
SERIAL_ECHOLNPGM(")");
}
#endifif (z_dest > current_position[Z_AXIS])
do_blocking_move_to_z(z_dest);
}
Lets take a break and look at the different predefined heights.
//#define MIN_Z_HEIGHT_FOR_HOMING 4 // (in mm) Minimal z height before homing (G28) for Z clearance above the bed, clamps, ...
// Be sure you have this distance over your Z_MAX_POS in case.
Used for x/y-moves when the probe is not deployed/extended. (obstacle-height + safety margin)
#define Z_RAISE_BETWEEN_PROBINGS 5 // Raise between probing points.
Used for x/y-moves when the probe is deployed/extended. (obstacle-height + safety margin + (distance between nozzle and deepest point of the probe when hanging (not triggered)))
#define Z_RAISE_PROBE_DEPLOY_STOW 15 // Raise to make room for the probe to deploy / stow
User while the probe is deployed/stowed. (obstacle-height + safety margin + (distance between nozzle and deepest point of the probe while (the servo is) deployed/stowed))
If this are our definitions, zprobe_zoffset is irrelevant.
When zprobe_zoffset is positive, it is in sub mm magnitude. Probably smaller than what i'd take as safety margin.
When zprobe_zoffset is negative, it is the wrong, too small, value and irrelevant for MIN_Z_HEIGHT_FOR_HOMING.
/** * Raise Z to a minimum height to make room for a probe to move * * z_raise: The minimal target height. **/inlinevoiddo_probe_raise(float z_raise) {
float z_dest = home_offset[Z_AXIS] + z_dest += z_raise;
#if ENABLED(DEBUG_LEVELING_FEATURE)
if (DEBUGGING(LEVELING)) {
SERIAL_ECHOPAIR("do_probe_raise(", z_raise);
SERIAL_ECHOLNPGM(")");
}
#endifdo_blocking_move_to_z( max(z_dest, current_position[Z_AXIS]) );
}
The text was updated successfully, but these errors were encountered:
The reason I chose to include the zprobe_zoffset is specifically to make the raise apply to the distance between the deployed (and triggered) probe and the bed, rather than between the nozzle and the bed. This is the most safe baseline, so even a small raise like 1mm is good enough (maybe not for inductive probe, but you get the idea).
The extra spacing below the nozzle is only applied when the probe extends below the nozzle (i.e., zprobe_zoffset is negative). (Of course we don't want to lower the nozzle for a positive zprobe_zoffset even when the user has overridden it – whether on purpose, or by mistake).
The one thing that does jump out as being irrelevant in do_probe_raise is the direction of homing (Z_HOME_DIR), because probing is always down, towards the bed, of course. If you happen to home to a max Z (as on a Delta) this raise should apply the same way.
Currently we have:
To better see what is going on:
Lets take a break and look at the different predefined heights.
Used for x/y-moves when the probe is not deployed/extended. (obstacle-height + safety margin)
Used for x/y-moves when the probe is deployed/extended. (obstacle-height + safety margin + (distance between nozzle and deepest point of the probe when hanging (not triggered)))
User while the probe is deployed/stowed. (obstacle-height + safety margin + (distance between nozzle and deepest point of the probe while (the servo is) deployed/stowed))
If this are our definitions,
zprobe_zoffset
is irrelevant.When
zprobe_zoffset
is positive, it is in sub mm magnitude. Probably smaller than what i'd take as safety margin.When
zprobe_zoffset
is negative, it is the wrong, too small, value and irrelevant forMIN_Z_HEIGHT_FOR_HOMING
.The text was updated successfully, but these errors were encountered: