Jump to content

Recommended Posts

Posted · Cura Start and End code

Hi everyone,

I am new to 3D printing and would like to change the start and end settings of my prints.

How can I make it so that the extruder positions itself 15mm above the bed in the front right corner, pushes out 20 mm of filament and then starts the print. And once the print is done it moves back to front right corner but moves the extruder to the top height, like 150mm above the bed or something.

This is the Current start and End Code that I have in Marlin.

Start:

G21 ;metric values

G90 ;absolute positioning

M82 ;set extruder to absolute mode

M107 ;start with the fan off

G28 X0 Y0 ;move X/Y to min endstops

G28 Z0 ;move Z to min endstops

G1 Z15.0 F9000 ;move the platform down 15mm

G92 E0 ;zero the extruded length

G1 F200 E3 ;extrude 3mm of feed stock

G92 E0 ;zero the extruded length again

G1 F9000

;Put printing message on LCD screen

M117 Printing...

End:

M104 S0 ;extruder heater off

M140 S0 ;heated bed heater off (if you have it)

G91 ;relative positioning

G1 E-1 F300 ;retract the filament a bit before lifting the nozzle, to release some of the pressure

G1 Z+0.5 E-5 X-20 Y-20 F9000 ;move Z up a bit and retract filament even more

G28 X0 Y0 ;move X/Y to min endstops, so the head is out of the way

M84 ;steppers off

G90 ;absolute positioning

Btw, I am using a Maker Select V2. I don't know if that makes a difference.

Thanks,

Anton

  • Link to post
    Share on other sites

    Posted · Cura Start and End code

    G0 and G1 are identical commands and tell the printer to "go" or "go to" some location. You can specify all 4 axes or just one axes or anything in between. So

    G0 X50 Y50 Z15

    Moves to that location with the nozzle 15mm above the bed. I don't know how wide your bed is and I don't know where 0,0 is for you. On UM printers 0,0 is front left and they are a little over 215mm wide so:

    G0 X200 Y0 Z15 is safe for a UM printer.

    To extrude it's the part where it does this:

    G92 E0 ;zero the extruded length

    G1 F200 E3 ;extrude 3mm of feed stock

    G92 E0 ;zero the extruded length again

    The G92's are important - that sets current position for an axis (in this case E axis to position zero). Without that you don't know where the E axis will move to - it depends where the E axis left off which might be at the 10 meter point from a previous print.

    The G1 F200 E3 moves 3mm of filament. The F200 is the feedrate which stays in effect for all subsequent G0 or G1 comnmands until F is mentioned again. It's in mm/minute so divide by 60 to get mm/sec. Or take your mm/sec value you want and multiply by 60.

    Does that answer all your questions?

  • 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...