MarlinFirmware / Marlin

Marlin is an optimized firmware for RepRap 3D printers based on the Arduino platform. Many commercial 3D printers come with Marlin installed. Check with your vendor if you need source code for your specific machine.
https://marlinfw.org
GNU General Public License v3.0
16.17k stars 19.21k forks source link

Dual-Z-Axis Homing: Only perfect if hitting Z2_MIN_ENDSTOP first #12020

Closed MarphXL closed 5 years ago

MarphXL commented 5 years ago

I Have MKS Gen V1.4 with TMC2208 on all stepper. I Use Z-Dual-Axis with two Endstops (Z-MIN and Z2-Min). If I do a Z-homing both Z-axis going down. If it hits the Z2_MIN_ENDSTOP first, the Z2-AXIS stops and the Z-AXIS going down till it hits the Z_MIN_ENDSTOP. Perfect! Both sides are leveled.

But if the Printer hits the Z-Min-Endstop first than he stops homing. The Z2-Min-Endstop wasn't hit.

It's reproducable. Everytime! (config-files in Marlin.zip at end of this text)

Could you help and give me a tip what I have misconfigured or missunderstanded?

configuration_adv.h

#define Z_DUAL_STEPPER_DRIVERS
#if ENABLED(Z_DUAL_STEPPER_DRIVERS)
  #define Z_DUAL_ENDSTOPS
  #if ENABLED(Z_DUAL_ENDSTOPS)
    #define Z2_USE_ENDSTOP _YMAX_
    #define Z_DUAL_ENDSTOPS_ADJUSTMENT  0
  #endif
#endif

configuration.h

// @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_Z2MIN_PLUG // 20181006
//#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

// Mechanical endstop with COM to ground and NC to Signal uses "false" here (most common setup).
#define X_MIN_ENDSTOP_INVERTING true // set to true to invert the logic of the endstop.
#define Y_MIN_ENDSTOP_INVERTING true // 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 true // set to true to invert the logic of the endstop.
#define Y_MAX_ENDSTOP_INVERTING true // 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.

pins_RAMPS.h

//
// Limit Switches
//
#define X_MIN_PIN           3
#ifndef X_MAX_PIN
  #define X_MAX_PIN         -1   // D2 ist für serial /USB-Serial
#endif
#define Y_MIN_PIN          14
#define Y_MAX_PIN          15
//#define Z2_MIN_PIN         15   // wird in configuration_adv.h mit Y_Max definiert
#define Z_MIN_PIN          18
#define Z_MAX_PIN          19

Marlin.zip

thinkyhead commented 5 years ago

define USE_Z2MIN_PLUG // 20181006

There is no such thing.

We'll look at the dual-Z-endstop homing and see if there's anything obvious going on.

Have you tried bugfix-2.0.x to see if it exhibits the same issue?

thinkyhead commented 5 years ago

Try this branch and see if it works any better for you: https://github.com/thinkyhead/Marlin/archive/bf1_old_dual_homing.zip

MarphXL commented 5 years ago

Thanks but the bf1_old_dual_homing.zip doesn't help. I try the bugfix 2.0 in an hour.

Here are my pins from M43, if this helps:

Log Output ``` Recv: PIN: 0 Port: E0 RXD protected Recv: PIN: 1 Port: E1 TXD protected Recv: PIN: 2 Port: E4 Input = 1 TIMER3B PWM: 0 WGM: 1 COM3B: 0 CS: 3 TCCR3A: 1 TCCR3B: 3 TIMSK3: 0 Recv: PIN: 3 Port: E5 X_MIN_PIN protected Recv: PIN: 4 Port: G5 Y_SERIAL_RX_PIN Input = 1 TIMER0B PWM: 128 WGM: 3 COM0B: 0 CS: 3 TCCR0A: 3 TCCR0B: 3 TIMSK0: 5 compare interrupt enabled overflow interrupt enabled Recv: PIN: 5 Port: E3 Y_SERIAL_TX_PIN Output = 1 TIMER3A PWM: 0 WGM: 1 COM3A: 0 CS: 3 TCCR3A: 1 TCCR3B: 3 TIMSK3: 0 Recv: PIN: 6 Port: H3 X_SERIAL_RX_PIN Input = 1 TIMER4A PWM: 0 WGM: 1 COM4A: 0 CS: 3 TCCR4A: 1 TCCR4B: 3 TIMSK4: 0 Recv: PIN: 7 Port: H4 CONTROLLER_FAN_PIN protected Recv: PIN: 8 Port: H5 E0_AUTO_FAN_PIN protected Recv: . RAMPS_D8_PIN protected Recv: PIN: 9 Port: H6 FAN_PIN protected Recv: . RAMPS_D9_PIN protected Recv: PIN: 10 Port: B4 HEATER_0_PIN protected Recv: . RAMPS_D10_PIN protected Recv: PIN: 11 Port: B5 X_SERIAL_TX_PIN Output = 1 TIMER1A PWM: 2000 WGM: 4 COM1A: 0 CS: 2 TCCR1A: 0 TCCR1B: 10 TIMSK1: 2 non-standard PWM mode compare interrupt enabled Recv: PIN: 12 Port: B6 Input = 0 TIMER1B PWM: 0 WGM: 4 COM1B: 0 CS: 2 TCCR1A: 0 TCCR1B: 10 TIMSK1: 2 non-standard PWM mode Recv: PIN: 13 Port: B7 LED_PIN Input = 0 TIMER0A PWM: 0 WGM: 3 COM0A: 0 CS: 3 TCCR0A: 3 TCCR0B: 3 TIMSK0: 5 overflow interrupt enabled Recv: . TIMER1C is also tied to this pin TIMER1C PWM: 0 WGM: 4 COM1C: 0 CS: 2 TCCR1A: 0 TCCR1B: 10 TIMSK1: 2 non-standard PWM mode Recv: PIN: 14 Port: J1 Y_MIN_PIN protected Recv: PIN: 15 Port: J0 Y_MAX_PIN protected Recv: PIN: 16 Port: H1 LCD_PINS_RS Output = 0 Recv: PIN: 17 Port: H0 LCD_PINS_ENABLE Output = 0 Recv: PIN: 18 Port: D3 Z_MIN_PIN protected Recv: PIN: 19 Port: D2 Input = 1 Recv: PIN: 20 Port: D1 Input = 1 Recv: PIN: 21 Port: D0 Input = 1 Recv: PIN: 22 Port: A0 Input = 0 Recv: PIN: 23 Port: A1 LCD_PINS_D4 Output = 1 Recv: PIN: 24 Port: A2 E0_ENABLE_PIN protected Recv: PIN: 25 Port: A3 LCD_PINS_D5 Input = 1 Recv: PIN: 26 Port: A4 E0_STEP_PIN protected Recv: PIN: 27 Port: A5 LCD_PINS_D6 Input = 1 Recv: PIN: 28 Port: A6 E0_DIR_PIN protected Recv: PIN: 29 Port: A7 LCD_PINS_D7 Input = 0 Recv: PIN: 30 Port: C7 Z2_ENABLE_PIN protected Recv: PIN: 31 Port: C6 BTN_EN1 Input = 1 Recv: PIN: 32 Port: C5 Input = 0 Recv: PIN: 33 Port: C4 BTN_EN2 Input = 1 Recv: PIN: 34 Port: C3 Z2_DIR_PIN protected Recv: PIN: 35 Port: C2 BTN_ENC Input = 1 Recv: PIN: 36 Port: C1 Z2_STEP_PIN protected Recv: PIN: 37 Port: C0 BEEPER_PIN Output = 0 Recv: PIN: 38 Port: D7 X_ENABLE_PIN protected Recv: PIN: 39 Port: G2 Input = 0 Recv: PIN: 40 Port: G1 E0_SERIAL_TX_PIN Output = 1 Recv: PIN: 41 Port: G0 KILL_PIN Input = 1 Recv: PIN: 42 Port: L7 SD_DETECT_PIN Input = 1 Recv: . Z2_SERIAL_RX_PIN Input = 1 Recv: PIN: 43 Port: L6 Input = 0 Recv: PIN: 44 Port: L5 HEATER_BED_PIN protected Recv: PIN: 45 Port: L4 Input = 0 TIMER5B PWM: 0 WGM: 1 COM5B: 0 CS: 3 TCCR5A: 1 TCCR5B: 3 TIMSK5: 0 Recv: PIN: 46 Port: L3 Z_STEP_PIN protected Recv: PIN: 47 Port: L2 Input = 0 Recv: PIN: 48 Port: L1 Z_DIR_PIN protected Recv: PIN: 49 Port: L0 Input = 1 Recv: PIN: 50 Port: B3 AVR_MISO_PIN Input = 1 Recv: . MISO_PIN Input = 1 Recv: PIN: 51 Port: B2 AVR_MOSI_PIN Input = 0 Recv: . MOSI_PIN Input = 0 Recv: PIN: 52 Port: B1 AVR_SCK_PIN Input = 1 Recv: . SCK_PIN Input = 1 Recv: PIN: 53 Port: B0 AVR_SS_PIN Input = 1 Recv: . SDSS Input = 1 Recv: . SS_PIN Input = 1 Recv: PIN: 54 Port: F0 (A 0) X_STEP_PIN protected Recv: PIN: 55 Port: F1 (A 1) X_DIR_PIN protected Recv: PIN: 56 Port: F2 (A 2) Y_ENABLE_PIN protected Recv: PIN: 57 Port: F3 (A 3) FIL_RUNOUT_PIN Input = 0 Recv: PIN: 58 Port: F4 (A 4) Analog in = 99 Input = 0 Recv: PIN: 59 Port: F5 (A 5) Z_SERIAL_TX_PIN Output = 1 Recv: PIN: 60 Port: F6 (A 6) Y_STEP_PIN protected Recv: PIN: 61 Port: F7 (A 7) Y_DIR_PIN protected Recv: PIN: 62 Port: K0 (A 8) Z_ENABLE_PIN protected Recv: PIN: 63 Port: K1 (A 9) E0_SERIAL_RX_PIN Input = 1 Recv: PIN: 64 Port: K2 (A10) Z_SERIAL_RX_PIN Input = 1 Recv: PIN: 65 Port: K3 (A11) Z2_SERIAL_TX_PIN Output = 1 Recv: PIN: 66 Port: K4 (A12) Output = 0 Recv: PIN: 67 Port: K5 (A13) TEMP_0_PIN protected Recv: PIN: 68 Port: K6 (A14) TEMP_BED_PIN protected Recv: PIN: 69 Port: K7 (A15) TEMP_1_PIN Analog in = 1023 ```
MarphXL commented 5 years ago

Waaaah... Same problem with bugfix 2.0. First I have had the problem with missing TMCStepper.h but I found the solution at Issue #11992. Could it be the stepper-library that makes this problem?

MarphXL commented 5 years ago

My last try was deleting alle stepper-libraries from arduino. Install latest tmcstepper-lib and compile again but it doesn't change the problem. Did you have another tip?

MarphXL commented 5 years ago

Nobody could help?

thinkyhead commented 5 years ago

Patience. The volunteers who occasionally scan these issues have busy lives and sometimes even sleep.

thinkyhead commented 5 years ago

See if enabling ENDSTOP_NOISE_FILTER makes any difference.

MarphXL commented 5 years ago

patience. yes, sorry about that. I have tested endstop noise filter but it change nothing. all my endstops are inverted. could this be a problem?

GMagician commented 5 years ago

I'm still using dual Z driver and dual z endstop (but v2.0) and it works with no issues. Have you checked with M119 if endstops work correctly?

MarphXL commented 5 years ago

yes, I tested M119. Did you have inverted endstops?

GMagician commented 5 years ago

Yes, inverted, only difference I use _ZMAX_ instead of _YMAX_ as second input and I have interrupts enabled

thinkyhead commented 5 years ago

Inverted (N-O) switches are more likely to have issues if they get shorted together, whereas N-C switches are caught earlier and are also immune to induction. You can use PINS_DEBUGGING and M43 to check each endstop pin to make sure that when one endstop is triggered, the other one isn’t. (M119 only shows one endstop state per axis, AFAIK.)

MarphXL commented 5 years ago

thanks. could you paste your m43 and m119 so I can compare.

GMagician commented 5 years ago

My M119 with no endstop pressed:

 22:33:44.065 : x_min: open
 22:33:44.065 : y_min: open
 22:33:44.065 : z_min: open
 22:33:44.065 : z2_min: open

My M119 with Z1 endstop pressed:

 22:35:33.769 : x_min: open
 22:35:33.769 : y_min: open
 22:35:33.769 : z_min: TRIGGERED
 22:35:33.769 : z2_min: open

My M119 with Z2 endstop pressed:

 22:36:21.798 : x_min: open
 22:36:21.798 : y_min: open
 22:36:21.798 : z_min: open
 22:36:21.798 : z2_min: TRIGGERED
GMagician commented 5 years ago

@thinkyhead

M119 only shows one endstop state per axis, AFAIK.)

mine report both

@MarphXL sorry but M43 is not enabled in my firmware

thinkyhead commented 5 years ago

mine report both

Oh good. That makes it easier for testing.

MarphXL commented 5 years ago

I checked all twice. My M119 is exact like GMagician. My M43 is above, but the problem is the same. Then I downloaded Marlin 1.1.9 again and make only the minimum changes in Pins and activated dual-Z-Axis. Same problem. I changed the microswitches so i must not invert them: same problem.

If I manually trigger Z-Endstop or Z2-endstop M119 give's correct results.

So I don't know what I can do.

MarphXL commented 5 years ago

I forget: With the new microswitches I make new cables and I make them VERY short. And as I wrote manually trigger-tests with M119 are all correct.

GMagician commented 5 years ago

Don't know if already asked, but are you using bugfix-1.1.x? maybe is better to start with it and not with stable 1.1.9 (bugs have been solved meantime)

MarphXL commented 5 years ago

The first try was the bugfix 1.1.9, then stable 1.1.9. 5 days ago thinkihead said I should try bugfix 2.0 and I tested it with bugfix 2.0. Same problem. So what could it be? the error must be somewhere in my hardware. I can google, and/but nobody else has that mistake. Is there a possibility to debug that dual-z-homing or could I insert some code?

MarphXL commented 5 years ago

Today I tested twice other versions of the tmc2208stepper-Lib (0.21, 0.25). but nothing changes

MarphXL commented 5 years ago

Everything goes OK with Marlin 1.1.7. But 1.1.9 has a bug.

MarphXL commented 5 years ago

I Try it with 1.1.9 with absolutely same configuration.h, configuration_adv.h andpins_RAMPS.h I only must change

#define X_DRIVER_TYPE  TMC2208
#define Y_DRIVER_TYPE  TMC2208
#define Z_DRIVER_TYPE  TMC2208
#define Z2_DRIVER_TYPE TMC2208
#define E0_DRIVER_TYPE TMC2208

Result: with bf1.1.9 it doesnt work, but with 1.1.7 everything is fine and perfect

MarphXL commented 5 years ago

Tried with 1.1.8 and this is also OK. So only Marlin 2.0, Marlin 1.1.9 and Marlin bugfix 1.1.9 has the problem with DUAL-ENDSTOPS.

GMagician commented 5 years ago

may you try to change Z2 input to _ZMAX_ instead of _YMAX_ ?

MarphXL commented 5 years ago

I have tried this last week, but that changes nothing. Did you read that the problem doesn't exist at 1.1.7 and 1.1.8? It is a bug in 1.1.9 AND 2.0

GMagician commented 5 years ago

Did you read that the problem doesn't exist at 1.1.7 and 1.1.8

Yes I read it, in version 1.1.9/2.0.x have been changed a lot of things about endstops logic, but as I told you my printer works correctly then it's not a so visible bug, don't you think so?

GMagician commented 5 years ago

Try to enable PINS_DEBUGGING and post the serial log

MarphXL commented 5 years ago

Hi GMagician, look above the 4th post.

GMagician commented 5 years ago

I didn't mean to see M43 echo, but echo while homing

thinkyhead commented 5 years ago

I've been unable to determine what causes this issue so far. Since endstops underwent an overhaul for 1.1.9, maybe @ejtagle can provide more insight.

ApplePaeppel commented 5 years ago

I have the same problem. Confirmation: works in 1.1.8 but not in 1.1.9

ejtagle commented 5 years ago

set

#define ENDSTOP_NOISE_THRESHOLD 2

And try again...

MarphXL commented 5 years ago

Here're the results with actual 1.1.9bugfix and #define ENDSTOP_NOISE_THRESHOLD 2:

Bug still exists.

First try with right side hits first the endstop:

Log Output ``` Recv: ok [...] Recv: echo:enqueueing "G28 Z" Recv: >>> G28 Recv: Machine Type: Cartesian Recv: Probe: NONE Recv: current_position=(0.00, 0.00, 20.00) : setup_for_endstop_or_probe_move Recv: > endstops.enable(true) Recv: >>> homeaxis(Z) Recv: Home 1 Fast: Recv: >>> do_homing_move(Z, -600.00, [4.00]) Recv: current_position=(0.00, 0.00, 0.00) : sync_plan_position [...] Recv: <<< do_homing_move(Z) Recv: Move Away: Recv: >>> do_homing_move(Z, 2.00, [4.00]) Recv: current_position=(0.00, 0.00, 0.00) : sync_plan_position [...] Recv: <<< do_homing_move(Z) Recv: Home 2 Slow: Recv: >>> do_homing_move(Z, -4.00, 1.00) Recv: current_position=(0.00, 0.00, 0.00) : sync_plan_position [...] Recv: <<< do_homing_move(Z) Recv: >>> set_axis_is_at_home(Z) Recv: For Z axis: Recv: home_offset = 0.00 Recv: position_shift = 0.00 Recv: soft_endstop_min = 0.00 Recv: soft_endstop_max = 400.00 Recv: > home_offset[Z] = 0.00 Recv: current_position=(0.00, 0.00, 0.00) : Recv: <<< set_axis_is_at_home(Z) Recv: current_position=(0.00, 0.00, 0.00) : sync_plan_position Recv: current_position=(0.00, 0.00, 0.00) : > AFTER set_axis_is_at_home Recv: <<< homeaxis(Z) Recv: current_position=(0.00, 0.00, 0.00) : sync_plan_position Recv: current_position=(0.00, 0.00, 0.00) : clean_up_after_endstop_or_probe_move Recv: X:0.00 Y:0.00 Z:0.00 E:0.00 Count X:0 Y:0 Z:0 Recv: <<< G28 [...] ```

Second try with left side hits first the endstop:

Log Output ``` Recv: ok [...] Recv: echo:enqueueing "G28 Z" Recv: >>> G28 Recv: Machine Type: Cartesian Recv: Probe: NONE Recv: current_position=(0.00, 0.00, 20.00) : setup_for_endstop_or_probe_move Recv: > endstops.enable(true) Recv: >>> homeaxis(Z) Recv: Home 1 Fast: Recv: >>> do_homing_move(Z, -600.00, [4.00]) Recv: current_position=(0.00, 0.00, 0.00) : sync_plan_position [...] Recv: <<< do_homing_move(Z) Recv: Move Away: Recv: >>> do_homing_move(Z, 2.00, [4.00]) Recv: current_position=(0.00, 0.00, 0.00) : sync_plan_position Recv: <<< do_homing_move(Z) Recv: Home 2 Slow: Recv: >>> do_homing_move(Z, -4.00, 1.00) Recv: current_position=(0.00, 0.00, 0.00) : sync_plan_position [...] Recv: <<< do_homing_move(Z) Recv: >>> set_axis_is_at_home(Z) Recv: For Z axis: Recv: home_offset = 0.00 Recv: position_shift = 0.00 Recv: soft_endstop_min = 0.00 Recv: soft_endstop_max = 400.00 Recv: > home_offset[Z] = 0.00 Recv: current_position=(0.00, 0.00, 0.00) : Recv: <<< set_axis_is_at_home(Z) Recv: current_position=(0.00, 0.00, 0.00) : sync_plan_position Recv: current_position=(0.00, 0.00, 0.00) : > AFTER set_axis_is_at_home Recv: <<< homeaxis(Z) Recv: current_position=(0.00, 0.00, 0.00) : sync_plan_position Recv: current_position=(0.00, 0.00, 0.00) : clean_up_after_endstop_or_probe_move Recv: X:0.00 Y:0.00 Z:0.00 E:0.00 Count X:0 Y:0 Z:0 Recv: <<< G28 [...] ```
MarphXL commented 5 years ago

I didn't see any difference in the loggings, but I see that the 1st try goes good and leveled correctly, but the 2nd try didn't hit the right endstop at any time

MarphXL commented 5 years ago

Did you read that the problem doesn't exist at 1.1.7 and 1.1.8

Yes I read it, in version 1.1.9/2.0.x have been changed a lot of things about endstops logic, but as I told you my printer works correctly then it's not a so visible bug, don't you think so?

hmm. Did you try to "dis"-level the axis, so you can test the two situations:

  1. right side hit the endstop first
  2. left side hit the endstop first

If this work for your printer with actual 1.1.9bugfix then I give you a beer.

GMagician commented 5 years ago

@MarphXL

If this work for your printer with actual 1.1.9bugfix then I give you a beer.

is this valid for version 2.0? 'cause on my printer it works perfectly ;-)

Please enable PINS_DEBUGGING, then M43 E1 and then G28 and finally post output. This new output should report also endstop detected changes

MarphXL commented 5 years ago

i only want to print with dual-endstops and tmc2208. if this works on marlin 2.0 i will send you the beer 😀 i tried in the past with 2.0 but it did not work. I will try with m43 e1 today and post results

MarphXL commented 5 years ago

did you have tmc2208? perhaps that is the reason?

GMagician commented 5 years ago

No I don't have tmc2208 but endstops logic is not stepstick dependent (only sensorless home may change behaviours)

MarphXL commented 5 years ago

Here are the results with M43 E1 and please recognize that the printer doesn't hit the right endstop in the first try (+++ hit left endstop first):

+++ Hit left side first +++++++++++

Log Output ``` Send: G91 G28 Z0 G90 [...] Recv: >>> G28 Recv: Machine Type: Cartesian Recv: Probe: NONE Recv: current_position=(0.00, 0.00, 0.00) : setup_for_endstop_or_probe_move Recv: > endstops.enable(true) Recv: >>> homeaxis(Z) Recv: Home 1 Fast: Recv: >>> do_homing_move(Z, -600.00, [4.00]) Recv: current_position=(0.00, 0.00, 0.00) : sync_plan_position Recv: <<< do_homing_move(Z) Recv: Move Away: Recv: >>> do_homing_move(Z, 2.00, [4.00]) Recv: current_position=(0.00, 0.00, 0.00) : sync_plan_position Recv: Z_MIN:1 Recv: Recv: <<< do_homing_move(Z) Recv: Home 2 Slow: Recv: >>> do_homing_move(Z, -4.00, 1.00) Recv: current_position=(0.00, 0.00, 0.00) : sync_plan_position [...] Recv: Z_MIN:0 Recv: Recv: <<< do_homing_move(Z) Recv: >>> set_axis_is_at_home(Z) Recv: For Z axis: Recv: home_offset = 0.00 Recv: position_shift = 0.00 Recv: soft_endstop_min = 0.00 Recv: soft_endstop_max = 400.00 Recv: > home_offset[Z] = 0.00 Recv: current_position=(0.00, 0.00, 0.00) : Recv: <<< set_axis_is_at_home(Z) Recv: current_position=(0.00, 0.00, 0.00) : sync_plan_position Recv: current_position=(0.00, 0.00, 0.00) : > AFTER set_axis_is_at_home Recv: <<< homeaxis(Z) Recv: current_position=(0.00, 0.00, 0.00) : sync_plan_position Recv: current_position=(0.00, 0.00, 0.00) : clean_up_after_endstop_or_probe_move Recv: X:0.00 Y:0.00 Z:0.00 E:0.00 Count X:0 Y:0 Z:0 Recv: <<< G28 [...] Recv: Z2_MIN:0 Recv: Recv: Z2_MIN:1 Recv: [...] Recv: Z2_MIN:0 Recv: Recv: Z2_MIN:1 Recv: ```

+++ Hit right side first +++++++++++

Log Output ``` Send: G91 G28 Z0 G90 [...] Recv: >>> G28 Recv: Machine Type: Cartesian Recv: Probe: NONE Recv: current_position=(0.00, 0.00, 30.00) : setup_for_endstop_or_probe_move Recv: > endstops.enable(true) Recv: >>> homeaxis(Z) Recv: Home 1 Fast: Recv: >>> do_homing_move(Z, -600.00, [4.00]) Recv: current_position=(0.00, 0.00, 0.00) : sync_plan_position [...] Recv: Z2_MIN:0 Recv: Recv: <<< do_homing_move(Z) Recv: Move Away: Recv: >>> do_homing_move(Z, 2.00, [4.00]) Recv: current_position=(0.00, 0.00, 0.00) : sync_plan_position Recv: Z_MIN:0 Recv: Recv: Z_MIN:1 Recv: Recv: Z2_MIN:1 Recv: [...] Recv: <<< do_homing_move(Z) Recv: Home 2 Slow: Recv: >>> do_homing_move(Z, -4.00, 1.00) Recv: current_position=(0.00, 0.00, 0.00) : sync_plan_position Recv: Z2_MIN:0 Recv: [...] Recv: Z_MIN:0 Recv: Recv: <<< do_homing_move(Z) Recv: >>> set_axis_is_at_home(Z) Recv: For Z axis: Recv: home_offset = 0.00 Recv: position_shift = 0.00 Recv: soft_endstop_min = 0.00 Recv: soft_endstop_max = 400.00 Recv: > home_offset[Z] = 0.00 Recv: current_position=(0.00, 0.00, 0.00) : Recv: <<< set_axis_is_at_home(Z) Recv: current_position=(0.00, 0.00, 0.00) : sync_plan_position Recv: current_position=(0.00, 0.00, 0.00) : > AFTER set_axis_is_at_home Recv: <<< homeaxis(Z) Recv: current_position=(0.00, 0.00, 0.00) : sync_plan_position Recv: current_position=(0.00, 0.00, 0.00) : clean_up_after_endstop_or_probe_move Recv: X:0.00 Y:0.00 Z:0.00 E:0.00 Count X:0 Y:0 Z:0 Recv: <<< G28 ```

Here is a compare of the relevant passage: dual-endstops

MarphXL commented 5 years ago

btw: I cannot compile actual bugfix 2.0 : Error "filenames are too long" but I cant change them.

GMagician commented 5 years ago

Right case is ok, on left It seems endstop trigger comes at homing end....No idea!

thinkyhead commented 5 years ago

I cannot compile actual bugfix 2.0

To compile 2.0.x on Windows will require Arduino 1.9 beta or PlatformIO.

GMagician commented 5 years ago

I think that 'right' is what should be expected, while left... there are missing Z2 triggers that appears just too late... can't explain why?

GMagician commented 5 years ago

ops wait a moment...is first bump correct and second not or both are not good? I see here that after first bump it raise but endstop Z2 is not released...

MarphXL commented 5 years ago

left side both are wrong; right side both are good

MarphXL commented 5 years ago

I want to know what is the difference between your printer and mine? Did you have all Endstops at interrupt-pins?

GMagician commented 5 years ago

Well this is my printer: Marlin 2.0 + mega2560 + ramps 1.4 + drv8825 Interrupts enabled and Z2 uses _YMAX_