threnody
Posts: 2
Joined: Sun Jan 19, 2020 8:52 am

Edit gcode header

Sun Jan 19, 2020 9:09 am

Hi,

The help page for the "Scripts" tab allows you to add gcode for commands, and says "This is the G-Code that will be ran after heating up but before your print."

I would like to change the a few things before this in the gcode output. For example, after an amount of tinkering, I've found that the best results I get are from heating the bed, then doing the bed leveling, then heating the nozzle, so that I don't end up with the blobs of filament and a bird's nest wrapped around the nozzle from oozing filament during leveling.

Obviously, I could manually edit every gcode file that Simplify3D produces, but this is a pain and I would much prefer to edit the template, or profile, or whatever the file/source is for the first set of gcode commands that are written into the start of each .gcode file.

Many thanks,
Paul

S3D-Chris
Posts: 237
Joined: Wed Jun 20, 2018 12:52 pm

Re: Edit gcode header

Tue Jan 28, 2020 11:00 am

Hello Paul,

This is fairly simple to implement in the starting script section of your process settings. You are able to control the order in which heating occurs from your scripts section by using the extruder and bed temperature variables. I've included a sample starting script below that will perform as you've requested.

Code: Select all

M140 S[bed0_temperature] ; heat bed
M190 S[bed0_temperature] ; stabilize bed
G28 X Y ; home X and Y axes
G29 ; level bed
M104 S[extruder0_temperature] T0 ; heat T0
M109 S[extruder0_temperature] T0 ; stabilize T0
In our experience, it would be advised that you heat the nozzle before performing leveling. So if you have issues with oozing you may want to add a retraction prior to the bed leveling. In that case, the script would end up like the following.

Code: Select all

M140 S[bed0_temperature] ; heat bed
M190 S[bed0_temperature] ; stabilize bed
G28 X Y ; home X and Y axes
M104 S[extruder0_temperature] T0 ; heat T0
M109 S[extruder0_temperature] T0 ; stabilize T0
G92 E0 ; zero extruder
G1 E-1.00 F2400 ; retract filament
G29 ; level bed

threnody
Posts: 2
Joined: Sun Jan 19, 2020 8:52 am

Re: Edit gcode header

Sun Feb 02, 2020 8:58 am

Chris,

Many thanks for the reply, apologies for not replying sooner, first chance I've had to tinker with my 3D printer for a while...

I will try your suggestions now and report back.

Cheers,
Paul

Return to “General Discussion and Tips”