Simplify 3D Custom G-Code

Todo

Simplify 3D gcode overview.

Note

These notes are based on my experiences with the Prusa i3 Mk3 and Artillery/Evnovo Sidewinder X1 printers. If you are using a different printer, please verify the hardware details are same. These pages may be a bit rough as I revise them and add new material. Please check back regularly for updates.

Caution

Please be sure that you’ve calibrated your printer, and particularly your Live-Z settings before using any of the following examples. These routines move the nozzle around close to the bed, and could cause damage if your printer is not adjusted properly.

Start G-Code

Thanks to /u/SpectreGadget on reddit for pointing out that my sample code used incorrect placeholders.

Note

I’ve made extensive edits to my gcode routines. The gcode samples on this page are current but the accompanying notes need to be updated.

I’ve incorporated these features into my own customized g-code settings for Simplify3D. Here’s a section-by-section breakdown:

Todo

Update with S3D startup gcode analysis.

At this point, the print will proceed normally.

I’m not a fan of the loud printer beeps, but I have inserted several chirp sounds (M300 S100 P10) to indicate progress throughout the print.

Here’s the full start g-code:

Todo

Full Simplify 3D startup gcode.

Listing 33 Simplify 3D start g-code
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
; Last updated 20191117
M300 S40 P10 ; chirp
M115 U3.7.2 ; tell printer latest fw version
M117 Initializing
; Set coordinate modes
G90 ; use absolute coordinates
M83 ; extruder relative mode
; Reset speed and extrusion rates
M200 D0 ; disable volumetric e
M220 S100 ; reset speed
; Set hardware parameters
M201 X1500 Y1500 Z1000 E5000 ; sets maximum accelerations  mm/sec^2
M203 X200 Y200 Z12 E120 ; sets maximum feedrates mm/sec
M204 P1500 R1250 T1500 ; sets acceleration (PT) and retract acceleration (R) mm/sec^2
M205 X10.00 Y10.00 Z0.40 E1.50 ; sets the jerk limits  mm/sec
M205 S0 T0 ; sets the minimum extruding and travel feed rate mm/sec
; Set initial warmup temps
M117 Nozzle preheat
M104 S160 ; set extruder no-ooze temp
M140 S75  ; set bed PINDA warmup temp
; Nozzle warmup before home to avoid driving hardened ooze into PEI surface
M109 S160 ; wait for extruder no-ooze warmup temp before mesh bed leveling, cool hot PINDA
M300 S40 P10 ; chirp
; Home
M117 Homing
G28 W ; home all without mesh bed level
; Present bed for final cleaning
G0 Z3; Raise nozzle before move
G0 X125 Y180 F10200; Move nozzle to PINDA warming position
G0 Z0.15 F10200; Lower nozzle to PINDA warming position
; Wait for PINDA warmup
M117 PINDA warmup
M860 S35 ; wait for PINDA temp to stabilize
M140 S[bed0_temperature] ; set target bed temp
G0 Z3; Raise nozzle before move
M300 S40 P10 ; chirp
; Mesh bed leveling
M117 Mesh bed leveling
G80 ; mesh bed leveling
M117 Saving results
G81 ; save mesh leveling results
; Final warmup routine
M117 Final warmup
G0 Z5; Raise nozzle to avoid denting bed while nozzle heats
M140 S[bed0_temperature] ; set bed final temp
M104 S[extruder0_temperature] ; set extruder final temp
M109 S[extruder0_temperature] ; wait for extruder final temp
M190 S[bed0_temperature] ; wait for bed final temp
M300 S40 P10 ; chirp
; Prime line routine
M117 Printing prime line
G0 Z0.15 ; Restore nozzle position - (thanks tim.m30)
M900 K0; Disable Linear Advance for prime line
G92 E0.0 ; reset extrusion distance
G1 Y-3.0 F1000.0 ; go outside print area
G1 E2 F1000 ; de-retract and push ooze
G1 X20.0 E6  F1000.0 ; fat 20mm intro line @ 0.30
G1 X60.0 E3.2  F1000.0 ; thin +40mm intro line @ 0.08
G1 X100.0 E6  F1000.0 ; fat +40mm intro line @ 0.15
G1 E-0.8 F3000; retract to avoid stringing
G1 X99.5 E0 F1000.0 ; -0.5mm wipe action to avoid string
G1 X110.0 E0 F1000.0 ; +10mm intro line @ 0.00
G1 E0.6 F1500; de-retract
G92 E0.0 ; reset extrusion distance
M82 ; extruder absolute mode
; Final print adjustments
M117 Preparing to print
M300 S40 P10 ; chirp
M900 K60 ;Set Linear Advance
M117 Print in progress

End G-Code

My end g-code is pretty standard. I like to reset any values that aren’t automatically cleared before a job:

  1. Linear Advance (M900 Kxx) is set to 0.

  2. Extrusion rate (M221) is set to 100%.

The rest is pretty standard Prusa g-code. Here’s my current end g-code:

Todo

S3D end gcode.

Listing 34 Simplify 3D end g-code
 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
; Last updated 20191117
G4 ; wait
; Raise nozzle and present bed
M117 Printing complete
G4 ; wait
G92 E0 ; prepare to retract
G1 E-0.8 F3000; retract to avoid stringing
; Anti-stringing end wiggle
G91 ; use relative coordinates
G1 X-0.5 Y-0.5 F1200
G1 X1 Y1 F1200
G90 ; use absolute coordinates
G1 Z210 ; Move print head up
G0 X0 Y210 F10200; present bed
; Reset print setting overrides
M200 D0 ; disable volumetric e
M220 S100 ; reset speed factor to 100%
M221 S100 ; reset extruder factor to 100%
M900 K0 ; reset linear acceleration
; Shut down printer
M104 S0 ; turn off temperature
M140 S0 ; turn off heatbed
M107 ; turn off fan
M84 ; disable motors
M300 extra_loading_move = -2

Simplify 3D placeholders

Table 3 Simplify 3D G-Code Placeholders

Value

Placeholder

First Layer Temperature

[extruder0_temperature]

First Layer Bed Temperature

[bed0_temperature]

Contact and feedback

You can find me on the Prusa support forums or Reddit where I lurk in many of the 3D printing-related subreddits.

Last updated 20191125