Jump to content

Adding code to print cycle


Carlbosson

Recommended Posts

Posted · Adding code to print cycle

Sorry I did not see a search to look to see if this has been asked before and I am sure it has. When my print is finished the hot end stays on the print and cools so it is stuck to the print. I would like to add a line of code to the sliced file to tell the printer to home all once the print is complete. I would also like to add a swipe before the print starts. Were do I add this in Cura? Thank in advance for all your help.

  • Link to post
    Share on other sites

    Posted · Adding code to print cycle

    I only looked at the end gcode as that's the critical part.  You put the printer into relative mode but I believe that only affects the E axis (extruder).  Instead use G92 which sets the current position.  Like this:

    G92 Z0 E0    <--- without actually moving any axis - now declare the Z and E axes to be at zero.

    G1 E-1 F1000   <-- retract 1mm

    G1 Z5  <-- move nozzle 5mm farther from print - note this may violate software end stops if your print used the full height

    G1 E-10    <-- retract another 9mm

    G1 X0 Y0 F6000  <-- move nozzle to corner at 100mm/sec

     

    G28   <-- optional - home all axes - don't do this if it means moving the nozzle to touch the build plate

     

  • Link to post
    Share on other sites

    Posted · Adding code to print cycle

    By the way, some versions of Marlin seem to ignore that last 1000 or so characters in the gcode file.  This is a bug only in certain versions.  One solution is to add a lot of comments at the end

     

    Also - did you look at the resulting gcode to see if it correctly added your code at the end?

     

    Next time please just paste in the code - don't attach a pdf containing a photo of a screenshot.

  • 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

      • UltiMaker Cura 5.7 stable released
        Cura 5.7 is here and it brings a handy new workflow improvement when using Thingiverse and Cura together, as well as additional capabilities for Method series printers, and a powerful way of sharing print settings using new printer-agnostic project files! Read on to find out about all of these improvements and more. 
         
          • Like
        • 18 replies
      • S-Line Firmware 8.3.0 was released Nov. 20th on the "Latest" firmware branch.
        (Sorry, was out of office when this released)

        This update is for...
        All UltiMaker S series  
        New features
         
        Temperature status. During print preparation, the temperatures of the print cores and build plate will be shown on the display. This gives a better indication of the progress and remaining wait time. Save log files in paused state. It is now possible to save the printer's log files to USB if the currently active print job is paused. Previously, the Dump logs to USB option was only enabled if the printer was in idle state. Confirm print removal via Digital Factory. If the printer is connected to the Digital Factory, it is now possible to confirm the removal of a previous print job via the Digital Factory interface. This is useful in situations where the build plate is clear, but the operator forgot to select Confirm removal on the printer’s display. Visit this page for more information about this feature.
          • Like
        • 0 replies
    ×
    ×
    • Create New...