add g-code hard-coded for every printer use possible?
I have installed the Core One Stealthbrush on my CoreOne+, Added some g-code as suggested "for the cleaning move" to the printers config. And after that I saw it performing the move a few times. Than all went back to the default cleaning ritual? So it appears to me that adding the g-code is not "hard-coded" but needs to be added after every change made for the printer set up?
Made me wondering if there is a better way of adding g-code so it will stay in place (as if default)?
The code used:
;G29 P9 X208 Y-2.5 W32 H4 G0 X143 Y-14 Z1 F10000; G0 X105 Y-18 Z1 F10000; G0 X143 Y-14 Z1 F10000; G0 X105 Y-18 Z1 F10000; G0 X143 Y-14 Z1 F10000; G0 X105 Y-18 Z1 F10000; G0 X143 Y-14 Z1 F10000; G0 X105 Y-18 Z1 F10000; G0 X143 Y-14 Z1 F10000; G0 X105 Y-18 Z1 F10000; G0 X105 Y-18 Z5 F10000; Z-Hop for safety, mentioned by @lordzurp
RE: add g-code hard-coded for every printer use possible?
I have installed the Core One Stealthbrush on my CoreOne+,
I used this one:
;----------------------------
;
; This G-code was copied from PrusaSlicer 2.9.4.
; All changes have been checked and tested for functionality.
;
; Please note:
; I do not guarantee completeness! I accept no liability for any damage caused by using this G-code.
; Prusa's “Nozzle Cleaning†command has been removed and replaced with a modified command.
; The “Absorb Heat†command has been removed.
;
; Version 1.01
; Last modified: February 9, 2026
;
;----------------------------
M17 ; enable steppers
M862.1 P[nozzle_diameter] A{(filament_abrasive[0] ? 1 : 0)} F{(nozzle_high_flow[0] ? 1 : 0)} ; nozzle check
M862.3 P "COREONE" ; printer model check
M862.5 P2 ; g-code level check
M862.6 P"Input shaper" ; FW feature check
M555 X{(min(print_bed_max[0], first_layer_print_min[0] + 32) - 32)} Y{(max(0, first_layer_print_min[1]) - 4)} W{((min(print_bed_max[0], max(first_layer_print_min[0] + 32, first_layer_print_max[0])))) - ((min(print_bed_max[0], first_layer_print_min[0] + 32) - 32))} H{((first_layer_print_max[1])) - ((max(0, first_layer_print_min[1]) - 4))}
G90 ; use absolute coordinates
M83 ; extruder relative mode
;----------------------------
; Preheat Nozzle
;----------------------------
; Do not wait until temperature is reached
M104 S175
;----------------------------
; Preheat Print bed
;----------------------------
; Wait until the set temperature is reached
M190 S[first_layer_bed_temperature]
;----------------------------
; Homing all axes
;----------------------------
M84 E ; turn off E motor
G28 ; home all without mesh bed level
;----------------------------
; Set nozzle in front of wire brush
;----------------------------
G1 Z2 F720 ; set bed position ;(move down)
G1 X145 Y-16 F4800 ; set nextruder position
G1 E-2 F2400 ; retraction
M84 E ; turn off E motor
; old nozzle clean
; G29 P9 X208 Y-2.5 W32 H4
;----------------------------
; Clean nozzle before MBL
; Increase speed by changing the number: Instead of “F5000,†you can also type “F8000.â€
;----------------------------
G0 X205 Y-16 Z1.00 F5000
G0 X165 Y-18 Z1.00 F5000
G0 X205 Y-16 Z1.00 F5000
G0 X165 Y-18 Z1.00 F5000
G0 X205 Y-16 Z1.00 F5000
;----------------------------
Move the brush closer to the nozzle
;----------------------------
G0 X165 Y-18 Z0.50 F5000
G0 X205 Y-16 Z0.50 F5000
G0 X165 Y-18 Z0.50 F5000
G0 Z2 F1000 ; z-lift
;----------------------------
; Execute MBL
;----------------------------
M84 E ; turn off E motor
G29 P1 ; invalidate mbl & probe print area
G29 P1 X150 Y0 W100 H20 C ; probe near purge place
G29 P3.2 ; interpolate mbl probes
G29 P3.13 ; extrapolate mbl outside probe area
G29 A ; activate mbl
;----------------------------
; Position nozzle above bin
;----------------------------
G1 X140 Y-17 Z2.00 F4800
;----------------------------
; Set nozzle temperature
;----------------------------
M109 S{first_layer_temperature[0]}
G92 E0
M569 S0 E ; set spreadcycle mode for extruder
M591 S0 ; disable stuck detection
;----------------------------
; Extrude filament into bins
; The amount of filament extruded is controlled by the command “E30.†30 stands for 30 millimeters of filament.
; With E10, only 10 millimeters are extruded.
;----------------------------
G92 E0 ; reset extruder position
G0 E30 F800 ; purge
;----------------------------
; Wipe off filament from the brush
;----------------------------
G0 X165 Y-18 Z0.50 F8000
G0 X205 Y-16 Z0.50 F3000
G0 Z2 F1000 ; z-lift
M591 R ; restore stuck detection
G92 E0
M221 S100 ; set flow to 100%
Mods for Core One: Core One HT 450 degrees, Comfortable display , Very fast print start and Reducing noises
Mods for Prusa XL: Very fast print start
RE: add g-code hard-coded for every printer use possible?
Thanks the code sure looks interesting and I will see if I can use that. But, i is not the answer to my question.. I'm looking for the "how to" keep the added code to remain in place also if changing something to the config. Or is the only option copying it over and over again... 🙂 ?
RE:
But, i is not the answer to my question.. I'm looking for the "how to" keep the added code to remain in place also if changing something to the config. Or is the only option copying it over and over again... 🙂 ?
Sorry, I forgot to include that when I copied the code over.
Mods for Core One: Core One HT 450 degrees, Comfortable display , Very fast print start and Reducing noises
Mods for Prusa XL: Very fast print start