Orca slicer start code Idex
-
Hello everyone.
I have created a start code for my IDEX printer for the Orca slicer. Everything works very well, except for the mirror mode. Here, I want it to perform a separate nozzle cleaning as specified in the code, and then start printing without executing the rest of the code. Does anyone have an idea?
; Model: Proschi3d({nozzle_diameter[0]}/{nozzle_diameter[1]}) ; 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[(initial_extruder % 2 == 0 ? min(initial_extruder + 0, 63) : max(initial_extruder - 1, 0))]} ; --- T1: {is_extruder_used[(initial_extruder % 2 == 0 ? min(initial_extruder + 1, 63) : max(initial_extruder - 0, 0))]} T[initial_extruder] {if plate_name =~/.*IDEXDupl.*/ || plate_name =~/.*IDEXCopy.*/ } T2 {elsif plate_name =~/.*IDEXMirr.*/} M140 S{first_layer_bed_temperature[initial_extruder]} M557 X{adaptive_bed_mesh_min[0]}:{adaptive_bed_mesh_max[0]} Y{adaptive_bed_mesh_min[1]}:{adaptive_bed_mesh_max[1]} P{bed_mesh_probe_count[0]}:{bed_mesh_probe_count[1]} ; Mesh-Bett-Nivellierung G28 X0 Y0 U0 T3 ; Eigener Düsenreinigungsprozess G0 Z10 F3000 ; Hebe die Düse an G0 X5 Y10 F6000 ; Bewege die Düse zur Reinigungsposition M109 S{max(230, min(290, nozzle_temperature_initial_layer[(initial_extruder % 2 == 0 ? min(initial_extruder + 0, 63) : max(initial_extruder - (1-0), 0))] + 15))} C2 W1 G0 Z1.6 G1 E10 Z5 F100 ; Extrudiere etwas Filament, um die Düse zu reinigen M104 S{nozzle_temperature_initial_layer[(initial_extruder % 2 == 0 ? min(initial_extruder + 0, 63) : max(initial_extruder - (1-0), 0))] + 5} G0 X15 Y10 F3000 G0 Z0.4 G0 E8 X70 Y10 G0 X70 Y20 Z10 G92 E0 ; Setze den Extruderzähler zurück ; Starte den Druckprozess M117 ; Starte den Druckprozess {else} M140 S{first_layer_bed_temperature[initial_extruder]} ; you can clean the nozzle {if is_extruder_used[(initial_extruder % 2 == 0 ? min(initial_extruder + 0, 63) : max(initial_extruder - (1-0), 0))]} M104 T{(initial_extruder % 2 == 0 ? min(initial_extruder + 0, 63) : max(initial_extruder - (1-0), 0))} S165 {endif} {if is_extruder_used[(initial_extruder % 2 == 0 ? min(initial_extruder + 1, 63) : max(initial_extruder - (1-1), 0))]} M104 T{(initial_extruder % 2 == 0 ? min(initial_extruder + 1, 63) : max(initial_extruder - (1-1), 0))} S165 {endif} G28 F5000 M557 X{adaptive_bed_mesh_min[0]}:{adaptive_bed_mesh_max[0]} Y{adaptive_bed_mesh_min[1]}:{adaptive_bed_mesh_max[1]} P{bed_mesh_probe_count[0]}:{bed_mesh_probe_count[1]} G29 S0 G28 X0 U0 F6000 G0 Z5 F6000 {if is_extruder_used[(initial_extruder % 2 == 0 ? min(initial_extruder + 0, 63) : max(initial_extruder - (1-0), 0))]} T{(initial_extruder % 2 == 0 ? min(initial_extruder + 0, 63) : max(initial_extruder - (1-0), 0))} G0 X{if 0 == 0}80{else}240{endif} Y0 F7000 {endif} {if is_extruder_used[(initial_extruder % 2 == 0 ? min(initial_extruder + 1, 63) : max(initial_extruder - (1-1), 0))]} T{(initial_extruder % 2 == 0 ? min(initial_extruder + 1, 63) : max(initial_extruder - (1-1), 0))} G0 X{if 1 == 0}80{else}240{endif} Y0 F7000 {endif} M190 R{first_layer_bed_temperature[initial_extruder]} G28 X Y f6000 M83 {if 1==1 && max(hot_plate_temp_initial_layer[initial_extruder], hot_plate_temp[initial_extruder]) >= 90} G0 Z0.06 G92 Z0 ;reset z {endif} {if is_extruder_used[(initial_extruder % 2 == 0 ? min(initial_extruder + 0, 63) : max(initial_extruder - (1-0), 0))]} ; preheat 0 M104 T{(initial_extruder % 2 == 0 ? min(initial_extruder + 0, 63) : max(initial_extruder - (1-0), 0))} S{max(230, min(290, nozzle_temperature_initial_layer[(initial_extruder % 2 == 0 ? min(initial_extruder + 0, 63) : max(initial_extruder - (1-0), 0))] + 15))} {endif} {if is_extruder_used[(initial_extruder % 2 == 0 ? min(initial_extruder + 1, 63) : max(initial_extruder - (1-1), 0))]} ; preheat 1 M104 T{(initial_extruder % 2 == 0 ? min(initial_extruder + 1, 63) : max(initial_extruder - (1-1), 0))} S{max(230, min(290, nozzle_temperature_initial_layer[(initial_extruder % 2 == 0 ? min(initial_extruder + 1, 63) : max(initial_extruder - (1-1), 0))] + 15))} {endif} {if is_extruder_used[(initial_extruder % 2 == 0 ? min(initial_extruder + 0, 63) : max(initial_extruder - (1-0), 0))] and (initial_extruder % 2) != 0} ; flush nozzle 0 T{(initial_extruder % 2 == 0 ? min(initial_extruder + 0, 63) : max(initial_extruder - (1-0), 0))} M104 S{max(230, min(290, nozzle_temperature_initial_layer[(initial_extruder % 2 == 0 ? min(initial_extruder + 0, 63) : max(initial_extruder - (1-0), 0))] + 15))}; common flush temp G0 Z1.6 F2000 G0 X{( 0 % 2 == 0 ? 167.0 : 197.0 )} F7000 G0 Y0 F7000 M109 S{max(230, min(290, nozzle_temperature_initial_layer[(initial_extruder % 2 == 0 ? min(initial_extruder + 0, 63) : max(initial_extruder - (1-0), 0))] + 15))} C2 W1 G1 E20 F80.0 G92 E0 M106 S{min(255, (fan_max_speed[(initial_extruder % 2 == 0 ? min(initial_extruder + 0, 63) : max(initial_extruder - (1-0), 0))] + 10) * 2.55)} M104 S{nozzle_temperature_initial_layer[(initial_extruder % 2 == 0 ? min(initial_extruder + 0, 63) : max(initial_extruder - (1-0), 0))] + 5} G1 E12.0 F200 G92 E0 G1 E8.0 Z4.6 F200 G92 E0 G0 Z5.6 F200 M107 G0 X{( 0 % 2 == 0 ? 137.0 : 187.0 )} F7000 G0 Z0.3 F240.0 M109 S{nozzle_temperature_initial_layer[(initial_extruder % 2 == 0 ? min(initial_extruder + 0, 63) : max(initial_extruder - (1-0), 0))]} C3 W1 G1 E3 F200 G92 E0 G1 X{( 0 % 2 == 0 ? 0 : 324 )} E8.5437 F7000 G92 E0 G1 E-{retract_length_toolchange[0]} F200 G92 E0 G0 Y20 F7000 M104 S{temperature_vitrification[(initial_extruder % 2 == 0 ? min(initial_extruder + 0, 63) : max(initial_extruder - (1-0), 0))]} {endif} {if is_extruder_used[(initial_extruder % 2 == 0 ? min(initial_extruder + 1, 63) : max(initial_extruder - (1-1), 0))] and (initial_extruder % 2) != 1} ; flush nozzle 1 T{(initial_extruder % 2 == 0 ? min(initial_extruder + 1, 63) : max(initial_extruder - (1-1), 0))} M104 S{max(230, min(290, nozzle_temperature_initial_layer[(initial_extruder % 2 == 0 ? min(initial_extruder + 1, 63) : max(initial_extruder - (1-1), 0))] + 15))}; common flush temp G0 Z1.6 F240.0 G0 X{( 1 % 2 == 0 ? 167.0 : 197.0 )} F7000 G0 Y0 F7000 M109 S{max(230, min(290, nozzle_temperature_initial_layer[(initial_extruder % 2 == 0 ? min(initial_extruder + 1, 63) : max(initial_extruder - (1-1), 0))] + 15))} C2 W1 G1 E20 F80.0 G92 E0 M106 S{min(255, (fan_max_speed[(initial_extruder % 2 == 0 ? min(initial_extruder + 1, 63) : max(initial_extruder - (1-1), 0))] + 10) * 2.55)} M104 S{nozzle_temperature_initial_layer[(initial_extruder % 2 == 0 ? min(initial_extruder + 1, 63) : max(initial_extruder - (1-1), 0))] + 5} G1 E12.0 F200 G92 E0 G1 E8.0 Z4.6 F200 G92 E0 G0 Z5.6 F200 M107 G0 X{( 1 % 2 == 0 ? 157.0 : 207.0 )} F6840.0 G0 Z0.3 F240.0 M109 S{nozzle_temperature_initial_layer[(initial_extruder % 2 == 0 ? min(initial_extruder + 1, 63) : max(initial_extruder - (1-1), 0))]} C3 W1 G1 E3 F200 G92 E0 G1 X{( 1 % 2 == 0 ? 0 : 324 )} E8.5437 F7000 G92 E0 G1 E-{retract_length_toolchange[1]} F200 G92 E0 G0 Y20 F6840.0 M104 S{temperature_vitrification[(initial_extruder % 2 == 0 ? min(initial_extruder + 1, 63) : max(initial_extruder - (1-1), 0))]} {endif} ; flush initial nozzle T[initial_extruder] M104 S{max(230, min(290, nozzle_temperature_initial_layer[(initial_extruder % 2 == 0 ? min(initial_extruder + initial_extruder, 63) : max(initial_extruder - (1-initial_extruder), 0))] + 15))}; common flush temp G0 Z1.6 F240.0 G0 X{( initial_extruder % 2 == 0 ? 167.0 : 197.0 )} F7000 G0 Y0 F7000 M109 S{max(230, min(290, nozzle_temperature_initial_layer[(initial_extruder % 2 == 0 ? min(initial_extruder + initial_extruder, 63) : max(initial_extruder - (1-initial_extruder), 0))] + 15))} C2 W1 G1 E20 F80.0 G92 E0 M106 S{min(255, (fan_max_speed[(initial_extruder % 2 == 0 ? min(initial_extruder + initial_extruder, 63) : max(initial_extruder - (1-initial_extruder), 0))] + 10) * 2.55)} M104 S{nozzle_temperature_initial_layer[(initial_extruder % 2 == 0 ? min(initial_extruder + initial_extruder, 63) : max(initial_extruder - (1-initial_extruder), 0))] + 5} G1 E12.0 F200 G92 E0 G1 E8.0 Z4.6 F200 G92 E0 G0 Z5.6 F200 M107 G0 X{( initial_extruder % 2 == 0 ? 157.0 : 207.0 )} F6840.0 G0 Z0.3 F240.0 M109 S{nozzle_temperature_initial_layer[(initial_extruder % 2 == 0 ? min(initial_extruder + initial_extruder, 63) : max(initial_extruder - (1-initial_extruder), 0))]} C3 W1 G1 E3 F200 G92 E0 G1 X{( initial_extruder % 2 == 0 ? 0 : 324 )} E8.5437 F6840.0 G92 E0 G1 E-{retraction_length[initial_extruder]} F200 G92 E0 G0 Y20 F7000 ; ready [plate_name]
-
@Proschi3D I'd put the tool specific macros into the tpreX/tpostX macros, to be less dependent on the slicer having to understand the setup.
-
@oliof As mentioned, it works really well, but I want the print to start after the variable for Mirror has been processed. And not continue with the subsequent gcode.
-
@Proschi3D yeah I understand. Best way would be to break up the parts and call them as separate macros guarded by conditionals, but if you do that, you can use the built-in tool prep macros.