Jump to content
chickenboy115

Add variable bed temperature in start gcode?

Recommended Posts

Posted · Add variable bed temperature in start gcode?

So I have my start gcode set to warm my bed to a specific temperature before heating the hotend and bed to the final temperature.  I was wondering if there is a way to set this first temperature as a variable relating to the final temperature instead of only being able to set an exact number.  Eg, my current gcode is below:

 

M190 S55 ;Preheat bed to 55C
M104 S{material_print_temperature} ; begin heating nozzle to final target
M140 S{material_bed_temperature} ; begin heating bed to final target

G28 ;Home

M190 S{material_bed_temperature} ; Wait for final bed temp
M109 S{material_print_temperature} ; Wait for final nozzle temp

This works fine until I switch filaments that have different bed temps and forget to edit the start gcode.  I'd like to do something like this:

M190 S{material_bed_temperature}-10 ;Preheat bed to 10C below final target

Is it possible to do math in the start gcode?  I saw a couple older posts saying no, but not sure if that changed in recent updates.  If not, is there some way to do this with a post processing script?

Share this post


Link to post
Share on other sites
Posted · Add variable bed temperature in start gcode?

No, it is not possible to use math in the start gcode snippet like that.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...

Important Information

Welcome to the Ultimaker Community of 3D printing experts. Visit the following links to read more about our Terms of Use or our Privacy Policy. Thank you!