<p>I am using CURA as my slicer, and it sets the bed and nozzle temp before printer start code is executed.
You can easily check that by opening a file in a notepad and see, that there will be a few lines describing the job, nozzle and bed setting temperature and <code>the user code</code> that is inserted in printer properties screen.</p>

<p>To change that behavior - you need to open the file and move the M commands down after leveling is executed.</p>

<pre><code>;FLAVOR:Marlin
;TIME:45
;Filament used: 0.0187665m
;Layer height: 0.2
;Generated with Cura_SteamEngine 3.3.1
M190 S60
M104 S200
M109 S200M82 ;absolute extrusion mode
</code></pre>

<p><strong>lines above are added by slicer so temperature is set before instritions from START G-Code section:</strong></p>

<pre><code>G21 ;metric values
G90 ;absolute positioning
M82 ;set extruder to absolute mode
M107 ;start with the fan off
G28;
G92 E0 ;zero the extruded length
G1 F20 E3 ;extrude 3mm of feed stock
G92 E0 ;zero the extruded length again
</code></pre>

<p><a href="https://i.sstatic.net/FTvAf.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/FTvAf.png" alt="user start g-code screen"></a></p>

CC BY-SA 4.0
2018-05-14T08:45:59.910Z
2018-05-14T14:39:18.223Z
2018-05-14T14:39:18.223Z
profesor79
<p>When I'm auto-leveling my Anet A8 with Marlin firmware, the nozzle heats to 195°C during the leveling process, which leaves drops of filament. I checked the resulting G-code but makes no sense to me: </p>

<pre><code>M107
M190 S55 ; set bed temperature and wait for it to be reached
M117 Homing Axes
G28                          ; Home axis
M117 Autoleveling
G29
M117 Cleaning Nozzle    ; Indicate nozzle clean in progress on LCD
M109 S200       ; Uncomment to set your own temp run warmer to clean out nozzle
M107                ; Turn layer fan off
G21             ; Set to metric change to G20 if you want Imperial
G90                          ; Force coordinates to be absolute relative to the origin
G0 X10 Y0 Z0.15 F9000         ; Move in 1mm from edge and up z 0.15mm
G92 E0                       ; Set extruder to 0 zero
G1 Y190 E50 F500             ; Extrude 100mm filiment along Y axis 190mm long to prime and clean the nozzle
G92 E0                       ; Reset extruder to 0 zero end of cleaning run
G1 E-3 F500                  ; Retract filiment by 3 mm to reduce string effect
G1 X3 Y190 Z15 F9000        ; Move over and rise to safe Z height
G1 X3 Y0 Z15 F9000      ; Move back to front of bed at safe Z height to shear strings
</code></pre>

<p>My printer heats the bed, then homes axes while setting the nozzle temperature to 195°C.</p>

<p>Then autolevels and finally <code>M109 S200</code> does its job.</p>

<p>How can I prevent the nozzle from heating when there is no G-code for it (except the <code>M109 S200</code>)?</p>

CC BY-SA 4.0
2018-05-13T18:01:02.737Z
According your code the nozzle will heat after autoleveling, M104 S210 will set the temperature you need during process and M104 S0 will turn off your extruder heater.
Fernando Baltazar
CC BY-SA 4.0
2018-05-13T18:14:42.003Z
Which firmware and or printer are you using? Please update that into your question.
0scar
CC BY-SA 4.0
2018-05-14T07:42:38.247Z
@FernandoBaltazar  I know right? but it heats **before** G29 at 195ºC then executes G29.
Petar Petrov
CC BY-SA 4.0
2018-05-14T07:43:04.920Z
@0scar Anet A8 with Marlin.
Petar Petrov
CC BY-SA 4.0
2018-05-14T09:09:10.090Z
Very strange, like @FernandoBaltazar mentioned, the heating is not instructed by the code before the leveling process has ended. Is the snippet taken from a g-code file from a product. Please re-slice and add the resulting g-code up to the point it starts printing. Also post your start g-code from your slicer. You are also sure that you did not accidentally preheat the nozzle through the menu?
0scar
CC BY-SA 4.0
2018-05-14T10:03:03.190Z
I kinda off solved it with M109 S50 before G29 `G28
 M109 S50
M117 Autoleveling
G29
M117 Cleaning Nozzle   
M109 S200`

I have to check marlin config files. Could be a firmware thing
Petar Petrov
CC BY-SA 4.0
2018-05-14T13:43:07.323Z
I agree that it's possible the Autolevel command is interpreted on your control board firmware as initiating nozzle heating while levelling, to save time.  But really: a couple bits of pre-extruded material is not a big deal.
Carl Witthoft
CC BY-SA 4.0
2018-05-14T14:45:43.687Z
Besides, you should ideally preheat the nozzle and test the bed level with a heated bed and heated nozzle. Testing cold or hot may lead to different bed mesh values. Leaking filament can be fought by retracting the filament after a successful print or prior to G29 on temp.
0scar
CC BY-SA 4.0
2018-05-14T14:53:51.897Z
Probe is far away from nozzle to not be influenced by it. Adding M109 S50 to force a temp before G29 did the trick and I had the best prints ive had in a long time. I consider that a solution
Petar Petrov
CC BY-SA 4.0
2018-05-14T16:57:28.927Z
@0scar M109 is for waiting to a temperature can be reached, then execute the next code (extrusion). M104 is to set the temperature while execute the following codes this way you can change temperatures during extrusion where the temperature is too high and the area is too small like pivots.
Fernando Baltazar
CC BY-SA 4.0
2018-05-14T17:09:13.260Z
@PetarPetrov   I'm using this lines after G28. G29 ; Autonivel M190 S38 ; set bed Temperature G1 Z4 F240 ; lift nozzle (to clean nozzle if material inside) M109 S195 ; wait for temperature to be reached then starts to print.
Fernando Baltazar
CC BY-SA 4.0
2018-07-11T12:32:34.317Z
@SeanHoulihane It´s a solution that works to me, but not sure if it is THE solution. But its logical if the filament oozes while autoleveling because the nozzle its heated up, then before `G29` i heat it to a point but not to the melting point that oozes `G28 M109 S50` then after G29  wait for desired print temp to be reached and start to print.
Petar Petrov
<g-code><hotend><nozzle><anet-a8>
Nozzle heats while autoleveling (or before)
Petar Petrov
# Nozzle heats while autoleveling (or before)

(Asked by: username_0 on 2018-05-13)

When I'm auto-leveling my Anet A8 with Marlin firmware, the nozzle heats to 195°C during the leveling process, which leaves drops of filament. I checked the resulting G-code but makes no sense to me:

```
M107
M190 S55 ; set bed temperature and wait for it to be reached
M117 Homing Axes
G28                          ; Home axis
M117 Autoleveling
G29
M117 Cleaning Nozzle    ; Indicate nozzle clean in progress on LCD
M109 S200       ; Uncomment to set your own temp run warmer to clean out nozzle
M107                ; Turn layer fan off
G21             ; Set to metric change to G20 if you want Imperial
G90                          ; Force coordinates to be absolute relative to the origin
G0 X10 Y0 Z0.15 F9000         ; Move in 1mm from edge and up z 0.15mm
G92 E0                       ; Set extruder to 0 zero
G1 Y190 E50 F500             ; Extrude 100mm filiment along Y axis 190mm long to prime and clean the nozzle
G92 E0                       ; Reset extruder to 0 zero end of cleaning run
G1 E-3 F500                  ; Retract filiment by 3 mm to reduce string effect
G1 X3 Y190 Z15 F9000        ; Move over and rise to safe Z height
G1 X3 Y0 Z15 F9000      ; Move back to front of bed at safe Z height to shear strings

```

My printer heats the bed, then homes axes while setting the nozzle temperature to 195°C.

Then autolevels and finally `M109 S200` does its job.

How can I prevent the nozzle from heating when there is no G-code for it (except the `M109 S200`)?

**Tags:** g-code, hotend, nozzle, anet-a8

> **Comments:**
> **username_1**: According your code the nozzle will heat after autoleveling, M104 S210 will set the temperature you need during process and M104 S0 will turn off your extruder heater.  
> **username_2**: Which firmware and or printer are you using? Please update that into your question.  
> **username_0**: @username_1  I know right? but it heats **before** G29 at 195ºC then executes G29.  
> **username_0**: @username_2 Anet A8 with Marlin.  
> **username_2**: Very strange, like @username_1 mentioned, the heating is not instructed by the code before the leveling process has ended. Is the snippet taken from a g-code file from a product. Please re-slice and add the resulting g-code up to the point it starts printing. Also post your start g-code from your slicer. You are also sure that you did not accidentally preheat the nozzle through the menu?  
> **username_0**: I kinda off solved it with M109 S50 before G29 `G28  M109 S50 M117 Autoleveling G29 M117 Cleaning Nozzle    M109 S200`  I have to check marlin config files. Could be a firmware thing  
> **username_3**: I agree that it's possible the Autolevel command is interpreted on your control board firmware as initiating nozzle heating while levelling, to save time.  But really: a couple bits of pre-extruded material is not a big deal.  
> **username_2**: Besides, you should ideally preheat the nozzle and test the bed level with a heated bed and heated nozzle. Testing cold or hot may lead to different bed mesh values. Leaking filament can be fought by retracting the filament after a successful print or prior to G29 on temp.  
> **username_0**: Probe is far away from nozzle to not be influenced by it. Adding M109 S50 to force a temp before G29 did the trick and I had the best prints ive had in a long time. I consider that a solution  
> **username_1**: @username_2 M109 is for waiting to a temperature can be reached, then execute the next code (extrusion). M104 is to set the temperature while execute the following codes this way you can change temperatures during extrusion where the temperature is too high and the area is too small like pivots.  
> **username_1**: @username_0   I'm using this lines after G28. G29 ; Autonivel M190 S38 ; set bed Temperature G1 Z4 F240 ; lift nozzle (to clean nozzle if material inside) M109 S195 ; wait for temperature to be reached then starts to print.  
> **username_0**: @SeanHoulihane It´s a solution that works to me, but not sure if it is THE solution. But its logical if the filament oozes while autoleveling because the nozzle its heated up, then before `G29` i heat it to a point but not to the melting point that oozes `G28 M109 S50` then after G29  wait for desired print temp to be reached and start to print.  

---

## 1 answers

### Answer by username_4 on 2018-05-14. Score: 1

I am using CURA as my slicer, and it sets the bed and nozzle temp before printer start code is executed.
You can easily check that by opening a file in a notepad and see, that there will be a few lines describing the job, nozzle and bed setting temperature and `the user code` that is inserted in printer properties screen.

To change that behavior - you need to open the file and move the M commands down after leveling is executed.

```
;FLAVOR:Marlin
;TIME:45
;Filament used: 0.0187665m
;Layer height: 0.2
;Generated with Cura_SteamEngine 3.3.1
M190 S60
M104 S200
M109 S200M82 ;absolute extrusion mode

```

**lines above are added by slicer so temperature is set before instritions from START G-Code section:**

```
G21 ;metric values
G90 ;absolute positioning
M82 ;set extruder to absolute mode
M107 ;start with the fan off
G28;
G92 E0 ;zero the extruded length
G1 F20 E3 ;extrude 3mm of feed stock
G92 E0 ;zero the extruded length again

```

[![user start g-code screen](https://i.sstatic.net/FTvAf.png)](https://i.sstatic.net/FTvAf.png)


---

