Pause to change filament colour?
-
Thanks, I did manage to do it manually but that means being there at the right time. Seems like an obvious thing to add to the slicer programs.
-
Request it as a feature on the relevant github page. Having the ability to insert custom gcode at layer x, would be quite a powerful feature.
-
I believe Prusa has made an utility for this purpose.
-
@keithw I tried using this script on my duetwifi and when it hit the layer height I chose the extruder moved homed and turned off everything and said the file was completed. That's not what suppose to do!
-
I follow the same path as @DjDemonD:
- Produce your GCODE.
- Look at the results of the slicer and determine which layer you want to do your color change.
- Open the GCODE using a text editor
- Search for Layer X, where X is the layer you want to change on.
- Insert M226 line where you want the pause.
- Repeat for all required pauses.
- Upload to printer
For M226 to do its job perfectly for your printer, you need to setup pause.g and resume.g appropriately. For reference, my pause.g looks like this:
M83 ; relative extrusion
G1 E-2 F3600 ; retract 2mm
G91 ; relative motion
G1 Z5 F6000 ; up 5mm
G90 ; absolute motion
G1 X5 Y5 F6000 ; swap spot
G1 E-100 F200 ; eject
M18 E0 ; disable extruder motor
M18 E1 ; disable extruder motorI disable the extruder motor so that I can manually feed the new filament into the extruder to prime it fully. Once I hit resume on the UI, resume.g executes:
G1 R1 Z5 F6000
G1 R1 F500This uses R1, which is used to return the head to it's previous position, though I override Z so that it positions the head 5mm above where it needs to be at speed, I then return completely to the actual position where we left off lowering Z slowly at the final step. Somewhere during the move, I usually poke something under the extruder to clear any ooze before the head finally gets back to work.
-
@blitzreg said in Pause to change filament colour?:
@keithw I tried using this script on my duetwifi and when it hit the layer height I chose the extruder moved homed and turned off everything and said the file was completed. That's not what suppose to do!
In most 3D printer firmwares (including RRF) M0 terminates the print. Instead of G1 X10 Y5\nM0 you should just use M226 to pause the print.
-
Using s3d, I have
{REPLACE "; layer 6" "M226/n; layer 6"}
in the 'Additional terminal commands for post processing' box under the scripts tab
Obviously change 6 for the layer number you want to stop at
Just comment it out with a ; if you don't need a stop -
Hi dc42, appreciate the help! So, if you wrote the script what would it look like? to pause at a specific layer height to change out filament? I did like where there was a popup on the screen and showed Z axis and the layer number it was currently on. What I did not like was all the blue boxes popping up on my computer blocking out everything on the duetwifi IP browser control. Changing out filament at a specific layer is where I've been beating my head against the wall!!!! I tried using S3D and make 2 processes with 2 files but the problem is getting them to line up on the Z axis. Please help and show the entire script file you would use to make it do the layer pause. I have an H800 Afinia and there you just punch in the layer numbers you want and it does it automatically. I would be nice if the duetwifi LCD under the pause had this option where you could pick a layer line number to pause at. Thanks again for your help, Larry
-
@dc42 I put the reply message in the wrong place. I was asking you if you could show us the full script file where you could pause at a specific layer height and also display on the LCD. I'm using your LCD that came with my duetwifi. I love this controller! Lot of people ask me about it and all I give is praise! I've built the hypercube evolution and using for my fishing tackle business. I'm trying to make lures that are 2 color with a single nozzle and need to pause at certain layer height. I'm pretty busy doing other things and it would be nice fo set a layer height and have it beep at me when it gets to that layer height and pause. so all my lure bodies are the same. I'm only running a single titan aero nozzle with a volcano. My program is S3D. Appreciate any help! Larry
-
@adrian52 Can you show me your entire script you have under Additional Terminal commands for pausing the print. Do you have it where is displays on the LCD and beeps when it pauses? Thanks, Larry
-
@blitzreg The line in my previous post is it. I just use dwc, and only have one printer, so I hang around for the pause, then change the filament, and hit resume. I have also used the same method to insert captive nuts. Adrian
-
@adrian52 I just ran your line for pause in script. I set it for layer 81. I do have a raft. So, what happened it paused at layer 84 and when I hit resume it left a 1mm gap in between two halfs. Any ideas?
-
@blitzreg said in Pause to change filament colour?:
Hi dc42, appreciate the help! So, if you wrote the script what would it look like? to pause at a specific layer height to change out filament? I did like where there was a popup on the screen and showed Z axis and the layer number it was currently on. What I did not like was all the blue boxes popping up on my computer blocking out everything on the duetwifi IP browser control. Changing out filament at a specific layer is where I've been beating my head against the wall!!!! I tried using S3D and make 2 processes with 2 files but the problem is getting them to line up on the Z axis. Please help and show the entire script file you would use to make it do the layer pause. I have an H800 Afinia and there you just punch in the layer numbers you want and it does it automatically. I would be nice if the duetwifi LCD under the pause had this option where you could pick a layer line number to pause at. Thanks again for your help, Larry
I would use Adrian's script,but in front of the M226 command I would insert 'M117 Change filament\n' to display a message too.
-
@blitzreg said in Pause to change filament colour?:
@adrian52 I just ran your line for pause in script. I set it for layer 81. I do have a raft. So, what happened it paused at layer 84 and when I hit resume it left a 1mm gap in between two halfs. Any ideas?
Have you tested your pause and resume macro files, by pausing a print and then resuming it?
-
@dc42 I just test it and its not working right. I've posted it here so you can look at the pause and resume files.
pause.g
; pause.g
; called when a print from SD card is paused
;
; generated by RepRapFirmware Configuration Tool on Sun May 20 2018 02:01:02 GMT-0700 (Pacific Daylight Time)
M83 ; relative extruder moves
G1 E-10 F3600 ; retract 10mm of filament
G91 ; relative positioning
G1 Z5 F360 ; lift Z by 5mm
G90 ; absolute positioning
G1 X0 Y0 F6000 ; go to X=0 Y=0resume.g
; resume.g
; called before a print from SD card is resumed
;
; generated by RepRapFirmware Configuration Tool on Sun May 20 2018 02:01:02 GMT-0700 (Pacific Daylight Time)
G1 R1 X0 Y0 Z5 F6000 ; go to 5mm above position of the last print move
G1 R1 X0 Y0 ; go back to the last print move
M83 ; relative extruder moves
;G1 E10 F3600 ; extrude 10mm of filament -
@dc42 Looks like in my resume.g its not going right where it left off but 5mm higher
-
@blitzreg I may have found the problem. It retracts 10mm at pause and the when it goes to resume there is a ; in front of extruding 5mm back. So when the nozzle starts to print there is no plastic until it catches up.
-
@dc42 Ok, the pause and resume .g files are working when I click on the lcd pause and resume. But when the script runs in S3D I'm getting a 1mm gap in between the model. I put the script bellow. Not sure if its a filament extruding problem. Maybe I should prime it more until it comes out of the nozzle.
-
@blitzreg Yes I do small extrudes from dwc until the new filament is coming through properly, then retrieve dangling filament just before hitting resume. Generally gives a seamless transition.
-
@blitzreg, this line in resume.g:
G1 R1 X0 Y0 ; go back to the last print move
should have a Z0 parameter too. But I'm not sure that is causing the problem.