RedWagon
Posts: 2
Joined: Fri Aug 02, 2013 6:38 pm

Auto bed leveling while preheating

Mon May 26, 2014 1:44 pm

This is just an informative post in case someone else needs to do this. Marlin firmware for the Reprap has an auto bed leveling feature which can take a bit of time to finish. I didn't like having my printer heat up, then spend extra time at temp leveling the Z. As a workaround, I removed my leveling script from Starting G-Code and added this to post processing.

sed -i "0,/^M104/s/^M104.*/&\nG28 X0 Y0\nG29/" [output_filepath]

This finds the first instance of a line that begins with M104 and adds the following lines:

G28 X0 Y0
G29

M104 set the temp, the leveling scripts run, then M106 runs which waits for the temp to stabilize. With this I can probe more points on my bed without wasting any time. If anyone else wants to use this, just replace the part in bold and don't forget to add \n for a new line. Hopefully we'll get a separate box for this in the future.

alien2108
Posts: 16
Joined: Fri May 23, 2014 3:41 pm

Re: Auto bed leveling while preheating

Tue May 27, 2014 4:15 pm

Hello!

I was just about to write about same request! I am also using auto bed levelling and I would love to do it before heating up finishes! Why? Simple, because otherwise I get filament dots all over my bed - where the probing happens and I have to "run" behind the head and cleanup!

A thought why it might be better to do it before heating even starts....Your nozzle will change dimensions when heating and if you heat up in the process of measuring you might get different results (I am guessing here....).

Simplify3D Team -> It would be great if there would be an option to execute some GCODE BEFORE HEATING UP the nozzle (bed can already start to heat up)!

I am not really keen to export gcode as I do direct USB printing....

Best regards

alien2108
Posts: 16
Joined: Fri May 23, 2014 3:41 pm

Re: Auto bed leveling while preheating

Thu Nov 06, 2014 11:34 am

Simplify team anything on that matter? Why not enable to execute some code BEFORE heat up procedure?

BaudR8
Posts: 183
Joined: Fri Aug 29, 2014 9:59 am

Re: Auto bed leveling while preheating

Thu Nov 06, 2014 3:05 pm

If I ever need to do some sort of script prior to pre-heating here's what I do:

- Go into Temperature Tab and for extruder and bed controllers, uncheck the option to Wait for Temperatures to stabilize.
- Go into my Scripts tab, and under the Starting G-Code put:

*startup procedure*
M190 S[bed1_temperature]
M109 S[extruder0_temperature]

So the starting g-code for bed leveling would look something like this:

Code: Select all

G28 X0 Y0; home all axes
G29
M190 S[bed1_temperature]
M109 S[extruder0_temperature]

alien2108
Posts: 16
Joined: Fri May 23, 2014 3:41 pm

Re: Auto bed leveling while preheating

Thu Nov 06, 2014 5:21 pm

Hey thnx for great tip!

I actually did following now:

- Disabled the Wait for Temperatures to stabilise
- Startup script I changed as as following:

M140 S[bed1_temperature] ; Set bed temp and do not wait - preheat
M104 S150; Set extruder and do not wait - preheat
G21 ; Units to mm
G28 ; home all axes
G29; Detailed Z-Probe
M190 S[bed1_temperature] ; Set bed temp and wait to be reached
M109 S[extruder0_temperature] ; Set extruder temp and wait to be reached
G1 Z3 F1000 ; Slide the probe back in
G1 X10 Y10 F6000 ; Move to start of bed
...

So this means that in the process of auto bed level bed gets heated up and extruder preps to 150C. After auto bed level is complete (G29) everything is heated up to final temperatures.

Saves me A TON of time now!!! :)

KC_703
Posts: 238
Joined: Tue Aug 26, 2014 5:23 pm

Re: Auto bed leveling while preheating

Thu Nov 06, 2014 9:28 pm

Any concern about expanding hotend affecting the leveling?

I usually "time" the start of my print to ~10C before the hotend reaches the first layer temp. Its worked well so far, but this is a great addition to the start script.

User avatar
TenKOhms
Posts: 172
Joined: Wed May 14, 2014 3:04 pm

Re: Auto bed leveling while preheating

Thu Nov 06, 2014 10:40 pm

KC_703 wrote:Any concern about expanding hotend affecting the leveling?

I usually "time" the start of my print to ~10C before the hotend reaches the first layer temp. Its worked well so far, but this is a great addition to the start script.
It shouldn't matter, at least I don't think so for the more common bed leveling probes. The induction sensor and most mechanical bed leveling probes don't actuate based off of the tip touching some point, but rather the external probe sensor itself, so they won't be prone to error caused by the nozzle expanding.

alien2108
Posts: 16
Joined: Fri May 23, 2014 3:41 pm

Re: Auto bed leveling while preheating

Fri Nov 07, 2014 2:23 am

No concernt at all, since I auto level with hal sensor, so head/extruder has nothing to do with it :)

markeby
Posts: 1
Joined: Wed Sep 16, 2020 10:19 pm

Re: Auto bed leveling while preheating

Mon Oct 19, 2020 1:44 pm

alien2108 wrote:
Thu Nov 06, 2014 5:21 pm
Hey thnx for great tip!

I actually did following now:

- Disabled the Wait for Temperatures to stabilise
- Startup script I changed as as following:

M140 S[bed1_temperature] ; Set bed temp and do not wait - preheat
M104 S150; Set extruder and do not wait - preheat
G21 ; Units to mm
G28 ; home all axes
G29; Detailed Z-Probe
M190 S[bed1_temperature] ; Set bed temp and wait to be reached
M109 S[extruder0_temperature] ; Set extruder temp and wait to be reached
G1 Z3 F1000 ; Slide the probe back in
G1 X10 Y10 F6000 ; Move to start of bed
...

So this means that in the process of auto bed level bed gets heated up and extruder preps to 150C. After auto bed level is complete (G29) everything is heated up to final temperatures.

Saves me A TON of time now!!! :)
I had a couple of concerns with the setting for my Ender 5 Pro.
First, using that setting for the bed got me M180 S-0
I used M140 [bed0_temperature] which actually made more sense.

Then, my original startup had:
M106 S0
M140 S60
M190 S60
M104 S240 T0
M109 S240 T0
and was missing the heat up command for the bed and extruder when I unchecked the "Wait for heat up"


So, I ended up with
M140 S[bed0_temperature]
M104 S[extruder0_temperature] T0
G28 ;Home
G29 ;Auto bed-level (BL-Touch)
M190 S[bed0_temperature]
M109 S[extruder0_temperature] T0

Return to “Feature Requests”