Welcome! Log In Create A New Profile

Advanced

z axis homing in the wrong direction

Posted by myfacelackseyes 
z axis homing in the wrong direction
July 13, 2013 06:23PM
I'm having trouble with a quirk in my firmware where the Z axis when told to home to a min endstop, homes in the + direction. When I print, it homes to the zero position and then steps down into the bed for each new layer.
I tried setting the axis up to home to a max position but this produced the same issue- the only way I could get the axis to home towards the min was by inverting it's direction in the firmware so that it was homing in the - direction to meet a maximum point- when told to print this produced the same problem, the machine would home and then continue to move upwards into the endstop, thinking it was moving down towards the print bed. The problem seems to be that I need to invert the home direction without inverting the axis itself.
Re: z axis homing in the wrong direction
July 14, 2013 06:06AM
You probably set
#define Z_HOME_DIR 1

Wrong. 1 means home to max, -1 to min position.


Repetier-Software - the home of Repetier-Host (Windows, Linux and Mac OS X) and Repetier-Firmware.
Repetier-Server - the solution to control your printer from everywhere.
Visit us on Facebook and Twitter!
Re: z axis homing in the wrong direction
July 14, 2013 02:36PM
I've had it set up with a min endstop and a max endstop with similar issues, when I send M119 in the host it reports a z_min endstop with the current setup.

configuration.h

*/
#define ENDSTOP_PULLUP_X_MIN false
#define ENDSTOP_PULLUP_Y_MIN false
#define ENDSTOP_PULLUP_Z_MIN false
#define ENDSTOP_PULLUP_X_MAX true
#define ENDSTOP_PULLUP_Y_MAX true
#define ENDSTOP_PULLUP_Z_MAX false

//set to true to invert the logic of the endstops
#define ENDSTOP_X_MIN_INVERTING true
#define ENDSTOP_Y_MIN_INVERTING true
#define ENDSTOP_Z_MIN_INVERTING true
#define ENDSTOP_X_MAX_INVERTING false
#define ENDSTOP_Y_MAX_INVERTING false
#define ENDSTOP_Z_MAX_INVERTING true

// Set the values true where you have a hardware endstop. The Pin numbe ris taken from pins.h.

#define MIN_HARDWARE_ENDSTOP_X true
#define MIN_HARDWARE_ENDSTOP_Y false
#define MIN_HARDWARE_ENDSTOP_Z true
#define MAX_HARDWARE_ENDSTOP_X false
#define MAX_HARDWARE_ENDSTOP_Y true
#define MAX_HARDWARE_ENDSTOP_Z false

//If your axes are only moving in one direction, make sure the endstops are connected properly.
//If your axes move in one direction ONLY when the endstops are triggered, set ENDSTOPS_INVERTING to true here



//// ADVANCED SETTINGS - to tweak parameters

// For Inverting Stepper Enable Pins (Active Low) use 0, Non Inverting (Active High) use 1
#define X_ENABLE_ON 0
#define Y_ENABLE_ON 0
#define Z_ENABLE_ON 0

// Disables axis when it's not being used.
#define DISABLE_X false
#define DISABLE_Y false
#define DISABLE_Z false
#define DISABLE_E false

// Inverting axis direction
#define INVERT_X_DIR true
#define INVERT_Y_DIR false
#define INVERT_Z_DIR true

//// ENDSTOP SETTINGS:
// Sets direction of endstops when homing; 1=MAX, -1=MIN
#define X_HOME_DIR -1
#define Y_HOME_DIR 1
#define Z_HOME_DIR -1

// Delta robot radius endstop
#define max_software_endstop_r true

//If true, axis won't move to coordinates less than zero.
#define min_software_endstop_x false
#define min_software_endstop_y false
#define min_software_endstop_z false

//If true, axis won't move to coordinates greater than the defined lengths below.
#define max_software_endstop_x true
#define max_software_endstop_y true
#define max_software_endstop_z true

pins.h

#define X_STEP_PIN 28
#define X_DIR_PIN 29
#define X_ENABLE_PIN 19
#define X_MIN_PIN 47
#define X_MAX_PIN -1

#define Y_STEP_PIN 30
#define Y_DIR_PIN 31
#define Y_ENABLE_PIN 18
#define Y_MIN_PIN -1 // Don't use this if you want to use SD card. Use 37 and put the endstop in the e-stop slot!!!
#define Y_MAX_PIN 20

#define Z_STEP_PIN 32
#define Z_DIR_PIN 33
#define Z_ENABLE_PIN 17
#define Z_MIN_PIN 36
#define Z_MAX_PIN -1

The other axes currently appear to be working. in the host when homed to the min Z endstop it reports the Z position as 0 and will not allow the axes to descend further: does not respond to 'down' commands. It moves 'up', but as I explained this actually moves the extruder nozzle towards the bed.
Re: z axis homing in the wrong direction
July 14, 2013 03:10PM
It sound now more like you should toggle invert z. You are confusing host visualization/fata and what the firmware does.

If the host has set home z to min it assumes z coordinate zero after sendung the command. This must not be the same the firmware thinks. And as you say up goes down, so inver z direction should help. That will ofcourse also change homing direction. Thats what i do not understand. Why does homing to min work if direction is set wrong.

Use M114 to ask firmware where your printer is.


Repetier-Software - the home of Repetier-Host (Windows, Linux and Mac OS X) and Repetier-Firmware.
Repetier-Server - the solution to control your printer from everywhere.
Visit us on Facebook and Twitter!
Re: z axis homing in the wrong direction
July 14, 2013 03:17PM
I didn't analyze your Configuration.h in deep but I've noticed the settings for "ENDSTOP_PULLUP ...". I use mechanical endstops and I set them all to true.
And ..INVERTING to false.
/* By default all endstops are pulled up to high. You need a pullup if you
use a mechanical endstop connected with gnd. Set value to false for no pullup
on this endstop.
*/
#define ENDSTOP_PULLUP_X_MIN true
#define ENDSTOP_PULLUP_Y_MIN true
#define ENDSTOP_PULLUP_Z_MIN true
#define ENDSTOP_PULLUP_X_MAX true
#define ENDSTOP_PULLUP_Y_MAX true
#define ENDSTOP_PULLUP_Z_MAX true
...
//set to true to invert the logic of the endstops
#define ENDSTOP_X_MIN_INVERTING false
#define ENDSTOP_Y_MIN_INVERTING false
#define ENDSTOP_Z_MIN_INVERTING false
#define ENDSTOP_X_MAX_INVERTING false
#define ENDSTOP_Y_MAX_INVERTING false
#define ENDSTOP_Z_MAX_INVERTING false

Edited 1 time(s). Last edit at 07/14/2013 03:29PM by flurin.
Re: z axis homing in the wrong direction
July 14, 2013 03:44PM
i wasn't talking about andstops. But you can test endstop status with M119.

I meant
#define INVERT_Z_DIR true


Repetier-Software - the home of Repetier-Host (Windows, Linux and Mac OS X) and Repetier-Firmware.
Repetier-Server - the solution to control your printer from everywhere.
Visit us on Facebook and Twitter!
Re: z axis homing in the wrong direction
July 14, 2013 03:46PM
m114 reports that Z is at 250 after homing, this is weird because I have told the firmware the printer is only 150mm tall!
I'm using optical endstops and they seem to work fine on the other axes with the current setup
Re: z axis homing in the wrong direction
July 14, 2013 03:48PM
changing invert_z_dir just makes the axis home in the wrong direction, down is still up up is still down and the axis homes up to minimum
Re: z axis homing in the wrong direction
July 14, 2013 03:58PM
... a note about testing endstops with M119.

You have to set .._BACK_ON_HOME to 0 otherwise you get wrong results.

// When you have several endstops in one circuit you need to disable it after homing by moving a
// small amount back. This is also the case with H-belt systems.
#define ENDSTOP_X_BACK_ON_HOME 0 //DT_PERFORMANCE
#define ENDSTOP_Y_BACK_ON_HOME 0 //DT_PERFORMANCE
#define ENDSTOP_Z_BACK_ON_HOME 0 //DT_PERFORMANCE
Re: z axis homing in the wrong direction
July 14, 2013 04:27PM
it doesn't seem to be a problem with the endstops, when triggered all endstops perform correctly, stepping the axis back and then forward again slowly, the problem is the Z axis homes in the opposite direction it should. I've just downloaded a fresh copy of the firmware but it is displaying the same issues, if it helps at all I'm using a printrboard rev E
Re: z axis homing in the wrong direction
July 14, 2013 04:42PM
removed

Edited 3 time(s). Last edit at 07/14/2013 10:53PM by flurin.
Re: z axis homing in the wrong direction
July 14, 2013 05:13PM
This guy had a similar issue:
I've finished my Hadron build, except for one little problem

He solved it replacing the motherboard (Arduino).

Edited 2 time(s). Last edit at 07/15/2013 12:05PM by flurin.
Re: z axis homing in the wrong direction
November 01, 2018 03:13AM
Hello Guys!

I have the same problem like the others, I have set up my printer, Z direction (if I move it manually) it OK when I increase the Z numbers it goes up, when I decrease the Z height number lowers.
The problem is when I try to home Z axis, my printer Z ax is going towards Z_Max direction.

An important thing to mention, my Z end stop is an inductive sensor, and I have enabled

Here are some of my settings:

------------------------------------------------------------ Z endstop settings -----------------------------------------------------------------

// Direction of endstops when homing; 1=MAX, -1=MIN
// :[-1,1]
#define X_HOME_DIR -1
#define Y_HOME_DIR -1
#define Z_HOME_DIR -1 // i think it ok it is like X,Y axis and works fine


// 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


// @section homing

// Specify here all the endstop connectors that are connected to any endstop or probe.
// Almost all printers will be using one per axis. Probes will use one or more of the
// extra connectors. Leave undefined any used for non-endstop and non-probe purposes.
#define USE_XMIN_PLUG
#define USE_YMIN_PLUG
#define USE_ZMIN_PLUG
//#define USE_XMAX_PLUG
//#define USE_YMAX_PLUG
//#define USE_ZMAX_PLUG

// Enable pullup for all endstops to prevent a floating state
#define ENDSTOPPULLUPS
#if DISABLED(ENDSTOPPULLUPS)
// Disable ENDSTOPPULLUPS to set pullups individually
//#define ENDSTOPPULLUP_XMAX
//#define ENDSTOPPULLUP_YMAX
//#define ENDSTOPPULLUP_ZMAX
//#define ENDSTOPPULLUP_XMIN
//#define ENDSTOPPULLUP_YMIN
//#define ENDSTOPPULLUP_ZMIN
//#define ENDSTOPPULLUP_ZMIN_PROBE
#endif


/// I have doubled some of the lines becouse I wanted to se the earlier settings, to see
what happend diffrently

// 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.

#define Y_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.

//#define Z_MIN_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Z_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.

#define X_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.

#define Y_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.

//#define Z_MAX_ENDSTOP_INVERTING false // set to true to invert the logic of the endstop.
#define Z_MAX_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.


//#define Z_MIN_PROBE_ENDSTOP_INVERTING false // set to true to invert the logic of the probe.
#define Z_MIN_PROBE_ENDSTOP_INVERTING true // set to true to invert the logic of the probe.
------------------------------------------------------- Auto bed lvling------------------

//#define AUTO_BED_LEVELING_3POINT
//#define AUTO_BED_LEVELING_LINEAR
#define AUTO_BED_LEVELING_BILINEAR
//#define AUTO_BED_LEVELING_UBL
//#define MESH_BED_LEVELING

/**
* Normally G28 leaves leveling disabled on completion. Enable
* this option to have G28 restore the prior leveling state.
*/
//#define RESTORE_LEVELING_AFTER_G28

/**
* Enable detailed logging of G28, G29, M48, etc.
* Turn on with the command 'M111 S32'.
* NOTE: Requires a lot of PROGMEM!
*/
//#define DEBUG_LEVELING_FEATURE

#if ENABLED(MESH_BED_LEVELING) || ENABLED(AUTO_BED_LEVELING_BILINEAR) || ENABLED(AUTO_BED_LEVELING_UBL)
// Gradually reduce leveling correction until a set height is reached,
// at which point movement will be level to the machine's XY plane.
// The height can be set with M420 Z
#define ENABLE_LEVELING_FADE_HEIGHT

// For Cartesian machines, instead of dividing moves on mesh boundaries,
// split up moves into short segments like a Delta. This follows the
// contours of the bed more closely than edge-to-edge straight moves.
#define SEGMENT_LEVELED_MOVES
#define LEVELED_SEGMENT_LENGTH 5.0 // (mm) Length of all segments (except the last one)

/**
* Enable the G26 Mesh Validation Pattern tool.
*/
//#define G26_MESH_VALIDATION
#if ENABLED(G26_MESH_VALIDATION)
#define MESH_TEST_NOZZLE_SIZE 0.4 // (mm) Diameter of primary nozzle.
#define MESH_TEST_LAYER_HEIGHT 0.2 // (mm) Default layer height for the G26 Mesh Validation Tool.
#define MESH_TEST_HOTEND_TEMP 205.0 // (°C) Default nozzle temperature for the G26 Mesh Validation Tool.
#define MESH_TEST_BED_TEMP 60.0 // (°C) Default bed temperature for the G26 Mesh Validation Tool.
#endif

#endif

#if ENABLED(AUTO_BED_LEVELING_LINEAR) || ENABLED(AUTO_BED_LEVELING_BILINEAR)

// Set the number of grid points per dimension.
#define GRID_MAX_POINTS_X 3
#define GRID_MAX_POINTS_Y GRID_MAX_POINTS_X

// Set the boundaries for probing (where the probe can reach).
#define LEFT_PROBE_BED_POSITION MIN_PROBE_EDGE
#define RIGHT_PROBE_BED_POSITION (X_BED_SIZE - MIN_PROBE_EDGE)
#define FRONT_PROBE_BED_POSITION MIN_PROBE_EDGE
#define BACK_PROBE_BED_POSITION (Y_BED_SIZE - MIN_PROBE_EDGE)

// Probe along the Y axis, advancing X after each column
//#define PROBE_Y_FIRST

#if ENABLED(AUTO_BED_LEVELING_BILINEAR)

// Beyond the probed grid, continue the implied tilt?
// Default is to maintain the height of the nearest edge.
//#define EXTRAPOLATE_BEYOND_GRID

//
// Experimental Subdivision of the grid by Catmull-Rom method.
// Synthesizes intermediate points to produce a more detailed mesh.
//
//#define ABL_BILINEAR_SUBDIVISION
#if ENABLED(ABL_BILINEAR_SUBDIVISION)
// Number of subdivisions between probe points
#define BILINEAR_SUBDIVISIONS 3
#endif

#endif

#elif ENABLED(AUTO_BED_LEVELING_UBL)




THANK YOU !!
Re: z axis homing in the wrong direction
November 01, 2018 05:23AM
If Z endstop is already triggered It will seem to move in the wrong direction.

Homeing consists of two stages
1) move towards endstop until endstop is triggered
2) back up and home again more slowly for more accuracy

If endstop is already triggered step 1 does nothing, and step 2 only does the back up part, so homing looks to be backwards

Edited 1 time(s). Last edit at 11/01/2018 05:24AM by Dust.
Re: z axis homing in the wrong direction
November 05, 2018 02:42AM
Thanks.


I have found the problem! My axis and all my settings was mirrored. After changing does settings works fine.
Now i have problem whith offsets and automatic bed leveling.

I just fun building a printer.



Thanks for the response.


Happy Printing smiling smiley
Re: z axis homing in the wrong direction
November 05, 2018 02:44AM
I have found the problem! My axis and all my settings was mirrored. After changing does settings works fine.
Now i have problem whith offsets and automatic bed leveling.

I just fun building a printer.
Thanks for the response.


Happy Printing
Re: z axis homing in the wrong direction
January 02, 2019 07:16AM
Quote
Tornado99
I have found the problem! My axis and all my settings was mirrored. After changing does settings works fine.
Now i have problem whith offsets and automatic bed leveling.

I just fun building a printer.
Thanks for the response.


Happy Printing

Are you able to post your configuration?

I'm having exactly the same problem.
Sorry, only registered users may post in this forum.

Click here to login