Nozzle Side Wiper - Anycubic Vyper with G-Code

Side mounted nozzle wiper which mounts on the right Z-endstop
3
9
0
82
updated April 28, 2025

Description

PDF

Print at 0.2mm layer height oriented as it is imported with a minimum of 3 perimeters on the wiper arm.

Half a nozzle silicone brush from the Bambu Lab A1 machines are needed. I got mine for around a dollar on AliExpress for two, so they are easy to get a hold of if you don't have them already :)

My print head is a bit further than on the original Vyper as I use the hero me system. But this works for me :) 

The wipe g code is pretty over-engineered with lots of checks to not move into any boundaries or prints. Feel free to delete unnecessary parts as you wish :)

If you decide to use the code as provided, just know that you can run a ‘CLEAN_NOZZLE’ in start and end macros, and a 'CLEAN_NOZZLE SAFE=1' in a resume macro.

Wipe G-code:

[gcode_macro CLEAN_NOZZLE]
variable_start_x: 251
variable_start_y: -7
variable_start_z: 0
variable_wipe_dist_x: 12
variable_wipe_qty: 7
variable_wipe_spd: 6000
gcode:
    {% set max_z = 243 %}
    {% set safe_mode = params.SAFE|default(0)|int %}
    
    ; Home if not homed
    {% if "xyz" not in printer.toolhead.homed_axes %}
        G28
    {% endif %}
    G90 ; Absolute positioning

    ; Calculate current safe travel height
    {% set current_z = printer.gcode_move.position.z %}
    {% if current_z < 5 %}
        {% set travel_z = 5 %}
    {% else %}
        {% set travel_z = current_z %}
    {% endif %}
    {% if travel_z > (max_z - 1) %}
        RESPOND TYPE=error MSG="CLEAN_NOZZLE aborted: Current Z height too high ({travel_z}mm)"
        CANCEL
    {% endif %}

    ; If safe_mode is enabled, make sure nozzle lifts higher before moving XY
    {% if safe_mode %}
        G1 Z{travel_z + 10} F1500
    {% else %}
        G1 Z{travel_z} F1500
    {% endif %}

    ; Move to wipe start position
    G1 X{start_x} Y{start_y} F6000
    G1 Z{start_z} F1500

    ; Notify user wiping has started
    RESPOND TYPE=echo MSG="CLEAN_NOZZLE: Wiping nozzle..."
    M117 Wiping nozzle...

    ; Wipe nozzle
    {% for wipes in range(wipe_qty) %}
        G1 X{start_x + wipe_dist_x} Y{start_y} F{wipe_spd}
        G1 X{start_x - 1} Y{start_y} F{wipe_spd}
    {% endfor %}

    ; After wiping, raise nozzle at the right-most end of the brush to avoid picking up filament again
    G1 X{start_x + wipe_dist_x} Y{start_y} F{wipe_spd} ; Move to the right-most edge

    ; Lift Z to avoid picking up filament
    G1 Z{start_z + 5} F1500 ; Lift 5mm after wiping

    ; After lifting, move to a safe position
    {% set wipe_end_z = printer.gcode_move.position.z %}
    {% set target_z = wipe_end_z + 5 %}
    {% if target_z < 10 %}
        {% set safe_end_z = 10 %}
    {% elif target_z > max_z %}
        {% set safe_end_z = max_z %}
    {% else %}
        {% set safe_end_z = target_z %}
    {% endif %}
    G1 Z{safe_end_z} F600

Tags



Model origin

The author marked this model as their own original creation.

License