Jump to content
Ultimaker Community of 3D Printing Experts

Successful Result : Octopi Start and End GCode for UM2


abstract
 Share

Recommended Posts

Posted · Successful Result : Octopi Start and End GCode for UM2

Hi Folks.

I have been using UM2 for nearly 2 years and for most of that time I used Octopi to control the UM2 remotely. After a recent Cura / Firmware update the Octopi seemed to be failing to print properly and today I got around to fixing that.

I got the latest Octopi image and then I started messing around with the Start and End GCode in Cura. Since I sometimes use Octopi and sometimes print with SD card from the front of the UM2, I wanted to make sure that using these 2 modes were compatible. In particular, the 'extrude after print' and 'prime before print' needs to match up reasonably well when switching between the 2 different control modes.

Also, I like the way the UM2 primes material on top of the front right metal clip, and I wanted Octopi to do the same. Pouring over forums, I didn't find a definitive answer so I did a lot of trial and error, and here are the results I have finalised.

Of course, to clarify- In Cura you need to have 2 machines setup, one for UM2 native using UltiGCode and another one using REPRAP (although maybe with this extra start / end stuff, Octopi might work with standard UltiGCode??) - anyway assume you need RepRap (Marlin/Sprinter) mode in your second Machine "UM2 via Octopi".

Now, put in the following in the Start and End GCode sections in Cura:

START CODE:

 

G21 ;metric valuesG90 ;absolute positioningM82 ;set extruder to absolute modeM107 ;start with the fan offG28 ; home all axesG1 F12000 X5 Y10M109 S{print_temperature} ;Uncomment to add your own temperature lineG1 Z30 ; lowerG92 E0 ; zero the extruded lengthG1 F100 E40; purge nozzle with 50mm of filamentG1 X80 Y60 F3000 ; move aside of the puddle of primed plasticG92 E0 ; zero the extruded length againG1 F{travel_speed}M117 Printing...

 

END CODE:

 

M104 S0 ;extruder heater offM140 S0 ;heated bed heater off (if you have it)G91 ;relative positioningG1 E-1 F300 ;retract the filament a bit before lifting the nozzle, to release some of the pressureG1 Z+0.5 E-15 F100 ;move Z up a bit and retract filament even moreG28 X0 Y0 ;move X/Y to min endstops, so the head is out of the wayG28 Z0	;platform downM84 ;steppers offG90 ;absolute positioning

 

I tested combinations of starting with a UM2 SD card print, then Octopi and the other way around, and whilst the retraction / extrusion at the end and start of prints aren't exactly the same, they do seem to be compatible with enough primed in both modes to start the print with a clear run of filament. The Octopi now moves the head to the front left (after the bed heats up) and starts heating the head in that position so it drips down to the front left. Then when its hot, it primes (quite a lot) and gets you started with a decent flow.

I am using Cura and UM2 Firmware version 15.04.2

Hope this helps someone else doing the same thing.

Mark

  • Like 1
Link to post
Share on other sites

  • 5 months later...
  • 1 month later...
Posted · Successful Result : Octopi Start and End GCode for UM2

Anything that works for pause and resume?

On resume I'd like to extrude, then go to the last XY position, then lower the head again.

Of cause in the resume-script for Octoprint I have no idea what the last XY positon was.

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

    • Our picks

      • The Ultimaker Showcase — October 14. What's new?
        Your dear friends at Ultimaker have some exciting news and insights for you!
         
        • 0 replies
      • New here? Get ahead with a free onboarding course
        Hi,
         
        Often getting started is the most difficult part of any process. A good start sets you up for success and saves you time and energy that could be spent elsewhere. That is why we have a onboarding course ready for
        Ultimaker S5 Pro Bundle, Ultimaker S5, Ultimaker S3 Ultimaker 2+ Connect.   
        They're ready for you on the Ultimaker Academy platform. All you need to do to gain access is to register your product to gain free access. 
        Ready? Register your product here in just 60 seconds.
          • Like
        • 8 replies
    ×
    ×
    • Create New...