1. Got a question or need help troubleshooting? Post to the troubleshooting forum or Search the forums!

Multi Color Printing Process detailed and explained

Discussion in 'Projects' started by tesseract, Aug 4, 2013.

  1. tesseract

    tesseract Moderator
    Staff Member

    Joined:
    Feb 20, 2013
    Messages:
    1,924
    Likes Received:
    533
    Ok today I made my first successful multi-colored print nothing fancy but want to try it out
    notice I said successful print that is the one on the left the one on eth right was my previous attempt due to ay slipping issue exasperated by this process you can see the results.
    The slippage issue has been resolved hopefully permanently so I expect my prints to be much better from now on.

    But I have been asked by a couple people how I did this so I will explain it here so you all will know
    2013-08-04 13.11.14.jpg

    The first thing to know is that Repetier-Host allows you to edit the gcode created by the Slic3r utility.
    and we will be doing some editing

    Here is a sample of the snippet of code I used
    and contains all the commands you need to use

    G1 X120.102 Y133.102 E498.63816
    G1 Z20.000 F7200.00
    G1 X10.00 Y100.00
    @pause Change Filament
    G1 X120.102 Y133.102
    G1 Z5.000 F7200.000



    I will explain these as I go
    the purple code is the code I added for this section

    The last line is probably the most critical and is the starting point of the process
    this tells the z axis to move to 5.000mm and do it at a speed of 7200.000
    now the scale of the speed is unimportant so what we have is the G1 command which tells an axis to move the next part is teh axis it is talking to and the last part is how fast to do it
    Now you will have to use a bit of logic and your desired affect to help you find the right location to add code like this I wanted it to do it every 5mm so I would be on the look out for a move to 5.000, and 10.000.
    the first base you dont have to worry about just where you want changes to occurs so 5 and 10
    so what I do is find those locations and then add my code which is similar but not exactly the same as I will explain
    the first line I add is to move the nozzle up from the print so I move z upward
    now knowing my print I know that 20 is out of the range of the print since it only goes to 15mm so 20 was a good choice
    So I entered to move it up
    G1 Z20.000 F7200.000

    I then entered to get me just out from the x home and about in the middle of the Y
    G1 X10.000 Y100.000

    The next command is a repetier-Host exclusive so it probably won't work for other software
    This command is the same as hitting the pause button in the software what happens is a little window pops up and the the message you enter after the pause command is displayed
    so I saw the little window and in it was "Change Filament"
    and a resume button
    @pause Change Filament

    At this point you can change the filament at your leisure and using you normal process you do not have to worry about moving anything at all if you need to move the axis some simply move it just don't hit the resume button in the software to a make sure all of this extra ,movement is adjusted for I do a few things PRIOR to hitting the resume button.
    I change the filament then I hit the Home all button in the software to bring the printer to home
    (make sure you print is not in this path or it will be impacted with)
    once this is done THEN you can hit the resume button and back to the gcode we go

    Remember that first lineof code we haven't talked about it yet so here is why it is not need to run the color change itself as that will be the last action teh printer will do BEFORE it starts the color routine but what is need is the values it used

    this says move to this x y position and extrude along the way inotherwords what the printer did last
    the e stands for extrude
    G1 X120.102 Y133.102 E498.63816

    We want to start right where it left off and because we home our printer all the movements you made while changing the filament are cancelled out we simply tell it to go back to that same position this time without extruding
    G1 X120.102 Y133.102

    The last line is simply the line it was going to go to next prior to you pause function
    It is not highlighted as it is part of the original code
    G1 Z5.000 F7200.000

    This process needs to be repeated for every color change you want to perform.
    So the X and Y positions will be different most likely for each one so the correct values must be used in each case. In addition the Z axis height you look for will be different as well

    MAKE SURE YOUR CODE TAKES INTO ACCOUNT THE HIGHEST Z AXIS HEIGHT AND THEN ADDS TO IT TO HELP CLEAR THE PRINT

    Now this routine is layer based in that you start it when a certain layer change occurs if that is what you want to do then you can now do it.

    So in a nutshell in the above code the purple code is what I add using information from the first line(actually the last line of code executed) and the purple code is placed right in front of the layer change command you want to perform the filament change on.

    Looking through the code itself you should be able to identify where the z axis changes simply look for the G1 z???.???? F????.??? block of code where the z value is the layer height you want to make the change in. Good luck and enjoy.

    If you completely screw up the gcode you can always re build it in slic3r and start again before you print.

    WARNING:: YOU ARE DEALING DIRECTLY WITH THE GCODE FOR YOUR PRINT THIS CODE CONTROLS MOVEMENTS WHICH ARE DONE BY MOTORS LOGIC IS IN PLACE TO HANDLE MOST THINGS LIKE IMPACTS WITH PRINTS AND GOING BEYOND THE BED EDGE BUT IT IS DONE IN THE SOFTWARE AND THE GENERATED CODE IS BASED ON THAT LOGIC THE CODE ABOVE DOES NOT CONTAIN ANY SUCH LOGIC SO IT IS UP TO THE INDIVIDUAL TO ACCURATELY DETERMINE IF THESE EVENTS ARE COMPENSATED FOR. FAILURE TO DO SO COULD CAUSE UNWANTED IMPACT WITH THE PRINT AND/OR FIXTURES SURROUNDING THE BUILDING AREA OR THE BED ITSELF AND COULD CAUSE DAMAGE TO OCCUR MAKE ANY CHANGES RECOMMENDED HERE AT YOUR OWN RISK.

    Felt I needed to say that just to make sure but I will try and answer any questions you have about this and I for one would start on something small and simple like the 15mm cube or possibly the 5step pyramid all in different colors would be neat.

    The single caveat I also want to make is that this code does nothing to change the temperature of the hot end I sued teh same exact settings for all three filaments you may find this does not work for you.

    One last things this is actually to change filaments and that includes types as well (PLA, NYLON ABS, LAYWOOD) but with this you will probably need more developed code to handle the temps as well.

    Good luck and enjoy this new aspect of your ROBO3D printers
     
    2 people like this.
  2. keraynopoylos

    keraynopoylos New Member

    Joined:
    Feb 21, 2013
    Messages:
    131
    Likes Received:
    28
    Thanks for this.

    Shouldn't you extrude(manually?) -right after you change the filament and before you hit "resume"- a bit in order to get rid of the leftovers of the previous color?
     
  3. tesseract

    tesseract Moderator
    Staff Member

    Joined:
    Feb 20, 2013
    Messages:
    1,924
    Likes Received:
    533
    I actually do this when I insert the new filament. I guess it is part of my filament change process after I open up the top I remove the old filament and load the new filament in and then I manually push the filament through until all the old is purged. THEN I close everything up. I didn't mention it because it was part of my normal change over process and assumed it was for others as well.

    You are right that is a step that must take place prior to the resume whether it is done manually as I do it or through the software to get rid of the old material.

    The other aspect to consider is this step ensures an abrupt change and in this case it is good but IF a subtle change of is the desired affect then the purging process need not take place. That being said it won't be a subtle change that happens over several layers it will probably happen during the current layer(depending on the size) sometime you just wont have any control as to when.

    Most of the time I would think this is a necessary step.
     
  4. SteveC

    SteveC Well-Known Member

    Joined:
    Jun 12, 2013
    Messages:
    894
    Likes Received:
    316
    Hi Jeff,

    I took a look at the details and have a suggested change to the G code that will make lifting the extruder away from the print a bit more foolproof. Just change to relative coordinates with G91 before raising the head then change back to absolute coordinates with G90 after lifting. This way you don't need to know the max height of the print and can't mess it up.

    G1 X120.102 Y133.102 E498.63816
    G1 Z20.000 F7200.00 ; replace this with the three lines below
    G91 ; change to relative coordinates​
    G1 Z10.000 F7200.000; Raise Z and arbitrary 5mm to get extruder out of the way​
    G90 ; go back to absolute coordinates​
    G1 X10.00 Y100.00
    @pause Change Filament
    G1 X120.102 Y133.102
    G1 Z5.000 F7200.000​

    The 5mm lift can be changed to whatever clearance you want from the current layer. Let me know if this helps.

    Steve
     
  5. tesseract

    tesseract Moderator
    Staff Member

    Joined:
    Feb 20, 2013
    Messages:
    1,924
    Likes Received:
    533
    That probably will help but I have a method I use now that for me yields these results pretty much on the fly with no change to gcode at all I have posted on that process witha disclaimer but it does work for me and others that have tried it

    This response was simply to show the OP how I used my old process and that it was similar to his and could probably help

    2013-11-23 08.56.32.jpg 2014-01-25 00.45.36.jpg colorchangetray.jpg colorchangevase.jpg colorchangevase2.jpg colorchangevaselrg2.jpg colorchgpuzzle.jpg colorchgpuzzlepart.jpg spheres100array.jpg spherescloseup.jpg xmastree6.jpg
     
  6. SteveC

    SteveC Well-Known Member

    Joined:
    Jun 12, 2013
    Messages:
    894
    Likes Received:
    316
    Where is this other method posted? Search on multi color only results in this post and perhaps the dual extruder posts.
     
  7. tesseract

    tesseract Moderator
    Staff Member

    Joined:
    Feb 20, 2013
    Messages:
    1,924
    Likes Received:
    533

Share This Page