Trying to get X1C to perform extra wipes during long prints

Trying to get my X1C to perform some extra wipes after a few hours on longer prints (when using PETG-CF).

What G-Codes achieve this?

This code does wipe on every 3rd layer (for testing) and then return to the print but doesn’t extrude anything affterwards

{if layer_num > 0 && layer_num % 3 == 0}
G90 ; absolute positioning
; Move to X1C wiper area (back left)
G1 X70 Y265 F12000
; Wipepass 1
G1 X70 F6000
G1 X105 F6000
; Wipe pass 2 (twice)
G1 X70 F6000
G1 X105 F6000
{endif}

On P2S/H series there’s dedicated g-code for travel to chute and wipe, G150.3 and G150.1, but X1C doesn’t slice and errors out when using these.

The goal is just a mid print wipe every X layers then continue. The problem with a manual pause, the print head does go to chute and perform a wipe on resume, is it occurs during a layer and always pics up a little filament/never resumes cleanly and those bits becomes blemises/blobs/bigger issues. So I need it to occur on layer change so it’s done cleanly.

Leckiestein has a bunch of really great X1C optimizations including wiping subroutines and a really clever way of controlling them.

Might wanna give them a go rather than reinventing the wheel yourself.

Search for “Steinwipe”.

I did see something about this but I thought it was a hardware mode/purchased product, I’ll have a proper read.

The basic Steinwipe is printed and uses an A1 wiper brush. It is a FAR better way to wipe your hotend compared to the stock X1 system.

There is a new Steinwipe Pro as well, but that isn’t really needed for what you’re doing.

I already have the panda brush, which wipes well enough, I just need the working g-code.

I’ve grabbed a copy of the SteinWipe code block and am working on modifying that, moving to chute and wiping is the easy part, it’s getting the extruder going again after as it thinks it’s in an unsafe state.

I’ve just realised Steinwipe uses different style move commands, not the G1 commands I was using so I’m working through that.

I don’t follow. His code is a drop-in solution.

Based on his wiper location, which I don’t use.

Plus I don’t want to insert from template manually at each layer where I want the wipe, I want the if layer = part so I can just do it every X layers, say 500, and save that for the model and not have to insert it each time.

I see where the miscommunication is. My apologies, I should have figured this out sooner.

The full Steinwipe package has code switches that allow you to turn on “wipe every X layers” at will.

The code you’re working with is just to modify the standard wipes to use the better scrub pad.

Here’s a link to the full package:

https://leckiestein.com/products/x1-p1-steinwipe-project-2025-dev-pack-swmc?variant=47451265925271

You’d need to modify his code to your wiper location and keep his “Wipe every X layers” code.

Thanks, the wipe every layer part is already sorted. It was just returning to extrusion that was the issue. As above, I realised I was changing the move commands which upsets the last know position status and upsets extrusion so I’ll sort that next and it will effectively be what you’re suggesting here.

I should add I don’t mind fiddling to learn as I’ve not played with g-code prior to this.

Sorted now.

For anyone else wanting conditional layer number mid print wipes on the panda brush wiper, this works for me.

;–Change X to wipe every X layers–
{if layer_num > 0 && layer_num % X == 0}

;–Set travel speed–
G0 F30000
M204 S20000

;–Lift off part–
G91
G2 Z0.5 I0.85 J0.85 P1
G90

;–Move to chute–
G0 X70 Y265 F10000
G91

;–Set wipe speed and acceleration–
G0 F24000
M204 S20000

;–Wipe passes (X+ then -X = 1 wipe)–
G0 X35
G0 X-35
G0 X35
G0 X-35
G0 X35
G0 X-35

;–Reset slicer XY–
G90
G0 X70 Y265
G92 X70 Y265

;–Return to plate–
G0 Y245 F30000
M83
{endif}