M600 and you

Have you been using services on sites like ColorPrint to perform your color changes? Have you ever experienced the service not working when you needed it the most?

Well look no further! You can do this directly in Slic3r PE with relative ease, and in this post I'm gonna take you through the process step by step.

What you will need:

  • Slic3r PE
  • At least two different colored filaments, preferrably of the same type.

What you will wish you had if you don't have it:

  • Tweezers or small pliers
prusa lcd

Step one

Locate the tab printer settings and create a duplicate of your favorite printer settings by choosing it and then clicking the floppy disc icon. Name it accordingly.

And don't worry, this won't engage your floppy drive.

Step two

Locate the the section labelled Custom G-code in the tab for printer settings.

Scroll down to the heading After layer change G-code and paste the following code:

; LAYER: [layer_num], Z HEIGHT: [layer_z]

{if layer_num == 45}M600 ; Color change {endif}

If you want to do more filament swaps, just duplicate the last row like so:

{if layer_num == 45}M600 ; Color change 1 {endif}
{if layer_num == 65}M600 ; Color change 2 {endif}
{if layer_num == 85}M600 ; Color change 3 {endif}

prusa color change 1

Step three

Choose your file to be sliced, choose your settings and slice it.

Step four

Click the preview tab in the main window and use the slider to the right to identify the layer number where you want the color change to happen. Note that it will happen AFTER the layer which you are viewing has printed.

prusa color change 2

Step five and possibly final step

Once you have chosen your layer, go ahead and find your way back to that code part which you pasted in the section for After layer change G-code.

Change the number 45 (65, 85) to your desired layer number.

If something doesn't add up or a layer number of something like 15 shows up at a z height of 2 mm printing 0,20 mm high layers, don't worry. You probably are printing with supports which throws your intuition off a bit. The layer number is correct 🙂

In the case pictured above, I would have gone for a color change after layer number 3 had printed, so I would input 3 as my layer for color change.

Slice it again, export your g-code or send to your octoprint server and print! 🙂

Final bonus step

If this worked for you, feel free to share this link to anyone you think might benefit from it.

Please become a member and join us over at Prusa Community Forum on Facebook and discuss printers and fun stuff with us.

8 thoughts on “M600 and you”

  1. OK, so what happens when the colour-change layer is printed? Does the extruder pause and wait for a filament change? You haven’t really explained what to do!

    1. Hi Tony!

      You’re right, I didn’t explain what to do and that’s because of 1) an original prusa guides you through it and 2) it might look different on other marlin printers and I wanted this guide to be somewhat universal.

      That being said, there is great documentation for what M600 does. Here is one resource: http://marlinfw.org/docs/gcode/M600.html

  2. For anyone interested I think it’s easier to use this code:
    {if layer_z==23.8}M600{endif}
    instead of the one in the article in the after layer change g-code.

Leave a Reply

Your email address will not be published. Required fields are marked *