Yes, that’s how i look at it too, but i’m trying to explain what it looks like to the user. You and i know that position_min/max/endstop defines the physical limits, the virtual g-code coordinate system runs within those boundaries and you can translate (SET_GCODE_OFFSET) and transform how the virtual coordinate system maps to the physical one by using modules such as bed_mesh
, skew
, z_thermal_adjust
, and the likes. Ie. the virtual coordinate system is a runtime mutable transform. Explaining the basic concept about virtual vs physical to the user is not difficult, it’s all the “side effects” associated with it. It’s not always transparent to the user how the virtual system is offset and/or transformed to the physical coordinate system which enforces the limits. It’s not immediately apparent when, why and how the boundary between the physical and virtual systems is crossed. They’re mixed more often than not, in both directions (z_offset is the simplest example). When you’re using a probe as a virtual endstop for an axis, the physical boundaries should be derived from the virtual one, until we have a complete physical representation of the system. Currently that’s not the case. The user is required to describe the physical system first, even though that’s not actually possible to do in any meaningful way (hence the position_min: -5
we keep coming back to). Without knowing the distance between the probes trigger point and the nozzle (z_offset) you don’t know the position_endstop and thus position_min is not an accurate representation of anything. All we really know and the most accurate definition we can give to the physical coordinate system, is that position_min is somewhere between negative infinity and position_max, until the z_offset has been determined - physically - and “saved” (apropos crossing the boundary between virtual and physical), position_min and position_endstops are in actuality unknown
. That is the crux of the issue, in technical terms. A chicken and egg kind of situation.
For what it is worth, your earlier messages were describing goals relative to the g-code coordinate system using terminology I associate with the physical coordinate system, and that had me confused.
I understand, there’s just no position_min / position_max equivalent in the g-code coordinate system, what would you use instead?
Btw i think this part
if one were viewing the physical coordinate system from the perspective of the g-code coordinate system, then the g-code coordinate system would seem perfectly rectangular while the physical coordinate system would appear bumpy, skewed, tilted, and changing.
Is a good way to think of the users perspective - and why many of them get frustrated as they don’t understand how they relate to each other. It’s a pretty complicated opaque mathematical model requiring multiple variables on a calibrated printer. I think going forward, thinking of the user as living in “gcode-land” could be helpful.
- Good point.
- I don’t understand. These situations aren’t affected by my proposed changes, are they? My proposal disables the physical boundary check at the endstop side of a single axis, exclusively during probe calibration, and only if that probe is used as a virtual endstop on that axis. Is there are mistake in my proposal somewhere that does not confine it to that specific situation? Does it help to define a flag that gets set when PROBE_CALIBRATE and ACCEPT is called? I must be missing something.
I’m also confused how the scenario you’re describing is different from how the system works today. Except that G1 Z-2 wouldn’t be allowed because the user forgot an arbitrary position_min: -5
in his config that we forced them to add, for the only purpose of running a calibration routine, it would have to be explicitly set for another reason - for example to get bed_mesh to work (ie, the minimum Z value of the bed mesh has to be greater than position_min).
- I agree with your sentiments, but it’s also far outside the scope of issues i’m trying to solve. I’m not trying to prevent hardware damage in general - i’m trying to remove one source of it (the requirement of setting an arbitrary position_min that conflicts with the physical properties of the printer, to run PROBE_CALIBRATE), while simultaneously improving the user experience of PROBE_CALIBRATE.
- I agree with the sentiments here, we absolutely should look into what can be done. However, it doesn’t actually solve any of the points i laid out in my description of “the problem” in my post.
So far we’ve used G1 Z-5
as a failure scenario, but I’ve never seen a user accidentally issue a command like that.
Doesn’t have to be directly user initiated, any macro that moves relatively can cause this, any macro that relies on position_min as a variable can cause it. Clicking one too many times on the z button in a frontend can cause it. Forcing an incorrect definition of the physical properties of the printer leaves any option open really - you’re effectively disabling the kinematic check. G1 Z-1 may be enough in itself to cause damage. Consider an all metal toolhead, unsupported heatbreak and a very flat and rigid bed.
that seems to me to be an attempt to “completely disable the safety check”
Bingo! yet PROBE_CALIBRATE requires it, unless you want to run it 4 times on some probe setups (euclid on EVA3 is one example).
I also don’t understand the references to position_min: -5
It’s the current default i use because it encompasses the z_offset of both bltouch and 8-12mm inductive probes. However it is not enough to calibrate a euclid or a klicky probe on the toolhead designs i’ve seen - there may be some out there where it’s not an issue. Default z_offset is zero (assuming anything else is dangerous). PROBE_CALIBRATE should be used to find the truth. Once z_offset is calibrated, ideally position_min
should be set to zero (but we can’t for other reasons - bed_mesh
and so on, it could however be set lower - but the klipper docs don’t tell us to). You can read it as position_min: -2
since that’s what’s in the docs.
Do you see how the boundary between physical and virtual becomes fuzzy as it relates to a non-flat surface (that you inherently think of as physical) and an undetermined/intangible virtual endstop position?
So, sure, if one completely disables the check then one may then need to reenable it, but perhaps we’d be better off not recommending they completely disable it in the first place?
Completely agree, hence my proposal! to be absolutely clear, i never once suggested disabling the check in general (only in the very situation where it’s invalid in the first place - PROBE_CALIBRATE on a virtual endstop), i do however claim that it’s effectively the result of what the Klipper docs are currently doing:
So, what situations are requiring such an extreme 5mm delta on the Z carriage (relative to the z endstop)?
I think this is why we’re talking past eachother a bit. There is no z endstop. There’s only an uncalibrated probe. There is nothing physically determined to relate to. That’s the specific case i’m talking about (i haven’t personally dealt with printers that function differently for the past 4 years).