Klipper says "move out of range" on any move

Basic Information:

Printer Model: Custom corexy
MCU / Printerboard: SKR Pro
klippy.log
klippy.log (420.5 KB)

Fill out above information and in all cases attach your klippy.log file. Pasting your printer.cfg is not needed
When pasting code or config snippets use the code tags </> in the menu above

Describe your issue:

Am trying to get this printer to work reliably but am having a problem with movement. I am trying to do a “calibate_probe” so I’m trying to move my X and Y to the center of the bed. I’ve tried “G1 x50” or G1 y50" or have used the buttons in Mainsail, I always the the error “Move out of range: 5.000 0.000 207.029 [0.000]” or something similar. What seems strange is that it is trying to move Z further than the endstop ( Z is max at 207 ). I have no Idea what is causing this. I’m about to give up on Klipper and go back to Marlin.

Hello @lcjnsb !

You have position_max = 207 for the Z-axes.

So when yo try to move beyond that, you get an error.

Move out of range: 5.000 0.000 207.029 [0.000]

Yes I agree, but I get the error after I home ( G28 ) and then try to move the X or Y axis. Is this Klipper trying to lower the Z before the move?

Now I see: You have a BLTouch.

You have to change your config for stepper_z:

https://www.klipper3d.org/BLTouch.html

Yes I do have a BLTouch, but I don’t use to home. I ran all the tests with “BLTOUCH_DEBUG COMMAND…” and it tests ok. The printer homes z at Z MAX (207) . When Z is at 0.00 the BLTouch is about 2 mm above the bed. Here is another piece to the puzzle, if i raise the bed ( ie M91 , G1 Z-1 F1500 ) via the icon on Mainsail I am able to move the X and Y. But the issue still remains, Z wants to move beyond home on an X or Y move.

This sounds weird. Maybe:

  1. You home
  2. After homing the printer is at Z=207
  3. You move X or Y
  4. Your bed_mesh kicks in and pushes your Z beyond 207
  5. Klipper errors out

Does it also happen when:

  1. G28
  2. BED_MESH_CLEAR
  3. Move X or Y?

No it doesn’t.
If I do the commands you suggest it works as expected, but the if the bed_mesh is active the opposite happens
G28 homes and sets Z at 207.00
G1 X100 Y100 moves as expected but sets Z at 207.00

If I issue BED_MESH_PROFILE LOAD=default and then issue the same commands the Z is set to 207.60.

I hope this is understandable. Should this be reported as an issue on Github or do you think this is something I have configured incorrectly?

This is expected behavior.
If you have a mesh loaded then your Z-value gets corrected on each G1 move according to the relevant mesh position.
If this mesh correction pushes your Z-value out of the max bounds then Klipper will error out.

Coincidentally an upcoming change will “solve” this issue for you. See Klipper changes to [bed_mesh] module · Issue #5983 · Klipper3d/klipper · GitHub

Thank you, I will wait for the update.