<p>I'm using Cura as my slicing/printing software and I just started using the BuildTak printing surface.</p>

<p>The BuildTak is damaged by pushing a hot nozzle into it and my printer's (Robo3D R1+) autoleveling feature works by pushing the nozzle into the build surface.</p>

<p>Is there a way to configure Cura so that it runs the Z probe first, then heat up the nozzle?</p>

<p>My first sheet of BuildTak already has 10 small holes in it (at the homing position and at the 9 leveling touch points)</p>

[{'answer_id': 469, 'author': 'Tormod Haugene', 'author_id': 115, 'author_profile': 'https://3dprinting.stackexchange.com/users/115', 'pm_score': 4, 'selected': True, 'text': '<p>In Cura (and Slic3r), you can 100% customize what the printer does before printing your actual model through custom <strong>start/end g-code</strong>.</p>\n\n<p>If you navigate to the <code>Start/End-GCode tab in Cura</code>, then select <code>start.gcode</code>, you can see what operations are run before each print begins. Lines prefixed with <code>;</code> are comments, and does not affect the printing in any way. </p>\n\n<p>Basically, we want to manually tell the printer to do the auto leveling <em>before</em> heating up the nozzle by editing the g-code in <code>start.gcode</code>.</p>\n\n<h3>G-Code generated with the default start.gcode:</h3>\n\n<p>If you try to slice some model with the default code found in <code>start.gcode</code>, you will get something like the following (depending on your printer):</p>\n\n<pre><code>; CURA AUTOMATICALLY INSERTS THESE TEMPERATURE CODES\n\nM190 S70.000000 ; Set bed temperature to 70 degrees\nM109 S210.000000 ; Set nozzle temperature to 210 degrees\n\n\n; THESE ARE THE CODES FROM START.GCODE (for a ROBO 3D R1) \n\nG28          ;move printer to endstops (the home position)\nG92 E0       ;zero the extruded filament length\nM565 Z-1     ;set z-probe offset\nG1 Z5 F5000  ;move the printer 5mm above the bed\nG29          ;run auto-leveling\n\n\n; THE ACTUAL MODEL BEGINS HERE\n\n;Layer count: 168\n;LAYER:0\n.\n.\n</code></pre>\n\n<h3>Analyzing the g-code output</h3>\n\n<p>At the top of this code snippet, we can see that Cura automatically inserts g-code for heating up the bed and nozzle to their respective temperatures with the <a href="http://reprap.org/wiki/G-code#M190:_Wait_for_bed_temperature_to_reach_target_temp" rel="noreferrer">M190</a> and <a href="http://reprap.org/wiki/G-code#M109:_Set_Extruder_Temperature_and_Wait" rel="noreferrer">M109</a> g-codes. This means the printer always will heat up the nozzle before reading the <code>start.gcode</code>s that we set. However, if we manually override <a href="http://reprap.org/wiki/G-code#M109:_Set_Extruder_Temperature_and_Wait" rel="noreferrer">M109</a> code in <code>start.gcode</code>, the <a href="http://reprap.org/wiki/G-code#M109:_Set_Extruder_Temperature_and_Wait" rel="noreferrer">M109</a> at the top will automagically disappear from the generated g-code output! (Thanks, @TomvanderZanden!)</p>\n\n<p>We could therefore use the auto-leveling command <a href="http://reprap.org/wiki/G-code#G29:_Detailed_Z-Probe" rel="noreferrer">G29</a> before manually setting the nozzle temperature with <a href="http://reprap.org/wiki/G-code#M109:_Set_Extruder_Temperature_and_Wait" rel="noreferrer">M109</a>; specifically, we want to add <code>M109 S{print_temperature}</code>, which reads the <code>Basic -&gt; Print Temperature</code>-setting in Cura, and replace <code>{print_temperature}</code> with it automatically.</p>\n\n<h3>Manipulating start.gcode:</h3>\n\n<p>In order to postpone heating the hotend till after probing, <code>start.gcode</code> could be something like: </p>\n\n<pre><code>G28          ;move printer to endstops (the home position)\nG92 E0       ;zero the extruded filament length\nM565 Z-1     ;set z-probe offset     &lt;-----   ( YOU HAVE TO ADJUST THIS, READ BELOW)\nG1 Z5 F5000  ;move the printer 5mm above the bed\nG29          ;run auto-leveling\nM109 S{print_temperature}    ;set nozzle temperature, and wait for it heat up\n</code></pre>\n\n<p>And that\'s about it! You can then use these codes in your <code>start.gcode</code>. However, you probably will have to recalibrate your z-prove offset. </p>\n\n<h3>Adjust z-probe offset:</h3>\n\n<p>Normally, auto-leveling is done with the nozzle heated for a reason: when the nozzle is warm, it expands slightly, moving closer to the bed. You might therefore have to adjust your Z-probe offset with the <a href="http://reprap.org/wiki/G-code#M565:_Set_Z_probe_offset" rel="noreferrer">M565</a> command (as demonstrated in the snippet) to account for the increase in nozzle length when warm.</p>\n\n<h3>Remember:</h3>\n\n<p>Remember that when editing g-code in this manner, you will take full control of how the printer operates. You could therefore very well do something unintended, so keep the power switch close! </p>\n'}, {'answer_id': 18662, 'author': 'Greenonline', 'author_id': 4762, 'author_profile': 'https://3dprinting.stackexchange.com/users/4762', 'pm_score': 0, 'selected': False, 'text': '<p>As pointed out in <a href="https://3dprinting.stackexchange.com/questions/454/how-to-configure-cura-to-run-the-z-probe-before-heating/469#comment6403_469">Markus\'s comment</a> to <a href="https://3dprinting.stackexchange.com/a/469/4762">Tormod\'s answer</a>, <code>{print_temperature}</code> needs to be replaced by <code>{material_print_temperature}</code>, so the code now becomes:</p>\n<pre><code>G28          ;move printer to endstops (the home position)\nG92 E0       ;zero the extruded filament length\nM565 Z-1     ;set z-probe offset     &lt;-----   ( YOU HAVE TO ADJUST THIS, READ BELOW)\nG1 Z5 F5000  ;move the printer 5mm above the bed\nG29          ;run auto-leveling\nM109 S{material_print_temperature}    ;set nozzle temperature, and wait for it heat up\n</code></pre>\n'}]
['https://3dprinting.stackexchange.com/questions/454', 'https://3dprinting.stackexchange.com', 'https://3dprinting.stackexchange.com/users/170/']