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.03k stars 19.13k forks source link

[BUG] M702 incorrect Z-travel #27152

Open DaveCay opened 1 month ago

DaveCay commented 1 month ago

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

Yes, and the problem still exists.

Bug Description

The final Z-position after M702 completion is incorrect when upper limit of Z may is to be exceeded during filament unloading process. The similar command M701 was modified in this fix: "Fix Resume Print with UBL (#21564)", the M702 code still unchanged. The M701 working correctly, M702 do not.

Bug Timeline

It is old bug, it was partialy solved in 2.0.8

Expected behavior

The nozzle will travel to the upper limit (less than the value in the Z parameter), unload the filament and return to the same position as before the command.

Actual behavior

The nozzle will travel to the upper limit (less than the value in the Z parameter), unload the filament and go down by value in Z parameter. The final position is deeper than before the command.

Steps to Reproduce

  1. Prehead nozzle to PLA temp
  2. Homing Z
  3. Go to Z=245mm (My printer have size of printing area 250mm)
  4. Use M702 Z50 command (you can also use command Unload filament from LCD menu when you have predefined Z raise at configuration by NOZZLE_PARK_POINT)
  5. Nozzle go up 5mm, filament is unloaded, nozzle go down by 50mm and stop at Z=200mm....

Version of Marlin Firmware

2.1.2.2

Printer model

Ender-3

Electronics

Creality 4.2.2/H8(HR4988) + GD32F303RET6

LCD/Controller

CR10_STOCKDISPLAY (RET6 12864 LCD)

Other add-ons

3D-Touch

Bed Leveling

ABL Bilinear mesh

Your Slicer

Prusa Slicer

Host Software

SD Card (headless)

Don't forget to include

Additional information & file uploads

config.zip

ellensp commented 1 month ago

Configs are for 2.1.2.2

Please test the bugfix-2.1.x branch to see where it stands. If the problem has been resolved then we can close this issue. If the issue isn't resolved yet, then we should investigate further.

DaveCay commented 1 month ago

Hi all, yes, I checked it in bugfix 2.1.x. Problem is remaining.

See file https://github.com/MarlinFirmware/Marlin/tree/bugfix-2.1.x/Marlin/src/gcode/feature/pause/M701_M702.cpp and compare line 122 and 225, please.

Best regards David