Jump to content
Ultimaker Community of 3D Printing Experts
Idusidus

Placing g-code in Cura

Recommended Posts

Hi,

 

I saw a video for a nozzle wipe but was done in simplify3D with the tab scripting. 

Where  can I place the following code ("printer startcode" or "extruder startcode") in Cura 3.3.1?

 

G1 Y-3.0 F500.0 ; move out of print volume

G1 X60.0 E9 F500.0 ; start purge

G1 X100 E12.5 F500.0 ; finish purge line

 

When placed in "printer startcode" do I need to remove lines, insert beween 2 lines or can I just place it at the end?

 

G21 ;metric values

G90 ;absolute positioning

M82 ;set extruder to absolute mode

M107 ;start with the fan off

G28 X0 Y0 ;move X/Y to min endstops

G28 Z0 ;move Z to min endstops

G1 Z15.0 F9000 ;move the platform down 15mm

G92 E0 ;zero the extruded length

G1 F200 E3 ;extrude 3mm of feed stock

G92 E0 ;zero the extruded length again

G1 F9000

;Put printing message on LCD screen

M117 Printing...

 

Thanks in advance.

 

 

Share this post


Link to post
Share on other sites

I believe I saw the exact same video.  I put my g-code in the "printer startcode" area.  If you look in the generated g-code file, CURA just inserts the code without any modification.  So, I replaced everything put in by default with my own g-code.  You probably want to look at the generated g-code file anyway to verify that it does what you want.

 

I also modified the "printer endcode" because I wanted to move the print bed to the front instead of it doing a home when the print was done.  Otherwise on my printer, the bed was always moved to the back and you had to manually move the bed forward to remove the print.

 

Here is what I ended up doing:

; Prefix G-Code for Creality CR-10 Mini to clean nozzle
M117 Nozzle Cleaning...    ; Indicate NOZZLE CLEANING on LCD
M107                       ; Turn layer fan off
G21                        ; Set units to metric (change to G20 if you want Imperial)
G90                        ; Set absolute coordinates
G28                        ; Home X/Y/Z axis
G0 X5 Y10 Z0.16 F5000      ; Move in 5mm x 10mm from corner and up [z] 0.16mm
G92 E0                     ; Set extruder to [0] zero
G1 Y210 E100 F500          ; Extrude 100mm filament 200mm along Y axis to prime and clean the nozzle
G92 E0                     ; Reset extruder to [0] zero at end of cleaning run
G1 E-3 F500                ; Retract filament by 3mm to reduce string effect
G0 Z15 F5000               ; Raise extruder to safe Z height (1st shearing action)
G0 X5 Y110 Z15 F5000       ; Move to center left of bed (2nd shearing action)
G1 E3 F500                 ; Prime the extruder since retraction
M117 Printing...           ; Indicate PRINTING on LCD

 

; Post G-Code for Creality CR-10 Mini
G91
G1 E-3 F1800
G1 Z10 F3000
G90
G0 X0 Y200        ; Eject (move print bed forward)
M106 S0           ; Turn off cooling fan
M104 S0           ; Turn off extruder
M140 S0           ; Turn off bed
M84               ; Disable motors
M117 Print Done.  ; Indicate PRINT DONE on LCD

 

Edited by MarkF
  • Like 1

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Our picks

    • Introducing Ultimaker Cura 3.6 | Beta
      Ultimaker Cura 3.6 | Beta is available. It comes with new features, bug fixes, and UX improvements. We would really like to have your feedback on it to make our stable release as good as it can be. As always, you can download the beta for free from our website, for Windows, MacOS, and Linux.
        • Like
      • 92 replies
    • Print Core CC | Red for Ruby
      Q: For some users, abrasive materials may be a new subject matter. Can you explain what it is that makes a material abrasive when you are not sure which print core to use?
      A: Materials which are hard in a solid piece (like metals, ceramics and carbon fibers) will generally also wear down the nozzle. In general one should assume...
        • Like
      • 30 replies
    • "Back To The Future" using Generative Design & Investment Casting
      Designing for light-weight parts is becoming more important, and I’m a firm believer in the need to produce lighter weight, less over-engineered parts for the future. This is for sustainability reasons because we need to be using less raw materials and, in things like transportation, it impacts the energy usage of the product during it’s service life.
        • Like
      • 12 replies
×

Important Information

Welcome to the Ultimaker Community of 3D printing experts. Visit the following links to read more about our Terms of Use or our Privacy Policy. Thank you!