Creality Ender 3 X axis homing issue I bought an Ender 3 recently. Auto-home is on the right front moving away from the end stop. I did reverse the wiring of the X axis motor, it did not work. I had Marlin 2.x uploaded, it didn't work too. 

Marlin 2.x:


Configuration.h
Configuration_adv.h


The print starts off with a boundary line in the middle and goes off the bed on the right corner to print. Y and Z axes are fine. X axis seems to be bumping into the right front, every time while homing. I had tweaked little bit of Marlin, but I'm a beginner and I don't understand it completely.

I'm using Cura, printer settings, max X=235, max Y=235, max Z=250, origin at the center: unchecked.

This might help...

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


#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 250


#define MANUAL_X_HOME_POS 0
#define MANUAL_Y_HOME_POS 0
#define MANUAL_Z_HOME_POS 0


(left this after so many trails)

In Pronterface the mid point X117.5 is at the middle right corner.

I'm thinking the printer is behaving like the origin(0,0) is on the right front, for X at least and it has nothing to do with the slicer.

It's about centering the prints, but it doesn't print on the bed mostly.



Start G-code:

; Ender 3 Custom Start G-code G92 E0 
; Reset Extruder G28 
; Home all axes G1 Z2.0 F3000 
; Move Z Axis up little to prevent scratching of Heat Bed 
G1 X0.1 Y20 Z0.3 F5000.0 ; Move to start position 
G1 X0.1 Y200.0 Z0.3 F1500.0 E15 ; Draw the first line 
G1 X0.4 Y200.0 Z0.3 F5000.0 ; Move to side a little 
G1 X0.4 Y20 Z0.3 F1500.0 E30 ; Draw the second line 
G92 E0 ; Reset Extruder 
G1 Z2.0 F3000 ; Move Z Axis up little to prevent scratching of Heat Bed 
G1 X5 Y20 Z0.3 F5000.0 ; Move over to prevent blob squish


End G-code:

G91 ;Relative positioning 
G1 E-2 F2700 ;Retract a bit 
G1 E-2 Z0.2 F2400 ;Retract and raise Z 
G1 X5 Y5 F3000 ;Wipe out 
G1 Z10 ;Raise Z more 
G90 ;Absolute positionning 
G1 X0 Y{machine_depth} ;Present print 
M106 S0 ;Turn-off fan 
M104 S0 ;Turn-off hotend 
M140 S0 ;Turn-off bed 
M84 X Y E ;Disable all steppers but Z
The issues you are facing can be caused typically by a defective X-axis endstop, an inverted logic of the X-axis endstop or a defective printer controller board. 

When the X-axis endstop is reporting being triggered, it will not move. After "homing" it will only go to the right of the "home position".

There a couple of things to troubleshoot the X-axis endstop working:


Command an M119 command over a printer console or connect your printer over USB to a printer software application like PronterFace, OctoPrint, Repetier-Host, etc. and look at the reported endstop triggers; these should be triggered when the endstops are pressed. Issue the M119 when you press the X endstop manually, if it reports "open" for X you need to invert the logic. If still triggered, the endstop is broken.
Swap the X-endstop for a any other endstop (Y or Z); then you can also check if the printer board is broken!




If it is the case to invert the polarity of the endstop, in the Marlin firmware Configuration.h, look up:

// Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup).
#define X_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.


Change the boolean value of the endstop you'd like to invert.