UPDATE to V4
I had some trouble with melted Filament inside the extruder. It looks like there is little to much and/or to fast retract especially at the End G-Code.
So I reduced both values a little.
Raise the bed for textured plate a little more (Z-0.05) to be nearer to the nozzle.
UPDATE to V3
I had some time, so I finished Start and End G-Code.
- Display Messages added
- End G-Code adapted:
– nozzle wipe included
– added comments
– put a 60 second cooling in (all 3 fans running high), please delete if you are printing a cooling sensitive filament (or if you just don´t like it ). I did this also on my other printers to have an initial fast cool down especially for the nozzle/print head.
Start G-Code V4
;===== machine: P1S =====
;===== date: 20240101 =====
;===== Version 4 =====
;===== start G-Code by Schmudi =====
;===== !!! use at your own risk !!! =====
;===== P1S firmware: 1.04.02.00 =====
;===== AMS firmware: 00.00.06.40 =====
;===================================================
;===== reset machine status =================
G90
M17 X1.2 Y1.2 Z0.75 ; set motor current to default
M220 S100 ;Reset Feedrate
M221 S100 ;Reset Flowrate
M73.2 R1.0 ;Reset left time magnitude
M1002 set_gcode_claim_speed_level : 5
M221 X0 Y0 Z0 ; turn off soft endstop to prevent protential logic problem
G29.1 Z{+0.0} ; clear z-trim value first
M204 S10000 ; init ACC set to 10m/s^2
;=============turn on fans =================
M106 P1 S125 ; Part fan
M106 P2 S50 ; AUX Fan
M106 P3 S200 ; Chamber Fan
M710 A1 S216; MC-board fan automatic
;===== heatbed preheat and home ====================
M1002 gcode_claim_action : 2
M140 S[bed_temperature_initial_layer_single] ;set bed temp
M104 S[nozzle_temperature_initial_layer] ;set extruder temp
M190 S[bed_temperature_initial_layer_single] ;wait bed temp
M1002 gcode_claim_action : 13
G28 P0 T300; home with low precision,permit 300deg temperature
;===== prepare print temperature and material ==========
M1002 gcode_claim_action : 7
M109 S250; set purge temp
G91
G0 Z10 F1200
G90
M975 S1 ; turn on mech mode supression
G1 X67 F12000
G1 Y240
G1 Y265 F3000
;===== prepare AMS ==========
M1002 gcode_claim_action : 4
M620 M
M620 S[initial_extruder]A ; switch material if AMS exist
G1 X120 F12000
T[initial_extruder]
G1 X54 F12000
G1 Y265
M400
M621 S[initial_extruder]A
M620.1 E F{filament_max_volumetric_speed[initial_extruder]/2.4053*60} T{nozzle_temperature_range_high[initial_extruder]}
;===== purge extruder and nozzle ==========
M1002 gcode_claim_action : 14
M412 S1 ;turn on filament runout detection
M104 S250 ;set nozzle to common flush temp
M106 P1 S0 ; Part fan off
G92 E0
G1 E40 F200
M400
M104 S[nozzle_temperature_initial_layer]
G92 E0
G1 E40 F200
M400
M106 P1 S255 ; Part fan full
M400 S4
G92 E0
G1 E-0.8 F300
M106 P1 S125
G1 X70 F9000
G1 X76 F15000
G1 X65 F15000
G1 X76 F15000
G1 X65 F15000; shake to put down garbage
G1 X80 F6000
G1 X95 F15000
G1 X80 F15000
G1 X165 F15000
M400
M106 P1 S125
G92 E0
;===== wipe nozzle ===============================
M1002 gcode_claim_action : 14
M975 S1
M106 S255
G1 X65 Y230 F18000
G1 Y264 F6000
G1 X100 F18000 ; first wipe mouth
G29.2 S0 ; turn off ABL
G0 Z5 F12000
G1 X60 Y265
G1 X100 F5000; second wipe mouth
G1 X70 F15000
G1 X100 F5000
G1 X70 F15000
G1 X100 F5000
G1 X70 F15000
G1 X100 F5000
G1 X70 F15000
G1 X90 F5000
M400
G1 Z10
G29.2 S1 ; turn on ABL
M975 S1 ; turn on vibration supression
M106 P1 S125 ; Part fan on
M1002 gcode_claim_action : 0
;===== 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.05} ; for Textured PEI Plate
{endif}
;======== wait extrude temperature and prefill =============
M106 P3 S220 ; Chamber Fan
M1002 gcode_claim_action : 0
G29.2 S1
M1002 gcode_claim_action : 2
M190 S[bed_temperature_initial_layer_single] ;set bed temp
M1002 gcode_claim_action : 7
M109 S[nozzle_temperature_initial_layer] ;set extruder temp
M1002 gcode_claim_action : 0
M975 S1 ; turn on mech mode supression
G92 E0
G1 E0.2 F300; pre-fill nozzle
G92 E0
End G-Code V3
;===== machine: P1S =====
;===== date: 20240101 =====
;===== Version 3 =====
;===== End G-Code by Schmudi =====
;===== !!! Use at your own risk !!! =====
;===================================================
;===== Preparation =====
M1002 gcode_claim_action : 0
M400 ; wait for buffer to clear
M1002 set_gcode_claim_speed_level : 5
;===== Retract filament =====
G92 E0 ; zero the extruder
G1 E-0.4 F300 ; retract
G1 Z{max_layer_z + 5} F900 ; lower z a little
G1 X65 Y255 F12000 ; move to safe pos
M400 S3; wait
G1 E-0.8 F300 ; retract
M400 S3; wait
G92 E0 ; zero the extruder
;===== 1st Wipe =====
G1 Y265 F3000
M140 S0 ; turn off bed
G1 X100 F12000 ; wipe
M1002 gcode_claim_action : 4
M620 S255; pull back filament to AMS
;====== cut filament =======
G1 X20 Y50 F12000
G1 Y-3
T255
G1 X65 F12000
G1 Y265
;===== wipe =======
M1002 gcode_claim_action : 14
G1 X100 F18000 ; first wipe
G29.2 S0 ; turn off ABL
G1 X60 Y265
G1 X100 F5000; second wipe mouth
G1 X70 F15000
G1 X100 F5000
G1 X70 F15000
G1 X100 F5000
G1 X70 F15000
G1 X100 F5000
G1 X70 F15000
G1 X90 F5000
M400
G29.2 S1 ; turn on ABL
M975 S1 ; turn on vibration supression
M400
M1002 gcode_claim_action : 0
;===== AMS =====
M621 S255; something for AMS
M104 S0 ; turn off hotend
M622.1 S1 ; for prev firmware, default turned on
;===== timelapse (camera) =====
M1002 judge_flag timelapse_record_flag
M622 J1
M400 ; wait all motion done
M991 S0 P-1 ;end smooth timelapse at safe pos
M400 S3 ;wait for last picture to be taken
M623; end of “timelapse_record_flag”
;===== Move Z down =====
M400
M17 S
M17 Z0.4 ; lower z motor current to reduce impact if there is something in the bottom
{if (max_layer_z + 100.0) < 250}
G1 Z{max_layer_z + 100.0} F600
G1 Z{max_layer_z +98.0}
{else}
G1 Z249 F600
G1 Z247
{endif}
M400 P100
;===== Move to park position and reset printer=====
G90
G1 X128 Y250 F3600
M220 S100 ; Reset feedrate magnitude
M201.2 K1.0 ; Reset acc magnitude
M73.2 R1.0 ;Reset left time magnitude
M1002 set_gcode_claim_speed_level : 0
;===== fast cool down ==========
M106 P1 S200; part cooling fan
M106 P2 S200; Aux fan
M106 P3 S256; Chamber fan
M400 S60; 60 seconds fast cool down time
M106 P1 S0; part cooling fan off
M106 P2 S0; Aux fan off
M106 P3 S0; Chamber fan off
M710 S0; MC-board fan off
M17 X0.8 Y0.8 Z0.5 ; lower motor current
Any comments are very welcome
Have fun!!!
I would also like to point out that the filament change code is also in progress. Thx @DzzD for this