Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Babystepping the Z-Offset uses the move axis step setting instead of the babystep setting #26896

Closed
1 task done
luizbgomide opened this issue Mar 22, 2024 · 8 comments
Closed
1 task done

Comments

@luizbgomide
Copy link

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

Yes, and the problem still exists.

Bug Description

My setup was working flawlessly one year ago on bugfix-2.1.x (commit 9e42480), last month I tried to update it to the latest of this branch and after manually migrating all the settings it was working but babystepping the Z Probe Offset was misbehaving.

As can be seem on the video below, when trying to move the Z Offset the display shows (correctly) that 0.01mm should be moved, but the actual move uses the 10mm step for axis move setting (as show in the screen) below.

VID_20240322_114242.mp4

I've tried to change every possible setting related to BABYSTEP and Z_PROBE without any luck. Since I just migrated the settings and the display correctly shows what should have happened, this must be a bug introduced in the last year.

Old settings (at 9e42480)
old_settings.zip

Current settings
current_settings.zip

Bug Timeline

It started at some point after commit 9e42480 from one year ago

Expected behavior

The hotend moves as indicated by the Z Probe Offset.

Actual behavior

The hotend moves by the step size for the axis move.

Steps to Reproduce

No response

Version of Marlin Firmware

bugfix-2.1.x

Printer model

Two Tress Bluer

Electronics

TMC2209 UART

LCD/Controller

MKS_ROBIN_TFT35

Other add-ons

BLTouch

Bed Leveling

ABL Bilinear mesh

Your Slicer

Cura

Host Software

OctoPrint

Don't forget to include

  • A ZIP file containing your Configuration.h and Configuration_adv.h.

Additional information & file uploads

No response

@ellensp
Copy link
Contributor

ellensp commented Mar 22, 2024

Confirmed in the simulator

@ellensp
Copy link
Contributor

ellensp commented Mar 22, 2024

I think im onto something.

Try this diff (2 changed lines in Marlin/src/lcd/tft/ui_common.cpp)

diff --git a/Marlin/src/lcd/tft/ui_common.cpp b/Marlin/src/lcd/tft/ui_common.cpp
index 944be77ab5..08fbabdfc6 100644
--- a/Marlin/src/lcd/tft/ui_common.cpp
+++ b/Marlin/src/lcd/tft/ui_common.cpp
@@ -71,7 +71,7 @@ void moveAxis(const AxisEnum axis, const int8_t direction) {
     }
   #endif
 
-  const float diff = motionAxisState.currentStepSize * direction;
+  float diff = motionAxisState.currentStepSize * direction;
 
   #if HAS_BED_PROBE
 
@@ -85,6 +85,7 @@ void moveAxis(const AxisEnum axis, const int8_t direction) {
                       , do_probe ? new_probe_offset : hotend_offset[active_extruder].z - bsDiff
                       , new_probe_offset
                     );
+        diff = 0;
         if (WITHIN(new_offs, PROBE_OFFSET_ZMIN, PROBE_OFFSET_ZMAX)) {
           babystep.add_steps(Z_AXIS, babystep_increment);
           if (do_probe)

Seems to work well in the sim

My test configs for the sim, if anyone is interested.
Configuration.zip

@ellensp
Copy link
Contributor

ellensp commented Mar 22, 2024

please note with your current settings you have 410 400 steps/mm for Z with BABYSTEP_MULTIPLICATOR_Z 4 and BABYSTEP_ZPROBE_OFFSET
So each baby step will move the Z 0.009756098 0.01mm, it will take a few clicks to noticeably move the Z axis

@luizbgomide
Copy link
Author

please note with your current settings you have 410 steps/mm for Z with BABYSTEP_MULTIPLICATOR_Z 4 and BABYSTEP_ZPROBE_OFFSET So each baby step will move the Z 0.009756098 mm, it will take a few clicks to noticeably move the Z axis

Actually it is 410 for the E0 axis, for Z it is 400.

After your last edit is it working or is it still moving double the distance?

@ellensp
Copy link
Contributor

ellensp commented Mar 22, 2024

correct distance now. yes your correct its 400, its very late here, going a bit cross eyed.

luizbgomide added a commit to luizbgomide/Marlin that referenced this issue Mar 22, 2024
@luizbgomide
Copy link
Author

luizbgomide commented Mar 22, 2024

Applied the fix but it is still misbehaving during print, when I adjust the z-offset it seems to dig the hotend into the bed, and even lose control of the rest of the axis, I've seem it move back during a print move, do some sort of "layer skip", etc.

The current version is unusable as it is for my printer.

@SyncroSeb
Copy link

SyncroSeb commented Apr 20, 2024

Had a similar problem.
Printer is a CoreXY (Tronxy X5SA Pro Stock motherboard with STMF446 Chip)
when adjusting the Z-Offset during the first layer the Z axis moved down not in 0.1 but whole mmand more steps, sometimes going down 20mm or more printing in the air, then going back to initial layer height. (+- Offset?).

The above mentioned changes to the Marlin/src/lcd/tft/ui_common.cpp (using actual bugfix version) worke out fine. Thx a lot

thinkyhead added a commit that referenced this issue Apr 24, 2024
@thisiskeithb
Copy link
Member

This may have been fixed in 489ef6e

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

@thinkyhead thinkyhead added this to the Version 2.1.3 milestone May 11, 2024
RPGFabi pushed a commit to RPGFabi/Marlin that referenced this issue Jun 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants