Notifications
Clear all

Conditional GCode for toolchanges  

  RSS
tim.o14
(@tim-o14)
Eminent Member
Conditional GCode for toolchanges

Hi Everyone,

I wanted to control the temperature better during the toolchanges between filaments of different printing temperatures. For example, this conditional code would super helpful. In essence, what I am trying to do is purge material at higher temp, then switch to the next tool's printing temperature after purging. Does anyone know how I would be able to do this in Prusa slicer via toolchange / filament specific GCodes?

 

Better said, in my 'pseudocode'

Fact: Tool 1 printing temperature is > Tool 2 printing temperaure.

CODE:

If TOOLCHANGE = T1 to T2

Finish wipe tower

Perform Tool Change

Maintain T1 Temperature

Purge on wipe tower

Change to T2 Temperature

Resume Print

 

If Toolchange = T2 to T1

Finish wipe tower

perform tool change

Change to T1 Temperature and wait

Purge on wipe tower

Resume print

What I have been doing is going through and manually changing everything, a big pain.. any help is much appreciated!

 

Tim

Posted : 23/12/2020 6:12 am
karl-herbert
(@karl-herbert)
Illustrious Member
RE: Conditional GCode for toolchanges
Posted by: @tim-o14

Hi Everyone,

I wanted to control the temperature better during the toolchanges between filaments of different printing temperatures. For example, this conditional code would super helpful. In essence, what I am trying to do is purge material at higher temp, then switch to the next tool's printing temperature after purging. Does anyone know how I would be able to do this in Prusa slicer via toolchange / filament specific GCodes?

 

Better said, in my 'pseudocode'

Fact: Tool 1 printing temperature is > Tool 2 printing temperaure.

CODE:

If TOOLCHANGE = T1 to T2

Finish wipe tower

Perform Tool Change

Maintain T1 Temperature

Purge on wipe tower

Change to T2 Temperature

Resume Print

 

If Toolchange = T2 to T1

Finish wipe tower

perform tool change

Change to T1 Temperature and wait

Purge on wipe tower

Resume print

What I have been doing is going through and manually changing everything, a big pain.. any help is much appreciated!

 

Tim

Maybe this macro will help you. I use it in Prusaslicer for multi-material prints.

real MM

works reliably and flawlessly 👍 

Statt zu klagen, dass wir nicht alles haben, was wir wollen, sollten wir lieber dankbar sein, dass wir nicht alles bekommen, was wir verdienen.

Posted : 23/12/2020 3:13 pm
tim.o14
(@tim-o14)
Eminent Member
Topic starter answered:
RE: Conditional GCode for toolchanges

I keep receiving this error-- see the attached photo.

 

Any idea?

 

Cheers,
Tim

Posted : 03/01/2021 2:00 am
tim.o14
(@tim-o14)
Eminent Member
Topic starter answered:
RE: Conditional GCode for toolchanges

I copied the link to the python file in the post-processing scripts section under Print Settings

Posted : 03/01/2021 2:02 am
Share: