How to move beyond the end stop, without disabling boundaries?

I have made a printer:
* core-XY 
* requires the X-homing to be done after Y-homing
* end stops on X-min (left) and Y-max (rear)
* requires the Y to move 10mm beyond the Y-homing sensor

I have managed to configure the printer to work, by setting "max_software_endstop_y false". This poses the risk of the user going beyond normal printing boundaries with the controller, or some externally connected software.

Do I overlook a configuration possibility with the standard configuration.h?

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

/* By default all endstops are pulled up to HIGH. You need a pull-up if you
use a mechanical endstop connected with GND. Set value to false for no pull-up
on this endstop.
*/
#define ENDSTOP_PULLUP false // ?????
#define ENDSTOP_INVERTING false

#define ENDSTOP_PULLUP_X_MIN ENDSTOP_PULLUP
#define ENDSTOP_PULLUP_Y_MIN ENDSTOP_PULLUP
#define ENDSTOP_PULLUP_Z_MIN ENDSTOP_PULLUP
#define ENDSTOP_PULLUP_X_MAX ENDSTOP_PULLUP
#define ENDSTOP_PULLUP_Y_MAX ENDSTOP_PULLUP
#define ENDSTOP_PULLUP_Z_MAX ENDSTOP_PULLUP

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

// Set the values true where you have a hardware endstop. The Pin number is 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 1
#define Y_ENABLE_ON 1
#define Z_ENABLE_ON 1

// Disables axis when it's not being used.
#define DISABLE_X false
#define DISABLE_Y false
#define DISABLE_Z false
#define DISABLE_E false
/* If you want to keep z motor running on stepper timeout, remove comments below.
  This may be useful if your z bed moves when motors are disabled. Will still
  turn z off when heaters get also disabled.
*/
//#define PREVENT_Z_DISABLE_ON_STEPPER_TIMEOUT

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

//// 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 true
#define min_software_endstop_y true
#define min_software_endstop_z true

//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 false
#define max_software_endstop_z true

// If during homing the endstop is reached, how many mm should the printer move back for the second try
#define ENDSTOP_X_BACK_MOVE 5
#define ENDSTOP_Y_BACK_MOVE 5
#define ENDSTOP_Z_BACK_MOVE 3

// For higher precision you can reduce the speed for the second test on the endstop
// during homing operation. The homing speed is divided by the value. 1 = same speed, 2 = half speed
#define ENDSTOP_X_RETEST_REDUCTION_FACTOR 4
#define ENDSTOP_Y_RETEST_REDUCTION_FACTOR 4
#define ENDSTOP_Z_RETEST_REDUCTION_FACTOR 4

// 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.
// doesn't work with negative values
#define ENDSTOP_X_BACK_ON_HOME 0.0
#define ENDSTOP_Y_BACK_ON_HOME 0.0
#define ENDSTOP_Z_BACK_ON_HOME 0.0

// You can disable endstop checking for print moves. This is needed, if you get sometimes
// false signals from your endstops. If your endstops don't give false signals, you
// can set it on for safety.
#define ALWAYS_CHECK_ENDSTOPS false

// maximum positions in mm - only fixed numbers!
// For delta robot Z_MAX_LENGTH is the maximum travel of the towers and should be set to the distance between the hotend
// and the platform when the printer is at its home position.
// If EEPROM is enabled these values will be overridden with the values in the EEPROM
#define X_MAX_LENGTH 574
#define Y_MAX_LENGTH 496
#define Z_MAX_LENGTH 500

// Coordinates for the minimum axis. Can also be negative if you want to have the bed start at 0 and the printer can go to the left side
// of the bed. Maximum coordinate is given by adding the above X_MAX_LENGTH values.
#define X_MIN_POS 0
#define Y_MIN_POS 0
#define Z_MIN_POS 0
"

Comments

  • " requires the Y to move 10mm beyond the Y-homing sensor"

    so you want to trigger y max and then move another 10mm in max direction? No homing will not do that resp. endstop check will make problems. Eventually you might get away with a negative move after homing if endstop check is disabled for that move, but in normal moves that might cause problems Sounds somewhat wrong to do this so not sure I understood it correctly.
  • Let me try to be more precise. During normal printing there's no need to go beyond Y-max. But for an extruder change, the position must be 10mm beyond Y-max, to park one of the extruders.

    I cannot change the Y homing position, otherwise there is mechanical interference risk. And X homing can only be done at Y-max (to be clear: Y-max = Y-home).

    I'm sure there is a solution, but I'm not confident enough to re-program the printer.ccp code.

  • Normally I would say disable endstop check with ALWAYS_CHECK_ENDSTOPS 0, but in newer firmware we have also improved boundary checks so it would not move just because target is outside boundaries.

    But since a y max homing is first and you can not home x first, that is a problem you can only solve by editing firmware, which is no problem since it is open source. Or you switch to y min homing instead, so you move to high y values for switching.

    Anyhow if using software solution, disable endstop as described and modify the check target coordinates check to allow y max + 10 as limit. The function responsible for this should be in printer.cpp
    bool Printer::isPositionAllowed(float x,float y,float z)

    Alternatively add a new M code using our custom even system and set 
        static INLINE uint8_t isNoDestinationCheck()
        {
            return flag1 & PRINTER_FLAG1_NO_DESTINATION_CHECK;
        }

        static INLINE void setNoDestinationCheck(uint8_t b)
        {
            flag1 = (b ? flag1 | PRINTER_FLAG1_NO_DESTINATION_CHECK : flag1 & ~PRINTER_FLAG1_NO_DESTINATION_CHECK);
        }

    if that flag is enabled, no destination check occurs. So you could use the new M command to disable the safety check and switch extruder. A good place are the extruder select commands.

    Also make sure y endstop triggers at Y max +10 and goes back more then 10mm for retesting so you cover the case enabling printer at y max + 10.
  • Ai ai, difficult communication.

    1. Y-homing at min is mechanically impossible.

    2. It is impossible to home Y at +10mm, as of the potential collision.

    3. The Y-probe is setup to trigger 11mm before collision. And it stays high in this area. Works fine.

    I will look into the software solution, but I cannot understand at this moment how the boundaries would be set correctly this way.
     
  • As said I would prefer disabling boundary check for extruder switch and then enable it again. That should allow you to move past endstop if endstop test is disabled.
  • It turns out to be possible with standard Repetier G-codes: The S1 option for the G0/G1 command disables the boundary check.

    Problem solved.
  • One detail is left to be answered. The S1 option of the G0/G1 command disables the boundary check, that is clear. But is this a toggle, or only valid for one command line?
    And if it is a toggle, how to enable the boundary check again?
  • G1 S0
    enables the boundary check. It is valid until changed.
Sign In or Register to comment.