Zmax move back after homing not working.

I seem to have things figured out to a degree. Except I can't seem to get the ZMAX endstop to move back 10 units (mm) after it homes. It just stays there and I have to move it manually. I guess it's not really a problem, but I would like to get it working. I have it setup on the X & Y and it works fine.

At first I ad a mechanical endstop and thought it may be caused by bounce to a switch to a optical. Much cleaner setup, so it will stay that way.

Anyway, below is the code. If anything jumps out...let me know. Hopefully I can get it fixed?


// ################ Endstop configuration #####################

#define ENDSTOP_PULLUP_X_MIN true
#define ENDSTOP_X_MIN_INVERTING true
#define MIN_HARDWARE_ENDSTOP_X true
#define ENDSTOP_PULLUP_Y_MIN true
#define ENDSTOP_Y_MIN_INVERTING false
#define MIN_HARDWARE_ENDSTOP_Y true

#define ENDSTOP_PULLUP_Z_MIN true
#define ENDSTOP_Z_MIN_INVERTING true
#define MIN_HARDWARE_ENDSTOP_Z false ///true


#define ENDSTOP_PULLUP_X_MAX true
#define ENDSTOP_X_MAX_INVERTING true
#define MAX_HARDWARE_ENDSTOP_X true
#define ENDSTOP_PULLUP_Y_MAX true
#define ENDSTOP_Y_MAX_INVERTING false
#define MAX_HARDWARE_ENDSTOP_Y true

#define ENDSTOP_PULLUP_Z_MAX true
#define ENDSTOP_Z_MAX_INVERTING false //true
#define MAX_HARDWARE_ENDSTOP_Z true


#define max_software_endstop_r true

#define min_software_endstop_x false
#define min_software_endstop_y false
#define min_software_endstop_z false
#define max_software_endstop_x false
#define max_software_endstop_y false
#define max_software_endstop_z false
#define ENDSTOP_X_BACK_MOVE 5
#define ENDSTOP_Y_BACK_MOVE 5
#define ENDSTOP_Z_BACK_MOVE 10 //2
#define ENDSTOP_X_RETEST_REDUCTION_FACTOR 3
#define ENDSTOP_Y_RETEST_REDUCTION_FACTOR 3
#define ENDSTOP_Z_RETEST_REDUCTION_FACTOR 3
#define ENDSTOP_X_BACK_ON_HOME 1
#define ENDSTOP_Y_BACK_ON_HOME 1
#define ENDSTOP_Z_BACK_ON_HOME 1 //0
#define ALWAYS_CHECK_ENDSTOPS 1

// ################# XYZ movements ###################

Comments

  • Except you did set it to 1 I see no error. Here the code segment adding this move for cartesian printer (it is cartesian, right?).








    #if defined(ENDSTOP_Z_BACK_ON_HOME)

    // If we want to go up a bit more for some reason

            if(ENDSTOP_Z_BACK_ON_HOME > 0)

    zCorrection -= axisStepsPerMM[Z_AXIS] * ENDSTOP_Z_BACK_ON_HOME * Z_HOME_DIR;

    #endif

    #if Z_HOME_DIR < 0

    // Fix bed coating

    zCorrection += axisStepsPerMM[Z_AXIS] * Printer::zBedOffset;

    #endif

            PrintLine::moveRelativeDistanceInSteps(0,0,zCorrection,0,homingFeedrate[Z_AXIS],true,false);


    Cou could add

    Com::printFLN(PSTR("extrZSteps:"),zCorrection);

    after the PrintLine::move.. to see how many steps it goes back. 

Sign In or Register to comment.