Bed temperature on change filament in gcode macro global var

Hello…
complete newbie on klipper :smiley:
I need help if possible…

i’m using a SV08

Before I start a print…
Home the printer,
pre-heat, put head 5mm above bed,
give 5 minutes +/- to get a good first layer…

Press start print…

The machine does:

Home, quad gantry, clean nozzle, home, probe pressure, heat nozzle and print.

Everything ok…

But if I choose other filament that uses more temperature…

When the machine starts to calibrate the temp of the bed drops to 65°

That’s not ok…

The first layer will be defective because difference of temp (20°C) on calibrate…

I saw on macro.cfg

that uses:

[gcode_macro _global_var]

to calibrate the printer…

And there

“variable_bed_mesh_calibrate_target_temp: 65”

How can I change that?

Maybe create a command line to get the pre-heat bed or choosed temp…?

Hello @Lc1975 !

You did as most newbies do: Who care for the template? So lets delete it.

PLEASE attach the klippy.log to your next post.

Do you correctly pass the slicer parameters to the Klipper start macro?

2 Likes

sorry :slight_smile:
the rush of wanting to learn and have the printer working

i use orca sv08 profiles, i didn’t any pass parameters to the klipper…
until now using pla and working great.
i clean the logs files… going to repeat everything to get a new log file…

Macro.cfg (21.4 KB)
printer.cfg (11.4 KB)

i have this configuration

Please attach the klippy.log

klippy (1).log (296.6 KB)

when start the print
[gcode_macro START_PRINT]
when starts to using the macro
[gcode_macro _global_var]
for calibration
override the temps from the gcode generated?

[gcode_macro _global_var]
variable_pause_park:{‘x’: 0, ‘y’: 0, ‘z’: 10, ‘e’: 1}
variable_cancel_park:{‘x’: 0, ‘y’: 350, ‘z’: 10, ‘e’: 1}
variable_z_maximum_lifting_distance: 345
variable_pause_resume_travel_speed: 150
variable_bed_mesh_calibrate_target_temp: 65 <<<<<< the issue?
variable_load_filament_extruder_temp: 230 #250
gcode:

how to change this if possible to get the temp of the bed on pre-heated or from the gocde file…?

Where do these macros come from? IMO the START_PRINT macros does not make any sense as it does not take any temperatures from the slicer.

Do yourself a favor and do not use macros that you do not understand. Most likely you do not need them either in this case.

The macro is from sovol sv08 stock firmware
Can’t do nothing on the slicer because the macro “start print” gets that variable of the temperature to start calibrate the bed.
I can only change the 65° if I go to the file and change to 80 or other value to mesh and probe at the temperature that is going to be used…
To pla is correct, but if I choose asa, abs or other filament I have to manually change the value.

See Using START_PRINT and END_PRINT Macros how such macros SHOULD work.
I do not know what Sovol is doing here or intends to do. In doubt, it might be best to contact them directly.
Another approach would be to get rid of this macro hell and use only stuff you need.

I search others (not sovol) and I didn’t see that macro or similar…
It’s better to change…
Thanks for try to help me :v:

Just for anybody reading this:
While it may work somehow, this is not a proper solution. This is a complete “macro mess” without rhyme or reason. It also completely defies the purpose of the START_PRINT macro.

In addition, the command:

M140 S0 START_PRINT BED_TEMP=[first_layer_bed_temperature] EXTRUDER_TEMP=[first_layer_temperature] MATERIAL=[filament_type]

is completely wrong and luckily gracefully ignored by Klipper.

I believe you…

That’s the guide that I had…
And works…

Before that didn’t work well when probing and calibrate the printer before start a print…

On the macro the only thing switched:

Comment the
variable_bed_mesh_calibrate_target_temp: 65

Add:

{% set extruder_target_temp = params.EXTRUDER_TEMP|default(printer.extruder.target|int) %}
{% set bed_target_temp = params.BED_TEMP|default(printer.heater_bed.target|int) %}
{action_respond_info(“Check Heating!”)}

The rest is as stock version.
Works…
:man_shrugging:t2:

SOVOL SV08

3D Printer control panel:

Calibrate ZOffset No good for PETG. This is good for PLA. KEEPS CHANGING BACK TO 65, no matter what I do e.g. TUNE values, etc

macro,cfg

Changing; still changed back to 65 on the heat bed

variable_bed_mesh_calibrate_target_temp: 85 # EDIT Calibrate ZOffset No good for PETG. This is good for PLA. KEEPS CHANGING BACK TO 65, no matter what I do e.g. TUNE values etc


variable_bed_mesh_calibrate_target_temp: 65 # EDIT Calibrate ZOffset No good for PETG. This is good for PLA. KEEPS CHANGING BACK TO 65, no matter what I do e.g. TUNE values etc

and

[gcode_macro _CALIBRATION_ZOFFSET]
gcode:
    M117 Calibrate Offset
    QUAD_GANTRY_LEVEL
    M140 S85 # EDIT Calibrate ZOffset No good for PETG. This is good for PLA. KEEPS CHANGING BACK TO 65, no matter wat I do e.g. variable_bed_mesh_calibrate_target_temp: 65 # EDIT Calibrate ZOffset No good for PETG. This is good for PLA. KEEPS CHANGING BACK TO 65, no matter what I do e.g. TUNE values, etc
    G4 P500
    CLEAN_NOZZLE
    G4 P500
    M117 zoffset calibration
    Z_OFFSET_CALIBRATION

P.S. Z_OFFSET_CALIBRATION I can not find this??

I do not believe SOVOL SV08 is a full version of Klipper

In the end I hat to remover PETG and put back in PLA to carry out a working Calibrate ZOffset

I am now about to try putting PETG back in…

Hello @Sovol_user !

Could you please format your code withe the Preformatted Text feature of the forum editor. Things are better readable then.
Format

here what i did and now works well:

in orcaslicer on the begining oh the printer settings “machine gcode” :

G28
G90
M104 S0 ; Stops OrcaSlicer from sending temp waits separately
M140 S0 START_PRINT BED_TEMP=[first_layer_bed_temperature] EXTRUDER_TEMP=[first_layer_temperature] MATERIAL=[filament_type]
M190 S[bed_temperature_initial_layer_single] ;wait for bed temp
M109 S[nozzle_temperature_initial_layer];wait for extruder temp
START_PRINT

if is the same the begining of your macro you can copy and paste…

[gcode_macro _CALIBRATION_ZOFFSET]
gcode:
    M117 Calibrate Offset
    QUAD_GANTRY_LEVEL
    {% set mesh_calibrate_temp = printer['gcode_macro _global_var'].bed_mesh_calibrate_target_temp|int if printer.heater_bed.target<10 else printer.heater_bed.target|int %}    # new line to temp calibration to other filament
    {% set current_target_temp  = printer.heater_bed.target|int %}
[gcode_macro QUAD_GANTRY_LEVEL]
rename_existing:QUAD_GANTRY_LEVEL_BASE
gcode:
    {% set mesh_name = "default" %}
    {% set mesh_calibrate_temp = printer['gcode_macro _global_var'].bed_mesh_calibrate_target_temp|int if printer.heater_bed.target<10 else printer.heater_bed.target|int %}   # new line to temp calibration to other filament
    {% set current_target_temp  = printer.heater_bed.target|int %}
[gcode_macro PROBE_CALIBRATE]
rename_existing:PROBE_CALIBRATE_BASE
gcode:
    {% set current_target_temp  = printer.heater_bed.target|int %}
    {% set z_offset_calibrate_temp = printer['gcode_macro _global_var'].bed_mesh_calibrate_target_temp|int if printer.heater_bed.target<10 else printer.heater_bed.target|int %}    # new line to temp calibration to other filament
[gcode_macro BED_MESH_CALIBRATE]
rename_existing: BED_MESH_CALIBRATE_BASE
gcode:
    
    {% set mesh_name = "default" %}
    {% set mesh_calibrate_temp = printer['gcode_macro _global_var'].bed_mesh_calibrate_target_temp|int if printer.heater_bed.target<10 else printer.heater_bed.target|int %}   # new line to temp calibration to other filament
    {% set current_target_temp  = printer.heater_bed.target|int %}
[gcode_macro START_PRINT]
description: 
variable_state: 'Prepare'
variable_record_extruder_temp:0
variable_max_record_extruder_temp:0
gcode:
    {% set mesh_name = "default" %}
    {% set mesh_calibrate_temp = printer['gcode_macro _global_var'].bed_mesh_calibrate_target_temp|int if printer.heater_bed.target<10 else printer.heater_bed.target|int %}   # new line to temp calibration to other filament
    {% set extruder_target_temp = printer.extruder.target|int %}
    {% set bed_targer_temp = printer.heater_bed.target|int %}
1 Like

Does it look better now, THANK YOU for the advice

1 Like

Hi. I was facing the same “problem”, and I just modify slicer and the actual Macro for Quad-Gantry.

Slicer:

M117
M190 S0
M109 S0
QUAD_GANTRY_LEVEL BED_TEMP=[first_layer_bed_temperature] 
PRINT_START EXTRUDER_TEMP={first_layer_temperature[initial_tool]} BED_TEMP=[first_layer_bed_temperature] 

Macro QGL:

[gcode_macro QUAD_GANTRY_LEVEL]
rename_existing:QUAD_GANTRY_LEVEL_BASE
gcode:
    {% set BED_TEMP = params.BED_TEMP|default(60)|float %}
    M140 S{BED_TEMP} #Start heating
    HOME #G28
    M190 S{BED_TEMP} #Wait for heating
    G90
    G0 Z1 #Probe near bed to heat up
    G4 P120000 #Wait 2 minutes after reach temperature
    G90
    G0 Z5 #Actual height to QGL
    QUAD_GANTRY_LEVEL_BASE
    #M140 S0

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.