zhop in cura is a feature meant mostly just for delta printers. Google image search "delta 3d printer" if you don't know exactly what I mean. Some non-delta printers can sometimes benefit from this feature but only if they have a Z axis with zero play. Which is pretty much no printer I've ever seen - I mean it would be an extremely expensive, extremely well built, extremely high quality printer that had no difference in z axis position whether you move the bed to a position from below or from above. (need like 0.01mm consistency - even that much error will give you 10% over/underextrusion with 0.1mm layer heights).
Remove the extra retraction before the skirt starts (the line G1 F2700 E-1). This command is causing the nozzle to retract filament and leads to the subsequent Z-hop action.
@danielboss - he knows that's the problem line of code. He's wondering what settings in Cura may be creating that. I don't know the answer.
GregValiant 1,454
Hi folks.
The Z-hop is related to the retraction, but there is no setting to adjust that retraction and so the Z-hop will occur.
The problem I was having with that was the retraction itself. It always caused the skirt to delay it's start. I tried using "Search and Replace" but it wanted to change all the retractions rather than just the first one so I re-wrote the script to suit myself. This is my version. (BTW Slashee is not allowed to comment on my coding style. It works.)
At some point I think it will end up in a Pull Request for Cura. There are new options and one of them is to replace the "First Instance Only".
Unzip the file and put it into your Configuration Folder and the "scripts" sub-folder. It will be available in Cura with the other post processors (under "Extensions") and will give you a second option for Search and Replace.
The settings look like this. (These are the settings that changes the initial retraction, to a G92. That sets the E location instead of pulling the filament back further since I do retract after the purge lines.)
You will need 3 instances of Search and Replace to adjust the three relevant lines. These will be ambidextrous and independent of the Cura settings for retraction and so forth.
I have the first instance to change that Initial Retraction so my skirts start correctly. You may not need this one.
Search: G1 F(\d*\d.*) E-(\d*\d.*)
Replace: G92 E-1 ;the number may require tweaking because you don't want a delay, nor a blob.)
Use regular expressions: checked
Enable search in a layer range: not checked
Replace first instance only: checked
Ignore StartUp Gcode: not checked (that particular retraction happens to be in the StartUp section of the gcode)
Ignore Ending Gcode: checked
The second instance removes the first Z-hop only.
Search: G1 F(\d*\d.*) Z(\d.*)
Replace: ;Z-hop removed
Use regular expressions: checked
Enable search in a layer range: not checked
Replace first instance only: checked
Ignore StartUp Gcode: checked (the first z-hop is within LAYER:0.)
Ignore Ending Gcode: checked
The first travel move contains the z-hop height and that needs to be removed/ignored but the travel needs to stay.
Search: G0 F(\d*\d.*) X(\d.*) Y(\d.*) Z(\d.*)
Replace: G0 F\1 X\2 Y\3 ;Z\4
Use regular expressions: checked
Enable search in a layer range: not checked
Replace first instance only: checked
Ignore StartUp Gcode: checked
Ignore Ending Gcode: checked
So instead of these lines:
G1 F2700 E-1 <<<<<<<<<<<<<< Extra Retraction
;LAYER_COUNT:70
;LAYER:0
M107
G1 F300 Z0.4 <<<< Z-hop
G0 F2700 X117.651 Y120.466 Z0.4
;TYPE:SKIRT
You would end up with these lines:
G92 E-1 <<<< If you have a retraction after purge lines in your StartUp then the number here should match that distance.
;LAYER_COUNT:70
;LAYER:0
M107
;z-hop removed
G0 F2700 X117.651 Y120.466 ;Z0.4 <<<<<< The Z parameter has been commented out and the F X Y are the same.
;TYPE:SKIRT
I will now state once again how much I hate dealing with Regular Expressions.
Recommended Posts
Slashee_the_Cow 541
The Z hop should move the head further from the bed, not make it scratch it. It moves to that height because it's a Z hop above the starting Z height (so it's just a normal Z hop down when it starts printing) and it retracts so it doesn't drool as it moves from the starting position of the head to the start of the skirt.
It looks like you're using Klipper(?) which I don't know that well but for regular Marlin startup gcode would usually start with an M90 to set it to absolute positioning and you'd have a G28 to home the printer (in your case probably after the START_PRINT macro) but I don't know if the START_PRINT macro handles that for you.
Link to post
Share on other sites