start-and-end-gcode

This is an old revision of the document!


Starting & Ending GCode

In your slicer you will have a section for GCode commands that are run at the very start and end of every print. In Cura/JGCreat, these are found in the machine settings.

There are several good videos on this topic that are linked at the bottom of this article. These will give you a great introduction into what is possible to achieve with starting and ending gcode commands.


Starting GCode

Typically this contains several functions:

  • Home and reference all axis
  • Set position to zero
  • Prime the extruder
  • Wipe the nozzle on the bed (not enabled by default - you need to add your own commands)
  • Enable auto-bed or mesh-bed levelling (if configured)

Default Start Script

  1. G28 ; Home all axis
  2. G1 Z15.0 F6000 ; Move up 15mm at 6000mm/min (note: more than the max speed set in the printer firmware)
  3. G92 E0 ; Reset extruder length to zero
  4. G1 F200 E10 ; Extrude 10mm at 200mm/min
  5. G92 E0 ; Reset extruder length to zero

The lift up and extrude is the β€œpurge and prime” to ensure that filament is flowing correctly. If the filament is left at home position for too long while the nozzle is hot, the filament can ooze out. Then the nozzle will not be ready for printing. The purge and prime gets the filament flowing again ready for printing.

You can add a β€œwipe” step to the starting gcode after the β€œpurge” - watch the videos below.


Ending GCode

  • M140 S0; Turn off the bed heater
  • M104 S0; Turn off the nozzle heater
  • G28 X Y; Home the X and Y axis
  • G0 Y280 F600; Bring the bed to the front for easy print removal
  • M84; Turn off the motors

As the home positions on the A5 has the bed towards the back of the printer, one useful command to add to the end GCode, is a command to bring the Y-axis forward to the front once the print is finished. e.g. β€œG0 Y280 F600”


Videos

start-and-end-gcode.1531562350.txt.gz Β· Last modified: 2020/12/25 02:13 (external edit)