CNC machine homes in the wrong direction.
Marlin 3D Printer Firmware running on Arduino Mega with RAMPS 1.4 shield.
The direction of travel when homing is configured in the configuration.h using the settings X_HOME_DIR, Y_HOME_DIR and Z_HOME_DIR in the section ENDSTOP SETTINGS.
A value of -1 will set the homing direction towards the min end stop. A value of 1 will set the homing direction to the max end stop.