Welcome! Log In Create A New Profile

Advanced

Axis moves in wrong direction after homing

Posted by wstoof 
Axis moves in wrong direction after homing
August 04, 2018 04:18AM
Have a lot of experience with building and programming cnc machines in Mach3.
And also used Marlin successfully in the past. Now having problems that simply looks like a beginners mistake ( feel a shamed about that ! )
After changing some pulley’s i uploaded new Marlin firmware to the MEGA controller of a 3D printer that worked fine for several years.
Not having saved the original config file of several years ago I edited a new Configuration.h file.

The 3D printer is mechanical almost same setup as a Ultimaker 1.
So it has the X and Y - axis switches in the left front corner and the Z-axis switch at the top on the back .
Some of the important settings …


#define USE_XMIN_PLUG
#define USE_YMIN_PLUG
#define USE_ZMIN_PLUG
//#define USE_XMAX_PLUG
//#define USE_YMAX_PLUG
//#define USE_ZMAX_PLUG

// Direction of endstops when homing; 1=MAX, -1=MIN
// :[-1,1]. ( can’t change the value X_HOME_DIR from -1 to 1gives an error code, because that is only possible USE_XMIN_PLUG etc )
#define X_HOME_DIR -1
#define Y_HOME_DIR -1
#define Z_HOME_DIR -1

// @section machine

// The size of the print bed
#define X_BED_SIZE 200
#define Y_BED_SIZE 200

// Travel limits (mm) after homing, corresponding to endstop positions.
#define X_MIN_POS 0
#define Y_MIN_POS 0
#define Z_MIN_POS 0
#define X_MAX_POS X_BED_SIZE
#define Y_MAX_POS Y_BED_SIZE
#define Z_MAX_POS 200

Have not made any changes on the Configuration_adv.h file

I have now a strange effect. ( both in 1.1.8 and 2 )
During Homeing the head moves correctly in direction to the switches ( X moves to the Left en the Y to the front ).
After the homing is finished the display shows both for X and Y that the coordinates are 0 .
When I now move the axis in the menu ( move axis) they don’t want to move to the right (X) and to the Back (Y) instead the controller thinks that the + direction is to the Left (X) and to the front of the machine (Y) so both in direction of the switch and crashing against the side of the machine.

( can’t change the value X_HOME_DIR from -1 to 1gives an error code)

It just doesn’t make sense that the + direction of the axis is in the same direction of the movement of the axis during homeing…

What am I doing wrong ? ( it must be something very stupid !, so i apologise now before getting an answer for my stupidity … )
Re: Axis moves in wrong direction after homing
August 04, 2018 08:12AM
Try the code Below. " these are for my stepper directions you will need to change for your 3D Printer "

// Invert the stepper direction. Change (or reverse the motor connector) if an axis goes the wrong way.
#define INVERT_X_DIR false
#define INVERT_Y_DIR false
#define INVERT_Z_DIR true


Computer Programmer / Electronics Technician
Sorry, only registered users may post in this forum.

Click here to login