Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Prusa XL Input Shaper (only one head will print) & add PC-CF, PA11-CF, & PVB filament types #5511

Merged
merged 65 commits into from
Jun 8, 2024

Conversation

cochcoder
Copy link
Contributor

@cochcoder cochcoder commented May 30, 2024

Partially does #2457

EDIT as of 6/6/24: This PR adds the ability to print with the Prusa XL and XLIS with one print head even if five heads are installed, according to #2457 (comment). This PR also adds three new filament types to be selected in the filament's settings. Everything seems to be working fine with the exception of the Input Shaper specific G-Code not showing up in the filament's start G-Code. This, however, seems to be a issue on my part as the Slicer exports the exact same thing that is in the filament's current files.

TO DO:

Prusa XL

  • Add 0.4, 0.5, 0.6, & 0.8 nozzle profiles
  • Add filament types (used for both input shaper & non Input Shaper)
  • Add 0.3 & 0.25 nozzle profiles
  • Add Input Shaper profiles

General

Bugs to be fixed

  • Weird image size
  • Profiles only shown when 0.4 is selected
  • Add Input Shaper nozzles to filaments

@hliebscher
Copy link
Contributor

pls add all XL profiles... up to 5 my start code works for all 1-5

; 2024 Heiko Liebscher
; Printer : [printer_preset]
; Profile : [print_preset]
; Plate : [plate_name]
; --- initial_extruder: [initial_extruder]
; --- has_wipe_tower: [has_wipe_tower]
; --- total_toolchanges: [total_toolchanges]
; --- T0: {is_extruder_used[0]}
; --- T1: {is_extruder_used[1]}
; --- T2: {is_extruder_used[2]}
; --- T3: {is_extruder_used[3]}
; --- T4: {is_extruder_used[4]}
;T[initial_extruder]
M17 ; enable steppers
M862.3 P "XL" ; printer model check
M862.5 P2 ; g-code level check
M862.6 P"Input shaper" ; FW feature check
M115 U5.1.2+13478
G90 ; use absolute coordinates
M83 ; extruder relative mode
; set print area
M555 X{first_layer_print_min[0]} Y{first_layer_print_min[1]} W{(first_layer_print_max[0]) - (first_layer_print_min[0])} H{(first_layer_print_max[1]) - (first_layer_print_min[1])}
; inform about nozzle diameter
{if (is_extruder_used[0])}M862.1 T0 P{nozzle_diameter[0]}{endif}
{if (is_extruder_used[1])}M862.1 T1 P{nozzle_diameter[1]}{endif}
{if (is_extruder_used[2])}M862.1 T2 P{nozzle_diameter[2]}{endif}
{if (is_extruder_used[3])}M862.1 T3 P{nozzle_diameter[3]}{endif}
{if (is_extruder_used[4])}M862.1 T4 P{nozzle_diameter[4]}{endif}

; turn off unused heaters
{if ! is_extruder_used[0]} M104 T0 S0 {endif}
{if ! is_extruder_used[1]} M104 T1 S0 {endif}
{if ! is_extruder_used[2]} M104 T2 S0 {endif}
{if ! is_extruder_used[3]} M104 T3 S0 {endif}
{if ! is_extruder_used[4]} M104 T4 S0 {endif}

M217 Z{max(zhop, 2.0)} ; set toolchange z hop to 2mm, or zhop variable from slicer if higher
; set bed and extruder temp for MBL
M140 S[first_layer_bed_temperature] ; set bed temp
G0 Z5 ; add Z clearance
M109 T{initial_tool} S{((filament_notes[initial_tool]=/.HT_MBL10./) ? (first_layer_temperature[initial_tool] - 10) : (filament_type[initial_tool] == "PC" or filament_type[initial_tool] == "PA") ? (first_layer_temperature[initial_tool] - 25) : (filament_type[initial_tool] == "FLEX") ? 210 : (filament_type[initial_tool]=/.PET./) ? 175 : 170)} ; wait for temp

; Home XY
G28 XY
; try picking tools used in print
G1 F{travel_speed * 60}
{if (is_extruder_used[0]) and (initial_tool != 0)}T0 S1 L0 D0{endif}
{if (is_extruder_used[1]) and (initial_tool != 1)}T1 S1 L0 D0{endif}
{if (is_extruder_used[2]) and (initial_tool != 2)}T2 S1 L0 D0{endif}
{if (is_extruder_used[3]) and (initial_tool != 3)}T3 S1 L0 D0{endif}
{if (is_extruder_used[4]) and (initial_tool != 4)}T4 S1 L0 D0{endif}
; select tool that will be used to home & MBL
T{initial_tool} S1 L0 D0
; home Z with MBL tool
M84 E ; turn off E motor
G28 Z
G0 Z5 ; add Z clearance

M104 T{initial_tool} S{if is_nil(temperature_vitrification[initial_tool])}70{else}{temperature_vitrification[initial_tool]-80}{endif} ; set idle temp
M190 S[first_layer_bed_temperature] ; wait for bed temp
G29 G ; absorb heat

M109 T{initial_tool} S{((filament_notes[initial_tool]=/.HT_MBL10./) ? (first_layer_temperature[initial_tool] - 10) : (filament_type[initial_tool] == "PC" or filament_type[initial_tool] == "PA") ? (first_layer_temperature[initial_tool] - 25) : (filament_type[initial_tool] == "FLEX") ? 210 : (filament_type[initial_tool]=/.PET./) ? 175 : 170)} ; wait for temp

; move to the nozzle cleanup area
G1 X{(min(((((first_layer_print_min[0] + first_layer_print_max[0]) / 2) < ((print_bed_min[0] + print_bed_max[0]) / 2)) ? (((first_layer_print_min[1] - 7) < -2) ? 70 : (min(print_bed_max[0], first_layer_print_min[0] + 32) - 32)) : (((first_layer_print_min[1] - 7) < -2) ? 260 : (min(print_bed_max[0], first_layer_print_min[0] + 32) - 32))), first_layer_print_min[0])) + 32} Y{(min((first_layer_print_min[1] - 7), first_layer_print_min[1]))} Z{5} F{(travel_speed * 60)}
M302 S160 ; lower cold extrusion limit to 160C
G1 E{-(filament_type[0] == "FLEX" ? 4 : 2)} F2400 ; retraction for nozzle cleanup
; nozzle cleanup
M84 E ; turn off E motor
G29 P9 X{((((first_layer_print_min[0] + first_layer_print_max[0]) / 2) < ((print_bed_min[0] + print_bed_max[0]) / 2)) ? (((first_layer_print_min[1] - 7) < -2) ? 70 : (min(print_bed_max[0], first_layer_print_min[0] + 32) - 32)) : (((first_layer_print_min[1] - 7) < -2) ? 260 : (min(print_bed_max[0], first_layer_print_min[0] + 32) - 32)))} Y{(first_layer_print_min[1] - 7)} W{32} H{7}
G0 Z5 F480 ; move away in Z
M107 ; turn off the fan
; MBL
M84 E ; turn off E motor
G29 P1 ; invalidate mbl & probe print area
G29 P1 X30 Y0 W{(((is_extruder_used[4]) or ((is_extruder_used[3]) or (is_extruder_used[2]))) ? "300" : ((is_extruder_used[1]) ? "130" : "50"))} H20 C ; probe near purge place
G29 P3.2 ; interpolate mbl probes
G29 P3.13 ; extrapolate mbl outside probe area
G29 A ; activate mbl
G1 Z10 F720 ; move away in Z
G1 F{travel_speed * 60}
P0 S1 L1 D0; park the tool
; set extruder temp
{if first_layer_temperature[0] > 0 and (is_extruder_used[0])}M104 T0 S{first_layer_temperature[0]}{endif}
{if first_layer_temperature[1] > 0 and (is_extruder_used[1])}M104 T1 S{first_layer_temperature[1]}{endif}
{if first_layer_temperature[2] > 0 and (is_extruder_used[2])}M104 T2 S{first_layer_temperature[2]}{endif}
{if first_layer_temperature[3] > 0 and (is_extruder_used[3])}M104 T3 S{first_layer_temperature[3]}{endif}
{if first_layer_temperature[4] > 0 and (is_extruder_used[4])}M104 T4 S{first_layer_temperature[4]}{endif}
{if (is_extruder_used[0]) and initial_tool != 0}
;
; purge first tool
;=================================
G1 F{travel_speed * 60}
P0 S1 L2 D0; park the tool
M109 T0 S{first_layer_temperature[0]}
T0 S1 L0 D0; pick the tool
G92 E0 ; reset extruder position

G0 X{(0 == 0 ? 30 : (0 == 1 ? 150 : (0 == 2 ? 210 : 330)))} Y{(0 < 4 ? -7 : -4.5)} Z10 F{(travel_speed * 60)} ; move close to the sheet's edge
G0 E{if is_nil(filament_multitool_ramming[0])}5{else}5{endif} X40 Z0.2 F{if is_nil(filament_multitool_ramming[0])}500{else}170{endif} ; purge while moving towards the sheet
G0 X70 E9 F800 ; continue purging and wipe the nozzle
G0 X{70 + 3} Z{0.05} F{8000} ; wipe, move close to the bed
G0 X{70 + 3 * 2} Z0.2 F{8000} ; wipe, move quickly away from the bed
G1 E{- 1.5 * retraction_length[0]} F2400 ; retract
G92 E0 ; reset extruder position
M104 S{(is_nil(temperature_vitrification[0]) ? (first_layer_temperature[0] + standby_temperature_delta) : (temperature_vitrification[0]))} T0
{endif}

{if (is_extruder_used[1]) and initial_tool != 1}
; purge second tool
;=================================
G1 F{travel_speed * 60}
P0 S1 L2 D0; park the tool
M109 T1 S{first_layer_temperature[1]}
T1 S1 L0 D0; pick the tool
G92 E0 ; reset extruder position
G0 X{(1 == 0 ? 30 : (1 == 1 ? 150 : (1 == 2 ? 210 : 330)))} Y{(1 < 4 ? -7 : -4.5)} Z10 F{(travel_speed * 60)} ; move close to the sheet's edge
G0 E{if is_nil(filament_multitool_ramming[1])}5{else}5{endif} X140 Z0.2 F{if is_nil(filament_multitool_ramming[1])}500{else}170{endif} ; purge while moving towards the sheet
G0 X110 E9 F800 ; continue purging and wipe the nozzle
G0 X{110 - 3} Z{0.05} F{8000} ; wipe, move close to the bed
G0 X{110 - 3 * 2} Z0.2 F{8000} ; wipe, move quickly away from the bed
G1 E{- 1.5 * retraction_length[1]} F2400 ; retract
G92 E0 ; reset extruder position
M104 S{(is_nil(temperature_vitrification[1]) ? (first_layer_temperature[1] + standby_temperature_delta) : (temperature_vitrification[1]))} T1
{endif}

{if (is_extruder_used[2]) and initial_tool != 2}
; purge third tool
;=================================
G1 F{travel_speed * 60}
P0 S1 L2 D0; park the tool
M109 T2 S{first_layer_temperature[2]}
T2 S1 L0 D0; pick the tool
G92 E0 ; reset extruder position
G0 X{(2 == 0 ? 30 : (2 == 1 ? 150 : (2 == 2 ? 210 : 330)))} Y{(2 < 4 ? -7 : -4.5)} Z10 F{(travel_speed * 60)} ; move close to the sheet's edge
G0 E{if is_nil(filament_multitool_ramming[2])}5{else}5{endif} X220 Z0.2 F{if is_nil(filament_multitool_ramming[2])}500{else}170{endif} ; purge while moving towards the sheet
G0 X250 E9 F800 ; continue purging and wipe the nozzle
G0 X{250 + 3} Z{0.05} F{8000} ; wipe, move close to the bed
G0 X{250 + 3 * 2} Z0.2 F{8000} ; wipe, move quickly away from the bed
G1 E{- 1.5 * retraction_length[2]} F2400 ; retract
G92 E0 ; reset extruder position
M104 S{(is_nil(temperature_vitrification[2]) ? (first_layer_temperature[2] + standby_temperature_delta) : (temperature_vitrification[2]))} T2
{endif}

{if (is_extruder_used[3]) and initial_tool != 3}
; purge fourth tool
;=================================
G1 F{travel_speed * 60}
P0 S1 L2 D0; park the tool
M109 T3 S{first_layer_temperature[3]}
T3 S1 L0 D0; pick the tool
G92 E0 ; reset extruder position
G0 X{(3 == 0 ? 30 : (3 == 1 ? 150 : (3 == 2 ? 210 : 330)))} Y{(3 < 4 ? -7 : -4.5)} Z10 F{(travel_speed * 60)} ; move close to the sheet's edge
G0 E{if is_nil(filament_multitool_ramming[3])}5{else}5{endif} X320 Z0.2 F{if is_nil(filament_multitool_ramming[3])}500{else}170{endif} ; purge while moving towards the sheet
G0 X290 E9 F800 ; continue purging and wipe the nozzle
G0 X{290 - 3} Z{0.05} F{8000} ; wipe, move close to the bed
G0 X{290 - 3 * 2} Z0.2 F{8000} ; wipe, move quickly away from the bed
G1 E{- 1.5 * retraction_length[3]} F2400 ; retract
G92 E0 ; reset extruder position
M104 S{(is_nil(temperature_vitrification[3]) ? (first_layer_temperature[3] + standby_temperature_delta) : (temperature_vitrification[3]))} T3
{endif}

{if (is_extruder_used[4]) and initial_tool != 4}
; purge fifth tool
;=================================
G1 F{travel_speed * 60}
P0 S1 L2 D0; park the tool
M109 T4 S{first_layer_temperature[4]}
T4 S1 L0 D0; pick the tool
G92 E0 ; reset extruder position
G0 X{(4 == 0 ? 30 : (4 == 1 ? 150 : (4 == 2 ? 210 : 330)))} Y{(4 < 4 ? -7 : -4.5)} Z10 F{(travel_speed * 60)} ; move close to the sheet's edge
G0 E{if is_nil(filament_multitool_ramming[4])}5{else}5{endif} X320 Z0.2 F{if is_nil(filament_multitool_ramming[4])}500{else}170{endif} ; purge while moving towards the sheet
G0 X290 E9 F800 ; continue purging and wipe the nozzle
G0 X{290 - 3} Z{0.05} F{8000} ; wipe, move close to the bed
G0 X{290 - 3 * 2} Z0.2 F{8000} ; wipe, move quickly away from the bed
G1 E{- 1.5 * retraction_length[4]} F2400 ; retract
G92 E0 ; reset extruder position
M104 S{(is_nil(temperature_vitrification[4]) ? (first_layer_temperature[4] + standby_temperature_delta) : (temperature_vitrification[4]))} T4
{endif}

; purge initial tool
;=================================
G1 F{travel_speed * 60}
P0 S1 L2 D0; park the tool
M109 T{initial_tool} S{first_layer_temperature[initial_tool]}
T{initial_tool} S1 L0 D0; pick the tool
G92 E0 ; reset extruder position
G0 X{(initial_tool == 0 ? 30 : (initial_tool == 1 ? 150 : (initial_tool == 2 ? 210 : 330)))} Y{(initial_tool < 4 ? -7 : -4.5)} Z10 F{(travel_speed * 60)} ; move close to the sheet's edge
G0 E{if is_nil(filament_multitool_ramming[initial_tool])}5{else}10{endif} X{(initial_tool == 0 ? 30 : (initial_tool == 1 ? 150 : (initial_tool == 2 ? 210 : 330))) + ((initial_tool == 0 or initial_tool == 2 ? 1 : -1) * 10)} Z0.2 F{if is_nil(filament_multitool_ramming[initial_tool])}500{else}170{endif} ; purge while moving towards the sheet
G0 X{(initial_tool == 0 ? 30 : (initial_tool == 1 ? 150 : (initial_tool == 2 ? 210 : 330))) + ((initial_tool == 0 or initial_tool == 2 ? 1 : -1) * 40)} E9 F800 ; continue purging and wipe the nozzle
G0 X{(initial_tool == 0 ? 30 : (initial_tool == 1 ? 150 : (initial_tool == 2 ? 210 : 330))) + ((initial_tool == 0 or initial_tool == 2 ? 1 : -1) * 40) + ((initial_tool == 0 or initial_tool == 2 ? 1 : -1) * 3)} Z{0.05} F{8000} ; wipe, move close to the bed
G0 X{(initial_tool == 0 ? 30 : (initial_tool == 1 ? 150 : (initial_tool == 2 ? 210 : 330))) + ((initial_tool == 0 or initial_tool == 2 ? 1 : -1) * 40) + ((initial_tool == 0 or initial_tool == 2 ? 1 : -1) * 3 * 2)} Z0.2 F{8000} ; wipe, move quickly away from the bed
G1 E{- 1.5 * retraction_length[initial_tool]} F2400 ; retract
G92 E0 ; reset extruder position

M593 X T2 F35.8
M593 Y T2 F35.4

End Code:
G4 ; wait
{if max_layer_z < max_print_height}G1 Z{z_offset+min(max_layer_z+5, max_print_height)}{endif} ; Move bed down
P0 S1 ; park tool
{if max_layer_z < max_print_height}G1 Z{z_offset+min(max_layer_z+97, max_print_height)} F300{endif} ; Move bed further down
; turn off extruder heaters
{if is_extruder_used[0]} M104 T0 S0 {endif}
{if is_extruder_used[1]} M104 T1 S0 {endif}
{if is_extruder_used[2]} M104 T2 S0 {endif}
{if is_extruder_used[3]} M104 T3 S0 {endif}
{if is_extruder_used[4]} M104 T4 S0 {endif}
M140 S0 ; turn off heatbed
M107 ; turn off fan
M221 S100 ; reset flow percentage
M84 ; disable motors
M77 ; stop print timer
; max_layer_z = [max_layer_z]

@cochcoder
Copy link
Contributor Author

pls add all XL profiles... up to 5 my start code works for all 1-5

; 2024 Heiko Liebscher

; Printer : [printer_preset]

; Profile : [print_preset]

; Plate : [plate_name]

; --- initial_extruder: [initial_extruder]

; --- has_wipe_tower: [has_wipe_tower]

; --- total_toolchanges: [total_toolchanges]

; --- T0: {is_extruder_used[0]}

; --- T1: {is_extruder_used[1]}

; --- T2: {is_extruder_used[2]}

; --- T3: {is_extruder_used[3]}

; --- T4: {is_extruder_used[4]}

;T[initial_extruder]

M17 ; enable steppers

M862.3 P "XL" ; printer model check

M862.5 P2 ; g-code level check

M862.6 P"Input shaper" ; FW feature check

M115 U5.1.2+13478

G90 ; use absolute coordinates

M83 ; extruder relative mode

; set print area

M555 X{first_layer_print_min[0]} Y{first_layer_print_min[1]} W{(first_layer_print_max[0]) - (first_layer_print_min[0])} H{(first_layer_print_max[1]) - (first_layer_print_min[1])}

; inform about nozzle diameter

{if (is_extruder_used[0])}M862.1 T0 P{nozzle_diameter[0]}{endif}

{if (is_extruder_used[1])}M862.1 T1 P{nozzle_diameter[1]}{endif}

{if (is_extruder_used[2])}M862.1 T2 P{nozzle_diameter[2]}{endif}

{if (is_extruder_used[3])}M862.1 T3 P{nozzle_diameter[3]}{endif}

{if (is_extruder_used[4])}M862.1 T4 P{nozzle_diameter[4]}{endif}

; turn off unused heaters

{if ! is_extruder_used[0]} M104 T0 S0 {endif}

{if ! is_extruder_used[1]} M104 T1 S0 {endif}

{if ! is_extruder_used[2]} M104 T2 S0 {endif}

{if ! is_extruder_used[3]} M104 T3 S0 {endif}

{if ! is_extruder_used[4]} M104 T4 S0 {endif}

M217 Z{max(zhop, 2.0)} ; set toolchange z hop to 2mm, or zhop variable from slicer if higher

; set bed and extruder temp for MBL

M140 S[first_layer_bed_temperature] ; set bed temp

G0 Z5 ; add Z clearance

M109 T{initial_tool} S{((filament_notes[initial_tool]=/.HT_MBL10./) ? (first_layer_temperature[initial_tool] - 10) : (filament_type[initial_tool] == "PC" or filament_type[initial_tool] == "PA") ? (first_layer_temperature[initial_tool] - 25) : (filament_type[initial_tool] == "FLEX") ? 210 : (filament_type[initial_tool]=/.PET./) ? 175 : 170)} ; wait for temp

; Home XY

G28 XY

; try picking tools used in print

G1 F{travel_speed * 60}

{if (is_extruder_used[0]) and (initial_tool != 0)}T0 S1 L0 D0{endif}

{if (is_extruder_used[1]) and (initial_tool != 1)}T1 S1 L0 D0{endif}

{if (is_extruder_used[2]) and (initial_tool != 2)}T2 S1 L0 D0{endif}

{if (is_extruder_used[3]) and (initial_tool != 3)}T3 S1 L0 D0{endif}

{if (is_extruder_used[4]) and (initial_tool != 4)}T4 S1 L0 D0{endif}

; select tool that will be used to home & MBL

T{initial_tool} S1 L0 D0

; home Z with MBL tool

M84 E ; turn off E motor

G28 Z

G0 Z5 ; add Z clearance

M104 T{initial_tool} S{if is_nil(temperature_vitrification[initial_tool])}70{else}{temperature_vitrification[initial_tool]-80}{endif} ; set idle temp

M190 S[first_layer_bed_temperature] ; wait for bed temp

G29 G ; absorb heat

M109 T{initial_tool} S{((filament_notes[initial_tool]=/.HT_MBL10./) ? (first_layer_temperature[initial_tool] - 10) : (filament_type[initial_tool] == "PC" or filament_type[initial_tool] == "PA") ? (first_layer_temperature[initial_tool] - 25) : (filament_type[initial_tool] == "FLEX") ? 210 : (filament_type[initial_tool]=/.PET./) ? 175 : 170)} ; wait for temp

; move to the nozzle cleanup area

G1 X{(min(((((first_layer_print_min[0] + first_layer_print_max[0]) / 2) < ((print_bed_min[0] + print_bed_max[0]) / 2)) ? (((first_layer_print_min[1] - 7) < -2) ? 70 : (min(print_bed_max[0], first_layer_print_min[0] + 32) - 32)) : (((first_layer_print_min[1] - 7) < -2) ? 260 : (min(print_bed_max[0], first_layer_print_min[0] + 32) - 32))), first_layer_print_min[0])) + 32} Y{(min((first_layer_print_min[1] - 7), first_layer_print_min[1]))} Z{5} F{(travel_speed * 60)}

M302 S160 ; lower cold extrusion limit to 160C

G1 E{-(filament_type[0] == "FLEX" ? 4 : 2)} F2400 ; retraction for nozzle cleanup

; nozzle cleanup

M84 E ; turn off E motor

G29 P9 X{((((first_layer_print_min[0] + first_layer_print_max[0]) / 2) < ((print_bed_min[0] + print_bed_max[0]) / 2)) ? (((first_layer_print_min[1] - 7) < -2) ? 70 : (min(print_bed_max[0], first_layer_print_min[0] + 32) - 32)) : (((first_layer_print_min[1] - 7) < -2) ? 260 : (min(print_bed_max[0], first_layer_print_min[0] + 32) - 32)))} Y{(first_layer_print_min[1] - 7)} W{32} H{7}

G0 Z5 F480 ; move away in Z

M107 ; turn off the fan

; MBL

M84 E ; turn off E motor

G29 P1 ; invalidate mbl & probe print area

G29 P1 X30 Y0 W{(((is_extruder_used[4]) or ((is_extruder_used[3]) or (is_extruder_used[2]))) ? "300" : ((is_extruder_used[1]) ? "130" : "50"))} H20 C ; probe near purge place

G29 P3.2 ; interpolate mbl probes

G29 P3.13 ; extrapolate mbl outside probe area

G29 A ; activate mbl

G1 Z10 F720 ; move away in Z

G1 F{travel_speed * 60}

P0 S1 L1 D0; park the tool

; set extruder temp

{if first_layer_temperature[0] > 0 and (is_extruder_used[0])}M104 T0 S{first_layer_temperature[0]}{endif}

{if first_layer_temperature[1] > 0 and (is_extruder_used[1])}M104 T1 S{first_layer_temperature[1]}{endif}

{if first_layer_temperature[2] > 0 and (is_extruder_used[2])}M104 T2 S{first_layer_temperature[2]}{endif}

{if first_layer_temperature[3] > 0 and (is_extruder_used[3])}M104 T3 S{first_layer_temperature[3]}{endif}

{if first_layer_temperature[4] > 0 and (is_extruder_used[4])}M104 T4 S{first_layer_temperature[4]}{endif}

{if (is_extruder_used[0]) and initial_tool != 0}

;

; purge first tool

;=================================

G1 F{travel_speed * 60}

P0 S1 L2 D0; park the tool

M109 T0 S{first_layer_temperature[0]}

T0 S1 L0 D0; pick the tool

G92 E0 ; reset extruder position

G0 X{(0 == 0 ? 30 : (0 == 1 ? 150 : (0 == 2 ? 210 : 330)))} Y{(0 < 4 ? -7 : -4.5)} Z10 F{(travel_speed * 60)} ; move close to the sheet's edge

G0 E{if is_nil(filament_multitool_ramming[0])}5{else}5{endif} X40 Z0.2 F{if is_nil(filament_multitool_ramming[0])}500{else}170{endif} ; purge while moving towards the sheet

G0 X70 E9 F800 ; continue purging and wipe the nozzle

G0 X{70 + 3} Z{0.05} F{8000} ; wipe, move close to the bed

G0 X{70 + 3 * 2} Z0.2 F{8000} ; wipe, move quickly away from the bed

G1 E{- 1.5 * retraction_length[0]} F2400 ; retract

G92 E0 ; reset extruder position

M104 S{(is_nil(temperature_vitrification[0]) ? (first_layer_temperature[0] + standby_temperature_delta) : (temperature_vitrification[0]))} T0

{endif}

{if (is_extruder_used[1]) and initial_tool != 1}

; purge second tool

;=================================

G1 F{travel_speed * 60}

P0 S1 L2 D0; park the tool

M109 T1 S{first_layer_temperature[1]}

T1 S1 L0 D0; pick the tool

G92 E0 ; reset extruder position

G0 X{(1 == 0 ? 30 : (1 == 1 ? 150 : (1 == 2 ? 210 : 330)))} Y{(1 < 4 ? -7 : -4.5)} Z10 F{(travel_speed * 60)} ; move close to the sheet's edge

G0 E{if is_nil(filament_multitool_ramming[1])}5{else}5{endif} X140 Z0.2 F{if is_nil(filament_multitool_ramming[1])}500{else}170{endif} ; purge while moving towards the sheet

G0 X110 E9 F800 ; continue purging and wipe the nozzle

G0 X{110 - 3} Z{0.05} F{8000} ; wipe, move close to the bed

G0 X{110 - 3 * 2} Z0.2 F{8000} ; wipe, move quickly away from the bed

G1 E{- 1.5 * retraction_length[1]} F2400 ; retract

G92 E0 ; reset extruder position

M104 S{(is_nil(temperature_vitrification[1]) ? (first_layer_temperature[1] + standby_temperature_delta) : (temperature_vitrification[1]))} T1

{endif}

{if (is_extruder_used[2]) and initial_tool != 2}

; purge third tool

;=================================

G1 F{travel_speed * 60}

P0 S1 L2 D0; park the tool

M109 T2 S{first_layer_temperature[2]}

T2 S1 L0 D0; pick the tool

G92 E0 ; reset extruder position

G0 X{(2 == 0 ? 30 : (2 == 1 ? 150 : (2 == 2 ? 210 : 330)))} Y{(2 < 4 ? -7 : -4.5)} Z10 F{(travel_speed * 60)} ; move close to the sheet's edge

G0 E{if is_nil(filament_multitool_ramming[2])}5{else}5{endif} X220 Z0.2 F{if is_nil(filament_multitool_ramming[2])}500{else}170{endif} ; purge while moving towards the sheet

G0 X250 E9 F800 ; continue purging and wipe the nozzle

G0 X{250 + 3} Z{0.05} F{8000} ; wipe, move close to the bed

G0 X{250 + 3 * 2} Z0.2 F{8000} ; wipe, move quickly away from the bed

G1 E{- 1.5 * retraction_length[2]} F2400 ; retract

G92 E0 ; reset extruder position

M104 S{(is_nil(temperature_vitrification[2]) ? (first_layer_temperature[2] + standby_temperature_delta) : (temperature_vitrification[2]))} T2

{endif}

{if (is_extruder_used[3]) and initial_tool != 3}

; purge fourth tool

;=================================

G1 F{travel_speed * 60}

P0 S1 L2 D0; park the tool

M109 T3 S{first_layer_temperature[3]}

T3 S1 L0 D0; pick the tool

G92 E0 ; reset extruder position

G0 X{(3 == 0 ? 30 : (3 == 1 ? 150 : (3 == 2 ? 210 : 330)))} Y{(3 < 4 ? -7 : -4.5)} Z10 F{(travel_speed * 60)} ; move close to the sheet's edge

G0 E{if is_nil(filament_multitool_ramming[3])}5{else}5{endif} X320 Z0.2 F{if is_nil(filament_multitool_ramming[3])}500{else}170{endif} ; purge while moving towards the sheet

G0 X290 E9 F800 ; continue purging and wipe the nozzle

G0 X{290 - 3} Z{0.05} F{8000} ; wipe, move close to the bed

G0 X{290 - 3 * 2} Z0.2 F{8000} ; wipe, move quickly away from the bed

G1 E{- 1.5 * retraction_length[3]} F2400 ; retract

G92 E0 ; reset extruder position

M104 S{(is_nil(temperature_vitrification[3]) ? (first_layer_temperature[3] + standby_temperature_delta) : (temperature_vitrification[3]))} T3

{endif}

{if (is_extruder_used[4]) and initial_tool != 4}

; purge fifth tool

;=================================

G1 F{travel_speed * 60}

P0 S1 L2 D0; park the tool

M109 T4 S{first_layer_temperature[4]}

T4 S1 L0 D0; pick the tool

G92 E0 ; reset extruder position

G0 X{(4 == 0 ? 30 : (4 == 1 ? 150 : (4 == 2 ? 210 : 330)))} Y{(4 < 4 ? -7 : -4.5)} Z10 F{(travel_speed * 60)} ; move close to the sheet's edge

G0 E{if is_nil(filament_multitool_ramming[4])}5{else}5{endif} X320 Z0.2 F{if is_nil(filament_multitool_ramming[4])}500{else}170{endif} ; purge while moving towards the sheet

G0 X290 E9 F800 ; continue purging and wipe the nozzle

G0 X{290 - 3} Z{0.05} F{8000} ; wipe, move close to the bed

G0 X{290 - 3 * 2} Z0.2 F{8000} ; wipe, move quickly away from the bed

G1 E{- 1.5 * retraction_length[4]} F2400 ; retract

G92 E0 ; reset extruder position

M104 S{(is_nil(temperature_vitrification[4]) ? (first_layer_temperature[4] + standby_temperature_delta) : (temperature_vitrification[4]))} T4

{endif}

; purge initial tool

;=================================

G1 F{travel_speed * 60}

P0 S1 L2 D0; park the tool

M109 T{initial_tool} S{first_layer_temperature[initial_tool]}

T{initial_tool} S1 L0 D0; pick the tool

G92 E0 ; reset extruder position

G0 X{(initial_tool == 0 ? 30 : (initial_tool == 1 ? 150 : (initial_tool == 2 ? 210 : 330)))} Y{(initial_tool < 4 ? -7 : -4.5)} Z10 F{(travel_speed * 60)} ; move close to the sheet's edge

G0 E{if is_nil(filament_multitool_ramming[initial_tool])}5{else}10{endif} X{(initial_tool == 0 ? 30 : (initial_tool == 1 ? 150 : (initial_tool == 2 ? 210 : 330))) + ((initial_tool == 0 or initial_tool == 2 ? 1 : -1) * 10)} Z0.2 F{if is_nil(filament_multitool_ramming[initial_tool])}500{else}170{endif} ; purge while moving towards the sheet

G0 X{(initial_tool == 0 ? 30 : (initial_tool == 1 ? 150 : (initial_tool == 2 ? 210 : 330))) + ((initial_tool == 0 or initial_tool == 2 ? 1 : -1) * 40)} E9 F800 ; continue purging and wipe the nozzle

G0 X{(initial_tool == 0 ? 30 : (initial_tool == 1 ? 150 : (initial_tool == 2 ? 210 : 330))) + ((initial_tool == 0 or initial_tool == 2 ? 1 : -1) * 40) + ((initial_tool == 0 or initial_tool == 2 ? 1 : -1) * 3)} Z{0.05} F{8000} ; wipe, move close to the bed

G0 X{(initial_tool == 0 ? 30 : (initial_tool == 1 ? 150 : (initial_tool == 2 ? 210 : 330))) + ((initial_tool == 0 or initial_tool == 2 ? 1 : -1) * 40) + ((initial_tool == 0 or initial_tool == 2 ? 1 : -1) * 3 * 2)} Z0.2 F{8000} ; wipe, move quickly away from the bed

G1 E{- 1.5 * retraction_length[initial_tool]} F2400 ; retract

G92 E0 ; reset extruder position

M593 X T2 F35.8

M593 Y T2 F35.4

End Code:

G4 ; wait

{if max_layer_z < max_print_height}G1 Z{z_offset+min(max_layer_z+5, max_print_height)}{endif} ; Move bed down

P0 S1 ; park tool

{if max_layer_z < max_print_height}G1 Z{z_offset+min(max_layer_z+97, max_print_height)} F300{endif} ; Move bed further down

; turn off extruder heaters

{if is_extruder_used[0]} M104 T0 S0 {endif}

{if is_extruder_used[1]} M104 T1 S0 {endif}

{if is_extruder_used[2]} M104 T2 S0 {endif}

{if is_extruder_used[3]} M104 T3 S0 {endif}

{if is_extruder_used[4]} M104 T4 S0 {endif}

M140 S0 ; turn off heatbed

M107 ; turn off fan

M221 S100 ; reset flow percentage

M84 ; disable motors

M77 ; stop print timer

; max_layer_z = [max_layer_z]

Thanks for the G-Code, is this needed to run the Prusa XL with multiple heads or does the current profile work? I probably won't be able to add support for multi head printing as the code that either BambuLabs or Orca Slicer removed is difficult to find and is out of my wheelhouse.

@cochcoder
Copy link
Contributor Author

Anyone wanting to test out the profile will need to use this new build, as it configures the printer infill to be what is used in PrusaSlicer and fixes the filament start G-Code not working properly.

@cochcoder cochcoder marked this pull request as ready for review June 7, 2024 01:35
@cochcoder cochcoder changed the title Add support for Prusa XL (only one head will print) & add PC-CF, PA11-CF, & PVB filament types Add support for Prusa XL & XLIS (only one head will print) & add PC-CF, PA11-CF, & PVB filament types Jun 7, 2024
@SoftFever
Copy link
Owner

By the way, if it helps to reduce the changes we need to make, I think we can remove the non 'input shaper' version, as I don't expect any users would use the non-IS version nowadays. It's not really worth supporting both versions. It makes sense for PS to add a new version instead of modifying the existing profiles, as they don't want to affect existing users when they introduce the IS firmware. However, for Orca, it's a different case.

@cochcoder
Copy link
Contributor Author

cochcoder commented Jun 7, 2024

Ok, I have removed all non Input Shaper profiles and renamed XLIS to Prusa XL Input Shaper. I've left the filaments with "@ XL" as they work with both versions and I left the process named with "@ XLIS" as "XL Input Shaper" is too long in my opinion.

@cochcoder cochcoder changed the title Add support for Prusa XL & XLIS (only one head will print) & add PC-CF, PA11-CF, & PVB filament types Add support for Prusa XL Input Shaper (only one head will print) & add PC-CF, PA11-CF, & PVB filament types Jun 7, 2024
@SoftFever
Copy link
Owner

Looks good.
I found some errors like typos and wrong parameter names, I will fix them in another commit.

@SoftFever SoftFever merged commit 467691d into SoftFever:main Jun 8, 2024
13 checks passed
@SoftFever
Copy link
Owner

pls add all XL profiles... up to 5 my start code works for all 1-5

; 2024 Heiko Liebscher ; Printer : [printer_preset] ; Profile : [print_preset] ; Plate : [plate_name] ; --- initial_extruder: [initial_extruder] ; --- has_wipe_tower: [has_wipe_tower] ; --- total_toolchanges: [total_toolchanges] ; --- T0: {is_extruder_used[0]} ; --- T1: {is_extruder_used[1]} ; --- T2: {is_extruder_used[2]} ; --- T3: {is_extruder_used[3]} ; --- T4: {is_extruder_used[4]} ;T[initial_extruder] M17 ; enable steppers M862.3 P "XL" ; printer model check M862.5 P2 ; g-code level check M862.6 P"Input shaper" ; FW feature check M115 U5.1.2+13478 G90 ; use absolute coordinates M83 ; extruder relative mode ; set print area M555 X{first_layer_print_min[0]} Y{first_layer_print_min[1]} W{(first_layer_print_max[0]) - (first_layer_print_min[0])} H{(first_layer_print_max[1]) - (first_layer_print_min[1])} ; inform about nozzle diameter {if (is_extruder_used[0])}M862.1 T0 P{nozzle_diameter[0]}{endif} {if (is_extruder_used[1])}M862.1 T1 P{nozzle_diameter[1]}{endif} {if (is_extruder_used[2])}M862.1 T2 P{nozzle_diameter[2]}{endif} {if (is_extruder_used[3])}M862.1 T3 P{nozzle_diameter[3]}{endif} {if (is_extruder_used[4])}M862.1 T4 P{nozzle_diameter[4]}{endif}

; turn off unused heaters {if ! is_extruder_used[0]} M104 T0 S0 {endif} {if ! is_extruder_used[1]} M104 T1 S0 {endif} {if ! is_extruder_used[2]} M104 T2 S0 {endif} {if ! is_extruder_used[3]} M104 T3 S0 {endif} {if ! is_extruder_used[4]} M104 T4 S0 {endif}

M217 Z{max(zhop, 2.0)} ; set toolchange z hop to 2mm, or zhop variable from slicer if higher ; set bed and extruder temp for MBL M140 S[first_layer_bed_temperature] ; set bed temp G0 Z5 ; add Z clearance M109 T{initial_tool} S{((filament_notes[initial_tool]=/.HT_MBL10./) ? (first_layer_temperature[initial_tool] - 10) : (filament_type[initial_tool] == "PC" or filament_type[initial_tool] == "PA") ? (first_layer_temperature[initial_tool] - 25) : (filament_type[initial_tool] == "FLEX") ? 210 : (filament_type[initial_tool]=/.PET./) ? 175 : 170)} ; wait for temp

; Home XY G28 XY ; try picking tools used in print G1 F{travel_speed * 60} {if (is_extruder_used[0]) and (initial_tool != 0)}T0 S1 L0 D0{endif} {if (is_extruder_used[1]) and (initial_tool != 1)}T1 S1 L0 D0{endif} {if (is_extruder_used[2]) and (initial_tool != 2)}T2 S1 L0 D0{endif} {if (is_extruder_used[3]) and (initial_tool != 3)}T3 S1 L0 D0{endif} {if (is_extruder_used[4]) and (initial_tool != 4)}T4 S1 L0 D0{endif} ; select tool that will be used to home & MBL T{initial_tool} S1 L0 D0 ; home Z with MBL tool M84 E ; turn off E motor G28 Z G0 Z5 ; add Z clearance

M104 T{initial_tool} S{if is_nil(temperature_vitrification[initial_tool])}70{else}{temperature_vitrification[initial_tool]-80}{endif} ; set idle temp M190 S[first_layer_bed_temperature] ; wait for bed temp G29 G ; absorb heat

M109 T{initial_tool} S{((filament_notes[initial_tool]=/.HT_MBL10./) ? (first_layer_temperature[initial_tool] - 10) : (filament_type[initial_tool] == "PC" or filament_type[initial_tool] == "PA") ? (first_layer_temperature[initial_tool] - 25) : (filament_type[initial_tool] == "FLEX") ? 210 : (filament_type[initial_tool]=/.PET./) ? 175 : 170)} ; wait for temp

; move to the nozzle cleanup area G1 X{(min(((((first_layer_print_min[0] + first_layer_print_max[0]) / 2) < ((print_bed_min[0] + print_bed_max[0]) / 2)) ? (((first_layer_print_min[1] - 7) < -2) ? 70 : (min(print_bed_max[0], first_layer_print_min[0] + 32) - 32)) : (((first_layer_print_min[1] - 7) < -2) ? 260 : (min(print_bed_max[0], first_layer_print_min[0] + 32) - 32))), first_layer_print_min[0])) + 32} Y{(min((first_layer_print_min[1] - 7), first_layer_print_min[1]))} Z{5} F{(travel_speed * 60)} M302 S160 ; lower cold extrusion limit to 160C G1 E{-(filament_type[0] == "FLEX" ? 4 : 2)} F2400 ; retraction for nozzle cleanup ; nozzle cleanup M84 E ; turn off E motor G29 P9 X{((((first_layer_print_min[0] + first_layer_print_max[0]) / 2) < ((print_bed_min[0] + print_bed_max[0]) / 2)) ? (((first_layer_print_min[1] - 7) < -2) ? 70 : (min(print_bed_max[0], first_layer_print_min[0] + 32) - 32)) : (((first_layer_print_min[1] - 7) < -2) ? 260 : (min(print_bed_max[0], first_layer_print_min[0] + 32) - 32)))} Y{(first_layer_print_min[1] - 7)} W{32} H{7} G0 Z5 F480 ; move away in Z M107 ; turn off the fan ; MBL M84 E ; turn off E motor G29 P1 ; invalidate mbl & probe print area G29 P1 X30 Y0 W{(((is_extruder_used[4]) or ((is_extruder_used[3]) or (is_extruder_used[2]))) ? "300" : ((is_extruder_used[1]) ? "130" : "50"))} H20 C ; probe near purge place G29 P3.2 ; interpolate mbl probes G29 P3.13 ; extrapolate mbl outside probe area G29 A ; activate mbl G1 Z10 F720 ; move away in Z G1 F{travel_speed * 60} P0 S1 L1 D0; park the tool ; set extruder temp {if first_layer_temperature[0] > 0 and (is_extruder_used[0])}M104 T0 S{first_layer_temperature[0]}{endif} {if first_layer_temperature[1] > 0 and (is_extruder_used[1])}M104 T1 S{first_layer_temperature[1]}{endif} {if first_layer_temperature[2] > 0 and (is_extruder_used[2])}M104 T2 S{first_layer_temperature[2]}{endif} {if first_layer_temperature[3] > 0 and (is_extruder_used[3])}M104 T3 S{first_layer_temperature[3]}{endif} {if first_layer_temperature[4] > 0 and (is_extruder_used[4])}M104 T4 S{first_layer_temperature[4]}{endif} {if (is_extruder_used[0]) and initial_tool != 0} ; ; purge first tool ;================================= G1 F{travel_speed * 60} P0 S1 L2 D0; park the tool M109 T0 S{first_layer_temperature[0]} T0 S1 L0 D0; pick the tool G92 E0 ; reset extruder position

G0 X{(0 == 0 ? 30 : (0 == 1 ? 150 : (0 == 2 ? 210 : 330)))} Y{(0 < 4 ? -7 : -4.5)} Z10 F{(travel_speed * 60)} ; move close to the sheet's edge G0 E{if is_nil(filament_multitool_ramming[0])}5{else}5{endif} X40 Z0.2 F{if is_nil(filament_multitool_ramming[0])}500{else}170{endif} ; purge while moving towards the sheet G0 X70 E9 F800 ; continue purging and wipe the nozzle G0 X{70 + 3} Z{0.05} F{8000} ; wipe, move close to the bed G0 X{70 + 3 * 2} Z0.2 F{8000} ; wipe, move quickly away from the bed G1 E{- 1.5 * retraction_length[0]} F2400 ; retract G92 E0 ; reset extruder position M104 S{(is_nil(temperature_vitrification[0]) ? (first_layer_temperature[0] + standby_temperature_delta) : (temperature_vitrification[0]))} T0 {endif}

{if (is_extruder_used[1]) and initial_tool != 1} ; purge second tool ;================================= G1 F{travel_speed * 60} P0 S1 L2 D0; park the tool M109 T1 S{first_layer_temperature[1]} T1 S1 L0 D0; pick the tool G92 E0 ; reset extruder position G0 X{(1 == 0 ? 30 : (1 == 1 ? 150 : (1 == 2 ? 210 : 330)))} Y{(1 < 4 ? -7 : -4.5)} Z10 F{(travel_speed * 60)} ; move close to the sheet's edge G0 E{if is_nil(filament_multitool_ramming[1])}5{else}5{endif} X140 Z0.2 F{if is_nil(filament_multitool_ramming[1])}500{else}170{endif} ; purge while moving towards the sheet G0 X110 E9 F800 ; continue purging and wipe the nozzle G0 X{110 - 3} Z{0.05} F{8000} ; wipe, move close to the bed G0 X{110 - 3 * 2} Z0.2 F{8000} ; wipe, move quickly away from the bed G1 E{- 1.5 * retraction_length[1]} F2400 ; retract G92 E0 ; reset extruder position M104 S{(is_nil(temperature_vitrification[1]) ? (first_layer_temperature[1] + standby_temperature_delta) : (temperature_vitrification[1]))} T1 {endif}

{if (is_extruder_used[2]) and initial_tool != 2} ; purge third tool ;================================= G1 F{travel_speed * 60} P0 S1 L2 D0; park the tool M109 T2 S{first_layer_temperature[2]} T2 S1 L0 D0; pick the tool G92 E0 ; reset extruder position G0 X{(2 == 0 ? 30 : (2 == 1 ? 150 : (2 == 2 ? 210 : 330)))} Y{(2 < 4 ? -7 : -4.5)} Z10 F{(travel_speed * 60)} ; move close to the sheet's edge G0 E{if is_nil(filament_multitool_ramming[2])}5{else}5{endif} X220 Z0.2 F{if is_nil(filament_multitool_ramming[2])}500{else}170{endif} ; purge while moving towards the sheet G0 X250 E9 F800 ; continue purging and wipe the nozzle G0 X{250 + 3} Z{0.05} F{8000} ; wipe, move close to the bed G0 X{250 + 3 * 2} Z0.2 F{8000} ; wipe, move quickly away from the bed G1 E{- 1.5 * retraction_length[2]} F2400 ; retract G92 E0 ; reset extruder position M104 S{(is_nil(temperature_vitrification[2]) ? (first_layer_temperature[2] + standby_temperature_delta) : (temperature_vitrification[2]))} T2 {endif}

{if (is_extruder_used[3]) and initial_tool != 3} ; purge fourth tool ;================================= G1 F{travel_speed * 60} P0 S1 L2 D0; park the tool M109 T3 S{first_layer_temperature[3]} T3 S1 L0 D0; pick the tool G92 E0 ; reset extruder position G0 X{(3 == 0 ? 30 : (3 == 1 ? 150 : (3 == 2 ? 210 : 330)))} Y{(3 < 4 ? -7 : -4.5)} Z10 F{(travel_speed * 60)} ; move close to the sheet's edge G0 E{if is_nil(filament_multitool_ramming[3])}5{else}5{endif} X320 Z0.2 F{if is_nil(filament_multitool_ramming[3])}500{else}170{endif} ; purge while moving towards the sheet G0 X290 E9 F800 ; continue purging and wipe the nozzle G0 X{290 - 3} Z{0.05} F{8000} ; wipe, move close to the bed G0 X{290 - 3 * 2} Z0.2 F{8000} ; wipe, move quickly away from the bed G1 E{- 1.5 * retraction_length[3]} F2400 ; retract G92 E0 ; reset extruder position M104 S{(is_nil(temperature_vitrification[3]) ? (first_layer_temperature[3] + standby_temperature_delta) : (temperature_vitrification[3]))} T3 {endif}

{if (is_extruder_used[4]) and initial_tool != 4} ; purge fifth tool ;================================= G1 F{travel_speed * 60} P0 S1 L2 D0; park the tool M109 T4 S{first_layer_temperature[4]} T4 S1 L0 D0; pick the tool G92 E0 ; reset extruder position G0 X{(4 == 0 ? 30 : (4 == 1 ? 150 : (4 == 2 ? 210 : 330)))} Y{(4 < 4 ? -7 : -4.5)} Z10 F{(travel_speed * 60)} ; move close to the sheet's edge G0 E{if is_nil(filament_multitool_ramming[4])}5{else}5{endif} X320 Z0.2 F{if is_nil(filament_multitool_ramming[4])}500{else}170{endif} ; purge while moving towards the sheet G0 X290 E9 F800 ; continue purging and wipe the nozzle G0 X{290 - 3} Z{0.05} F{8000} ; wipe, move close to the bed G0 X{290 - 3 * 2} Z0.2 F{8000} ; wipe, move quickly away from the bed G1 E{- 1.5 * retraction_length[4]} F2400 ; retract G92 E0 ; reset extruder position M104 S{(is_nil(temperature_vitrification[4]) ? (first_layer_temperature[4] + standby_temperature_delta) : (temperature_vitrification[4]))} T4 {endif}

; purge initial tool ;================================= G1 F{travel_speed * 60} P0 S1 L2 D0; park the tool M109 T{initial_tool} S{first_layer_temperature[initial_tool]} T{initial_tool} S1 L0 D0; pick the tool G92 E0 ; reset extruder position G0 X{(initial_tool == 0 ? 30 : (initial_tool == 1 ? 150 : (initial_tool == 2 ? 210 : 330)))} Y{(initial_tool < 4 ? -7 : -4.5)} Z10 F{(travel_speed * 60)} ; move close to the sheet's edge G0 E{if is_nil(filament_multitool_ramming[initial_tool])}5{else}10{endif} X{(initial_tool == 0 ? 30 : (initial_tool == 1 ? 150 : (initial_tool == 2 ? 210 : 330))) + ((initial_tool == 0 or initial_tool == 2 ? 1 : -1) * 10)} Z0.2 F{if is_nil(filament_multitool_ramming[initial_tool])}500{else}170{endif} ; purge while moving towards the sheet G0 X{(initial_tool == 0 ? 30 : (initial_tool == 1 ? 150 : (initial_tool == 2 ? 210 : 330))) + ((initial_tool == 0 or initial_tool == 2 ? 1 : -1) * 40)} E9 F800 ; continue purging and wipe the nozzle G0 X{(initial_tool == 0 ? 30 : (initial_tool == 1 ? 150 : (initial_tool == 2 ? 210 : 330))) + ((initial_tool == 0 or initial_tool == 2 ? 1 : -1) * 40) + ((initial_tool == 0 or initial_tool == 2 ? 1 : -1) * 3)} Z{0.05} F{8000} ; wipe, move close to the bed G0 X{(initial_tool == 0 ? 30 : (initial_tool == 1 ? 150 : (initial_tool == 2 ? 210 : 330))) + ((initial_tool == 0 or initial_tool == 2 ? 1 : -1) * 40) + ((initial_tool == 0 or initial_tool == 2 ? 1 : -1) * 3 * 2)} Z0.2 F{8000} ; wipe, move quickly away from the bed G1 E{- 1.5 * retraction_length[initial_tool]} F2400 ; retract G92 E0 ; reset extruder position

M593 X T2 F35.8 M593 Y T2 F35.4

End Code: G4 ; wait {if max_layer_z < max_print_height}G1 Z{z_offset+min(max_layer_z+5, max_print_height)}{endif} ; Move bed down P0 S1 ; park tool {if max_layer_z < max_print_height}G1 Z{z_offset+min(max_layer_z+97, max_print_height)} F300{endif} ; Move bed further down ; turn off extruder heaters {if is_extruder_used[0]} M104 T0 S0 {endif} {if is_extruder_used[1]} M104 T1 S0 {endif} {if is_extruder_used[2]} M104 T2 S0 {endif} {if is_extruder_used[3]} M104 T3 S0 {endif} {if is_extruder_used[4]} M104 T4 S0 {endif} M140 S0 ; turn off heatbed M107 ; turn off fan M221 S100 ; reset flow percentage M84 ; disable motors M77 ; stop print timer ; max_layer_z = [max_layer_z]

Hi @hliebscher

Does it work with multiple tools?
We can add another multi tool version of profile for XL.
But I think given the difference between Orca and PS, it's not necessary to add "2 tool head" "5 head version".
One multi-tool version is enough for Orca.

@SoftFever
Copy link
Owner

Meanwhile, added some fixes to the single head version: f9ecc9d

@cochcoder cochcoder deleted the prusa-xl branch June 8, 2024 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants