Not on Layerchange, but directly at the print start. as soon as the prime line is layed down.
Currently i have reached a point, where i set the Cooling Fan Speed once, to a desired Value, like for sample 10 % on the Screen, after that every time a print starts, and colling thinks it would be needed it kicks up to that 10 %.
So far, so good. Now i just need to find a way to tell the Printer to freaking use the Aux-Fan-Setting from filament tab for that value instead of some ive set on the screen…
I really dont know why bambu does such a crap, ist that bambus way to force people into the H-Series ?
**
Current Start:
**
;M1002 set_flag extrude_cali_flag=1
;M1002 set_flag g29_before_print_flag=1
;M1002 set_flag auto_cali_toolhead_offset_flag=1
;M1002 set_flag build_plate_detect_flag=1
;======== P2S start gcode==========
;===== 2025/11/18 =====
M140 S[bed_temperature_initial_layer_single] ; heat heatbed first
M993 A0 B0 C0 ; nozzle cam detection not allowed.
M400
;=====printer start sound ===================
M17
M400 S1
M1006 S1
M1006 A53 B9 L50 C53 D9 M50 E53 F9 N50
M1006 A56 B9 L50 C56 D9 M50 E56 F9 N50
M1006 A61 B9 L50 C61 D9 M50 E61 F9 N50
M1006 A53 B9 L50 C53 D9 M50 E53 F9 N50
M1006 A56 B9 L50 C56 D9 M50 E56 F9 N50
M1006 A61 B18 L50 C61 D18 M50 E61 F18 N50
M1006 W
;=====printer start sound ===================
M620 M ;enable remap
G389
;===== avoid end stop =================
G91
G380 S2 Z22 F1200
G380 S2 Z-12 F1200
G90
;===== avoid end stop =================
;===== reset machine status =================
M204 S10000
M630 S0 P1
G90
M17 D ; reset motor current to default
M960 S5 P1 ; turn on logo lamp
G90
M220 S100 ;Reset Feedrate
M1002 set_gcode_claim_speed_level: 5
M221 S100 ;Reset Flowrate
M73.2 R1.0 ;Reset left time magnitude
G29.1 Z{+0.0} ; clear z-trim value first
M983.1 M1
M982.2 S1 ; turn on cog noise reduction
M983.4 S0
;===== reset machine status =================
;===== start to heat heatbed & hotend==========
M1002 gcode_claim_action : 2
M1002 set_filament_type:{filament_type[initial_no_support_extruder]}
M104 S140 A
G29.2 S0 ; avoid invalid abl data
;===== first homing start =====
M1002 gcode_claim_action : 13
G28 X T300
G150.3
M972 S24 P0
M972 S26 P0 C0
M972 S42 P0 T5000
G150.1 F8000 ; wipe mouth to avoid filament stick to heatbed
G90
G1 X128 Y128 F30000
G28 Z P0 T400
M400
;===== first homign end =====
;===== detection start =====
M1002 gcode_claim_action : 11
M104 S{nozzle_temperature_initial_layer[initial_no_support_extruder]-80} A ; rise temp in advance
M972 S19 P0 T5000 ;plate type detection
;===== detection end =====
;===== prepare print temperature and material ==========
M400
M211 X0 Y0 Z0 ;turn off soft endstop
M975 S1 ; turn on input shaping
G29.2 S0 ; avoid invalid abl data
G150.3
{if ((filament_type[initial_no_support_extruder] == “PLA”) || (filament_type[initial_no_support_extruder] == “PLA-CF”) || (filament_type[initial_no_support_extruder] == “PETG”)) && (nozzle_diameter[initial_no_support_extruder] == 0.2)}
M620.10 A0 F74.8347 H{nozzle_diameter[initial_no_support_extruder]} T{flush_temperatures[initial_no_support_extruder]} P{nozzle_temperature_initial_layer[initial_no_support_extruder]} S1
M620.10 A1 F74.8347 H{nozzle_diameter[initial_no_support_extruder]} T{flush_temperatures[initial_no_support_extruder]} P{nozzle_temperature_initial_layer[initial_no_support_extruder]} S1
{else}
M620.10 A0 F{flush_volumetric_speeds[initial_no_support_extruder]/2.405360} H{nozzle_diameter[initial_no_support_extruder]} T{flush_temperatures[initial_no_support_extruder]} P{nozzle_temperature_initial_layer[initial_no_support_extruder]} S1
M620.10 A1 F{flush_volumetric_speeds[initial_no_support_extruder]/2.405360} H{nozzle_diameter[initial_no_support_extruder]} T{flush_temperatures[initial_no_support_extruder]} P{nozzle_temperature_initial_layer[initial_no_support_extruder]} S1
{endif}
M620.11 P0 L0 I[initial_no_support_extruder] E0
M620.11 K0 I[initial_no_support_extruder] R0
M620 S[initial_no_support_extruder]A ; switch material if AMS exist
M1002 gcode_claim_action : 4
M1002 set_filament_type:UNKNOWN
M400
T[initial_no_support_extruder]
M400
M628 S0
M629
M400
M1002 set_filament_type:{filament_type[initial_no_support_extruder]}
M621 S[initial_no_support_extruder]A
M104 S{nozzle_temperature_initial_layer[initial_no_support_extruder]}
M400
M106 P1 S0
M400
G29.2 S1
;===== prepare print temperature and material ==========
;===== auto extrude cali start =========================
M975 S1
M1002 judge_flag extrude_cali_flag
M622 J0
M983.3 F{filament_max_volumetric_speed[initial_no_support_extruder]/2.4} A0.4 ; cali dynamic extrusion compensation
M623
M622 J1
M1002 set_filament_type:{filament_type[initial_no_support_extruder]}
M1002 gcode_claim_action : 8
M109 S{nozzle_temperature[initial_no_support_extruder]}
G90
M83
M983.3 F{filament_max_volumetric_speed[initial_no_support_extruder]/2.4} A0.4 ; cali dynamic extrusion compensation
M400
M106 P1 S255
M400 S5
M106 P1 S0
G150.3
M623
M622 J2
M1002 set_filament_type:{filament_type[initial_no_support_extruder]}
M1002 gcode_claim_action : 8
M109 S{nozzle_temperature[initial_no_support_extruder]}
G90
M83
M983.3 F{filament_max_volumetric_speed[initial_no_support_extruder]/2.4} A0.4 ; cali dynamic extrusion compensation
M400
M106 P1 S255
M400 S5
M106 P1 S0
G150.3
M623
;===== auto extrude cali end =========================
{if hold_chamber_temp_for_flat_print}
M1002 gcode_claim_action : 58
M104 S{first_layer_temperature[initial_no_support_extruder]}
{if bed_temperature_initial_layer_single > 89}
M1030 S1800
{else}
M1030 S300
{endif}
M1030 C
{endif}
{if filament_type[current_extruder] == “TPU” || filament_type[current_extruder] == “PVA”}
{else}
M83
G1 E-3 F1800
M400 P500
{endif}
G150.2
G150.1 F8000
G150.2
G150.1 F8000
G91
G1 Y-16 F12000 ; move away from the trash bin
G90
M400
M104 S{nozzle_temperature_initial_layer[initial_no_support_extruder]-80} A
;===== wipe right nozzle start =====
M1002 gcode_claim_action : 14
G150 T{nozzle_temperature_initial_layer[initial_no_support_extruder]}
M400
{if filament_type[current_extruder] == “PC”}
M109 S170 A
{else}
M109 S140 A
{endif}
G91
G1 Z5 F1200
G90
M400
G150.1
;===== wipe left nozzle end =====
;===== mech mode sweep start =====
M1002 gcode_claim_action : 3
G90
G1 X128 Y128 F20000
G1 Z5 F1200
M400 P200
M970.3 Q1 A5 K0 O1
M970.2 Q1 K1 W74 Z0.01
M974 Q1 S2 P0
M970.3 Q0 A7 K0 O1
M970.2 Q0 K1 W74 Z0.01
M974 Q0 S2 P0
M975 S1
M400
;===== mech mode sweep end =====
;===== bed leveling ==================================
M1002 gcode_claim_action : 54
M190 S[bed_temperature_initial_layer_single]; ensure bed temp
M109 S140 A
M106 S0 ; turn off fan , too noisy
M1002 judge_flag g29_before_print_flag
M622 J1
M1002 gcode_claim_action : 1
{if hold_chamber_temp_for_flat_print}
G29 H
{else}
G29 A1 X{first_layer_print_min[0]} Y{first_layer_print_min[1]} I{first_layer_print_size[0]} J{first_layer_print_size[1]}
{endif}
M400
M500 ; save cali data
M623
M622 J2
M1002 gcode_claim_action : 1
{if hold_chamber_temp_for_flat_print}
G29 H
{else}
G29 A2 X{first_layer_print_min[0]} Y{first_layer_print_min[1]} I{first_layer_print_size[0]} J{first_layer_print_size[1]}
{endif}
M400
M500 ; save cali data
M623
M622 J0
G28
M623
G29.2 S1
G28
;===== bed leveling end ================================
M985.1 U0 E2
M985.1 U1 E2
M104 S[nozzle_temperature_initial_layer] A
G150.3 ; move to garbage can to wait for temp
;===== wait temperature reaching the reference value =======
M190 S[bed_temperature_initial_layer_single]
;========turn off light and fans =============
M960 S1 P0 ; turn off laser
M960 S2 P0 ; turn off laser
M106 S0 ; turn off cooling fan
;===== wait temperature reaching the reference value =======
M1002 gcode_claim_action : 255
M400
M975 S1 ; turn on mech mode supression
;============switch again==================
M211 X0 Y0 Z0 ;turn off soft endstop
G91
G1 Z6 F1200
G90
M1002 set_filament_type:{filament_type[initial_no_support_extruder]}
M620 S[initial_no_support_extruder]A
M400
T[initial_no_support_extruder]
M400
M628 S0
M629
M400
M621 S[initial_no_support_extruder]A
;============switch again==================
;===== for Textured PEI Plate , lower the nozzle as the nozzle was touching topmost of the texture when homing ==
{if curr_bed_type==“Textured PEI Plate”}
G29.1 Z{0.01} ; for Textured PEI Plate
{else}
G29.1 Z{0.03}
{endif}
;===== nozzle load line ===============================
M1002 gcode_claim_action : 51
G29.2 S1 ; ensure z comp turn on
G90
M83
M109 S{nozzle_temperature_initial_layer[initial_no_support_extruder]}
G0 X100 Y0 F24000
M400
;G130 O0 X100 Y-0.4 Z0.8 F{filament_max_volumetric_speed[initial_no_support_extruder]/2/2.4053} L40 E20 D5
G130 O0 X100 Y-0.2 Z0.6 F{filament_max_volumetric_speed[initial_no_support_extruder]/2/2.4053} L40 E12 D4
G90
M83
G1 Z0.5
M400
;===== noozle load line end ===========================
M1002 gcode_claim_action : 0
G29.99
{if (filament_type[initial_no_support_extruder] == “TPU”) ||
(filament_type[initial_no_support_extruder] == “PLA”) || (filament_type[initial_no_support_extruder] == “PETG”)}
M1015.3 S1 H[nozzle_diameter];enable tpu, pla and petg clog detect
{else}
M1015.3 S0;disable clog detect
{endif}
{if (filament_type[initial_no_support_extruder] == “PLA”) || (filament_type[initial_no_support_extruder] == “PETG”)
|| (filament_type[initial_no_support_extruder] == “PLA-CF”) || (filament_type[initial_no_support_extruder] == “PETG-CF”)}
M1015.4 S1 K1 H[nozzle_diameter] ;enable E air printing detect
{else}
M1015.4 S0 K0 H[nozzle_diameter] ;disable E air printing detect
{endif}
M620.6 I[initial_no_support_extruder] W1 ;enable ams air printing detect
M1010 Q0 B0.023 S0.01
M1010 Q1 B0.005 S0.01
M1010.1 S1
**
Current Layer Change:
**
; progress update
M73 L{layer_num+1}
M991 S0 P{layer_num} ;notify layer change
**
Current Filament Change:
**
;======== P2S filament_change gcode ==========
;===== 2025/11/10 =====
M620 S[next_extruder]A
M204 S9000
{if toolchange_count > 1 && (z_hop_types[current_extruder] == 0 || z_hop_types[current_extruder] == 3)}
G17
G2 Z{z_after_toolchange + 0.4} I0.86 J0.86 P1 F10000 ; spiral lift a little from second lift
{endif}
;nozzle_change_gcode
G1 Z{max_layer_z + 3.0} F1200
M400
M106 P1 S0
{if toolchange_count == 2}
; get travel path for change filament
;M620.1 X[travel_point_1_x] Y[travel_point_1_y] F21000 P0
;M620.1 X[travel_point_2_x] Y[travel_point_2_y] F21000 P1
;M620.1 X[travel_point_3_x] Y[travel_point_3_y] F21000 P2
{endif}
{if ((filament_type[current_extruder] == “PLA”) || (filament_type[current_extruder] == “PLA-CF”) || (filament_type[current_extruder] == “PETG”)) && (nozzle_diameter[current_extruder] == 0.2)}
M620.10 A0 F74.8347 L[flush_length] H{nozzle_diameter[current_extruder]} T{flush_temperatures[current_extruder]} P[old_filament_temp] S1
{else}
M620.10 A0 F{flush_volumetric_speeds[current_extruder]/2.4053*60} L[flush_length] H{nozzle_diameter[current_extruder]} T{flush_temperatures[current_extruder]} P[old_filament_temp] S1
{endif}
{if ((filament_type[next_extruder] == “PLA”) || (filament_type[next_extruder] == “PLA-CF”) || (filament_type[next_extruder] == “PETG”)) && (nozzle_diameter[next_extruder] == 0.2)}
M620.10 A1 F74.8347 L[flush_length] H{nozzle_diameter[next_extruder]} T{flush_temperatures[next_extruder]} P[new_filament_temp] S1
{else}
M620.10 A1 F{flush_volumetric_speeds[next_extruder]/2.4053*60} L[flush_length] H{nozzle_diameter[next_extruder]} T{flush_temperatures[next_extruder]} P[new_filament_temp] S1
{endif}
{if long_retraction_when_cut}
M620.11 P1 L0 I[current_extruder] E-{retraction_distance_when_cut} F{max((flush_volumetric_speeds[current_extruder]/2.4053*60), 200)}
{else}
M620.11 P0 L0 I[current_extruder] E0
{endif}
M620.11 K0 I[current_extruder] R0
T[next_extruder]
;deretract
{if filament_type[next_extruder] == “TPU”}
{else}
{if filament_type[next_extruder] == “PA”}
;VG1 E1 F{max(new_filament_e_feedrate, 200)}
;VG1 E1 F{max(new_filament_e_feedrate/2, 100)}
{else}
;VG1 E4 F{max(new_filament_e_feedrate, 200)}
;VG1 E4 F{max(new_filament_e_feedrate/2, 100)}
{endif}
{endif}
; VFLUSH_START
{if flush_length>41.5}
;VG1 E41.5 F{min(old_filament_e_feedrate,new_filament_e_feedrate)}
;VG1 E{flush_length-41.5} F{new_filament_e_feedrate}
{else}
;VG1 E{flush_length} F{min(old_filament_e_feedrate,new_filament_e_feedrate)}
{endif}
SYNC T{ceil(flush_length / 80) * 5}
; VFLUSH_END
M1002 set_filament_type:{filament_type[next_extruder]}
M400
M83
{if next_extruder < 255}
M620.10 R{retract_length_toolchange[filament_map[next_extruder]-1]}
M628 S0
;VM109 S[new_filament_temp]
M629
M400
M983.3 F{filament_max_volumetric_speed[next_extruder]/2.4} A0.4 R{retract_length_toolchange[filament_map[next_extruder]-1]}
M400
G1 Z{max_layer_z + 3.0} F3000
{if layer_z <= (initial_layer_print_height + 0.001)}
M204 S[initial_layer_acceleration]
{else}
M204 S[travel_acceleration]
{endif}
{else}
G1 X[x_after_toolchange] Y[y_after_toolchange] Z[z_after_toolchange] F12000
{endif}
M621 S[next_extruder]A
{if (filament_type[next_extruder] == “PLA”) || (filament_type[next_extruder] == “PETG”)
|| (filament_type[next_extruder] == “PLA-CF”) || (filament_type[next_extruder] == “PETG-CF”)}
M1015.4 S1 K1 H[nozzle_diameter] ;enable E air printing detect
{else}
M1015.4 S0 K0 H[nozzle_diameter] ;disable E air printing detect
{endif}
M620.6 I[next_extruder] W1 ;enable ams air printing detect
G1 Y256 F18000
;not set fan changing filament