Nozzle heats while autoleveling (or before)

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)?

• 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 May 13 '18 at 18:01
• Which firmware and or printer are you using? Please update that into your question. – 0scar May 13 '18 at 18:14
• @FernandoBaltazar I know right? but it heats before G29 at 195ºC then executes G29. – Petar Petrov May 14 '18 at 7:42
• @0scar Anet A8 with Marlin. – Petar Petrov May 14 '18 at 7:43
• 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 May 14 '18 at 9:09

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