Writing G-code : swiping at start of print

  • Ok, I did it, I ordered myself an Ender-3, a genuine 24V e3D hotend, inductive sensor and some better tubing/clamps to cope with the problem the CR10/Ender line has occasionally.

    But now I need to fix up my Cura for the machine coming in. The start is the CR10, and fixing the dimensions is easy.

    But now comes the tricky part: Start and End G-code. For my TronXY I never bothered with changing it away from the "basic" settings that a "custom 3D printer" on Marlin gave, but this time I want to know what I type in there. The basic code, after I dragged out the G-code handbook from the RepRap wiki to add the missing comments is:

    G28            ;Home
    G1 Z15.0 F6000 ;Move the Gantry up 15mm going fast
    ;Prime the extruder
    G92 E0 ; reset extrusion distance
    G1 F200 E3 ; extrude 3mm of feed stock
    G92 E0 ; reset extrusion distance

    The RepRap Wiki suggests that there could be made so much more from this.

    I would love to swipe the nozzle before starting to print, making sure that the curled up filament from this first extrusion doesn't get squished against the nozzle and make a bad first layer.

    How does an example (commented) G-code for swiping the nozzle look like?

  • Trish

    Trish Correct answer

    4 years ago

    The lazy way: Skirt/Brim

    With my TronXY X1 I learned pretty fast, that this first bit of extrusion on an unheated bed can totally mess up the first layer by being just in the way, as explained in the question.

    To some degree, this behavior can be avoided by adding a skirt of a certain length. An equally good alternative that also increases bed adhesion for tricky parts is the brim. Both are not set via G-code but can be added by the slicer. In Ultimaker Cura both are found in the tab Build Plate Adhesion as type, as the following pictures show:

    Skirt: 2 lines, minimum length 250mm

    Skirt: 2 lines, minimum length 250mm

    Brim: minimum length 250mm, 8mm width

    Brim: minimum length 250mm, 8mm width

    The Prusa Priming-line

    Angus/MakersMuse introduced me to the Prusa Priming Line in one of his tutorial videos. For his Wanhao he used (for the video) just this start G-code script:

    G1 Y-3 F500 ; Move out of print volume
    G1 X60 E9 F500 ; start purge line
    G1 X100 E12.5 F500 ; finish purge line

    This resulted in a nice line like this:
    A printed "Prusa Priming Line"

    In Ultimaker Cura, this piece of code is added via the preferences of a machine. In Cura 3, you usually had to add the starting G-code yourself. Since at least version 4.2.1, all preset machines contain some variant of a priming line, usually at the left side.

License under CC-BY-SA with attribution

Content dated before 7/24/2021 11:53 AM