Notifications
Clear all

Multiple filament G-code issue  

  RSS
Hoof Hearted
(@hoof-hearted)
Trusted Member
Multiple filament G-code issue

I'm trying out the tweak whereby you tell Prusaslicer that the Mini+ has multiple extruders. It sort of works, but I should be able to do better. This all revolves around the custom Tool Change G-code section. I got this code from somewhere:

; eliminate first tool change

{if previous_extruder != -1}

M117 Filament [next_extruder] is next

M601 ; Pause

M400 ; wait until all moves are completed

{endif}

My issue is that the message displayed by the M117 command is only on the display for a couple of seconds and then gets wiped out by the M601 pause command. So if you're not stood there looking at the display, then you don't know which filament is required next. 

I tried adding a G4 S5 command after the M117 in order to increase the length of time the message is displayed. This works, but during the 5 seconds delay, the nozzle is still in contact with the model and gently oozing filament. So I hit on the idea of raising the extruder and lowering it again afterwards. I added the following commands before the M117:

G91 ; relative positioning mode

G1 Z10 ;lift the extruder 10mm

G90 ; go back to absolute positioning

After the pause I do a G91,G1 Z-10,G90 to restore the original height. This all works, but after the subsequent filament change, there is almost zero filament being extruded. I can feel the filament moving backwards and forwards. It seems that it is retracting almost the same amount that it is extruding. So the net effect is almost zero extrusion. When I remove the above code which raises the extruder, it starts printing normally again.

Can anyone explain what I am doing wrong?

 

 

This topic was modified 5 months ago 2 times by Hoof Hearted
Posted : 27/05/2024 12:39 pm
Hoof Hearted
(@hoof-hearted)
Trusted Member
Topic starter answered:
RE: Multiple filament G-code issue

I should have added that the filament changes are completely normal. I see the usual amount of purging taking place. I also tried using a wipe tower. This didn't change anything. The wipe tower was almost non-existent also.

Posted : 27/05/2024 12:52 pm
Hoof Hearted
(@hoof-hearted)
Trusted Member
Topic starter answered:
RE: Multiple filament G-code issue

I've been doing some more trials....

I've found now that if I remove the G1 Z10 command, and just leave the G91 and G90 in there, the issue still persists. If I take out the G91 and leave the G90, the issue still persists. When I take out the G90, it prints normally again.  

To prove a point, I've removed everything except the G90 and M600 (See attached) and the problem still persists. 

So can anyone tell me why the G90 stops the filament flowing. I'm pretty sure that the tiny bit I am seeing is the normal oozing that occurs for a little while after printing. Once again, I can feel the filament advancing and retracting, but it's equal amounts in both directions. 

 

Posted : 27/05/2024 8:02 pm
Hoof Hearted
(@hoof-hearted)
Trusted Member
Topic starter answered:
RE:

I found this interesting post where it was mentioned that extrusion failed after a script, and that an M83 was necessary to put the extruder back into relative mode.

https://forum.prusa3d.com/forum/prusaslicer/extruder-relative-m83-vs-absolute-m82-whats-the-pro-con/

So in my script I put an M83 after the G90 and now the extruder works normally after the filament change, where I have raised the extruder and lowered it afterwards.

I also came up with a work around for the M117 not displaying the appropriate message. I removed the M117 and wrote code  to  emit  beeps to indicate which extruder is next. 3 Beeps for  extruder 3 for example.

It took me a while to work out the necessary syntax for mixing macro language with G-Code. The following code works perfectly. If anyone can suggest a better way to  write it, I would be interested to see it.

{

local extruder_no=0;

if previous_extruder != -1 then

extruder_no=next_extruder+1;

"G91

";"G1 Z10

";"M300 S40 P100

";"G4 P200

";

if extruder_no > 1 then

"M300 S40 P100

";"G4 P200

";

endif

if extruder_no > 2 then

"M300 S40 P100

";"G4 P200

";

endif

"M600

";"G1 Z-10

";"G90

";"M83

";

endif

}

This post was modified 5 months ago by Hoof Hearted
Posted : 29/05/2024 12:20 pm
Share: