Jump to content

Recommended Posts

Posted · Pre-print G-Code assistance needed

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

  • Link to post
    Share on other sites

    Posted · Pre-print G-Code assistance needed

    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.

  • Link to post
    Share on other sites

    Posted (edited) · Pre-print G-Code assistance needed

    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
  • 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
    • Our picks

      • Help Us Improve Cura – Join the Ultimaker Research Program
        🚀 Help Shape the Future of Cura and Digital Factory – Join Our Power User Research Program!
        We’re looking for active users of Cura and Digital Factory — across professional and educational use cases — to help us improve the next generation of our tools.
        Our Power User Research Program kicks off with a quick 15-minute interview to learn about your setup and workflows. If selected, you’ll be invited into a small group of users who get early access to features and help us shape the future of 3D printing software.

        🧪 What to Expect:
        A short 15-minute kickoff interview to help us get to know you If selected, bi-monthly research sessions (15–30 minutes) where we’ll test features, review workflows, or gather feedback Occasional invites to try out early prototypes or vote on upcoming improvements
        🎁 What You’ll Get:
         
        Selected participants receive a free 1-year Studio or Classroom license Early access to new features and tools A direct voice in what we build next
        👉 Interested? Please fill out this quick form
        Your feedback helps us make Cura Cloud more powerful, more intuitive, and more aligned with how you actually print and manage your workflow.
        Thanks for being part of the community,

        — The Ultimaker Software Team
        • 0 replies
      • Cura 5.10 stable released!
        The full stable release of Cura 5.10 has arrived, and it brings support for the new Ultimaker S8, as well as new materials and profiles for previously supported UltiMaker printers. Additionally, you can now control your models in Cura using a 3D SpaceMouse and more!
          • Like
        • 18 replies
    ×
    ×
    • Create New...