Using parameters to apply different K factors
 
Notifications
Clear all

Using parameters to apply different K factors  

  RSS
Mattelec
(@mattelec)
New Member
Using parameters to apply different K factors

I had the idea of using a custom filament Gcode, where it determines the K-factor by using the parameters filament_type and nozzle_diameter. However it doesn't work, maybe something is broken in my code. Anybody has tried this?

My code:

 M900 K{if filament_type[0]==PLA and nozzle_diameter[0]==0.4}0.05{elsif filament_type[0]==PLA and nozzle_diameter[0]==0.6}0.04{elsif filament_type[0]==PETG and nozzle_diameter[0]==0.4}0.08{endif} ; Filament gcode

Best Answer by FoxRun3D:

Try

if filament_type[0]=="PLA"

etc. Quotes around the text

Posted : 02/02/2022 6:21 pm
FoxRun3D
(@foxrun3d)
Illustrious Member
RE:

Try

if filament_type[0]=="PLA"

etc. Quotes around the text

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

Posted : 02/02/2022 8:03 pm
Mattelec liked
Mattelec
(@mattelec)
New Member
Topic starter answered:
RE: Using parameters to apply different K factors

That solve the issue. I didn't think about it being a string variable

Posted : 02/02/2022 8:18 pm
Share: