Jump to content
Ultimaker Community of 3D Printing Experts
OneLooseCrank

Pre-print G-Code assistance needed

Recommended Posts

Hi all,

I've started to invest in adjusting the G-Code that comes out of Cura to speed up the print and get a better first layer. However, I've started this investigation at the same time as upgrading to Cura 2.6.2. I'm really struggling to write in a bit of code that withdraws the filament at the end of a print, and then advances the filament prior to printing (the purpose of this is to remove filament from the extruder which expands at the end of the print, evacuating the extruder, leaving a gap in the first layer of the next print whilst the filament catches up). I've tried using [G1 E10 F200] with the intention of advancing 10mm at a feed rate of 200mm/min. I've tried it without the G1 code. Without the Fxx speed. What would be the right code to do nothing other than advance or withdraw filament?

Cheers,

OLC

Share this post


Link to post
Share on other sites

Right, in experimenting with this I've come across a few problems - one of which is that Cura withdraws a large amount of filament before printing when a model is sliced there, but I can't identify the line of code doing it. But one problem at a time. I have tested each of the following lines one by one and discovered that you need a new line after the last line of code for it to be performed. But I still can't get a one off extrusion to test a pre-print filament advance.

[G28

M109 S200

G1 F3600 X100 Y100 Z15 E10.0

]

Any ideas on what on earth I've missed? All I want to see the code do at the moment is extrude some filament to make up for the loss after expansion at the end of a print.

Share this post


Link to post
Share on other sites

Hi OLC,

first question is: which firmware uses your printer - or which gcode-flavour does it understand? e.g. G22, G23 are not commonly used AFAIK

Further:

  • respect the current position... The start coordinates for X/Y/Z should be initialized after the G28 command. But for the E-axis you have to set it on your own (e.g. with G92 E0.0).
  • respect the positioning mode (coordinates can be interpreted as relative or absolute) - if in doubt, always set it explicitly with G90, G91, M82, M83 (the CuraEngine uses absolute coordinates AFAIK)
  • all slicers that i know are presuming that the E coordinate is zero at the beginning, your start script should end with a G92 E0, just to be safe

Good luck!

Edited by Guest

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×

Important Information

Terms of Use Privacy Policy