#Help with start gcode using printer variables

1 messages · Page 1 of 1 (latest)

coarse night
#

Hey hey lovely people, I have tweaked my start gcode to pre-heat the chamber.
Most of the time it works, but at times the toolhead doesn't go where I expect it to be.
I expect the toolhead to be at the center of the printer, but sometimes it simpy doesn't move.

I feel like I am making a dumb mistake, any idea of what I am missing ?

Gcode:

;;===== date: 20240520 =====================
;printer_model:[printer_model]
;initial_filament:{filament_type[initial_extruder]}
;curr_bed_type:{curr_bed_type}
M8213 ; Turn on light
M400 ; wait for buffer to clear
M220 S100 ;Set the feed speed to 100%
M221 S100 ;Set the flow rate to 100%
M104 S140
G90

{if chamber_temperature[initial_no_support_extruder]> 20} ; Heat the Chamber
M106 S250
M400
G1 Z130 ; Set Buildplate at half height for better heat dissipation

;; === THIS LINE IS THE ONE THAT SEEM TO FAIL
G1 X{print_bed_max[0]*0.5} Y{print_bed_max[1]*0.5} F12000


M400
 {if bed_temperature[initial_no_support_extruder] >60}
 M140 S110
 {elsif bed_temperature[initial_no_support_extruder] <60}
 M140 S60
 {endif}
M106 S250
M400
TEMPERATURE_WAIT SENSOR=box MINIMUM=[chamber_temperature]
M140 S[bed_temperature_initial_layer_single] ; initiate cooldown for printing
M106 S0
{endif}
M190 S[bed_temperature_initial_layer_single]
G28 ; home
M729 ; Clean Nozzle

;;==== Quick calibration after heatsoak
M8210 S[bed_temperature_initial_layer_single] ;Set bed_mesh_temp
BED_MESH_CALIBRATE METHOD=fast  ;Run 6x6 calibration at temp



;[...stock start gcode]
wintry egret
#

G28 probably needs to be before your fail-line

coarse night
#

It may be, I'll test on my next print

wintry egret
#

you can also do the home twice if you think position might change after the frame heats up

#

gemini says:

{% if "xyz" not in printer.toolhead.homed_axes %}
    G28
{% endif %}
floral glacier
#

Your code is similar to mine. Didn't work until I placed a M400, so Idk why yours won't work. I leave you the link to my code and you can work it out from there: https://www.reddit.com/r/ElegooCentauriCarbon/comments/1qmg4ct/starting_gcode_with_chamber_temperature_open/

So, I installed Open Centauri because they added a feature that lets you start the print only after the chamber gets to a minimun temperature. This…

coarse night