Marlin icon indicating copy to clipboard operation
Marlin copied to clipboard

[BUG] Dual Z Stepper with dual endstop don't work

Open 891paul opened this issue 2 months ago • 13 comments

Did you test the latest bugfix-2.1.x code?

Yes, and the problem still exists.

Bug Description

Hello, I have configured Marlin 2.1.2.2. With 2 Z stepper motors and 2 endstops.

The steppers drive manually, but the homing function only works in X and Y. Nothing happens when homing Z.

The endstops respond with M119.

If you move the Z axis manually and press one of the two Z endstops, both steppers stop. But only one stepper should remain standing.

The problem can be found more often on the Internet.

Bug Timeline

Marlin 2.1.2.2

Expected behavior

Each stepper should stop with the corresponding limit switch and the homing function in Z and the homing function of all 3 axes should work

Actual behavior

Z Homing is not possible. When you press a Z endstop, both steppers stop

Steps to Reproduce

No response

Version of Marlin Firmware

2.1.2.2

Printer model

No response

Electronics

BTT SKR V1.3

LCD/Controller

BTT TFT 35

Other add-ons

No response

Bed Leveling

MBL Manual Bed Leveling

Your Slicer

Prusa Slicer

Host Software

OctoPrint

Don't forget to include

  • [X] A ZIP file containing your Configuration.h and Configuration_adv.h.

Additional information & file uploads

Config.zip

891paul avatar Apr 24 '24 21:04 891paul

Please download bugfix-2.1.x to test with the latest code and let us know if you're still having this issue.

thisiskeithb avatar Apr 24 '24 21:04 thisiskeithb

Same problem exists for dual Y (and probably dual X).

Odd since this was working in the last release, and there's no obvious changes in the code around these.

Also odd since the firmware thinks it's moving the axes the whole time.

After doing some debugging, seems like the issue is any time 'set_separate_?_axis(true)' is active.

Ill see about fixing it this week and submit any fixes I find

arades79 avatar Apr 25 '24 01:04 arades79

2.1.2.2 is very buggy and should not be used. List of known 2.1.2.2 bugs and fixes https://github.com/MarlinFirmware/Marlin/issues?q=is%3Aissue+2.1.2.2+in%3Atitle+label%3A%22Bug%3A+Confirmed+!%22+

ellensp avatar Apr 25 '24 04:04 ellensp

I need a stable version. Which one would you recommend?

891paul avatar Apr 25 '24 04:04 891paul

isnt there an option to enable for dual Z stepper endstops, like G34? because doesn't the I3 use this to level the gantry? https://marlinfw.org/docs/gcode/G034-zsaa.html

classicrocker883 avatar Apr 26 '24 01:04 classicrocker883

The bug (on my board) is still active. After the suggested fixes, the behavior did not change on my Octopus PRO board. bugfix-2.1.x (03.05.2024) did not affect the printer behavior.

mouse2233 avatar May 03 '24 10:05 mouse2233

Same here on Anycubic i3 Mega P.

2.1.2.1
works fine

2.1.2.2
wrong Z stepping (manual movement is doubled), G28 blocks Z axes and does not move

2.1.x with all proposed fixes applied (pending PRs)
manual movement is fine again, Z homing still blocks

bugfix-2.1.x
works fine (answer updated, did not work in previous tests)

stklcode avatar May 05 '24 06:05 stklcode

@stklcode

with all proposed fixes applied

What proposed fixes are you referring to?

And please provide your bugfix configs if you also have this issue under bugfix

ellensp avatar May 05 '24 07:05 ellensp

What proposed fixes are you referring to?

All currently open PRs für 2.1.x #27020 #27021 #27022 #27023 #27024 #27025 #27026

stklcode avatar May 05 '24 07:05 stklcode

All currently open PRs für 2.1.x #27020 #27021 #27022 #27023 #27024 #27025 #27026

Those are not for bugfix Those are fixes for broken 2.1.2.2. ie Marln 2.1.x, not bugfix 2.1.x Use bugfix code unmodified

ellensp avatar May 05 '24 07:05 ellensp

Those are not for bugfix

I know. As I wrote before: "2.1.x with all proposed fixes applied" (not "bugfix-").

stklcode avatar May 05 '24 07:05 stklcode

It was unclear, before you edited it.

ellensp avatar May 05 '24 07:05 ellensp

Yep, sorry for the confusion.

Just re-tested my configuration and extracted the actual target (Anycubic i3 Mega P with BLTouch and case light - guess the latter is not of any relevance here :wink:) on top of the current bugfix-2.1.x branch (eb781afe7b01d510b58abc4f83b767ecc61d6b84).

=> bugfix-2.1.x works :heavy_check_mark: (just had a minor config bug with the endstops) => 2.1.x still broken :x:

Configs attached:


Console outputs with DEBUG_LEVELING_FEATURE enabled and M111 S32 (on the broken 2.1.x branch)

Home X (G28 X) Lifts Z axis, and homes X. So far acting normally.

console output
Send: G28 X
Recv: >>> G28  X2.00 Y2.00 Z0.00
Recv: Machine Type: Cartesian
Recv: Probe: BLTOUCH
Recv: Probe Offset X-2.00 Y-25.00 Z-0.40 (Left-Front & Below Nozzle)
Recv: Auto Bed Leveling: BILINEAR (disabled)
Recv: 
Recv: >>> set_bed_leveling_enabled  X2.00 Y2.00 Z0.00
Recv: <<< set_bed_leveling_enabled  X2.00 Y2.00 Z0.00
Recv: Raise Z before homing:
Recv: do_blocking_move_to_z(5.00, 10.00)
Recv: >>> do_blocking_move_to  X2.00 Y2.00 Z0.00
Recv: >  X2.00 Y2.00 Z5.00
Recv: <<< do_blocking_move_to  X2.00 Y2.00 Z5.00
Recv: BLTouch from 90 to 160
Recv: BLTouch from 160 to 90
Recv: >>> homeaxis(X)
Recv: Home Fast: -337.50mm
Recv: >>> do_homing_move  X2.00 Y2.00 Z5.00
Recv: ...(X, -337.50, [50.00])
[...]
Recv: <<< do_homing_move  X2.00 Y2.00 Z5.00
Recv: Move Away: 5.00mm
Recv: >>> do_homing_move  X2.00 Y2.00 Z5.00
Recv: ...(X, 5.00, [50.00])
Recv: <<< do_homing_move  X2.00 Y2.00 Z5.00
Recv: Re-bump: -10.00mm
Recv: >>> do_homing_move  X2.00 Y2.00 Z5.00
Recv: ...(X, -10.00, 25.00)
Recv: <<< do_homing_move  X2.00 Y2.00 Z5.00
Recv: >>> set_axis_is_at_home(X)
Recv: Axis X home_offset = 0.00 position_shift = 0.00
Recv: > home_offset[X] = 0.00
Recv:   current_position= X0.00 Y2.00 Z5.00 :
Recv: <<< set_axis_is_at_home(X)
Recv:   current_position= X0.00 Y2.00 Z5.00 : sync_plan_position
Recv:   current_position= X0.00 Y2.00 Z5.00 : > AFTER set_axis_is_at_home
Recv: <<< homeaxis(X)
Recv:   current_position= X2.00 Y2.00 Z5.00 : sync_plan_position
Recv: X:2.00 Y:2.00 Z:5.00 E:0.00 Count X:0 Y:160 Z:2000
Recv: <<< G28  X2.00 Y2.00 Z5.00
Recv: ok

Home Y (G28 Y) The same as for X, works as expected.

Home Z (G28 Z)

Absolutely no movement on any Z stepper at all. Neither before nor after endstop push.

console output
Send: G28 Z
Recv: >>> G28  X2.00 Y2.00 Z5.00
Recv: Machine Type: Cartesian
Recv: Probe: BLTOUCH
Recv: Probe Offset X-2.00 Y-25.00 Z-0.40 (Left-Front & Below Nozzle)
Recv: Auto Bed Leveling: BILINEAR (disabled)
Recv: 
Recv: >>> set_bed_leveling_enabled  X2.00 Y2.00 Z5.00
Recv: <<< set_bed_leveling_enabled  X2.00 Y2.00 Z5.00
Recv: >>> homeaxis(Z)
Recv: Home Fast: -315.00mm
Recv: >>> do_homing_move  X2.00 Y2.00 Z5.00
Recv: ...(Z, -315.00, [4.00])

(no movement, just "busy: procwessing" messages)

(maually push Z endstops here)

Recv: <<< do_homing_move  X2.00 Y2.00 Z5.00
Recv: Move Away: 2.00mm
Recv: >>> do_homing_move  X2.00 Y2.00 Z5.00
Recv: ...(Z, 2.00, [4.00])
Recv: <<< do_homing_move  X2.00 Y2.00 Z5.00
Recv: Re-bump: -4.00mm
Recv: >>> do_homing_move  X2.00 Y2.00 Z5.00
Recv: ...(Z, -4.00, 1.00)
Recv: <<< do_homing_move  X2.00 Y2.00 Z5.00
Recv: >>> set_axis_is_at_home(Z)
Recv: *** Z HOMED TO ENDSTOP ***
Recv: Axis Z home_offset = 0.00 position_shift = 0.00
Recv: > home_offset[Z] = 0.00
Recv:   current_position= X2.00 Y2.00 Z0.00 :
Recv: <<< set_axis_is_at_home(Z)
Recv:   current_position= X2.00 Y2.00 Z0.00 : sync_plan_position
Recv:   current_position= X2.00 Y2.00 Z0.00 : > AFTER set_axis_is_at_home
Recv: <<< homeaxis(Z)
Recv: >>> move_z_after_homing  X2.00 Y2.00 Z0.00
Recv: >>> move_z_after_probing  X2.00 Y2.00 Z0.00
Recv: <<< move_z_after_probing  X2.00 Y2.00 Z0.00
Recv: <<< move_z_after_homing  X2.00 Y2.00 Z0.00
Recv:   current_position= X2.00 Y2.00 Z0.00 : sync_plan_position
Recv: X:2.00 Y:2.00 Z:0.00 E:0.00 Count X:160 Y:160 Z:0
Recv: <<< G28  X2.00 Y2.00 Z0.00
Recv: ok
Send: M113 S2
Recv: ok

Endstop detection with M119 looks okay.

condition z_min z2_min z_probe
no endstop pushed open open triggered
left Z endstop pushed triggered open triggered
right Z endstop pushed open triggered triggered
both Z endstops pushed triggered triggered triggered

stklcode avatar May 05 '24 08:05 stklcode