Odd homing behavior with endstops

Ok so I have my lowrider set up with all my endstops working properly, but here is the issue:

If I power on the machine, then go to the homing screen and hit “XY”, the first thing it does is drive the Z axis into the table until the motors start to grind. I have to kill the power to make it stop.

If I Home the Z axis first, it drives the Z upward to the stops, repeats, and levels everything just as it should.
Then if home XY after Z, the machine moves only X and Y to the stops, and repeats, just as it should.
So my work around is to always home Z first, and it works just fine. But why does it drive Z down when homing XY? and why doesn’t it do that after homing Z?

This is an SKR 1.2 Board.

Interesting. I’v never homed XY before Z. I have the same Lowrider setup as you.
I just went and tried it and no, homing XY on powerup before anything else just homes X then Y as normal, it doesn’t drive Z down first.
First time I have done this however, because my Z drops when I hit the Estop, there isn’t enough friction in the Z screws, so I have to catch the bars to stop the router bit from driving through the work or table. On power up I have to home Z first because of this. Then move XY closer to the home if it was powered down too far away. Then home XY. Then set Z0 on the top of the work.
I don’t know why your machine drives Z down first n Home XY other than this looks like it’s trying to find the touch plate but that also doesn’t make sense.
Tom

How high up is it when it starts? Are the Z motors engaged? Does a positive Z movement go up?

This is not the behavior I expect. So I suspect something like the Z motors are driving to a “safe height” or that the Z motors aren’t engaged, and they are slowly falling when the XY moves.

The Z motors are definitely being driven under power, not falling due to gravity. The motors will start to grind if I let it hit the table.
Since you asked, I tested at a few different starting heights, and here is what I discovered. When I power on the machine, the Z axis is set to 200 on the display by default, no matter what height the gantry is at.
If I move Z upward (above 200), to say 240, and then hit HOME XY, it will drive Z under power to 200, and then move to the X and Y limit switches.
If I first move Z below 200, say 160, and then hit HOME XY, it will not drop Z at all, and simply home XY.
Basically it seems to be checking that Z is at 200 or less before moving in XY. It will drive Z down (but not up) to wherever it was when the machine was turned on.
Is this a firmware setting? is it correct? The X and Y are always at zero when I first turn on the machine.
I think that on the times it has driven itself into the work piece, I must have started up the machine at a low position, then raised the gantry to give me some working room, then put my work piece underneath, then hit HOME XY…This would drive it back to its start position in Z, to which I have added my work piece to, causing a crash. I hope that made sense.

Ok. That is making more sense.

The 200 is just the default for Z max. But it doesn’t matter, because it has no idea where it is until it homes Z. It is trying to get back into the workspace, because it thinks that is a good idea.

There is a Z safe homing setting. I am not sure if that is on. We could try turning that off.

This is explainable now by the firmware. I am not sure why I haven’t seen anyone complain about it before. Or maybe they did and I have jettisoned that memory.