Skip to content

Instantly share code, notes, and snippets.

@mikejr83
Last active January 7, 2022 05:41
Show Gist options
  • Save mikejr83/6eb5cae9bff0883106e6812fc6ec1bde to your computer and use it in GitHub Desktop.
Save mikejr83/6eb5cae9bff0883106e6812fc6ec1bde to your computer and use it in GitHub Desktop.
Start and End g-code for JGMaker Artist-D (for Cura)
G91 ;Relative positioning
G1 E-2 F2700 ;Retract a bit
G1 E-2 Z0.2 F2400 ;Retract and raise Z
G1 X5 Y5 F3000 ;Wipe out
G1 Z10 ;Raise Z more
G90 ;Absolute positionning
G28 X; Move extruders out of print area
G1 Y{machine_depth} ;Present print
M106 S0 ;Turn-off fan
M104 S0 ;Turn-off hotend
M140 S0 ;Turn-off bed
M84 X Y E ;Disable all steppers but Z
M140 S{material_bed_temperature_layer_0} ; Set Heat Bed temperature
M104 S{material_print_temperature_layer_0} ; Set Extruder temperature
G28 ;Home
M190 S{material_bed_temperature_layer_0} ; Wait for Heat Bed temperature
G1 Z15.0 F6000 ;Move the platform down 15mm
;Prime the extruder
G92 E0 ; Reset Extruder
G1 Z2.0 F3000 ; Move Z Axis up little to prevent scratching of Heat Bed
G1 X10 Y20 Z0.3 F5000.0 ; Move to start position
M109 S{material_print_temperature_layer_0} ; Wait for Extruder temperature
G1 X10 Y200.0 Z0.2 F1500.0 E15 ; Draw the first line
G1 X10.3 Y200.0 Z0.2 F5000.0 ; Move to side a little
G1 X10.3 Y20 Z0.2 F1500.0 E30 ; Draw the second line
G92 E0 ; Reset Extruder
G1 Z2.0 F3000 ; Move Z Axis up little to prevent scratching of Heat Bed
G1 X14 Y20 Z0.2 F5000.0 ; Move over to prevent blob squish
@mikejr83
Copy link
Author

This can be adapted to any slicer, but the macro bits are from Cura.

@bodinjm
Copy link

bodinjm commented Feb 25, 2021

Just noticed your publication, thanks for the start/end proposal

@neo2478
Copy link

neo2478 commented Feb 28, 2021

Thanks a lot for all your community contributions!!
Are these meant to be for only the first extruder or both extruders?

@inspectionsbybob
Copy link

looks like only one extuder... there are dual-extruder Acura & Prusa profiles on the JGM support page and there may be one on the FB page as well.

@mikejr83
Copy link
Author

mikejr83 commented May 4, 2021

looks like only one extuder... there are dual-extruder Acura & Prusa profiles on the JGM support page and there may be one on the FB page as well.

This is just start and end code for the printer. I do not use any extruder specific start and end code.

@inspectionsbybob
Copy link

so if one replaced the variables in brackets { things_like_this } with hard values it would become generic accross most slicers?

question... why the two lines?? Isn't that what a skirt/brim is for?

question... the retract, is that a "fast" retract to clear the nozzle out a bit?

question... what would the commands look like for RIGHT SIDE extruder, what I know as E2?

@mikejr83
Copy link
Author

mikejr83 commented May 4, 2021

so if one replaced the variables in brackets { things_like_this } with hard values it would become generic accross most slicers?

question... why the two lines?? Isn't that what a skirt/brim is for?

question... the retract, is that a "fast" retract to clear the nozzle out a bit?

question... what would the commands look like for RIGHT SIDE extruder, what I know as E2?

  1. If you replace the braced sections with values you can plunk them in anywhere. They're macros formatted for Cura. However, I would suggest looking at the macros for your slicer to see if there is an analogous one. {material_bed_temperature_layer_0} is pulled from Cura's setting for "Build Plate Temperature Initial Layer". For PrusaSlicer it would be [first_layer_bed_temperature] (note, see how the enclosure changes from '{}' to '[]').
  2. That's a purge pattern that I've always had in my printers. It's in the default Ender 3 Pro profile included in Cura and I've transferred it to every other printer I've used. It's good to insure that the filament is primed in the extruder. You might not always be printing a skirt but a brim or a raft. With these you want good filament to be ready in the nozzle.
  3. It relieves pressure so there should be little oozing while it travels from the prime line to where it is actually going to print.
  4. Again, these are used for start and end gcode for the whole printer. Cura places a T0 or T1 gcode command before all this. The gcode in these examples are for the active extruder. In Cura's machine settings these are called "Start G-code" and "End G-code". In PrusaSlicer, in the "Printer Settings" tab, under "Custom G-code", this would be "Start-G-code" and "End G-code". PrusaSlicer let's you do fancy if statements in theirs. I've never really looked into it.

Each slicer has its own way of doing things. I posted these here because there basic and most people use Cura. They certainly can be adapted to other slicers. It's just g-code. I have limited experience with PrusaSlicer. For Slicer3D or Ideamaker I have no clue.

@inspectionsbybob
Copy link

I am revisiting the Gcode Start sequence as I am rebuilding my Profiles....

If I want to a RETRACTION as the last move before starting my print to prevent carrying any BLOB over to my print, where would I put it?

Would it be a "G1 E1 -1.5 F800" or should I use something else?

@inspectionsbybob
Copy link

I love this Start sequence, the only thing I would add to the END is to move the Y to only 250 so it doesn't block the controls and I would move it a bit slower than the default travel move which can be jarring....

Oh Yes, I am trying to figure out how to play a short "I'm done "tune, but am not having luck with the M300 commands...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment