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

Add Z-Hop support #8

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Conversation

omdathetkan
Copy link
Contributor

See #4

@omdathetkan
Copy link
Contributor Author

omdathetkan commented Mar 26, 2020

Dont have a printer in reach to test, but looks alright from this gcode visualiser (after also fixing #7):
image

hop-test.gcode.txt

gcode += "G0 F{speed} E{e:.6f}".format(speed=retraction_speed * 60, e=e - retraction_distance)
if retraction_hop_enabled:
gcode += " Z{z:.6f}".format(z=layer_heights[layer_nr] + retraction_hop)
gcode += " (RETRACT)\n"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is your debug code? Or maybe something specific to your device? Having the word (RETRACT) there is not standard g-code.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
gcode += " (RETRACT)\n"
gcode += "G10\n" #enable retraction gcode

This seems to work for me

gcode += "G0 F{speed} E{e:.6f}".format(speed=unretraction_speed * 60, e=e)
if retraction_hop_enabled:
gcode += " Z{z:.6f}".format(z=layer_heights[layer_nr])
gcode += " (UN-RETRACT)\n"
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similarly, this is not standard and would give a parse error in many printers.

Copy link

@shardsofaperture shardsofaperture Nov 28, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
gcode += " (UN-RETRACT)\n"
gcode += "G11\n" #enable zhop

this also works for me - ender S1 Plus - I think that G11 is right - in practice it is working on my printer - I know it is needed per marlin docs "Multiple consecutive G10 or G10 S1 commands without a corresponding G11 or G11 S1 will be ignored" so I would assume we're getting G10 / hop / G11 to close the loop.

@shardsofaperture
Copy link

I went though for a few hours (yes hours) - the G10/G11 were easy fixes to swap out and they work, my cura settings are set to 4mm z hop and .08mm retract.

The issue I'm still having (and this is probably a different issue) and where I spent my hours on are it will essentially G28 X0 Y0 Z.02 at start of print (drawing?) and there is no way for it that I can figure out to stay hopped until the first correct X/Y and drop to .02.

I've tried enabling prime, putting a G10 in the code prior to starting, changing "

result += "G0 F15000 Z{layer_height}".format(layer_height=layer_height_0)
to
result += "G0 F15000 Z4/n"

and a few other things. Essentially it will start at that first layer height and stay there, which drags the pen across from the corner to wherever the drawing is, I can't figure out a way around it and everything I've tried either does NOT work or it causes cura to say the plugin is corrupted.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants