I have been manually editing my start gcode macro every time I change filament to change the temperature. I know there is a way to automate this process but I have had trouble understanding how to use variable. I would like to know how to set up variables in the start macro and change those variables in Cura slicer using my existing filament profiles.
here is my existing start gcode:
M190 S100 #heat bed
G28 #home
BED_MESH_CALIBRATE PROFILE="default" #auto bed level
G0 X110 Y110 Z10
G1 X0 Y0 Z10 F4000.0 #move to start position
M109 S240 #heat nozzle
[gcode_macro START_PRINT]
gcode:
{% set BED_TEMP = params.BED_TEMP|default(60)|float %}
{% set EXTRUDER_TEMP = params.EXTRUDER_TEMP|default(200)|float %}
M190 S{BED_TEMP}
M109 S{EXTRUDER_TEMP}
G28 ;Home
BED_MESH_PROFILE LOAD=default
G92 E0 ;Reset Extruder
G1 Z2.0 F3000 ;Move Z Axis up
G1 X10.1 Y20 Z0.28 F5000.0 ;Move to start position
G1 X10.1 Y200.0 Z0.28 F1500.0 E15 ;Draw the first line
G1 X10.4 Y200.0 Z0.28 F5000.0 ;Move to side a little
G1 X10.4 Y20 Z0.28 F1500.0 E30 ;Draw the second line
G92 E0 ;Reset Extruder
G1 Z2.0 F3000 ;Move Z Axis up
Ideally the slicer should be able to do it but I have my start gcode in Klipper, if I try to put the exact same gcode into the slicer I run into weird errors and can’t start a print.
Same problem. the value of print temperature for filament in Cura 5.5.0 is not used. the temperature used is the temperature given in begining of printer.cfg for variable_defaultTempNozzle
So i must edit printer.cfg each time i change filament.
Any idea ?
Thanks in advance for any help