Hi all,
I’m a quite new user of an A1 mini, found this interesting blog here, so my question might be a bit stupid
I created a copy of a filament and placed the gCode to the extended settings / start-gCode. then I sliced my model and was surprised about the ~doubling of the preparation time. After starting the print, I saw both temperatures were increased in parallel, but also this noisy calibration process started, so obviously the optimation does not work as expected.
Firmware and Studio are at latest software release (gCode version I don’t know where to find).
So any ideas what I did wrong?
Thanks in advance
Firmware says “latest” on the screen: 01.33.01.02
Software says 1.10.1.50 and I just downloaded that last week.
It’s not a huge amount of material, but I get one small purge, the printer prints it’s little test line at the edge of the bed, and then returns for another purge. I have not modified the G Code or changed any of the defaults.
It is not mean to to be implemented into filament gcode, but startup of the printer.
While this works, I would suggest read up a little on the matter to gain better understanding before doing such big changes on your machine.
In the bambu studio program, before you send anything to print, you have the chance to modify the printer profile and filament profile etc. Don’t worry, you will easily find them.
Yes, I thought doing this filament-based is easy and with ‘little risc’, but I fully agree to keep my hands off the printer until getting more knowledge, so thanks for your response
My preference would be to prioritize less oozing (meaning I dont need to be next to the printer to remove it manually) over saving 10-20 seconds. The main goal of this gcode modification for me is getting rid of the xy-mech.
Id super appreciate if you can provide a version that uses the factory setting for the bed and nozzle heating, and yours for the xy-mech. Thanks!
I posted what I learn in an earlier reply. You can simply comment out the M970 and M974 in your factory g-code to disable the xy mech.
BTW, I am updating a newer version 1.2 here, using some clever tricks to minimise both the oozing and the initial string. (now both are better than the factory default). Check out the changelog. I list details.
I’ve developed a new method to reduce leakage when the nozzle is heated. The new approach optimises the heating sequence to minimise oozing by reduce the nozzle heating period and also adding a filament retraction when the heating starts. Specifically, the nozzle now begins heating only when the bed temperature is 4 degrees below the target temperature.
For example, in a print job where the nozzle target is 220°C and the bed target is 70°C, the nozzle will start heating when the bed reaches 66°C. As soon as the nozzle reaches 220°C, it immediately draws the flush bar without hesitation. (The bed temperature already reaches your target 70°C some time in advance) This represents the logically minimal oozing for the A1 mini while still share heating and saving startup time.
Reducing Initial Stringing:
To further minimise the initial stringing, I’ve added a snappy clearing movement. After the initial 1 flush bar, the hotend will make a quick, sharp swipe movement to the right (X-axis to 150mm). This action effectively thins out or completely swipe off the initial stringing.
;===== machine: A1 mini =========================
;===== date: 20240620 =====================
;===== modified by KK v1.2 =====================
;===== start to heat heatbead&hotend==========
M1002 gcode_claim_action : 2
M1002 set_filament_type:{filament_type[initial_no_support_extruder]}
M104 S140
M140 S{bed_temperature_initial_layer_single-4} ; heat to -4 degree
G392 S0 ;turn off clog detect
M9833.2
;=====start printer sound ===================
M17
M400 S1
M1006 S1
M1006 A0 B0 L100 C37 D10 M100 E37 F10 N100
M1006 A0 B0 L100 C41 D10 M100 E41 F10 N100
M1006 A0 B0 L100 C44 D10 M100 E44 F10 N100
M1006 A0 B10 L100 C0 D10 M100 E0 F10 N100
M1006 A43 B10 L100 C39 D10 M100 E46 F10 N100
M1006 A0 B0 L100 C0 D10 M100 E0 F10 N100
M1006 A0 B0 L100 C39 D10 M100 E43 F10 N100
M1006 A0 B0 L100 C0 D10 M100 E0 F10 N100
M1006 A0 B0 L100 C41 D10 M100 E41 F10 N100
M1006 A0 B0 L100 C44 D10 M100 E44 F10 N100
M1006 A0 B0 L100 C49 D10 M100 E49 F10 N100
M1006 A0 B0 L100 C0 D10 M100 E0 F10 N100
M1006 A44 B10 L100 C39 D10 M100 E48 F10 N100
M1006 A0 B0 L100 C0 D10 M100 E0 F10 N100
M1006 A0 B0 L100 C39 D10 M100 E44 F10 N100
M1006 A0 B0 L100 C0 D10 M100 E0 F10 N100
M1006 A43 B10 L100 C39 D10 M100 E46 F10 N100
M1006 W
M18
;=====avoid end stop =================
G91
G380 S2 Z30 F1200
G380 S3 Z-20 F1200
G1 Z5 F1200
G90
;===== reset machine status =================
M204 S6000
M630 S0 P0
G91
M17 Z0.3 ; lower the z-motor current
G90
M17 X0.7 Y0.9 Z0.5 ; reset motor current to default
M960 S5 P1 ; turn on logo lamp
G90
M83
M220 S100 ;Reset Feedrate
M221 S100 ;Reset Flowrate
M73.2 R1.0 ;Reset left time magnitude
;====== cog noise reduction=================
M982.2 S1 ; turn on cog noise reduction
;===== prepare print temperature and material ==========
M400
M18
M109 S80 H170
M104 S140
M400
M17
M400
G28 X
M211 X0 Y0 Z0 ;turn off soft endstop ; turn off soft endstop to prevent protential logic problem
M975 S1 ; turn on
G1 X0.0 F3000
G1 X-13.5 F3000
M620 M ;enable remap
M620 S[initial_no_support_extruder]A ; switch material if AMS exist
G392 S0 ;turn on clog detect
M1002 gcode_claim_action : 4
M400
M1002 set_filament_type:UNKNOWN
M109 S[nozzle_temperature_initial_layer]
M104 S250
M400
T[initial_no_support_extruder]
G1 X-13.5 F3000
M400
M620.1 E F{filament_max_volumetric_speed[initial_no_support_extruder]/2.4053*60} T{nozzle_temperature_range_high[initial_no_support_extruder]}
M109 S250 ;set nozzle to common flush temp
M106 P1 S0
G92 E0
G1 E50 F200
M400
M1002 set_filament_type:{filament_type[initial_no_support_extruder]}
M104 S{nozzle_temperature_range_high[initial_no_support_extruder]}
G92 E0
G1 E50 F{filament_max_volumetric_speed[initial_no_support_extruder]/2.4053*60}
M400
M106 P1 S178
G92 E0
G1 E5 F{filament_max_volumetric_speed[initial_no_support_extruder]/2.4053*60}
M109 S{nozzle_temperature_initial_layer[initial_no_support_extruder]-20} ; drop nozzle temp, make filament shink a bit
M104 S{nozzle_temperature_initial_layer[initial_no_support_extruder]-40}
G92 E0
G1 E-0.5 F300
G1 X0 F30000
G1 X-13.5 F3000
G1 X0 F30000 ;wipe and shake
G1 X-13.5 F3000
G1 X0 F12000 ;wipe and shake
G1 X0 F30000
G1 X-13.5 F3000
M109 S{nozzle_temperature_initial_layer[initial_no_support_extruder]-40}
G392 S0 ;turn off clog detect
M621 S[initial_no_support_extruder]A
M400
M106 P1 S0
;===== prepare print temperature and material end =====
;===== mech mode fast check============================
M1002 gcode_claim_action : 3
G0 X25 Y175 F20000 ; find a soft place to home
;M104 S0
G28 Z P0 T300; home z with low precision,permit 300deg temperature
G29.2 S0 ; turn off ABL
M104 S140
; build plate detect
M1002 judge_flag build_plate_detect_flag
M622 S1
G39.4
M400
M623
G1 Z5 F3000
G1 X90 Y-1 F30000
M400 P200
;shaking removed M970.3 Q1 A7 K0 O2
;shaking removed M974 Q1 S2 P0
G1 X90 Y0 Z5 F30000
M400 P200
;shaking removed M970 Q0 A10 B50 C90 H15 K0 M20 O3
;shaking removed M974 Q0 S2 P0
M975 S1
G1 F30000
G1 X-1 Y10
G28 X ; re-home XY
;===== wipe nozzle ===============================
M1002 gcode_claim_action : 14
M975 S1
M104 S140 ; set temp down to heatbed acceptable
M106 S100 ; turn on fan (G28 has turn off fan)
M211 S; push soft endstop status
M211 X0 Y0 Z0 ;turn off Z axis endstop
M83
G1 E-1 F500
G90
M83
M109 S140
M104 S140
G0 X90 Y-4 F30000
G380 S3 Z-5 F1200
G1 Z2 F1200
G1 X91 F10000
G380 S3 Z-5 F1200
G1 Z2 F1200
G1 X92 F10000
G380 S3 Z-5 F1200
G1 Z2 F1200
G1 X93 F10000
G380 S3 Z-5 F1200
G1 Z2 F1200
G1 X94 F10000
G380 S3 Z-5 F1200
G1 Z2 F1200
G1 X95 F10000
G380 S3 Z-5 F1200
G1 Z2 F1200
G1 X96 F10000
G380 S3 Z-5 F1200
G1 Z2 F1200
G1 X97 F10000
G380 S3 Z-5 F1200
G1 Z2 F1200
G1 X98 F10000
G380 S3 Z-5 F1200
G1 Z2 F1200
G1 X99 F10000
G380 S3 Z-5 F1200
G1 Z2 F1200
G1 X99 F10000
G380 S3 Z-5 F1200
G1 Z2 F1200
G1 X99 F10000
G380 S3 Z-5 F1200
G1 Z2 F1200
G1 X99 F10000
G380 S3 Z-5 F1200
G1 Z2 F1200
G1 X99 F10000
G380 S3 Z-5 F1200
G1 Z5 F30000
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
G1 X25 Y175 F30000.1 ;Brush material
G1 Z0.2 F30000.1
G1 Y185
G91
G1 X-30 F30000
G1 Y-2
G1 X27
G1 Y1.5
G1 X-28
G1 Y-2
G1 X30
G1 Y1.5
G1 X-30
G90
M83
G1 Z5 F3000
G0 X50 Y175 F20000 ; find a soft place to home
G28 Z P0 T300; home z with low precision, permit 300deg temperature
G29.2 S0 ; turn off ABL
G0 X85 Y185 F10000 ;move to exposed steel surface and stop the nozzle
G0 Z-1.01 F10000
G91
G2 I1 J0 X2 Y0 F2000.1
G2 I-0.75 J0 X-1.5
G2 I1 J0 X2
G2 I-0.75 J0 X-1.5
G2 I1 J0 X2
G2 I-0.75 J0 X-1.5
G2 I1 J0 X2
G2 I-0.75 J0 X-1.5
G2 I1 J0 X2
G2 I-0.75 J0 X-1.5
G2 I1 J0 X2
G2 I-0.75 J0 X-1.5
G2 I1 J0 X2
G2 I-0.75 J0 X-1.5
G2 I1 J0 X2
G2 I-0.75 J0 X-1.5
G2 I1 J0 X2
G2 I-0.75 J0 X-1.5
G2 I1 J0 X2
G2 I-0.75 J0 X-1.5
G90
G1 Z5 F30000
G1 X25 Y175 F30000.1 ;Brush material
G1 Z0.2 F30000.1
G1 Y185
G91
G1 X-30 F30000
G1 Y-2
G1 X27
G1 Y1.5
G1 X-28
G1 Y-2
G1 X30
G1 Y1.5
G1 X-30
G90
M83
G1 Z5
G0 X55 Y175 F20000 ; find a soft place to home
G28 Z P0 T300; home z with low precision, permit 300deg temperature
G29.2 S0 ; turn off ABL
G1 Z10
G1 X85 Y185
G1 Z-1.01
G1 X95
G1 X90
M211 R; pop softend status
M106 S0 ; turn off fan , too noisy
;===== wipe nozzle end ================================
;===== wait heatbed ====================
M1002 gcode_claim_action : 2
M104 S140
;M140 S[bed_temperature_initial_layer_single];set bed temp
G1 Z5 F3000
G29.2 S1
G1 X10 Y10 F20000
;===== bed leveling ==================================
;M1002 set_flag g29_before_print_flag=1
M1002 judge_flag g29_before_print_flag
M622 J1
M1002 gcode_claim_action : 1
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]}
M400
M500 ; save cali data
M623
;===== bed leveling end ================================
;===== home after wipe mouth============================
M1002 judge_flag g29_before_print_flag
M622 J0
M1002 gcode_claim_action : 13
G28 T145
M623
;===== home after wipe mouth end =======================
M975 S1 ; turn on vibration supression
;===== nozzle load line ===============================
M975 S1
G90
M83
T1000
G1 X-13.5 Y0 Z10 F10000
G1 E1.2 F500
M400
M1002 set_filament_type:UNKNOWN
;===============================force both temperature!!!====================
M190 S{bed_temperature_initial_layer_single-4} ; wait till bed -4 degree
M140 S[bed_temperature_initial_layer_single] ;bed keeps heating no stop
M109 S{nozzle_temperature[initial_extruder]-40}
G1 E-3 F300
M109 S{nozzle_temperature[initial_extruder]} ;wait nozzle heat up
M400
M412 S1 ; ===turn on filament runout detection===
M400 P10
G392 S0 ;turn on clog detect
M620.3 W1; === turn on filament tangle detection===
M400 S2
M1002 set_filament_type:{filament_type[initial_no_support_extruder]}
;M1002 set_flag extrude_cali_flag=1
M1002 judge_flag extrude_cali_flag
M622 J1
M1002 gcode_claim_action : 8
M400
M900 K0.0 L1000.0 M1.0
G90
M83
;force bed temperature, no more needed
;M190 S[bed_temperature_initial_layer_single]
;M400
G0 X68 Y-4 F30000
G0 Z0.3 F18000 ;Move to start position
M400
G0 X88 E10 F{outer_wall_volumetric_speed/(24/20) * 60}
G0 X93 E.3742 F{outer_wall_volumetric_speed/(0.3*0.5)/4 * 60}
G0 X98 E.3742 F{outer_wall_volumetric_speed/(0.3*0.5) * 60}
G0 X103 E.3742 F{outer_wall_volumetric_speed/(0.3*0.5)/4 * 60}
G0 X108 E.3742 F{outer_wall_volumetric_speed/(0.3*0.5) * 60}
G0 X113 E.3742 F{outer_wall_volumetric_speed/(0.3*0.5)/4 * 60}
G0 Y0 Z0 F20000
M400
G1 X-13.5 Y0 Z10 F10000
M400
G1 E10 F{outer_wall_volumetric_speed/2.4*60}
M983 F{outer_wall_volumetric_speed/2.4} A0.3 H[nozzle_diameter]; cali dynamic extrusion compensation
M106 P1 S178
M400 S7
G1 X0 F18000
G1 X-13.5 F3000
G1 X0 F18000 ;wipe and shake
G1 X-13.5 F3000
G1 X0 F12000 ;wipe and shake
G1 X-13.5 F3000
M400
M106 P1 S0
M1002 judge_last_extrude_cali_success
M622 J0
M983 F{outer_wall_volumetric_speed/2.4} A0.3 H[nozzle_diameter]; cali dynamic extrusion compensation
M106 P1 S178
M400 S7
G1 X0 F18000
G1 X-13.5 F3000
G1 X0 F18000 ;wipe and shake
G1 X-13.5 F3000
G1 X0 F12000 ;wipe and shake
M400
M106 P1 S0
M623
G1 X-13.5 F3000
M400
M984 A0.1 E1 S1 F{outer_wall_volumetric_speed/2.4} H[nozzle_diameter]
M106 P1 S178
M400 S7
G1 X0 F18000
G1 X-13.5 F3000
G1 X0 F18000 ;wipe and shake
G1 X-13.5 F3000
G1 X0 F12000 ;wipe and shake
G1 X-13.5 F3000
M400
M106 P1 S0
M623 ; end of "draw extrinsic para cali paint"
;===== extrude cali test ===============================
M104 S{nozzle_temperature_initial_layer[initial_extruder]}
G90
M83
;force bed temperature, no more needed
;M190 S[bed_temperature_initial_layer_single]
;M400
G0 X68 Y-2.5 F30000
G0 Z0.3 F18000 ;Move to start position
G0 X88 E10 F{outer_wall_volumetric_speed/(24/20) * 60}
G0 X93 E.3742 F{outer_wall_volumetric_speed/(0.3*0.5)/4 * 60}
G0 X98 E.3742 F{outer_wall_volumetric_speed/(0.3*0.5) * 60}
G0 X103 E.3742 F{outer_wall_volumetric_speed/(0.3*0.5)/4 * 60}
G0 X108 E.3742 F{outer_wall_volumetric_speed/(0.3*0.5) * 60}
G0 X113 E.3742 F{outer_wall_volumetric_speed/(0.3*0.5)/4 * 60}
G0 X115 Z0 F20000
M400
;========turn off light and wait extrude temperature =============
M1002 gcode_claim_action : 0
M400 ; wait all motion done before implement the emprical L parameters
;===== for Textured PEI Plate , lower the nozzle as the nozzle was touching topmost of the texture when homing ==
;curr_bed_type={curr_bed_type}
{if curr_bed_type=="Textured PEI Plate"}
G29.1 Z{-0.02} ; for Textured PEI Plate
{endif}
M960 S1 P0 ; turn off laser
M960 S2 P0 ; turn off laser
M106 S0 ; turn off fan
M106 P2 S0 ; turn off big fan
M106 P3 S0 ; turn off chamber fan
M975 S1 ; turn on mech mode supression
G90
M83
T1000
M211 X0 Y0 Z0 ;turn off soft endstop
M1007 S1
G0 X150 Z1
Update Version 1.3 Ultimate (Potentially the Final Version)
I’ve delved deep into the Bambu’s G-code, working out all the intricacies and functions of every code segment. I’ve performed a big rewrite.
This is a carefully crafted piece with full understanding of the g-code and the machine tricks. You can try it with peace of mind.
v1.3 Changelog:
Utilize the factory “unpause” method to completely clean initial oozing 100%
Reduce and merge redundant movements to save additional time.
Add detailed comments to numerous lines and sections for improved readability and understanding.
Other changes from v1.1 and v1.2
Two Operating Modes:
The Crazy Mode (w/ “Bed Leveling” Unchecked, startup time 1:20):
Runs only safety checks + a quick nozzle wipe
Jumps directly to printing, even before the bed reaches full temperature
Minimizes startup time
Don’t worry about the cooler bed too much, the temperature will catch up soon. All my PETG test prints adhering well enough to the bed…But still, not ideal for tall models with weak bases.
Normal Mode (w/ “Bed Leveling” Checked):
Performs bed leveling while simultaneously heating the bed, so the bed leveling doesn’t really cost you extra time.
Provides a more conservative and thorough startup process.
After deep research into the printer movement logistics, I’d say there’s no further optimization possible without compromising safety. The “crazy mode” 1:20 startup is the best this A1 minion could do. There you go the start g-code v1.3:
;===== machine: A1 mini =========================
;===== date: 20240620 =====================
;===== modified by KK v1.3 =====================
;===== start to heat heatbead&hotend==========
M1002 gcode_claim_action : 2
M1002 set_filament_type:{filament_type[initial_no_support_extruder]}
M104 S140 ; nozzle heat to bed safe temperature
M140 S{bed_temperature_initial_layer_single-4} ; bed heat to -4 degree
G392 S0 ;turn off clog detect
M9833.2
;=====start printer sound ===================
M17
M400 S1
M1006 S1
M1006 A0 B0 L100 C37 D10 M100 E37 F10 N100
M1006 A0 B0 L100 C41 D10 M100 E41 F10 N100
M1006 A0 B0 L100 C44 D10 M100 E44 F10 N100
M1006 A0 B10 L100 C0 D10 M100 E0 F10 N100
M1006 A43 B10 L100 C39 D10 M100 E46 F10 N100
M1006 A0 B0 L100 C0 D10 M100 E0 F10 N100
M1006 A0 B0 L100 C39 D10 M100 E43 F10 N100
M1006 A0 B0 L100 C0 D10 M100 E0 F10 N100
M1006 A0 B0 L100 C41 D10 M100 E41 F10 N100
M1006 A0 B0 L100 C44 D10 M100 E44 F10 N100
M1006 A0 B0 L100 C49 D10 M100 E49 F10 N100
M1006 A0 B0 L100 C0 D10 M100 E0 F10 N100
M1006 A44 B10 L100 C39 D10 M100 E48 F10 N100
M1006 A0 B0 L100 C0 D10 M100 E0 F10 N100
M1006 A0 B0 L100 C39 D10 M100 E44 F10 N100
M1006 A0 B0 L100 C0 D10 M100 E0 F10 N100
M1006 A43 B10 L100 C39 D10 M100 E46 F10 N100
M1006 W
M18
;=====avoid end stop =================
G91 ; Set to relative positioning
G380 S2 Z10 F1200 ;carefully move up and down
G380 S3 Z-5 F1200
G1 Z5 F1200
G90 ; set to absolute positioning
;G0 Z50 F30000 ;fast moving down
;===== reset machine status =================
M204 S6000
M630 S0 P0
G91
M17 Z0.3 ; lower the z-motor current
G90
M17 X0.7 Y0.9 Z0.5 ; reset motor current to default
M960 S5 P1 ; turn on logo lamp
G90
M83
M220 S100 ;Reset Feedrate
M221 S100 ;Reset Flowrate
M73.2 R1.0 ;Reset left time magnitude
;====== cog noise reduction=================
M982.2 S1 ; turn on cog noise reduction
;===== prepare print temperature and material ==========
M400 ; Wait for all moves to complete
M18 ; Disable motors
;M109 S80 H170 ; Heat hotend to 80°C with a specific heatbreak temperature
M104 S140
M400
M17 ; Enable motors
M400
G28 X ; =====actually Home X and Y?, not sure why, home later?..nahh the printer exploded without it
M211 X0 Y0 Z0 ;turn off soft endstop ; turn off soft endstop to prevent protential logic problem
M975 S1 ; Turn on vibration suppression
G1 X0.0 F3000
G1 X-13.5 F3000 ;quick clean
M620 M ;enable remap
M620 S[initial_no_support_extruder]A ; switch material if AMS exist
G392 S0 ;turn on clog detect
M1002 gcode_claim_action : 4
M400
M1002 set_filament_type:UNKNOWN
M109 S[nozzle_temperature_initial_layer]
M104 S250
M400
T[initial_no_support_extruder]
G1 X-13.5 F3000
M400
M620.1 E F{filament_max_volumetric_speed[initial_no_support_extruder]/2.4053*60} T{nozzle_temperature_range_high[initial_no_support_extruder]}
M109 S250 ;set nozzle to common flush temp
M106 P1 S0
G92 E0
G1 E50 F200
M400
M1002 set_filament_type:{filament_type[initial_no_support_extruder]}
M104 S{nozzle_temperature_range_high[initial_no_support_extruder]}
G92 E0
G1 E50 F{filament_max_volumetric_speed[initial_no_support_extruder]/2.4053*60}
M400
M106 P1 S178
G92 E0
G1 E5 F{filament_max_volumetric_speed[initial_no_support_extruder]/2.4053*60}
M109 S{nozzle_temperature_initial_layer[initial_no_support_extruder]-20} ; drop nozzle temp, make filament shink a bit
M104 S{nozzle_temperature_initial_layer[initial_no_support_extruder]-40}
G92 E0
G1 E-0.5 F300
G1 X0 F30000
G1 X-13.5 F3000
G1 X0 F30000 ;wipe and shake
G1 X-13.5 F3000
G1 X0 F12000 ;wipe and shake
G1 X0 F30000
G1 X-13.5 F3000
M109 S{nozzle_temperature_initial_layer[initial_no_support_extruder]-40}
G392 S0 ;turn off clog detect
M621 S[initial_no_support_extruder]A
M400
M106 P1 S0
;===== prepare print temperature and material end =====
;=====home the Z=====================
G0 X55 Y175 F10000 ; find a soft place to home Z
G28 Z P0 T300; home z with low precision,permit 300deg temperature
G29.2 S0 ; turn off ABL ; bed leveling related...
M104 S140
;===do a quick plate detection===============
G1 Z5
G1 F10000
M1002 judge_flag build_plate_detect_flag
M622 S1
G39.4
M400
M623
G1 Z5
;===== mech mode fast check============================
M1002 gcode_claim_action : 3
;G1 Z5 F3000
;G1 X90 Y-1 F30000
;M400 P200
;shaking removed M970.3 Q1 A7 K0 O2
;shaking removed M974 Q1 S2 P0
;G1 X90 Y0 Z5 F30000
;M400 P200
;shaking removed M970 Q0 A10 B50 C90 H15 K0 M20 O3
;shaking removed M974 Q0 S2 P0
M975 S1 ; turn on vibration suppression
G1 F30000
;G1 X-1 Y10
;G28 X ; re-home XY
;===== wipe nozzle ===============================
M1002 gcode_claim_action : 14
M975 S1 ; turn on vibration suppression
M104 S140 ; set temp down to heatbed acceptable
M106 S150 ; turn on fan (G28 has turn off fan)
M211 S; push soft endstop status
M211 X0 Y0 Z0 ;turn off Z axis endstop
M83
G1 E-1 F500
G90
M83
M104 S140 ;keep safe heat
;knocks quickly;;;;;
G1 X55 Y185 F30000
G380 S3 Z-5 F1200
G1 Z2 F1200
G1 X54 F10000
G380 S3 Z-5 F1200
G1 Z2 F1200
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;Brush material on rubber
G1 X25 Y175 F30000
G1 Z0.2 F30000
G1 Y185
G91
G1 X-30 F30000
G1 Y-2
G1 X27
G1 Y1.5
G1 X-28
G1 Y-2
G1 X30
G1 Y1.5
G1 X-30
G90
M83
G1 Z2 F30000
;G0 X50 Y175 F20000 ; find a soft place to home
;G28 Z P0 T300; home z with low precision, permit 300deg temperature
;G29.2 S0 ; turn off ABL
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;Brush material on steal
G0 X86 Y184 F30000 ;move to exposed steel surface and stop the nozzle
G0 Z-1.01 F10000
G91
G2 I1 J0 X2 Y0 F2000
G2 I-0.7 J0 X-1.4
G2 I1 J0 X2
G2 I-0.7 J0 X-1.4
G2 I1 J0 X2
G2 I-0.7 J0 X-1.4
G2 I1 J0 X2
G2 I-0.7 J0 X-1.4
G2 I1 J0 X2
G2 I-0.7 J0 X-1.4
G3 I1 J0 X2
G3 I-0.7 J0 X-1.4
G3 I1 J0 X2
G3 I-0.7 J0 X-1.4
G3 I1 J0 X2
G3 I-0.7 J0 X-1.4
G3 I1 J0 X2
G3 I-0.7 J0 X-1.4
G3 I1 J0 X2
G3 I-0.7 J0 X-1.4
G90
G1 Z2 F30000
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;Brush material on rubber
G1 X25 Y175 F30000
G1 Z0.2 F30000
G1 Y185
G91
G1 X-30 F30000
G1 Y-2
G1 X27
G1 Y1.5
G1 X-28
G1 Y-2
G1 X30
G1 Y1.5
G1 X-30
G90
M83
G1 Z2 F30000
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;Wipe material on steal
G1 Z10
G1 X85 Y184
G1 Z-1.01
G1 X95
G1 X90
G1 Z5 F30000
G1 Y175
;;;;;;;;;;;;;;;;;;;;;;re-check nozzle height and re-home Z
G0 X55 Y175 F20000 ; find a soft place to home
G28 Z P0 T300; home z with low precision, permit 300deg temperature
G29.2 S0 ; turn off ABL
M211 R; pop softend status
M106 S0 ; turn off fan , too noisy
;===== wipe nozzle end ================================
;===== wait heatbed ====================
M1002 gcode_claim_action : 2
M104 S140
;M140 S[bed_temperature_initial_layer_single];set bed temp
G1 Z5 F3000
G29.2 S1
;G1 X10 Y10 F20000
;===== bed leveling ==================================
;M1002 set_flag g29_before_print_flag=1
M1002 judge_flag g29_before_print_flag ;check if leveling is on J1 off J0
M622 J1
M1002 gcode_claim_action : 1
;G28 T180
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]}
M400
M500 ; save cali data
M623
M1002 judge_flag g29_before_print_flag ;check if leveling is on J1 off J0
M622 J1
M400
G1 X0 Z10 F30000
G1 X-13.5 F3000
M400
M190 S{bed_temperature_initial_layer_single-4} ; wait till bed -4 degree
M400
M623
M1002 judge_flag g29_before_print_flag ;check if leveling is on J1 off J0
M622 J0
M104 S{nozzle_temperature[initial_extruder]-40} ;nozzle starts heat a little more, saves 5 seconds
M1002 gcode_claim_action : 13
G28 T180
M623
M975 S1 ; turn on vibration supression
;===== nozzle load filament ===============================
M975 S1
G90
M83
T1000
G1 X0 Y0 Z10 F30000
G1 X-13.5 Y0 Z10 F3000
G1 E1.2 F500
M400
M1002 set_filament_type:UNKNOWN
;===============================nozzle heat up====================
M140 S[bed_temperature_initial_layer_single] ;bed keeps heating more
M104 S{nozzle_temperature[initial_extruder]} ;nozzle keeps heating more
M109 S{nozzle_temperature[initial_extruder]} ;wait nozzle to fully heat up
M400
M412 S1 ; ===turn on filament runout detection===
M400 P10
G392 S0 ;turn on clog detect
M620.3 W1; === turn on filament tangle detection===
M400 S2
M1002 set_filament_type:{filament_type[initial_no_support_extruder]}
;M1002 set_flag extrude_cali_flag=1
M1002 judge_flag extrude_cali_flag
M622 J1
M1002 gcode_claim_action : 8
M400
M900 K0.0 L1000.0 M1.0
G90
M83
;force bed temperature, no more needed
;M190 S[bed_temperature_initial_layer_single]
;M400
G0 X68 Y-4 F30000
G0 Z0.3 F18000 ;Move to start position
M400
G0 X88 E10 F{outer_wall_volumetric_speed/(24/20) * 60}
G0 X93 E.3742 F{outer_wall_volumetric_speed/(0.3*0.5)/4 * 60}
G0 X98 E.3742 F{outer_wall_volumetric_speed/(0.3*0.5) * 60}
G0 X103 E.3742 F{outer_wall_volumetric_speed/(0.3*0.5)/4 * 60}
G0 X108 E.3742 F{outer_wall_volumetric_speed/(0.3*0.5) * 60}
G0 X113 E.3742 F{outer_wall_volumetric_speed/(0.3*0.5)/4 * 60}
G0 Y0 Z0 F20000
M400
G1 X-13.5 Y0 Z10 F10000
M400
G1 E10 F{outer_wall_volumetric_speed/2.4*60}
M983 F{outer_wall_volumetric_speed/2.4} A0.3 H[nozzle_diameter]; cali dynamic extrusion compensation
M106 P1 S178
M400 S7
G1 X0 F18000
G1 X-13.5 F3000
G1 X0 F18000 ;wipe and shake
G1 X-13.5 F3000
G1 X0 F12000 ;wipe and shake
G1 X-13.5 F3000
M400
M106 P1 S0
M1002 judge_last_extrude_cali_success
M622 J0
M983 F{outer_wall_volumetric_speed/2.4} A0.3 H[nozzle_diameter]; cali dynamic extrusion compensation
M106 P1 S178
M400 S7
G1 X0 F18000
G1 X-13.5 F3000
G1 X0 F18000 ;wipe and shake
G1 X-13.5 F3000
G1 X0 F12000 ;wipe and shake
M400
M106 P1 S0
M623
G1 X-13.5 F3000
M400
M984 A0.1 E1 S1 F{outer_wall_volumetric_speed/2.4} H[nozzle_diameter]
M106 P1 S178
M400 S7
G1 X0 F18000
G1 X-13.5 F3000
G1 X0 F18000 ;wipe and shake
G1 X-13.5 F3000
G1 X0 F12000 ;wipe and shake
G1 X-13.5 F3000
M400
M106 P1 S0
M623 ; end of "draw extrinsic para cali paint"
;===== adding oozing clearing ===============================
M106 P1 S200
G1 E20 F300
G1 E-0.5 F300
M400 S2
G1 E-0.5 F300
M400 S1
G1 X0 F30000
G1 X-13.5 F3000
G1 X0 F30000 ;wipe and shake
G1 X-13.5 F3000
G1 X0 F30000 ;wipe and shake
G1 X-13.5 F3000
G1 X0 F30000 ;wipe and shake
G1 X-13.5 F3000
;===== extrude cali test 1 bar ===============================
M104 S{nozzle_temperature_initial_layer[initial_extruder]}
G90 ; Absolute positioning
M83 ; Relative extrusion mode
;force bed temperature, no more needed
;M190 S[bed_temperature_initial_layer_single]
;M400
G0 X68 Y-2.5 F30000
G0 Z0.3 F18000 ;Move to start position
G0 X88 E10 F{outer_wall_volumetric_speed/(24/20) * 60}
G0 X93 E.3742 F{outer_wall_volumetric_speed/(0.3*0.5)/4 * 60}
G0 X98 E.3742 F{outer_wall_volumetric_speed/(0.3*0.5) * 60}
G0 X103 E.3742 F{outer_wall_volumetric_speed/(0.3*0.5)/4 * 60}
G0 X108 E.3742 F{outer_wall_volumetric_speed/(0.3*0.5) * 60}
G0 X113 E.3742 F{outer_wall_volumetric_speed/(0.3*0.5)/4 * 60}
G0 X115 Z0 F20000
M400
;========turn off light and wait extrude temperature =============
M1002 gcode_claim_action : 0
M400 ; wait all motion done before implement the emprical L parameters
;===== for Textured PEI Plate , lower the nozzle as the nozzle was touching topmost of the texture when homing ==
;curr_bed_type={curr_bed_type}
{if curr_bed_type=="Textured PEI Plate"}
G29.1 Z{-0.02} ; for Textured PEI Plate
{endif}
M960 S1 P0 ; turn off laser
M960 S2 P0 ; turn off laser
M106 S0 ; turn off fan
M106 P2 S0 ; turn off big fan
M106 P3 S0 ; turn off chamber fan
M975 S1 ; turn on mech mode supression
G90
M83
T1000
M211 X0 Y0 Z0 ;turn off soft endstop
M1007 S1
;==========time to fly===========
G0 Z1 F30000
G0 X150 Z2 F30000
If you could see how many times I screw up during the writing and testing of this starting g-code (wrong homing, nozzle scratches into the bed, filament flying), you would know that I am not conformable writing g-code without a real machine in hand.
I have written tons of comments on lots of g-code lines. If you read them, I think you can make some adjustments to your A1 codes accordingly.
across my 5 printers , over the last 10 years, I see a 0.08 z-offset difference from cold to hot (bed+sheet+extrudeer). This means if i calibrate my mesh cold, my first layer when heated will be very squished. My enders extruder grow z+0.1 (half thickness of a sheet of paper) from cold to hot.
Meshing a bed during the heating cycle will result in peaks and valleys that arent there.
The reason there are gcodes for heat and wait are to allow full expansion of the whole printing system, the extruder and bed, prior to calibration and printing.
Yes we can tweak the gocde, but, be aware, every time an update is made in the standard scripts, you will have to re-modify it. Also, if you post non standard gcode on makerworld it can cause others issues so they strip it out, it can also have issues with the support of your machine. One of the routines mentioned as “dangerous” as example, take out safeguards that have been thought through by the manufacturer may seem a good idea until you’re grinding the nozzle into the bed or layer 0 isn;t sticking.
Making changes to the gocde to this level isnt risk free, and, printing and/or meshing prior to full heating of the printing system (extruder/nozzle/plate/bed) will reduce your z-offset and set off your mesh. You won’t find any documention online that suggests the opposite of this is ok.