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

Purging G-Code

Discussion in 'Software' started by Marquis Johnson, Jul 11, 2015.

  1. Marquis Johnson

    Marquis Johnson Active Member

    Joined:
    Feb 18, 2015
    Messages:
    204
    Likes Received:
    203
    I was watching a few videos online and saw that the CEL Robox has a purge system for clearing the extruder of plastic. You could of course do this with your hand but I have made the G-Code specific for clearing exactly 100mm of filament so you can do an extruder calibration along side the purge.

    I don't really use the cancel function in Cura because it is faster to close the window and reopen it. So in the script.py I changed this:

    addButton(0, 200, 255, 'Cancel', cancelPrint)

    to this:

    addButton(0, 200, 255, 'Purge', sendGCode, " M104 S190; M104 S190; G28; G29; M109 S190; G1 Z2 E5; G1 F1000 X5 E45; G1 E50; G1 F5000 Y5; G1 F1000 E55; G1 X220 E95; G1 E100; G1 Z5; G28; G92 E0")

    (Can't use M104 S{print_temperature} for some reason, if you need a temp higher than 190c change S190 to S(desired temp).

    You end up with a pretty purge that looks like this:

    IMG_7888.JPG
     

    Attached Files:

    Mike Kelly likes this.
  2. Menissalt

    Menissalt New Member

    Joined:
    Nov 24, 2015
    Messages:
    8
    Likes Received:
    3
    Any way you could convert this to a purge script to start a print? I'm using S3D and it currently has:

    G28 ; home all axes
    G1 Z5 F5000 ; lift Z by 5mm
    M565 Z-0.6 ; set the offset for auto-leveling mechanism
    G29 ; run auto-level

    Purging before the print would really be ideal for me.
     
  3. Marquis Johnson

    Marquis Johnson Active Member

    Joined:
    Feb 18, 2015
    Messages:
    204
    Likes Received:
    203
    Here's the G-Code that purges the system:

    M104 S190; Set Heat to 190
    G28; Home All
    G29; Auto Level
    M109 S190; Heat and Wait
    G1 Z2 E5; Extrude and Raise
    G1 F1000 X5 E45; Move and Extrude
    G1 E50; Extrude in place
    G1 F5000 Y5; Move to Y5
    G1 F1000 E55; Extrude in place
    G1 X220 E95; Move and Extrude
    G1 E100; Extrude in place
    G1 F5000 E95; Retract 5mm
    G1 Z5; Move Up 5mm
    G28; Home All
    G92 E0; Zero Extruder
     
  4. Menissalt

    Menissalt New Member

    Joined:
    Nov 24, 2015
    Messages:
    8
    Likes Received:
    3
    Thanks, but this doesn't actually purge the nozzle in my system for some reason. It goes through the motions but nothing comes out.
     
  5. Marquis Johnson

    Marquis Johnson Active Member

    Joined:
    Feb 18, 2015
    Messages:
    204
    Likes Received:
    203
    The temperature might be too low. Increase M104S190 to M104S210
     
  6. Menissalt

    Menissalt New Member

    Joined:
    Nov 24, 2015
    Messages:
    8
    Likes Received:
    3
    I use Simplify3D, so my temps are set before my start script. I was using this instead:

    G28 ; home all axes
    G1 Z5 F5000 ; lift Z by 5mm
    M565 Z-0.6 ; set the offset for auto-leveling mechanism
    G29 ; run auto-level
    G1 E5; Extrude
    G1 F1000 X5 E45; Move and Extrude
    G1 E50; Extrude in place
    G1 F5000 Y5; Move to Y5
    G1 F1000 E55; Extrude in place
    G1 X220 E95; Move and Extrude
    G1 E100; Extrude in place

    When using "G1 Z2 E5; Extrude and Raise" it never lowered and just extruded in mid aid, making a mess, so I set it to "G1 E5; Extrude". I also removed the retract because S3D already retracts before starting the print. I would like it to raise between extrudes and before starting the print, but I can figure that out on my own if need be.

    Thanks for the help so far by the way!
     

Share This Page