G-Code to set the loaded filament type for a given tool?
 
Notifications
Clear all

G-Code to set the loaded filament type for a given tool?  

  RSS
Meerman
(@meerman)
Active Member
G-Code to set the loaded filament type for a given tool?

I'm giving Colorfabb's allPHA a try and need to create some custom G-Code to load it to the printer, since its maximum recommended print temperature (200ºC) is much lower than the lowest choice on the Prusa XL's "Load filament" menu: PLA @ 215ºC.

So far I've been able to load filament by setting the temperature manually using the on-screen controls, and then printing a tiny G-code file which only contains the one command:

M701

This works a treat. But when I then try to print an actual mode, I of course get a warning about mismatched filament types, because the sliced G-Code contains the line:

; filament_type = PHA

How do I modify my custom filament load G-Code to set the type to "PHA", so I can avoid this warning (and feel good about seeing "PHA" within the on-screen menus)?

Posted : 04/03/2024 12:06 pm
FoxRun3D
(@foxrun3d)
Famed Member
RE:

I don't think there's a way to change the onscreen menu without recompiling the firmware. But I don't see why that particular filament shouldn't load fine at PLA temperature. Higher temp shouldn't be an issue. 

Formerly known on this forum as @fuchsr -- until all hell broke loose with the forum software...

Posted : 04/03/2024 7:17 pm
Meerman
(@meerman)
Active Member
Topic starter answered:
RE: G-Code to set the loaded filament type for a given tool?

If the temperature is too high, the filament doesn't just melt it literally drips from the nozzle like it was water. Sometimes accompanied by an ugly puff of some sort of gas.

More to the point, I want to avoid the warning when I start a print that the loaded filament does not match the G-Code.

Posted : 17/03/2024 12:38 pm
Marc
 Marc
(@marc-9)
Estimable Member
RE: G-Code to set the loaded filament type for a given tool?

melt it literally drips from the nozzle like it was water. Sometimes accompanied by an ugly puff

For me that sounds like moisture in the filament. Especially the "puff"

to avoid the warning when I start a print that the loaded filament does not match the G-Code

Have you made a profile based on PLA?
If you load it als PLA and make a filament profile for allPHA in Prusaslicer based on PLA that shouldn't be an issue. See [Filament Settings] => [Advanced] => [Filament properties] => [Filament type].

You only get that warning if the filament type loaded doesn't match the type used in the slicer. 

Posted : 17/03/2024 2:19 pm
Diem
 Diem
(@diem)
Illustrious Member

With the increasing range of materials becoming available do we need an 'Other' option with settable load temperatures?

Thoughts?

Cheerio,

Posted : 17/03/2024 3:03 pm
Meerman
(@meerman)
Active Member
Topic starter answered:
RE: G-Code to set the loaded filament type for a given tool?

For me that sounds like moisture in the filament. Especially the "puff"

I thought so too. The filament is dry (~11% relative humidity according to the hygrometer in the dry box I keep it in), so I can only think that the moister got into the filament while it was sitting in the nozzle for a few weeks? Still odd as it is enclosed in PTFE tubing all the way between the extruder and the dry-box. At any rate, it only happens during loading and unloading, so thus far it's not been a problem during printing. 🤷

With the increasing range of materials becoming available do we need an 'Other' option with settable load temperatures?

Personally I would really like that. I had a read of the Prusa Buddy Firmware source code and think I found my way around it. It seems to record the filament type as an enum (i.e. an integer) and so must be one of:

  • PLA
  • PETG
  • PETG_NH ("No heatbed")
  • ASA
  • PC
  • PVB
  • ABS
  • HIPS
  • PP
  • PA
  • FLEX

(Based on my reading of https://github.com/prusa3d/Prusa-Firmware-Buddy/blob/master/src/common/filament.cpp#L11 )

So my strategy is to abuse one of the types I don't personally use, such as PA. Of course I don't want the nozzle at PA's 285ºC when I am loading allPHA, I want it at, say, 190ºC. So I've created some tiny G-Code files I can print when I want to load allPHA:

M109 S190   ; Set and wait for nozzle temperature
M701 S"PA"  ; Load to nozzle, set type to "PA"

This is based on my reading of the Prusa Buddy firmware-specific G-codes. I'll edit my allPHA filament profile to declare itself as "PA" as well which should keep the XL's pre-print filament type check useful to me.

Another which caught my eye was M1600 Change filament menu, which looks like it might let me set the filament type after the fact. However when I tried it the printer initiated a filament unload procedure which I aborted, so I don't know what state it would leave things in.

Posted : 17/03/2024 4:41 pm
Share: