# Wrong caculation with z\_tilt?

**URL:** <https://klipper.discourse.group/t/wrong-caculation-with-z-tilt/586>\
**Category:** General Discussion\
**Created:** [July 22, 2021, 7:26pm UTC](https://klipper.discourse.group/t/wrong-caculation-with-z-tilt/586 "2021-07-22T19:26:21Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![EddyMI3D](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/eddymi3d/32/1981_2.png) [@EddyMI3D](https://klipper.discourse.group/u/EddyMI3D)\
**Post date:** [July 22, 2021, 7:26pm UTC](https://klipper.discourse.group/t/wrong-caculation-with-z-tilt/586/1 "2021-07-22T19:26:21Z")

</div>

Hello!

I’m on the way to setup a Formbot T-Rex 3 for Klipper.

All is fine, also stepper\_z1 runs well, but…  
When I try to run a Z\_TILT\_ADJUST, I get wierd results:

```auto
Recv: // probe at 20.000,200.000 is z=2.243750
Recv: // probe at 20.000,200.000 is z=2.236250
Recv: // probe at 20.000,200.000 is z=2.243750
Recv: // probe at 380.000,200.000 is z=2.593750
Recv: // probe at 380.000,200.000 is z=2.600000
Recv: // probe at 380.000,200.000 is z=2.593750
Recv: // Making the following Z adjustments:
Recv: // stepper_z = -0.238467
Recv: // stepper_z1 = 0.194906
Recv: // Retries: 0/10 Probed points range: 0.354583 tolerance: 0.005000
Recv: // probe at 20.000,200.000 is z=2.488467
Recv: // probe at 20.000,200.000 is z=2.482217
Recv: // probe at 20.000,200.000 is z=2.484717
Recv: // probe at 380.000,200.000 is z=2.832217
Recv: // probe at 380.000,200.000 is z=2.835967
Recv: // probe at 380.000,200.000 is z=2.837217

```

So, in the first run, Z is -0.238467 too low and Z1 is 0.194906 too high.

So Klipper should add 0.238467 to Z and subtract 0.194906 from Z1.

But in the second run Z is obviously 0.238467 higher than before, but Z1 also is higher instead lower.

This are my Z stepper setups:

```auto
[stepper_z]
step_pin: PL3
dir_pin: PL1
enable_pin: !PK0
microsteps: 16
rotation_distance: 4
endstop_pin: probe:z_virtual_endstop
position_min: -4.25
position_max: 500

[stepper_z1]
step_pin: PA5
dir_pin: PA3
enable_pin: !PA7
microsteps: 16
rotation_distance: 4

```

And this my z\_tilt setup:

```auto
[z_tilt]
z_positions: 
    -20,200
    420,200
points: 
    20,200
    380,200
speed: 100
horizontal_move_z: 10
retries: 10
retry_tolerance: 0.005

```

I’m afraid, I missed something.

Any Ideas or experiences?

---

<div class="post-metadata">

**Author:** ![EddyMI3D](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/eddymi3d/32/1981_2.png) [@EddyMI3D](https://klipper.discourse.group/u/EddyMI3D)\
**Post date:** [July 22, 2021, 7:54pm UTC](https://klipper.discourse.group/t/wrong-caculation-with-z-tilt/586/2 "2021-07-22T19:54:54Z")

</div>

Never mind.

The issue is found: He sits on this side of the keyboard.

I had the wrong cable connected to stepper Z1

![grafik](https://global.discourse-cdn.com/free1/uploads/klipper/original/1X/b20453d6abd76deef5fa82bfa339bb1e1a4ed451.png)

---

<div class="post-metadata">

**Author:** ![ReXT3D](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/rext3d/32/200_2.png) [@ReXT3D](https://klipper.discourse.group/u/ReXT3D)\
**Post date:** [July 22, 2021, 11:41pm UTC](https://klipper.discourse.group/t/wrong-caculation-with-z-tilt/586/3 "2021-07-22T23:41:00Z")

</div>

I’m pretty sure that many of us have done just that one way or another.

If your bed is not very flat at the specified Y position, you may want to add more probing points along X to get a better overall fit. I do mine with 6 points for example, with the two outer ones on each side being tighter than the inner ones. But if yours work, don’t bother.

---

<div class="post-metadata">

**Author:** ![EddyMI3D](https://yyz2.discourse-cdn.com/free1/user_avatar/klipper.discourse.group/eddymi3d/32/1981_2.png) [@EddyMI3D](https://klipper.discourse.group/u/EddyMI3D)\
**Post date:** [May 10, 2024, 9:06pm UTC](https://klipper.discourse.group/t/wrong-caculation-with-z-tilt/586/4 "2024-05-10T21:06:18Z")

</div>


