I got it working now 👍
There was a endstop set for the z axis
; Endstops
M574 X1 S1 C0
M574 Y1 S1 C1
M574 Z2 S1 C2
M574 U1 S1 C4
M574 V1 S1 C3
So I changed it to
M574 X1 S1 C0
M574 Y1 S1 C1
M574 Z0
M574 U1 S1 C4
M574 V1 S1 C3
and now it's working. Thank you all for your help.