Notifications
Clear all

Filament Gcode Run Command  

  RSS
LS4 3DPrinting
(@ls4-3dprinting)
Member
Filament Gcode Run Command

Hi I am trying to setup a custom start gcode for my filaments on a custom printer.   But I would like to call it in the middle of the printer start gcode.    I have a heated chamber and with the expansion that causes many parts of the heatup procedure can change based on a different filament.     What I would like is for the printer to do basic homing from start gcode.  Then go to the filament gcode to do heating.  The go back to the printer start gcode to do the nozzle priming/wipe before print starts.     Is there a gcode place holder that I can use to tell it to run the filament start code on that line?   If not where would the best place to request that feature be?

Best Answer by bobstro:

Posted by: @ls4-3dprinting

Those commands are part of it and I am using them. But I also need chamber temperatures for each filament and dwell times on heat up are different to allow heat soak for consistent z offset. 

Ah, I see. So far as I know, there are no PrusaSlicer placeholders for those values. There is also no way to define a variable that can be used in gcode. You have to enter the gcode and settings by hand and you're doing that in the custom gcode for each filament now, correct?

One thing you can try that is not very graceful but should work is to insert your filament-specific gcode into the Notes field under Filament Settings. You can then simply insert [filament_notes] into your PrusaSlicer custom startup gcode to get the desired sequence. It doesn't save you a lot of effort and you have to be certain to keep the note syntax correct. I've not experimented with this myself yet, but I do use [filament_notes] to name gcode output files and it works without surprises. You do have to make sure that this field contains ONLY legitimate startup gcode for all your filament profiles. The default Prusa filament profiles have other stuff in there. You can probably do this with a conditional check.

A post-processor script is another possibility, but you'd have to extract the desired settings out of the final generated gcode.

It might be worth opening a feature request for these extra values over on the PrusaSlicer GitHub pages.

Napsal : 23/02/2021 5:29 am
bobstro
(@bobstro)
Illustrious Member
RE: Filament Gcode Run Command

At present, any custom gcode in your printer profile is added after your startup gcode. There's no current way to change this inside PrusaSlicer. However, from your description, it sounds like what you're really after are the placeholders (aka variables) that correspond to the filament and bed temperatures and can be used in startup gcode. To set the 1st layer temperatures for your filament in startup gcode, you can use the following placeholders:

  • [first_layer_bed_temperature]
  • [first_layer_temperature] 

Just place these in the sequence of your startup routine that you want the temperatures to be set and PrusaSlicer will substitute the placeholders with the settings from your filament profile.

I've got a bunch of notes on PrusaSlicer gcode here that you might find helpful.

My notes and disclaimers on 3D printing

and miscellaneous other tech projects
He is intelligent, but not experienced. His pattern indicates two dimensional thinking. -- Spock in Star Trek: The Wrath of Khan

Napsal : 23/02/2021 6:59 am
LS4 3DPrinting
(@ls4-3dprinting)
Member
Topic starter answered:
RE: Filament Gcode Run Command

Those commands are part of it and I am using them. But I also need chamber temperatures for each filament and dwell times on heat up are different to allow heat soak for consistent z offset.  Those need to come before the purge and wipe that is done right before the print.   At the moment I have all of those things in the start gcode of the machine and have to change them for each filament.    It is why I would like to run them in the middle.   Homing commands first.  Then call filament for heating cycles. Then go back for purge and wipe.   I could see someone wanting to run them before homing as well if the heat swell changed how the homing sensors triggered on their machine.    On my machine difference in z offset from PLA temperature to PEEK is over 3mm from how much everything moves.  That is not missing a decimal.  

Also thanks for those notes they were indeed very useful in setting up the starting gcode for the machine.

This post was modified před 4 years by LS4 3DPrinting
Napsal : 23/02/2021 7:45 am
bobstro
(@bobstro)
Illustrious Member
RE: Filament Gcode Run Command
Posted by: @ls4-3dprinting

Those commands are part of it and I am using them. But I also need chamber temperatures for each filament and dwell times on heat up are different to allow heat soak for consistent z offset. 

Ah, I see. So far as I know, there are no PrusaSlicer placeholders for those values. There is also no way to define a variable that can be used in gcode. You have to enter the gcode and settings by hand and you're doing that in the custom gcode for each filament now, correct?

One thing you can try that is not very graceful but should work is to insert your filament-specific gcode into the Notes field under Filament Settings. You can then simply insert [filament_notes] into your PrusaSlicer custom startup gcode to get the desired sequence. It doesn't save you a lot of effort and you have to be certain to keep the note syntax correct. I've not experimented with this myself yet, but I do use [filament_notes] to name gcode output files and it works without surprises. You do have to make sure that this field contains ONLY legitimate startup gcode for all your filament profiles. The default Prusa filament profiles have other stuff in there. You can probably do this with a conditional check.

A post-processor script is another possibility, but you'd have to extract the desired settings out of the final generated gcode.

It might be worth opening a feature request for these extra values over on the PrusaSlicer GitHub pages.

My notes and disclaimers on 3D printing

and miscellaneous other tech projects
He is intelligent, but not experienced. His pattern indicates two dimensional thinking. -- Spock in Star Trek: The Wrath of Khan

Napsal : 23/02/2021 2:55 pm
LS4 3DPrinting se líbí
LS4 3DPrinting
(@ls4-3dprinting)
Member
Topic starter answered:
RE: Filament Gcode Run Command

@bobstro

Wow! That does exactly what I wanted it to. Thanks!   

Napsal : 23/02/2021 8:46 pm
LS4 3DPrinting
(@ls4-3dprinting)
Member
Topic starter answered:
RE: Filament Gcode Run Command

@bobstro

Thanks again.  I finally have a way to just select profiles and print with this printer and still have it do exactly what I want.  Putting [filament_notes] does indeed grab everything and drop it right in the start code.   Of note it won't substitute place holders, but it does work!

Napsal : 23/02/2021 10:58 pm
bobstro
(@bobstro)
Illustrious Member
RE: Filament Gcode Run Command

Glad it works for you. Definitely make a feature request on GitHub as those sound like reasonable placeholders to support. The notes fields at least provide some flexibility.

My notes and disclaimers on 3D printing

and miscellaneous other tech projects
He is intelligent, but not experienced. His pattern indicates two dimensional thinking. -- Spock in Star Trek: The Wrath of Khan

Napsal : 24/02/2021 6:27 am
Share: