1. Got a question or need help troubleshooting? Post to the troubleshooting forum or Search the forums!

Solved Correct G Code

Discussion in 'Troubleshooting' started by Paul1967, Feb 1, 2020.

  1. Paul1967

    Paul1967 Member

    Joined:
    Oct 27, 2018
    Messages:
    38
    Likes Received:
    1
    I am having a small issue which the extruder scratches the top of my print as it finishes. I was thinking the below g code would be correct to slightly lower the bed as the print finished?

    G28 Z-0.5 X0 Y0 ; home X and Y

    paul
     
  2. mark tomlinson

    mark tomlinson ༼ つ ◕_ ◕ ༽つ
    Staff Member

    Joined:
    Feb 21, 2013
    Messages:
    23,912
    Likes Received:
    7,338
    You need to switch to relative coordinates for that to work (or it will crash the nozzle into the print).

    Here is a better example

    M104 S0 ;extruder heater off
    M140 S0 ;heated bed heater off (if you have it)
    G91 ;relative positioning
    G1 E-1 F300 ;retract the filament a bit before lifting the nozzle, to release some of the pressure
    G1 Z+0.5 E-5 X-20 Y-20 F9000 ;move Z up a bit and retract filament even more
    G28 X0 Y0 ;move X/Y to min endstops, so the head is out of the way
    G1 Y150 F5000 ;move completed part out
    M84 ;steppers off
    G90 ;absolute positioning
     
  3. mark tomlinson

    mark tomlinson ༼ つ ◕_ ◕ ༽つ
    Staff Member

    Joined:
    Feb 21, 2013
    Messages:
    23,912
    Likes Received:
    7,338
    You can edit the movement numbers as needed to get what you want:
    >G1 Y150 F5000 ;move completed part out

    maybe you want more or less movement, adjust the Y150 to however many mm you want.
     
  4. Paul1967

    Paul1967 Member

    Joined:
    Oct 27, 2018
    Messages:
    38
    Likes Received:
    1
    This worked great! thank you

    Paul
     
    mark tomlinson likes this.

Share This Page