Help editing Start/End GCode on Mini1

Get answers & advice for all of your 3D printing & Free Software needs here!
Post Reply
tizteaches
Posts: 2
Joined: Fri Oct 11, 2019 9:43 am

Help editing Start/End GCode on Mini1

Post by tizteaches » Mon Oct 28, 2019 8:26 am

Hi folks,

I'm running a Mini 1 with the Graphic Display. I use Cura 3.6 set the print preferences and then save and print using an SD card. I want to make a couple of changes to the Start and End gcodes in the machine settings. I don't know if either are possible and would really appreciate any input.

1) For the Start Code: I'd like to set the last step of the to display "name of the file" Printing..., instead of "Mini Printing..."
2) For the End Code: The default code has the extruder cool off completely. I'd like to instead lower the extruder temp to the {material_wipe_temp} and keep that temperature. I tried a variety of commands to make this happen, but the extruder temp always clears to zero after the printer stops. Even if I add an M104 or M109 command at the very end of the code, the printer does not retain the temp like it does with the heated bed. Is there a way to keep the extruder head primed for the next print.

I used this website as a reference but couldn't find what I needed. http://marlinfw.org/meta/gcode/
Below is the default Start/End Gcode for a Mini1(GLCD).

Thanks, for your help!
Tiz


START GCODE
;This G-Code has been generated specifically for the LulzBot Mini with standard extruder
M73 P0 ; clear GLCD progress bar
M75 ; Start GLCD Timer
G26 ; clear potential 'probe fail' condition
M107 ; disable fans
M420 S0 ; disable leveling matrix
G90 ; absolute positioning
M82 ; set extruder to absolute mode
G92 E0 ; set extruder position to 0
M140 S{material_bed_temperature_layer_0} ; start bed heating up
G28 ; home all axes
G0 X0 Y187 Z156 F200 ; move away from endstops
M109 R{material_soften_temperature} ;
G1 E-30 F75 ; retract filament
M109 R{material_wipe_temperature} ; wait for extruder to reach wiping temp
G1 X45 Y173 F11520 ; move above wiper pad
G1 Z0 F1200 ; push nozzle into wiper
G1 X42 Y173 Z-.5 F4000 ; wiping
G1 X52 Y171 Z-.5 F4000 ; wiping
G1 X42 Y173 Z0 F4000 ; wiping
G1 X52 Y171 F4000 ; wiping
G1 X42 Y173 F4000 ; wiping
G1 X52 Y171 F4000 ; wiping
G1 X42 Y173 F4000 ; wiping
G1 X52 Y171 F4000 ; wiping
G1 X57 Y173 F4000 ; wiping
G1 X77 Y171 F4000 ; wiping
G1 X57 Y173 F4000 ; wiping
G1 X77 Y171 F4000 ; wiping
G1 X57 Y173 F4000 ; wiping
G1 X87 Y171 F4000 ; wiping
G1 X77 Y173 F4000 ; wiping
G1 X97 Y171 F4000 ; wiping
G1 X77 Y173 F4000 ; wiping
G1 X97 Y171 F4000 ; wiping
G1 X77 Y173 F4000 ; wiping
G1 X97 Y171 F4000 ; wiping
G1 X107 Y173 F4000 ; wiping
G1 X97 Y171 F4000 ; wiping
G1 X107 Y173 F4000 ; wiping
G1 X97 Y171 F4000 ; wiping
G1 X107 Y173 F4000 ; wiping
G1 X112 Y171 Z-0.5 F1000 ; wiping
G1 Z10 ; raise extruder
G28 X0 Y0 ; home X and Y
G0 X0 Y187 F200 ; move away from endstops
M109 R{material_probe_temperature} ; wait for extruder to reach probe temp
M204 S300 ; set probing acceleration
G29 ; start auto-leveling sequence
M420 S1 ; enable leveling matrix
M425 Z ; use measured Z backlash for compensation
M425 Z F0 ; turn off measured Z backlash compensation. (if activated in the quality settings, this command will automatically be ignored)
M204 S2000 ; restore standard acceleration
G28 X0 Y0 ; re-home to account for build variance of earlier mini builds
G0 X0 Y187 F200 ; move away from endstops
G0 Y152 F4000 ; move in front of wiper pad
G4 S1 ; pause
M400 ; wait for moves to finish
M117 Heating... ; progress indicator message on LCD
M109 R{material_print_temperature_layer_0} ; wait for extruder to reach printing temp
M190 R{material_bed_temperature_layer_0} ; wait for bed to reach printing temp
G1 Z2 E0 F75 ; prime tiny bit of filament into the nozzle
M117 Mini Printing... ; progress indicator message on LCD


END GCODE
M400 ; wait for moves to finish
M140 S{material_part_removal_temperature} ; start bed cooling
M104 S0 ; disable hotend
[/color]M107 ; disable fans
G92 E5 ; set extruder to 5mm for retract on print end
M117 Cooling please wait ; progress indicator message on LCD
G1 X5 Y5 Z158 E0 F10000 ; move to cooling position
G1 E5 ; re-prime extruder
M190 R{material_part_removal_temperature} ; wait for bed to cool down to removal temp
M77 ; Stop GLCD Timer
G1 X145 F1000 ; move extruder out of the way
G1 Y175 F1000 ; present finished print
M140 S{material_keep_part_removal_temperature_t}; keep temperature or cool down
M84 ; disable steppers
G90 ; absolute positioning
M117 Print Complete. ; print complete message

radensb
Posts: 77
Joined: Sun Jul 23, 2017 3:21 pm

Re: Help editing Start/End GCode on Mini1

Post by radensb » Mon Oct 28, 2019 8:21 pm

There is no {filename} parameter because the file name is determined after the slicing and the file is saved. You could manually edit the last M117 line in the START block, If you wanted the file name to be "tizteaches5" you would change the M117 line to be:

Code: Select all

M117 tizteaches5
Remember that the screen can only support 16 characters per line.

In the END block, the heaters are disabled by the line:

Code: Select all

M104 S0 ; disable hotend
There may also be a saefty that ensures all the heaters are off after a print. This could be implemented in the Marlin firmware, or as extra gcode inserted after the END block in Cura to ensure the heaters are off. Or both. Open the gcode file and look at the bottom of the file to see if there are any additional commands that affect the heaters. If there are, you can remove them but be careful! Don't burn your house down because you forget that it doesn't shut off automatically and left it hot!!

As a much safer alternative, you could just change the above line to the following:

Code: Select all

M104 S{material_wipe_temperature} ; idle hotend
This will instruct the hotend to cool down to and hold the wipe temperature instead of turning it off during the remainder of the END gcode block. This way, even if the safety code kicks in and shuts the heater all the way off at the very end of the print, you would be able to remove the part, clean the bed, and start the next print without the extruder cooling off too much allowing for a rapid restart on the next print.

tizteaches
Posts: 2
Joined: Fri Oct 11, 2019 9:43 am

Re: Help editing Start/End GCode on Mini1

Post by tizteaches » Tue Nov 12, 2019 9:15 am

Thanks for the response radensb.

Unfortunately the temp seems to always clear to zero once the last part of the end block is done. I'm guessing it might be a safety feature.
In regards to displaying the file name, I was able to delete the last line of the start block M117 Mini Printing.... Removing that line left the file name displayed during the printing process.

Thanks again for the tips!

Post Reply