Homing macro - 3 pivot points

Basic Information:

Printer Model: RatRig Style Printer
MCU / Printerboard: Octopus Pro
Host / SBC
klippy.log

Hello,

does someone now how to write a macro for the following situation:

Problem:
If you have 3 z-motors that are leveling the print plate horizontally (in my case with a bltouch) a situation can happen that the bed is in a too wrong angle that after a homing and then a z tilt adjust command the nozzle then scratches over the bed and scratches over the pei flex plate while going to the X, Y coordinates that should be probed.

So to avoid this I always have to check by hand the alignement of the bed before a
Z_TILT_ADJUST command.

Solution:

Does someone know how to write a macro that makes the following:

→ The first time the printer is powered on, the print bed goes one time down to in
total 3 limit swiches, that are located next to the z motors “pivot Points”.
→ Now the bed is on an aceptable “safe alignement”
→ Homing
→ Z-tilt adjust is now allowed

Thanks for your help.

Include your klippy.log file where people can see your configuration and many more info which you can’t provide thru the text description.

By analyzing your description I understand your issue, but seems you are trying to solve it the wrong way.
Explaining why: Before you are doing Z_TILT_ADJUST you always do homing sequence first, homing sequence should drive all steppers to their limit switches - so your bed already should be in “safe alignment” region.
can’t comment more on that - because you didn’t include klippy.log

As a possible workaround maybe it would help to increase horizontal_move_z parameter to make your toolhead move higher between probe points.

Hey thanks for your reply. The klippy log file is now uploaded.
Yes you are right, the homing sequence on a ratrig printer is done first, in the beginning at the center of the bed. After that the Z_TILT_ADJUST is making the bed horizontally.
To avoid the printernozzle scratching over the bed in the case of a strong wrong bed angle → increasing the Horizontal_move_z parameter is a solution.

It is advisable to home Z again after Z_TILT-ADJUST has been performed.

Ok, so now when i can see your klippy.log i understand that you don’t have separate individual end-stops for each Z stepper and you are using BLTouch probe as a cumulative Z-enstop.
Yes in this kind of conditions your only option is to increase Horizontal_move_z, or you need to add 3 individual endtops (or use sensorless probes) and use them for homing sequence, in this kind of scenario your bead will always be in “safe alignment” region.