Understanding X and Y limits and homing....Questions

Basic Information:

Printer Model: SV01
MCU / Printerboard:SKR Mini E3 V2.0
klippy.log no log needed

Fill out above information and in all cases attach your klippy.log file (use zip to compress it, if too big). Pasting your printer.cfg is not needed
Be sure to check our “Knowledge Base” Category first. Most relevant items, e.g. error messages, are covered there

Describe your issue:

My issue is trying to figure out my X and my Y limits (min and Max). I tried reading this document: Understanding X and Y Axes Limits and Homing … But it is half backwards. In it, it states: " * Homing towards position_min

  • Klipper starts moving in the negative direction (usually to the left for X and to the front for Y) until it hits the endstop
  • After hitting the endstop, Klipper now knows that the bed’s origin (X=0 / Y=0) is position_min millimeters away from the current position". This is incorrect. I have 12 printers and they all home to min by going X to the left and Y to the rear. I have never seen a printer with a Y endstop at the front. So I am trying to figure out my min and max without getting an error. My nozzle for the Y axis is on the bed after moving it FORWARD to 14mm. It is at its max at 266mm. When I put that the position endstop is at -14 or even 14 I get an error. SO i try endstop 0 and position min to be 14 or -14 and still get an error. So I am cluesless. Klipper is very different from marlin when it comes to the math with these things.

The classic 0,0 position is the front left. That has been the case all the way back to the very first printers. Most printers in fact have the endstops front and left, even the most basic Ender printers.
That’s why, if you want to home to the back instead, you need to use position_max and the back position of the bed. I.e. if your bed is 250x250 with the endstop at the back at 250, you’d put this for Y:

position_endstop: 250
position_max: 250

It is needed.

This would be way more easy with a klippy.log.

Interesting.
As I’m always open for improvements of the guides, please be so kind to provide the correct information.

It does not matter where the endstops are located as long as the boundaries are set properly.
And the math is the same for Klipper as it is for other firmwares!

My v0 homes into the rear right corner though 0,0 is of course at the front left corner.
My NoName actually homes into front left corner where 0,0 is too…

If you have 12 printers that are hopefully working you should have some knowledge and basic understanding of how things work.
If not the Klipper configuration documentation is your recommended reading:
https://www.klipper3d.org/Config_Reference.html

Well the guide states that Y should home to the front when homing to the min position. Y should actually move to the rear for the min position towards the endstop. Unless it is some new printer that homes forward to a forward endstop which would be really weird.

How would a klippy log answer my question as to which way I should set the min position? The nozzle when y is homed is 14mm in front edge of the bed. Or the edge of the bed is 14mm behind the nozzle. The klippy log would not have this information. This is mechanical information that one could only get from physical measurement. Unless the log is all knowing and a mind reader. I was just simply asking how I need to define my position min and endstop position for the printer with the nozzle being plus 14mm in front of the front edge of the bed(meaning off the bed by 14mm’s). Also this is a fresh build so no klippy log to even provide.

I do have basic knowledge. I am an expert in marlin… not klipper. haha I am a klipper noob. I know klipper has to be spoon fed information to do the proper math and cant calculate like marlin can with only a few inputs. I noticed setting up offsets and such you get way different results with klipper vs marlin where marlin is all perfect on the first input. I can tell marlin my offsets and bed size and done. Klipper needs to be exact to hit bed center and know where the virtual space is.

If your endstop is at the back like all printers and your nozzle does not leave the bed then the position_endstop would actually be 0 and your min would also be 0. Then you would see how far forward your bed goes and that would be your max. Not the other way around. And yes front left is indeed the standard. Well at least for the 7.8 years I have been printing. lmao I was just asking how I need to label it being that my nozzle is 14 off the front edge of the bed. I think I figured it out though. I set pos_end to -14 and pos_min to -14 and that seems to have done the trick. Idk who told you that the pos_end is your max when triggered if it is at the rear but they were misinformed.

If your endstop is at the maximum position then it homes towards max and not 0.
Endstop position can be beyond the maximum or minimum limits and can even be negative if the nozzle leaves the printable area.

You may want to read here for this:

I wont have a log until I fire this up for the first time but here is the section I was working on if that helps.

[stepper_y]
step_pin: PB10
dir_pin: !PB2
enable_pin: !PB11
microsteps: 16
rotation_distance: 40
full_steps_per_rotation: 200
endstop_pin: ^PC1
position_endstop: -14
position_min: -14
position_max: 265
homing_speed: 50

Converting all machines I have to klipper. I write up from the old info and then use a base config for the given board and then setup all the other configs then flash and then upload to the system and then power on. I also do all measurements with the machine off first. Hence how I knew when Y triggered it was 14mm in front.

Unfortunately, then your understanding of coordinate systems and Klipper is lacking.

  • As stated, the guides assume a standard Cartesian coordinate system, which is the de facto standard for 3D printers.
    • This means your origin (0/0) is in the front-left corner (see the diagrams)
    • Of course you can define different systems like 0/0 being in the center or in the back-right corner. In any case, it goes by a right-hand coordinate system definition
  • Depending on the relation between position_max and position_endstop, Klipper chooses the homing direction (see “Basic Homing Theory”)

Best thing would be to provide a rough sketch with your layout and this also goes towards @EddyMI3D point to provide a klippy.log to see how you have defined the relevant settings so far.

1 Like

If 0,0 is the front left corner as per standard and the position of your endstop is in the back then endstop_position can’t be below position_max.

As requested by @Sineos please create a sketch with markings and post it here.

Typically on such printers you will have something like:

[stepper_x]
position_endstop: 0
position_max: ...

[stepper_y]
position_endstop: 0
position_max: ...

This means:

  • Once you hit the endstop, you are at your 0/0 position
    • your print-head is over the bed’s lower left corner
    • all movements to the relevant max
  • You could add a position_min if the printer allows for some additional movement but would bring the head off the bed. Can be useful to give some head-room for probing etc.

Yes at 0,0 the nozzle is off the bed by 14mms. But I think I fixed it. I saw a klipper doc that states if you have over hang then you have to define the endstop and the position min the exact same. So i did that and now it homes dead center when I home it. I just tried it and seems to work. I just didnt want to fire it up and crash something. But all is well now it seems. And I have a good understanding of coordinates. As standard as I was saying 0,0 is front left corner for x and y. When you tell the printer to home then the printer will home to the min positions. So that would be left on the x axis and y axis would go back towards the endstop. The guide you quoted in an old post said X goes to the left and Y comes forward. If Y comes forward then your bed is moving towards you and away from the endstop thus giving you a positive position and not a lower minimum position. Printers home left and to the rear to reach front left corner. I have never seen a printer home left and the bed move forward towards me and away from the endstop. Also why on boards you always define the X MIN pin and the Y MIN pin for the 2 endstops. The endstops tell you your min position. But some printers like the sv01 have some overhang.

Yeah I read that. hence the title of my post. That guide was incorrect stating that homing towards the min position that x goes left and the bed moves forward. I have never seen a printer home left and forward. I have always seen them go left and to the rear. If the bed moves toward you then there is a problem with your inversion.

Everything is a matter of settings:

My Trex goes forward for Y homing

[stepper_y]
step_pin: PF6
dir_pin: !PF7
enable_pin: !PF2
microsteps: 16
rotation_distance: 39.83
endstop_pin: ^!PJ0
position_endstop: 400
position_max: 400
homing_speed: 50.0
second_homing_speed: 10.0

Again, it is your understanding that is wrong. Klipper homes in the relation between position_min / position_max and the respective position_endstop. Depending on this relation, the direction of homing is chosen.

Well the standard 99% of printers it is left and back. Not left and front when it comes to movement. carriage goes left bed goes back.

It is not about where the homing of other printer go to. This is not a law.
It’s about the correct settings and that Klipper knows where 0/0 is.