Keresés

Új hozzászólás Aktív témák

  • poli27

    Topikgazda

    válasz daninet #40049 üzenetére

    Bemásolom :)
    ;===== Machine: P1P_thrutheframe remix Start Code =========
    ;===== Date: 20230311 ==========================

    ;===== Note: ========================================
    ;remove linear advance portion.
    ;change AB motor current to 1.1A (( 1.68/1.414)*90%) reduce heat build up, but enough for high acceleration
    ;change Z motor current from 0.75A to 0.7A
    ;added code for textured pei plate to lower nozzle by z-0.03 when printing


    ;===== Reset machine status ====================
    G91
    M17 Z0.4 ;lower the z-motor current
    G0 Z12 F300 ;lower the hotbed , to prevent the nozzle is below the hotbed
    G90
    M17 X1.1 Y1.1 Z0.75 ;reset motor current to default
    G90
    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

    ;===== heatbed preheat ===============
    M1002 gcode_claim_action : 2
    M140 S[bed_temperature_initial_layer_single] ;set bed temp
    M190 S[bed_temperature_initial_layer_single] ;wait for bed temp


    ;===== prepare print temperature and material ===============
    M104 S[nozzle_temperature_initial_layer] ;set extruder temp
    G91
    G0 Z10 F1200 ;move bed down by 10mm just in case
    G90
    G28 X ;home X and Y axis
    M975 S1 ;turn ON vibration suppression
    G1 X60 F12000
    G1 Y245
    G1 Y265 F3000 ;place nozzle over poop chute
    M620 M
    M620 S[initial_tool]A ;switch material if AMS exist
    M109 S[nozzle_temperature_initial_layer]
    G1 X120 F12000

    G1 X20 Y50 F12000
    G1 Y-3
    T[initial_tool]
    G1 X54 F12000
    G1 Y265
    M400
    M621 S[initial_tool]A

    M412 S1 ;turn on filament runout detection


    ;===== prepare print temperature and material ========================
    ;===== reduce the purge to 40+40mm vs 50+50mm ========================
    M109 S240 ;set nozzle to common flush temp
    M106 S0 ;turn OFF part cooling fan
    G92 E0
    G1 E40 F200 ;purge 40mm vs 50mm (stock)
    M400
    M104 S[nozzle_temperature_initial_layer]
    G92 E0
    G1 E40 F200 ;purge 40mm vs 50mm (stock)
    M400
    M106 S255 ;turn ON part cooling fan
    G92 E0
    G1 E5 F300
    M109 S{nozzle_temperature_initial_layer[initial_extruder]-20} ;drop nozzle temp, make filament shink a bit
    G92 E0
    G1 E-0.5 F300 ;retraction to help removing waste filament

    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 ;wipe and shake
    M400


    ;===== wipe nozzle ===============
    M1002 gcode_claim_action : 14
    M975 S1 ;turn ON vibration suppression
    M106 S255 ;turn ON part cooling fan
    G1 X65 Y230 F15000
    G1 Y264 F6000
    M109 S{nozzle_temperature_initial_layer[initial_extruder]-35}
    G1 X100 F15000 ;first wipe mouth

    G0 X135 Y253 F18000 ;move to 3mm from bed edge and center of exposed steel tab
    G28 Z P0 T300 ;home Z with low precision and permit 300deg temperature
    G29.2 S0 ;turn OFF ABL
    G0 Z5 F1200 ;lower hotbed by 5mm

    G1 X60 Y265
    G92 E0
    G1 E-0.5 F300 ;retrack more
    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
    G0 X128 Y261 Z-1.3 F1200 ;move to exposed steel tab and push nozzle onto it
    M104 S140 ;set temp down to heatbed acceptable at 140 degree
    M106 S255 ;turn ON part cooling fan (G28 has turned it off)

    M221 S ;push soft endstop status
    M221 Z0 ;turn OFF Z axis endstop
    G0 Z0.5 F20000 ;nozzle wipe cycle
    G0 X125 Y259.5 Z-1.01
    G0 X131 F211
    G0 X124
    G0 Z0.5 F20000
    G0 X125 Y262.5
    G0 Z-1.01
    G0 X131 F211
    G0 X124
    G0 Z0.5 F20000
    G0 X125 Y260.0
    G0 Z-1.01
    G0 X131 F211
    G0 X124
    G0 Z0.5 F20000
    G0 X125 Y262.0
    G0 Z-1.01
    G0 X131 F211
    G0 X124
    G0 Z0.5 F20000
    G0 X125 Y260.5
    G0 Z-1.01
    G0 X131 F211
    G0 X124
    G0 Z0.5 F20000
    G0 X125 Y261.5
    G0 Z-1.01
    G0 X131 F211
    G0 X124
    G0 Z0.5 F20000
    G0 X125 Y261.0
    G0 Z-1.01
    G0 X131 F211
    G0 X124
    G0 X128
    G2 I0.5 J0 F300
    G2 I0.5 J0 F300
    G2 I0.5 J0 F300
    G2 I0.5 J0 F300

    M109 S140 ;wait nozzle temp down to heatbed acceptable
    G2 I0.5 J0 F3000
    G2 I0.5 J0 F3000
    G2 I0.5 J0 F3000
    G2 I0.5 J0 F3000

    M221 R ;pop softend status
    G0 Z10 F1200 ;lower hotbed by 10mm
    M400
    G0 Z10
    G0 F15000
    G0 X230 Y15 F15000
    G29.2 S1 ;turn on ABL
    M106 S0 ;turn OFF part cooling fan


    ;===== bed leveling ===============
    M1002 judge_flag g29_before_print_flag
    M622 J1
    M1002 gcode_claim_action : 1
    G29 A 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 bed leveling data
    M623


    ;===== home after wipe mouth ===============
    M1002 judge_flag g29_before_print_flag
    M622 J0
    M1002 gcode_claim_action : 13
    G28
    M623
    M975 S1 ;turn ON vibration supression after homing


    ;===== set extrude temp earlier, to reduce wait time ===============
    M104 S{nozzle_temperature_initial_layer[initial_extruder]}


    ;===== mech mode fast check ===============
    G1 X128 Y128 Z10 F20000
    M400 P200
    M970.3 Q1 A7 B30 C80 H15 K0
    M974 Q1 S2 P0

    G1 X128 Y128 Z10 F20000
    M400 P200
    M970.3 Q0 A7 B30 C90 Q0 H15 K0
    M974 Q0 S2 P0

    M975 S1 ;turn ON vibration supression
    G1 F18000
    G1 X230 Y15
    G28 X ;re-home XY


    ;===== for Textured PEI Plate, High Temp Plate and Wham Bam Plate ===============
    ;curr_bed_type={curr_bed_type}
    {if curr_bed_type=="Textured PEI Plate"}
    G29.1 Z{-0.03} ;squish of -0.03mm for Textured PEI Plate
    {elsif curr_bed_type=="High Temp Plate"}
    G29.1 Z{+0.00} ;raise of 0.00mm for High Temp or Wham Bam Plate
    {endif}


    ;===== turn off fan and wait extrude temperature ===============
    M1002 gcode_claim_action : 0
    M109 S[nozzle_temperature_initial_layer]
    M106 S0 ;turn OFF fan
    M106 P2 S0 ;turn OFF Aux fan
    M106 P3 S0 ;turn OFF Chamber fan

    M975 S1 ;turn on mech mode supression


    ;===== Nozzle load line sequence ===============
    M975 S1 ;turn on vibration suppression
    G90 ;set all axis to absolute
    M83
    T1000
    G1 E{-retraction_length[initial_extruder]} F1800
    G0 Z5 F300 ;move heatbed down by 5mm
    G0 X254.5 F6000 ;move toolhead to the right
    G0 Y50 F6000 ;move toolhead 50mm on Y axis
    G0 Z1.0 ;move heatbed to 1.0mm to allow oozing.
    G1 E{retraction_length[initial_extruder]} F1800
    M109 S[nozzle_temperature_initial_layer]
    M400
    G0 Z0.2 ;lower nozzle to printing height.
    G1 E1 F300 ;extrude 1mm of filament at 5mm/s
    G0 X253
    G1 Y175 E6.4 F{outer_wall_volumetric_speed/(0.3*0.5) * 60}
    G0 X251.5
    G1 Y50 E6.4


    ;===== Quick wipe sequence ===============
    G0 Y48 Z1.0 F6000 ;1mm lift and move 2mm on Y
    G0 Z0.0 ;press nozzle onto bed
    G0 Y44 F3000 ;start of 4 wipes movement
    G0 Y48 F3000
    G0 Y44 F3000
    G0 Y48 F3000
    G0 Y44 F3000
    G0 Y48 F3000
    G0 Y44 F3000 ;end of 4 wipes movement
    G0 Z0.4 ;raise nozzle up to prevent scratching bed

    [ Szerkesztve ]

Új hozzászólás Aktív témák