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
Cura 3.2.1: PauseAtHeight resume wrong feed on UM3 #3676
Comments
Additional remark: The issue might be in the firmware of the UM3; thus used firmware: 4.3.2 |
I can't reproduce this bug. I don't get the additional retract that you're seeing. I do get the unnecessary ones though. Here is a snippet of the g-code that it produces for me:
I think the "unnecessary" ones are just to retract while it's doing that long travel move in between though. |
Gcode also looks symmetrical in my case and those of some customers. As I mentioned it might also be an issue in the firmware. Could you pass it on in this case internally please? There is no Github repository for the firmware of the UM3 I think... |
What I miss here is the version of the UM3 firmware this was found. Can you add this? I know we have found some issues (and made some patches) that might fix this, but it is still being tested. |
@MarcoTvM |
For the UM3 the firmware already does retract and un-retract so all of that code and especially putting it in M83 mode will mess up. EDIT: confirmed the pause procedure just starts sending gcode strating with a G92 E0 and then a G1 E-xxx |
@robinmdh , what do you mean with "could not find the plugin"? It's in the Postprocessing plugin in Cura... ;-) |
@Dim3nsioneer, we made several changes to that file, but I'm still curious to see the improvements you made. Can you mail your version? |
@Dim3nsioneer my internal nightly build of cura on Linux does not get the download page for this plugin nor was it listed as installed. perhaps I should just move to a newer one, it might be a Linux thing, etc. The script should do nothing Except insert A "M0" on a new line at the start of a layer. I'm fairly sure we've messed about with the UM3's version of the pause a bit!!! saved_state = self.__resume_procedure.getSavedState()
prepause_uncorrected_pos = cast(Move, saved_state["move"])
compensator = c.getGCodeProcessor().gcode_compensator
active_hotend = saved_state["active_hotend"]
prepause_corrected_pos = prepause_uncorrected_pos if compensator is None else \
compensator.compensatePoint(prepause_uncorrected_pos, active_hotend )
# reset the position of the filament because it could have been reset by the change material procedure while paused.
e_pos = prepause_corrected_pos.e[cast(int, active_hotend)] - PauseStep.RETRACT_LENGTH_ON_PAUSE #type: ignore
c.sendRawGCode("G92 E{0}".format(e_pos))
# unretract the big part
c.sendRawGCode("G1 E{E:f} F{F:f}".format(E=e_pos + PauseStep.RETRACT_LENGTH_ON_PAUSE - PauseStep.QUICK_RETRACT_LENGTH_ON_PAUSE, F=deprime_speed))
# return Z (XY already moved to the right location in resumePrintProcedure).
c.sendRawGCode("G1 Z{Z:f} F{F:f}".format(Z=prepause_corrected_pos.z, F=move_speed))
c.getGCodeProcessor().setLastMove(prepause_uncorrected_pos)
# Finally restore the speed to what it was before.
log.info("gcode: G1 F{F:f}".format(F=prepause_uncorrected_pos.f))
c.sendRawGCode("G1 F{F:f}".format(F=prepause_uncorrected_pos.f))
cooling_fan_speed = saved_state.get("cooling_fan_speed", 0)
if cooling_fan_speed is not None:
c.getPrintHeadController().getPropertyContainer().get("cooling_fan_speed").set(cooling_fan_speed) # type: ignore
c.waitForQueueToBeEmpty(wait_for_motion_controller=True)
c.setPaused(False)
# reset the saved state
self.__resume_procedure.setSavedState({}) so first the state is set to be retracted the retract lenght on pause. So I guess you mean that whole quick retract length can be left out? |
I should have included the pausing... saved_state = {"move": c.getLastMove()} # type: Dict[str, Union[Move, int]]
# Filament tracking is disabled for the the gcode will do the retraction so the RetractedLength has to be updated afterwards.
# In EM-2528 this should be fixed.
pre_pause_retracted_length = c.getHotendRetractedLength(c.getGCodeActiveHotend())
# Wipe left or right to prevent running into the end limits
wipe_x_pos = saved_state["move"].x - self.__HORIZONTAL_WIPE_DISTANCE if saved_state["move"].x > self.__HORIZONTAL_WIPE_DISTANCE else saved_state["move"].x + self.__HORIZONTAL_WIPE_DISTANCE
c.sendRawGCode("G92 E0")
c.sendRawGCode("G1 E%d F%f" % (-self.QUICK_RETRACT_LENGTH_ON_PAUSE, deprime_speed * 2)) # High speed retract to prevent oozing
c.sendRawGCode("G0 X%f Y%f F%d" % (wipe_x_pos, saved_state["move"].y, move_speed)) # wipe nozzle
c.sendRawGCode("G0 Z%f F%d" % (saved_state["move"].z + self.__Z_HOP_HEIGHT, move_speed)) # hop
c.sendRawGCode("G1 E%d F%f" % (-self.RETRACT_LENGTH_ON_PAUSE, deprime_speed)) # Long retract |
I made changes on the base of FW 4.3.3:
As mentioned before, it also worked without the changes (in absolute e mode) but like this it mirrors the logic in pauseStep.py. |
@Dim3nsioneer I do believe you un-retract too much in your case. Of course you next gcode line read from the file will compensateand depending on your paused print's current line type/length it might be a good thing but try pausing on the outer wall of a cylinder? here is the pause logic from 4.3 c.sendRawGCode("G92 E0")
c.sendRawGCode("G1 E%d F%f" % (-self.QUICK_RETRACT_LENGTH_ON_PAUSE, deprime_speed * 2)) # High speed retract to prevent oozing
c.sendRawGCode("G0 X%f Y%f F%d" % (wipe_x_pos, saved_state["Y"], move_speed)) # wipe nozzle
c.sendRawGCode("G0 Z%f F%d" % (saved_state["Z"] + self.__Z_HOP_HEIGHT, move_speed)) # hop
c.sendRawGCode("G1 E%d F%f" % (-self.RETRACT_LENGTH_ON_PAUSE, deprime_speed)) # Long retract So first we retract to the quick retract length, then we retract to the RETRACT_LENGTH_ON_PAUSE position, since we;re in absolute mode this does not include an additional QUICK_RETRACT_LENGTH_ON_PAUSE Or am I missing something here? |
If we are in absolute mode then yes. I looked at it with the script POV which change into relative mode and then it would do two separate movements with each the full length of those retracts. |
On second thought, I think we should then get rid of that
in resumeStep.py, correct? |
That is a well hidden plugin/script @ckielstra helped me find the plugin/script in my Cura (I kept looking at that list of installed plugins and saw no pause at... calling pause at height a plugin is a big misnomer IMHO) Resulting Gcode: M204 S5000
M205 X30 Y30
G0 F15000 X111.856 Y94.737
G0 X111.869 Y94.774
;TIME_ELAPSED:171.761287
;TYPE:CUSTOM
;added code by post processing
;script: PauseAtHeight.py
;current z: 0.57
;current height: 0.29999999999999993
M0;Do the actual pause
;LAYER:3
M106 S255
G0 X111.869 Y94.774 Z0.57
M204 S1000
M205 X10 Y10
;TYPE:WALL-INNER
G1 F1800 X110.777 Y95.227 E33.99907 So I think this issue can be closed once Cura 3.5.x is released? |
Has it been tested? Is that the version of the script which is in the master branch here (54b990c)? |
Yep, the Cura master branch should contain the most recent version. Summarizing:
|
I meant the first one, tested against reported problems. |
3.5.0 has been released. I hope it works! Thanks for the debugging, guys! |
Application Version
3.2.1
Platform
Windows 10
Qt
version from Ultimaker's website
PyQt
version from Ultimaker's website
Display Driver
n/a
Printer
UM3
Steps to Reproduce
Use PauseAtHeight on any object on an UM3; test: 4mm retract
Actual Results
retracts 4mm before pause ->ok
retracts another 4mm before pause -> nok
retracts a long distance (16mm?) before moving to park position ->nok
retracts another long distance (16mm?) after resuming ->nok
primes 4mm -> ok
retracts 4mm -> unnecessary?
primes 4mm -> unnecessary?
Expected results
proper priming after resuming
Summary:
The pauseAtHeight script leads to additional e-moves which are not compensated at resuming. Result is printing a lot of air.
The text was updated successfully, but these errors were encountered: