Test Limit switches

I am setting up my machine and it tested correctly for the movements so I am on Test the limit switches. It tests the Z axis and then just sits there with the pop up up. It does not move on to test either the X or Y axis. What do I do?

Hello Samuel and welcome to the forum,
When going through Machine Setup did it ask you if you had homing switches?
If it tested the Z axis did the Z axis stop when it hit the switch?

I assume you mean trying to home the machine ($H)
If Z hit switch once but halts => $27 value is too low. Default is =1, change to 3 or 5.
This parameter define the pull-off distance after the first switch tap, preparing for the 2nd tap.
$27=1 may not be enough for the switch to disengage.

I jog the Z axis up it goes up, I do it again it works again and then I go up another time and it goes down. I am over an inch away from the limit switch

Same thing if I jog it down. It goes either direction almost randomly

Check your stepper wiring, you have one faulty wire.

I did find a loose wire in the Z axis, but also had to adjust the screw so the limit switch could close!

Thanks for the help!