I have used Marlin for 10 years. I have edited the config file more times than I have kissed my wife.
I have a lot of experience, but I have no idea whats going on here.
The printer is a common configuration with a moving gantry for the X axis containing the hotend. On that gantry is also a servo activated Z-probe on an arm.
When I use Octoprint to move the Z-axis, down button moves down, up button moves up so the motor polarity is correct. I have also done this with G-codes to confirm operation.
The config file is set up with z homing direction -1 as normal with the define in place for seeking Z-Min.
THE PROBLEM is that homing causes the gantry to move UP instead of down towards the bed. It's even weirder than that. It moves up quite a bit and then the servo activates. I can usually get it to think it's done by pressing the Z_MIN switch a few times at that point.
It has to be a configuration problem, right? Here are some selected entries from the config file - the ones I am aware of that come into play.
#define NUM_SERVOS 1 // Servo index starts with 0 for M280 command
If you have any personal experience with anything that looks like this, please let me know if you think I am doing anything wrong in config. If you do not have any specific wisdom, please do not respond (unless you are Mark).
It seems like a weird problem, but I know that I am doing something wrong. It works on my other machine, but that one runs Marlin 1.0 and I had to hack the bed leveling code into it manually back when it was new. Marlin 2 has way more configuration parameters and features which I am finding a little cryptic.
The endstop (probe) is a NO switch (to ground) with a 4.7k pullup.