Dynamic forms

All forms now generated from a single function. Huge reduction in code and easier to make global changes.
This commit is contained in:
lawgicau
2021-07-14 17:35:30 +10:00
parent a4eadd10b6
commit 8707323b18
5 changed files with 343 additions and 556 deletions

View File

@ -3,7 +3,7 @@
<head> <head>
<script src="js/loadscripts.js"></script> <script src="js/loadscripts.js"></script>
</head> </head>
<body onload="loadAllFormData()"> <body onload="loadAllFormData(); displayCustom();">
<div id="menu"></div> <div id="menu"></div>
<div id="header"></div> <div id="header"></div>
<div id="tabs"> <div id="tabs">
@ -248,89 +248,11 @@
<h2>First layer gcode generator</h2> <h2>First layer gcode generator</h2>
<p>The following form will create a series of five squares that you can use to live level your bed or set the Z offset. It is quick to print and features one square in the middle of the bed, with four others in the corners. You can use these to turn the levelling knobs in each corner until they are consistent, or ensure your ABL system is working if you have one in place.</p> <p>The following form will create a series of five squares that you can use to live level your bed or set the Z offset. It is quick to print and features one square in the middle of the bed, with four others in the corners. You can use these to turn the levelling knobs in each corner until they are consistent, or ensure your ABL system is working if you have one in place.</p>
<a href="#" data-featherlight="img/firstlayerpreview.jpg"><img class="thumb" src="img/firstlayerpreview.jpg" /></a> <a href="#" data-featherlight="img/firstlayerpreview.jpg"><img class="thumb" src="img/firstlayerpreview.jpg" /></a>
<!-- firstlayerForm-->
<form name="firstlayerForm" id="firstlayerForm" onsubmit="return false;"> <form name="firstlayerForm" id="firstlayerForm" onsubmit="return false;">
<h4>Nozzle Diameter / Layer Height</h4>
<p>Select your nozzle diameter and layer height. If you have not changed your nozzle, it will likely be 0.4 mm. 0.2 mm is a typical layer height for this nozzle.</p>
<label for="nozzleLayer">Select nozzle diameter / layer height:</label>
<select name="nozzleLayer">
<option value="40_20">0.4 mm nozzle / 0.2 mm layer height</option>
<option value="40_16">0.4 mm nozzle / 0.16 mm layer height</option>
<option value="40_12">0.4 mm nozzle / 0.12 mm layer height</option>
<option value="30_15">0.3 mm nozzle / 0.15 mm layer height</option>
</select>
<h4>Additional start gcode</h4>
<p>If you have additional start commands, tick the box and enter the gcode. This can be used for an extruder prime sequence, overwriting the standard flow rate, compensating for 2.85/3.00 mm filament, setting K factor and more. Tick the box for more details.</p>
<label>Additional start gcode:<input name="start" type="checkbox" onchange="toggle(!this.checked, '#firstlayerStart')" value="extraStart"></label>
<label>Add M80 to turn PSU on:<input name="psuon" type="checkbox" value="on"></label>
<label>Remove <b>T0</b> from gcode (advanced users with MMU)<input name="removet0" type="checkbox"></label>
<div id="firstlayerStart" class="startExp">
<p>For the majority of users, you can skip this section. Any gcode entered here will be inserted after temperatures are set and homing is complete. Start gcode is saved by the browser, you should only have to enter it once. Example uses include:</p>
<ul>
<li>Copying gcode commands from your slicer to draw an intro/prime/purge line. By default this is left out to accommodate delta printers.</li>
<li>Telling the firmware to alter the flow rate of the gcode to follow. This does not mean the exact flow rate you have set in your own slicer. For example, using <b><a href="https://marlinfw.org/docs/gcode/M221.html" target="_blank">M221</a> S120</b> would set the flow rate to 120% of what it was originally sliced as in Simpilfy3D. Use this to compensate for obvious over or under extrusion you may encounter with these tests. Additional information available at the base of the <a href="#flow">Flow Rate</a> tab.</li>
<li><b>M221 S38</b> can also be used to compensate for 2.85 mm filament and <b>M221 S34</b> for 3.00 mm filament instead of the default 1.75 mm.</li>
<li>Setting the K factor for linear advance. For example, <b>M900 K0.11</b></li>
<li>Custom ABL sequence. By default, only G28 is present. This gcode will be inserted immediately afer that so custom commands can be used here.</li>
<li>Anything else you have in your start gcode, such as setting acceleration values, E-steps, etc.</li>
</ul>
<textarea name="startgcode"></textarea>
</div>
<script> <script>
if(document.firstlayerForm.start.checked == false){ createForm("firstlayer");
$("#firstlayerStart").hide();
}
</script> </script>
<h4>Bed dimensions</h4>
<p>Inputting the correct number will attempt to move the print into the centre of the bed. If the 0,0 at centre button is checked for a delta, also enter your bed diameter. Please check the gcode to ensure it will fit on your bed.</p>
<label>0,0 at centre of bed (most deltas):<input name="centre" type="checkbox" onchange="toggle(this.checked, 'first')" value="centre"></label>
<span id="firstlayerXY"><label>Bed X dimension (mm): <input type="number" name="bedx" value="100" min="100" max="600" step="1"></label>
<label>Bed Y dimension (mm): <input type="number" name="bedy" value="100" min="100" max="600" step="1"></label><br /></span>
<span id="firstlayerdia"><label>Bed diameter dimension (mm): <input type="number" name="beddia" value="100" min="100" max="600" step="1"></label></span>
<script>
if(document.firstlayerForm.centre.checked == false){
$("#firstlayerXY").show();
$("#firstlayerdia").hide();
} else {
$("#firstlayerXY").hide();
$("#firstlayerdia").show();
}
</script>
<p>You may add extra margin for clearing bed clips, etc. Caution! If this is too large on small printers the squares will overlap.</p>
<label>Extra margin from edge (mm): <input type="number" name="margin" value="0" min="0" max="100" step="1"></label>
<h4>Temperatures</h4>
<p>For the hot end and bed respectively, typical PLA temperatures are 200 and 60, PETG 235 and 80, ABS 250 and 100, TPU 230 and 5 (effectively off).</p>
<label>Hot end temperature (deg C): <input type="number" name="hotendtemp" value="200" min="160" max="450"></label>
<label>Bed temperature (deg C): <input type="number" name="bedtemp" value="60" min="0" max="150"></label> (use 0 for a non heated bed)<br />
<h4>Part Cooling Fan</h4>
<p>Part cooling fans typically don't activate until layer 2. Since this print is only one layer thick, part cooling is not applicable.</p>
<h4>Auto Bed Levelling</h4>
<label for="abl">Select which method of ABL is in place.</label>
<select name="abl">
<option value="0">No ABL</option>
<option value="1">Probe new mesh at the start of print - G29 (BLtouch,EZABL,etc)</option>
<option value="2">Restore saved ABL/manual mesh - M420 S1</option>
<option value="3">Prusa MK3 - G28 W followed by G80</option>
<option value="4">Prusa Mini - Only heat nozzle to 170, then G29</option>
<option value="5">Unified Bed Leveling - Load Saved Mesh (slot 1) then 3 Probe Tilt </option>
</select>
<h4>Retraction</h4>
<p>If you don't know what to enter here, you can leave the retraction speed at 40 mm/sec. For a bowden tube printer, 6mm is a likely retraction distance. For direct drive, a starting value of 1mm may be suitable. If you are not sure about extra restart distance, leave this as 0.</p>
<p><label>Retraction distance (mm): <input type="number" name="retdist" value="5" min="0" max="20" step="0.1"></label>
<label>Retraction speed (mm/sec): <input type="number" name="retspeed" value="40" min="5" max="150" step="1"></label></p>
<p><label>Extra restart distance (mm): <input type="number" name="retdistextra" min="-10" max="10" value="0" step="0.1"></label>
<label>Z hop (mm): <input type="number" name="zhop" min="0" max="10" value="0" step="0.1"></label></p>
<h4>Additional end gcode</h4>
<p>If you have additional end commands, tick the box and enter the gcode.</p>
<label>Additional end gcode:<input name="end" type="checkbox" onchange="toggle(!this.checked, '#firstlayerEnd')" value="extraEnd"></label>
<div id="firstlayerEnd" class="endExp">
<p>For the majority of users, you can skip this section. Any gcode entered here will be inserted at the very end of the file.</p>
<textarea name="endgcode"></textarea>
</div>
<script>
if(document.firstlayerForm.start.checked == false){
$("#firstlayerEnd").hide();
}
</script>
<p><input type="button" onclick="processFirstlayer()" value="Download Gcode"></p> <p><input type="button" onclick="processFirstlayer()" value="Download Gcode"></p>
<p><input type="button" onclick="resetFormToDefaults(form)" value="Reset parameters"> <input type="button" onclick="outputSettings(form)" value="Output Settings Summary"></p> <p><input type="button" onclick="resetFormToDefaults(form)" value="Reset parameters"> <input type="button" onclick="outputSettings(form)" value="Output Settings Summary"></p>
</form> </form>
@ -352,82 +274,10 @@
</div> </div>
<p>The form below will create a customised version of the <a href="https://www.thingiverse.com/thing:1278865" target="_blank">XYZ 20mm calibration cube by iDig3Dprinting</a>. It is fast to print and gives a good indication if there is any fundamental problem with the printer.</p> <p>The form below will create a customised version of the <a href="https://www.thingiverse.com/thing:1278865" target="_blank">XYZ 20mm calibration cube by iDig3Dprinting</a>. It is fast to print and gives a good indication if there is any fundamental problem with the printer.</p>
<a href="#" data-featherlight="img/cube.jpg"><img class="thumb" src="img/cube.jpg" /></a> <a href="#" data-featherlight="img/cube.jpg"><img class="thumb" src="img/cube.jpg" /></a>
<!-- baselineForm -->
<form name="baselineForm" id="baselineForm" onsubmit="return false;"> <form name="baselineForm" id="baselineForm" onsubmit="return false;">
<h4>Nozzle Diameter / Layer Height</h4>
<p>Select your nozzle diameter and layer height. If you have not changed your nozzle, it will likely be 0.4 mm. 0.2 mm is a typical layer height for this nozzle. First layer height will be locked to the overall layer height. There are too many permutations to include support for first layer height variation too.</p>
<label for="nozzleLayer">Select nozzle diameter / layer height:</label>
<select name="nozzleLayer">
<option value="40_20">0.4 mm nozzle / 0.2 mm layer height</option>
<option value="40_16">0.4 mm nozzle / 0.16 mm layer height</option>
<option value="40_12">0.4 mm nozzle / 0.12 mm layer height</option>
<option value="30_15">0.3 mm nozzle / 0.15 mm layer height</option>
</select>
<h4>Additional start gcode</h4>
<p>If you have additional start commands, tick the box and enter the gcode. This can be used for an extruder prime sequence, overwriting the standard flow rate, compensating for 2.85/3.00 mm filament, setting K factor and more. Tick the box for more details.</p>
<label>Additional start gcode:<input name="start" type="checkbox" onchange="toggle(!this.checked, '#baselineStart')" value="extraStart"></label>
<label>Add M80 to turn PSU on:<input name="psuon" type="checkbox" value="on"></label>
<label>Remove <b>T0</b> from gcode (advanced users with MMU)<input name="removet0" type="checkbox"></label>
<div id="baselineStart" class="startExp">
<p>For the majority of users, you can skip this section. Any gcode entered here will be inserted after temperatures are set and homing is complete. Start gcode is saved by the browser, you should only have to enter it once. Example uses include:</p>
<ul>
<li>Copying gcode commands from your slicer to draw an intro/prime/purge line. By default this is left out to accommodate delta printers.</li>
<li>Telling the firmware to alter the flow rate of the gcode to follow. This does not mean the exact flow rate you have set in your own slicer. For example, using <b><a href="https://marlinfw.org/docs/gcode/M221.html" target="_blank">M221</a> S120</b> would set the flow rate to 120% of what it was originally sliced as in Simpilfy3D. Use this to compensate for obvious over or under extrusion you may encounter with these tests. Additional information available at the base of the <a href="#flow">Flow Rate</a> tab.</li>
<li><b>M221 S38</b> can also be used to compensate for 2.85 mm filament and <b>M221 S34</b> for 3.00 mm filament instead of the default 1.75 mm.</li>
<li>Setting the K factor for linear advance. For example, <b>M900 K0.11</b></li>
<li>Custom ABL sequence. By default, only G28 is present. This gcode will be inserted immediately afer that so custom commands can be used here.</li>
<li>Anything else you have in your start gcode, such as setting acceleration values, E-steps, etc.</li>
</ul>
<textarea name="startgcode"></textarea>
</div>
<script> <script>
if(document.baselineForm.start.checked == false){ createForm("baseline");
$("#baselineStart").hide();
}
</script>
<h4>Bed dimensions</h4>
<p>Inputting the correct number will attempt to move the print into the centre of the bed. If the 0,0 at centre button is checked, the bed size is irrelevant. Please check the gcode to ensure it will fit on your bed.</p>
<label>0,0 at centre of bed (most deltas):<input name="centre" type="checkbox" onchange="toggle(this.checked, '#baselineXY')" value="centre"></label>
<span id="baselineXY"><label>Bed X dimension (mm): <input type="number" name="bedx" value="100" min="100" max="600" step="1"></label>
<label>Bed Y dimension (mm): <input type="number" name="bedy" value="100" min="100" max="600" step="1"></label><br /></span>
<h4>Temperatures</h4>
<p>For the hot end and bed respectively, typical PLA temperatures are 200 and 60, PETG 235 and 80, ABS 250 and 100, TPU 230 and 5 (effectively off).</p>
<label>Hot end temperature (deg C): <input type="number" name="hotendtemp" value="200" min="160" max="450"></label>
<label>Bed temperature (deg C): <input type="number" name="bedtemp" value="60" min="0" max="150"></label> (use 0 for a non heated bed)<br />
<h4>Part Cooling Fan</h4>
<p>Printing with PLA typically has the part cooling fan come on from layer 2. Alter this default behaviour here. A zero speed value disables the fan apart from bridging.</p>
<label>Part cooling fan speed:</label> <input type="number" name="fanSpeed" value="100" min="0" max="100" step="5"> % </label><label for="fanLayer">starting on: </label>
<select name="fanLayer">
<option value="2">layer 2</option>
<option value="3">layer 3</option>
<option value="5">layer 5</option>
</select>
<h4>Auto Bed Levelling</h4>
<label for="abl">Select which method of ABL is in place.</label>
<select name="abl">
<option value="0">No ABL</option>
<option value="1">Probe new mesh at the start of print - G29 (BLtouch,EZABL,etc)</option>
<option value="2">Restore saved ABL/manual mesh - M420 S1</option>
<option value="3">Prusa MK3 - G28 W followed by G80</option>
<option value="4">Prusa Mini - Only heat nozzle to 170, then G29</option>
<option value="5">Unified Bed Leveling - Load Saved Mesh (slot 1) then 3 Probe Tilt </option>
</select>
<h4>Retraction</h4>
<p>If you don't know what to enter here, you can leave the retraction speed at 40 mm/sec. For a bowden tube printer, 6mm is a likely retraction distance. For direct drive, a starting value of 1mm may be suitable. If you are not sure about extra restart distance, leave this as 0.</p>
<p><label>Retraction distance (mm): <input type="number" name="retdist" value="5" min="0" max="20" step="0.1"></label>
<label>Retraction speed (mm/sec): <input type="number" name="retspeed" value="40" min="5" max="150" step="1"></label></p>
<p><label>Extra restart distance (mm): <input type="number" name="retdistextra" min="-10" max="10" value="0" step="0.1"></label>
<label>Z hop (mm): <input type="number" name="zhop" min="0" max="10" value="0" step="0.1"></label></p>
<h4>Additional end gcode</h4>
<p>If you have additional end commands, tick the box and enter the gcode.</p>
<label>Additional end gcode:<input name="end" type="checkbox" onchange="toggle(!this.checked, '#baselineEnd')" value="extraEnd"></label>
<div id="baselineEnd" class="endExp">
<p>For the majority of users, you can skip this section. Any gcode entered here will be inserted at the very end of the file.</p>
<textarea name="endgcode"></textarea>
</div>
<script>
if(document.baselineForm.start.checked == false){
$("#baselineEnd").hide();
}
</script> </script>
<p><input type="button" onclick="processBaseline()" value="Download Gcode"></p> <p><input type="button" onclick="processBaseline()" value="Download Gcode"></p>
<p><input type="button" onclick="resetFormToDefaults(form)" value="Reset parameters"> <input type="button" onclick="outputSettings(form)" value="Output Settings Summary"></p> <p><input type="button" onclick="resetFormToDefaults(form)" value="Reset parameters"> <input type="button" onclick="outputSettings(form)" value="Output Settings Summary"></p>
@ -818,7 +668,7 @@
</tbody> </tbody>
</table> </table>
<div class="exp"> <div class="exp">
<h5>Other factors beyond the scope of this test - Important!</h5> <h5>I can't translate my test results to my own slicer! Other factors beyond the scope of this test - Important!</h5>
<ul> <ul>
<li>Auto cooling (PrusaSlicer) / Speed Overrides (Simplify3D) / Minimum layer time (Cura): Most slicers have a setting to detect if a layer will complete in less than a certain time threshold. In this case, all movement for that layer is slowed, including those related to retraction, to increase the layer time to meet the target. The gcode generated by the this page has this setting OFF. If your results vary, trying turning this setting off in your own slicer too.</li> <li>Auto cooling (PrusaSlicer) / Speed Overrides (Simplify3D) / Minimum layer time (Cura): Most slicers have a setting to detect if a layer will complete in less than a certain time threshold. In this case, all movement for that layer is slowed, including those related to retraction, to increase the layer time to meet the target. The gcode generated by the this page has this setting OFF. If your results vary, trying turning this setting off in your own slicer too.</li>
<li>Z hop speed: If you are using Z hop, the vertical feedrate for the Z movements is set to 20 mm/sec for these tests. Matching this in your slicer is advised if these tests look better than your own slicer results. </li> <li>Z hop speed: If you are using Z hop, the vertical feedrate for the Z movements is set to 20 mm/sec for these tests. Matching this in your slicer is advised if these tests look better than your own slicer results. </li>
@ -834,144 +684,10 @@
</div> </div>
<p>The following form will create a retraction tower to conveniently test back to back parameters in the same print. Of the three available parameters, it is best to change only one per test print. For example, keep the retraction speed and extra restart distance the same, but vary the retraction distance over each segment. Changing more than one parameter makes is hard to tell what made the difference. The print is quick, so repeat the test varying other parameters until you are happy with them all.</p> <p>The following form will create a retraction tower to conveniently test back to back parameters in the same print. Of the three available parameters, it is best to change only one per test print. For example, keep the retraction speed and extra restart distance the same, but vary the retraction distance over each segment. Changing more than one parameter makes is hard to tell what made the difference. The print is quick, so repeat the test varying other parameters until you are happy with them all.</p>
<p>Here is the STL if you would like to slice a similar test yourself: <a href="files/retractiontestv2.stl">retractiontestv2.stl</a>. This file has been updated to V2, which changes the external shape from circular to pentagonal. It is also slightly shorter to print faster. The original file is still available here: <a href="files/retractiontest.stl">retractiontest.stl</a></p> <p>Here is the STL if you would like to slice a similar test yourself: <a href="files/retractiontestv2.stl">retractiontestv2.stl</a>. This file has been updated to V2, which changes the external shape from circular to pentagonal. It is also slightly shorter to print faster. The original file is still available here: <a href="files/retractiontest.stl">retractiontest.stl</a></p>
<!-- retractionForm -->
<form name="retractionForm" id="retractionForm" onsubmit="return false;"> <form name="retractionForm" id="retractionForm" onsubmit="return false;">
<h4>Nozzle Diameter / Layer Height</h4>
<p>Select your nozzle diameter and layer height. If you have not changed your nozzle, it will likely be 0.4 mm. 0.2 mm is a typical layer height for this nozzle. First layer height will be locked to the overall layer height. There are too many permutations to include support for first layer height variation too.</p>
<label for="nozzleLayer">Select nozzle diameter / layer height:</label>
<select name="nozzleLayer">
<option value="40_20">0.4 mm nozzle / 0.2 mm layer height</option>
<option value="40_16">0.4 mm nozzle / 0.16 mm layer height</option>
<option value="40_12">0.4 mm nozzle / 0.12 mm layer height</option>
<option value="30_15">0.3 mm nozzle / 0.15 mm layer height</option>
</select>
<h4>Additional start gcode</h4>
<p>If you have additional start commands, tick the box and enter the gcode. This can be used for an extruder prime sequence, overwriting the standard flow rate, compensating for 2.85/3.00 mm filament, setting K factor and more. Tick the box for more details.</p>
<label>Additional start gcode:<input name="start" type="checkbox" onchange="toggle(!this.checked, '#retractionStart')" value="extraStart"></label>
<label>Add M80 to turn PSU on:<input name="psuon" type="checkbox" value="on"></label>
<label>Remove <b>T0</b> from gcode (advanced users with MMU)<input name="removet0" type="checkbox"></label>
<div id="retractionStart" class="startExp">
<p>For the majority of users, you can skip this section. Any gcode entered here will be inserted after temperatures are set and homing is complete. Start gcode is saved by the browser, you should only have to enter it once. Example uses include:</p>
<ul>
<li>Copying gcode commands from your slicer to draw an intro/prime/purge line. By default this is left out to accommodate delta printers.</li>
<li>Telling the firmware to alter the flow rate of the gcode to follow. This does not mean the exact flow rate you have set in your own slicer. For example, using <b><a href="https://marlinfw.org/docs/gcode/M221.html" target="_blank">M221</a> S120</b> would set the flow rate to 120% of what it was originally sliced as in Simpilfy3D. Use this to compensate for obvious over or under extrusion you may encounter with these tests. Additional information available at the base of the <a href="#flow">Flow Rate</a> tab.</li>
<li><b>M221 S38</b> can also be used to compensate for 2.85 mm filament and <b>M221 S34</b> for 3.00 mm filament instead of the default 1.75 mm.</li>
<li>Setting the K factor for linear advance. For example, <b>M900 K0.11</b></li>
<li>Custom ABL sequence. By default, only G28 is present. This gcode will be inserted immediately afer that so custom commands can be used here.</li>
<li>Anything else you have in your start gcode, such as setting acceleration values, E-steps, etc.</li>
</ul>
<textarea name="startgcode"></textarea>
</div>
<script> <script>
if(document.retractionForm.start.checked == false){ createForm("retraction");
$("#retractionStart").hide();
}
</script>
<h4>Bed dimensions</h4>
<p>Inputting the correct number will attempt to move the print into the centre of the bed. If the centre button is checked, the bed size is irrelevant. Please check the gcode to ensure it will fit on your bed.</p>
<label>0,0 at centre of bed (most deltas):<input name="centre" type="checkbox" onchange="toggle(this.checked, '#retractionXY')" value="centre"></label>
<span id="retractionXY"><label>Bed X dimension (mm): <input type="number" name="bedx" value="100" min="100" max="600" step="1"></label>
<label>Bed Y dimension (mm): <input type="number" name="bedy" value="100" min="100" max="600" step="1"></label><br /></span>
<h4>Temperatures</h4>
<p>For the hot end and bed respectively, typical PLA temperatures are 200 and 60, PETG 235 and 80, ABS 250 and 100, TPU 230 and 5 (effectively off).</p>
<label>Hot end temperature (deg C): <input type="number" name="hotendtemp" value="200" min="160" max="450"></label>
<label>Bed temperature (deg C): <input type="number" name="bedtemp" value="60" min="0" max="150"></label> (use 0 for a non heated bed)<br />
<h4>Part Cooling Fan</h4>
<p>Printing with PLA typically has the part cooling fan come on from layer 2. Alter this default behaviour here. A zero speed value disables the fan apart from bridging.</p>
<label>Part cooling fan speed:</label> <input type="number" name="fanSpeed" value="100" min="0" max="100" step="5"> % </label><label for="fanLayer">starting on: </label>
<select name="fanLayer">
<option value="2">layer 2</option>
<option value="3">layer 3</option>
<option value="5">layer 5</option>
</select>
<h4>Auto Bed Levelling</h4>
<label for="abl">Select which method of ABL is in place.</label>
<select name="abl">
<option value="0">No ABL</option>
<option value="1">Probe new mesh at the start of print - G29 (BLtouch,EZABL,etc)</option>
<option value="2">Restore saved ABL/manual mesh - M420 S1</option>
<option value="3">Prusa MK3 - G28 W followed by G80</option>
<option value="4">Prusa Mini - Only heat nozzle to 170, then G29</option>
<option value="5">Unified Bed Leveling - Load Saved Mesh (slot 1) then 3 Probe Tilt </option>
</select>
<h4>Retraction</h4>
<p>For initial tests, you can leave the retraction speed at 40 mm/sec. For a bowden tube printer, 6mm is a likely retraction distance. For direct drive, a starting value of 1mm may be suitable. Vary either side of this for each segment. <span class="sug">Suggested increments for how much to vary the value for each segment are shown in green.</span>.</p>
<table>
<thead>
<tr>
<th>Reference Diagram</th>
<th>Segment</th>
<th>Retraction distance (mm)<p class="sug">&#177; 0.5 - 1</p></th>
<th>Retraction speed (mm/sec)<p class="sug">&#177; 5</p></th>
<th>Extra restart distance (mm)<p class="sug">&#177; 0.2</p></th>
<th>Prime (unretract) speed (mm/sec)<p class="sug">&#177; 5</p></th>
<th>Z hop (mm)<p class="sug">&#177; 0.1</p></th>
</tr>
</thead>
<tbody>
<tr>
<td rowspan="6">
<img src="img/retractiondiagram.jpg" />
</td>
<td style="text-align: center;">F</td>
<td><input type="number" min="0" max="20" name="ret_f1" value="6" step="0.1"></td>
<td><input type="number" min="5" max="200" name="ret_f2" value="40" step="1"></td>
<td><input type="number" min="-10" max="10" name="ret_f3" value="0" step="0.1"></td>
<td><input type="number" min="5" max="200" name="ret_f4" value="40" step="1"></td>
<td><input type="number" min="0" max="5" name="ret_f5" value="0" step="0.1"></td>
</tr>
<tr>
<td style="text-align: center;">E</td>
<td><input type="number" min="0" max="20" name="ret_e1" value="6" step="0.1"></td>
<td><input type="number" min="5" max="200" name="ret_e2" value="40" step="1"></td>
<td><input type="number" min="-10" max="10" name="ret_e3" value="0" step="0.1"></td>
<td><input type="number" min="5" max="200" name="ret_e4" value="40" step="1"></td>
<td><input type="number" min="0" max="5" name="ret_e5" value="0" step="0.1"></td>
</tr>
<tr>
<td style="text-align: center;">D</td>
<td><input type="number" min="0" max="20" name="ret_d1" value="6" step="0.1"></td>
<td><input type="number" min="5" max="200" name="ret_d2" value="40" step="1"></td>
<td><input type="number" min="-10" max="10" name="ret_d3" value="0" step="0.1"></td>
<td><input type="number" min="5" max="200" name="ret_d4" value="40" step="1"></td>
<td><input type="number" min="0" max="5" name="ret_d5" value="0" step="0.1"></td>
</tr>
<tr>
<td style="text-align: center;">C</td>
<td><input type="number" min="0" max="20" name="ret_c1" value="6" step="0.1"></td>
<td><input type="number" min="5" max="200" name="ret_c2" value="40" step="1"></td>
<td><input type="number" min="-10" max="10" name="ret_c3" value="0" step="0.1"></td>
<td><input type="number" min="5" max="200" name="ret_c4" value="40" step="1"></td>
<td><input type="number" min="0" max="5" name="ret_c5" value="0" step="0.1"></td>
</tr>
<tr>
<td style="text-align: center;">B</td>
<td><input type="number" min="0" max="20" name="ret_b1" value="6" step="0.1"></td>
<td><input type="number" min="5" max="200" name="ret_b2" value="40" step="1"></td>
<td><input type="number" min="-10" max="10" name="ret_b3" value="0" step="0.1"></td>
<td><input type="number" min="5" max="200" name="ret_b4" value="40" step="1"></td>
<td><input type="number" min="0" max="5" name="ret_b5" value="0" step="0.1"></td>
</tr>
<tr>
<td style="text-align: center;">A</td>
<td><input type="number" min="0" max="20" name="ret_a1" value="6" step="0.1"></td>
<td><input type="number" min="5" max="200" name="ret_a2" value="40" step="1"></td>
<td><input type="number" min="-10" max="10" name="ret_a3" value="0" step="0.1"></td>
<td><input type="number" min="5" max="200" name="ret_a4" value="40" step="1"></td>
<td><input type="number" min="0" max="5" name="ret_a5" value="0" step="0.1"></td>
</tr>
</tbody>
</table>
<h4>Additional end gcode</h4>
<p>If you have additional end commands, tick the box and enter the gcode.</p>
<label>Additional end gcode:<input name="end" type="checkbox" onchange="toggle(!this.checked, '#retractionEnd')" value="extraEnd"></label>
<div id="retractionEnd" class="endExp">
<p>For the majority of users, you can skip this section. Any gcode entered here will be inserted at the very end of the file.</p>
<textarea name="endgcode"></textarea>
</div>
<script>
if(document.retractionForm.start.checked == false){
$("#retractionEnd").hide();
}
</script> </script>
<p><input type="button" onclick="processRetraction()" value="Download Gcode"></p> <p><input type="button" onclick="processRetraction()" value="Download Gcode"></p>
<p><input type="button" onclick="resetFormToDefaults(form)" value="Reset parameters"> <input type="button" onclick="outputSettings(form)" value="Output Settings Summary"></p> <p><input type="button" onclick="resetFormToDefaults(form)" value="Reset parameters"> <input type="button" onclick="outputSettings(form)" value="Output Settings Summary"></p>
@ -1005,121 +721,10 @@
<p>Your 3D printer firmware will have a minimum hot end temperature extrusion is allowed and a maximum hot end temperature for safety. Make sure to keep within these boundaries to avoid errors.</p> <p>Your 3D printer firmware will have a minimum hot end temperature extrusion is allowed and a maximum hot end temperature for safety. Make sure to keep within these boundaries to avoid errors.</p>
<p>Here is the STL if you would like to slice a similar test yourself: <a href="files/temperaturetowerv2.stl">temperaturetowerv2.stl</a>. This is an updated model that prints in less time, has more variation in overhangs, and has a narrow pyramid in each band to try and snap off to test layer adhesion.</p> <p>Here is the STL if you would like to slice a similar test yourself: <a href="files/temperaturetowerv2.stl">temperaturetowerv2.stl</a>. This is an updated model that prints in less time, has more variation in overhangs, and has a narrow pyramid in each band to try and snap off to test layer adhesion.</p>
<p>The original design can be found here: <a href="files/temperaturetower.stl">temperaturetower.stl</a></p> <p>The original design can be found here: <a href="files/temperaturetower.stl">temperaturetower.stl</a></p>
<!-- temperatureForm -->
<form name="temperatureForm" id="temperatureForm" onsubmit="return false;"> <form name="temperatureForm" id="temperatureForm" onsubmit="return false;">
<h4>Nozzle Diameter / Layer Height</h4>
<p>Select your nozzle diameter and layer height. If you have not changed your nozzle, it will likely be 0.4 mm. 0.2 mm is a typical layer height for this nozzle. First layer height will be locked to the overall layer height. There are too many permutations to include support for first layer height variation too.</p>
<label for="nozzleLayer">Select nozzle diameter / layer height:</label>
<select name="nozzleLayer">
<option value="40_20">0.4 mm nozzle / 0.2 mm layer height</option>
<option value="40_16">0.4 mm nozzle / 0.16 mm layer height</option>
<option value="40_12">0.4 mm nozzle / 0.12 mm layer height</option>
<option value="30_15">0.3 mm nozzle / 0.15 mm layer height</option>
</select>
<h4>Additional start gcode</h4>
<p>If you have additional start commands, tick the box and enter the gcode. This can be used for an extruder prime sequence, overwriting the standard flow rate, compensating for 2.85/3.00 mm filament, setting K factor and more. Tick the box for more details.</p>
<label>Additional start gcode:<input name="start" type="checkbox" onchange="toggle(!this.checked, '#temperatureStart')" value="extraStart"></label>
<label>Add M80 to turn PSU on:<input name="psuon" type="checkbox" value="on"></label>
<label>Remove <b>T0</b> from gcode (advanced users with MMU)<input name="removet0" type="checkbox"></label>
<div id="temperatureStart" class="startExp">
<p>For the majority of users, you can skip this section. Any gcode entered here will be inserted after temperatures are set and homing is complete. Start gcode is saved by the browser, you should only have to enter it once. Example uses include:</p>
<ul>
<li>Copying gcode commands from your slicer to draw an intro/prime/purge line. By default this is left out to accommodate delta printers.</li>
<li>Telling the firmware to alter the flow rate of the gcode to follow. This does not mean the exact flow rate you have set in your own slicer. For example, using <b><a href="https://marlinfw.org/docs/gcode/M221.html" target="_blank">M221</a> S120</b> would set the flow rate to 120% of what it was originally sliced as in Simpilfy3D. Use this to compensate for obvious over or under extrusion you may encounter with these tests. Additional information available at the base of the <a href="#flow">Flow Rate</a> tab.</li>
<li><b>M221 S38</b> can also be used to compensate for 2.85 mm filament and <b>M221 S34</b> for 3.00 mm filament instead of the default 1.75 mm.</li>
<li>Setting the K factor for linear advance. For example, <b>M900 K0.11</b></li>
<li>Custom ABL sequence. By default, only G28 is present. This gcode will be inserted immediately afer that so custom commands can be used here.</li>
<li>Anything else you have in your start gcode, such as setting acceleration values, E-steps, etc.</li>
</ul>
<textarea name="startgcode"></textarea>
</div>
<script> <script>
if(document.temperatureForm.start.checked == false){ createForm("temperature");
$("#temperatureStart").hide();
}
</script>
<h4>Bed dimensions</h4>
<p>Inputting the correct number will attempt to move the print into the centre of the bed. If the centre button is checked, the bed size is irrelevant. Please check the gcode to ensure it will fit on your bed.</p>
<label>0,0 at centre of bed (most deltas):<input name="centre" type="checkbox" onchange="toggle(this.checked, '#tempXY')" value="centre"></label>
<span id="tempXY"><label>Bed X dimension (mm): <input type="number" name="bedx" value="100" min="100" max="600" step="1"></label>
<label>Bed Y dimension (mm): <input type="number" name="bedy" value="100" min="100" max="600" step="1"></label><br /></span>
<h4>Bed Temperature</h4>
<p>For the bed, typical PLA temperature is 60, PETG 80, ABS 100, and TPU 5 (effectively off).</p>
<label>Bed temperature (deg C): <input type="number" name="bedtemp" value="60" min="0" max="150"></label> (use 0 for a non heated bed)<br />
<h4>Part Cooling Fan</h4>
<p>Printing with PLA typically has the part cooling fan come on from layer 2. Alter this default behaviour here. A zero speed value disables the fan apart from bridging.</p>
<label>Part cooling fan speed:</label> <input type="number" name="fanSpeed" value="100" min="0" max="100" step="5"> % </label><label for="fanLayer">starting on: </label>
<select name="fanLayer">
<option value="2">layer 2</option>
<option value="3">layer 3</option>
<option value="5">layer 5</option>
</select>
<h4>Auto Bed Levelling</h4>
<label for="abl">Select which method of ABL is in place.</label>
<select name="abl">
<option value="0">No ABL</option>
<option value="1">Probe new mesh at the start of print - G29 (BLtouch,EZABL,etc)</option>
<option value="2">Restore saved ABL/manual mesh - M420 S1</option>
<option value="3">Prusa MK3 - G28 W followed by G80</option>
<option value="4">Prusa Mini - Only heat nozzle to 170, then G29</option>
<option value="5">Unified Bed Leveling - Load Saved Mesh (slot 1) then 3 Probe Tilt </option>
</select>
<h4>Retraction</h4>
<p>If you don't know what to enter here, you can leave the retraction speed at 40 mm/sec. For a bowden tube printer, 6mm is a likely retraction distance. For direct drive, a starting value of 1mm may be suitable. If you are not sure about extra restart distance, leave this as 0.</p>
<p><label>Retraction distance (mm): <input type="number" name="retdist" value="5" min="0" max="20" step="0.1"></label>
<label>Retraction speed (mm/sec): <input type="number" name="retspeed" value="40" min="5" max="150" step="1"></label></p>
<p><label>Extra restart distance (mm): <input type="number" name="retdistextra" min="-10" max="10" value="0" step="0.1"></label>
<label>Z hop (mm): <input type="number" name="zhop" min="0" max="10" value="0" step="0.1"></label></p>
<h4>Hot end temperature</h4>
<p>Typically, filament comes with a recommended hot end temperature. It is recommended to use values either side of this. For instance, if a PLA filament asked for 200 degrees, you may vary the temperature from 190, 195, 200, 205, 210 (the default values of the form). Typically, the first layer temperature will be elevated to increase adhesion with the bed, especially if a lower than usual temperature is being trialled for segment A. <span class="sug">Suggested increments for how much to vary the value for each segment are shown in green.</span></p>
<table>
<thead>
<tr>
<th>Reference Diagram</th>
<th>Segment</th>
<th>Hot end temperature<p class="sug">&#177; 5 - 10</p></th>
</tr>
</thead>
<tbody>
<tr>
<td rowspan="6" style="text-align: center;">
<img src="img/temperaturediagram.jpg" />
</td>
<td style="text-align: center;">E</td>
<td><input type="number" min="150" max="450" name="temp_e1" value="210"></td>
</tr>
<tr>
<td style="text-align: center;">D</td>
<td><input type="number" min="150" max="450" name="temp_d1" value="205"></td>
</tr>
<tr>
<td style="text-align: center;">C</td>
<td><input type="number" min="150" max="450" name="temp_c1" value="200"></td>
</tr>
<tr>
<td style="text-align: center;">B</td>
<td><input type="number" min="150" max="450" name="temp_b1" value="195"></td>
</tr>
<tr>
<td style="text-align: center;">A</td>
<td><input type="number" min="150" max="450" name="temp_a1" value="190"></td>
</tr>
<tr>
<td style="text-align: center;">First layer</td>
<td><input type="number" min="150" max="450" name="temp_a0" value="200"></td>
</tr>
</tbody>
</table>
<h4>Additional end gcode</h4>
<p>If you have additional end commands, tick the box and enter the gcode.</p>
<label>Additional end gcode:<input name="end" type="checkbox" onchange="toggle(!this.checked, '#temperatureEnd')" value="extraEnd"></label>
<div id="temperatureEnd" class="endExp">
<p>For the majority of users, you can skip this section. Any gcode entered here will be inserted at the very end of the file.</p>
<textarea name="endgcode"></textarea>
</div>
<script>
if(document.temperatureForm.start.checked == false){
$("#temperatureEnd").hide();
}
</script> </script>
<p><input type="button" onclick="processTemperature()" value="Download Gcode"></p> <p><input type="button" onclick="processTemperature()" value="Download Gcode"></p>
<p><input type="button" onclick="resetFormToDefaults(form)" value="Reset parameters"> <input type="button" onclick="outputSettings(form)" value="Output Settings Summary"></p> <p><input type="button" onclick="resetFormToDefaults(form)" value="Reset parameters"> <input type="button" onclick="outputSettings(form)" value="Output Settings Summary"></p>
@ -1218,157 +823,10 @@
<p>The image below shows an example of each of these scenarios:</p> <p>The image below shows an example of each of these scenarios:</p>
<a href="#" data-featherlight="img/m205.jpg"><img class="thumb" src="img/m205.jpg" /></a> <a href="#" data-featherlight="img/m205.jpg"><img class="thumb" src="img/m205.jpg" /></a>
<p>Use the following form to customise the gcode to your liking:</p> <p>Use the following form to customise the gcode to your liking:</p>
<!-- accelerationForm -->
<form name="accelerationForm" id="accelerationForm" onsubmit="return false;"> <form name="accelerationForm" id="accelerationForm" onsubmit="return false;">
<h4>Nozzle Diameter / Layer Height</h4>
<p>Select your nozzle diameter and layer height. If you have not changed your nozzle, it will likely be 0.4 mm. 0.2 mm is a typical layer height for this nozzle. First layer height will be locked to the overall layer height. There are too many permutations to include support for first layer height variation too.</p>
<label for="nozzleLayer">Select nozzle diameter / layer height:</label>
<select name="nozzleLayer">
<option value="40_20">0.4 mm nozzle / 0.2 mm layer height</option>
<option value="40_16">0.4 mm nozzle / 0.16 mm layer height</option>
<option value="40_12">0.4 mm nozzle / 0.12 mm layer height</option>
<option value="30_15">0.3 mm nozzle / 0.15 mm layer height</option>
</select>
<h4>Additional start gcode</h4>
<p>If you have additional start commands, tick the box and enter the gcode. This can be used for an extruder prime sequence, overwriting the standard flow rate, compensating for 2.85/3.00 mm filament, setting K factor and more. Tick the box for more details.</p>
<label>Additional start gcode:<input name="start" type="checkbox" onchange="toggle(!this.checked, '#accelerationStart')" value="extraStart"></label>
<label>Add M80 to turn PSU on:<input name="psuon" type="checkbox" value="on"></label>
<label>Remove <b>T0</b> from gcode (advanced users with MMU)<input name="removet0" type="checkbox"></label>
<div id="accelerationStart" class="startExp">
<p>For the majority of users, you can skip this section. Any gcode entered here will be inserted after temperatures are set and homing is complete. Start gcode is saved by the browser, you should only have to enter it once. Example uses include:</p>
<ul>
<li>Copying gcode commands from your slicer to draw an intro/prime/purge line. By default this is left out to accommodate delta printers.</li>
<li>Telling the firmware to alter the flow rate of the gcode to follow. This does not mean the exact flow rate you have set in your own slicer. For example, using <b><a href="https://marlinfw.org/docs/gcode/M221.html" target="_blank">M221</a> S120</b> would set the flow rate to 120% of what it was originally sliced as in Simpilfy3D. Use this to compensate for obvious over or under extrusion you may encounter with these tests. Additional information available at the base of the <a href="#flow">Flow Rate</a> tab.</li>
<li><b>M221 S38</b> can also be used to compensate for 2.85 mm filament and <b>M221 S34</b> for 3.00 mm filament instead of the default 1.75 mm.</li>
<li>Setting the K factor for linear advance. For example, <b>M900 K0.11</b></li>
<li>Custom ABL sequence. By default, only G28 is present. This gcode will be inserted immediately afer that so custom commands can be used here.</li>
<li>Anything else you have in your start gcode, such as setting acceleration values, E-steps, etc.</li>
</ul>
<textarea name="startgcode"></textarea>
</div>
<script> <script>
if(document.accelerationForm.start.checked == false){ createForm("acceleration");
$("#accelerationStart").hide();
}
</script>
<h4>Bed dimensions</h4>
<p>Inputting the correct number will attempt to move the print into the centre of the bed. If the centre button is checked, the bed size is irrelevant. Please check the gcode to ensure it will fit on your bed.</p>
<label>0,0 at centre of bed (most deltas):<input name="centre" type="checkbox" onchange="toggle(this.checked, '#accelerationXY')" value="centre"></label>
<span id="accelerationXY"><label>Bed X dimension (mm): <input type="number" name="bedx" value="100" min="100" max="600" step="1"></label>
<label>Bed Y dimension (mm): <input type="number" name="bedy" value="100" min="100" max="600" step="1"></label><br /></span>
<h4>Temperatures</h4>
<p>For the hot end and bed respectively, typical PLA temperatures are 200 and 60, PETG 235 and 80, ABS 250 and 100, TPU 230 and 5 (effectively off).</p>
<label>Hot end temperature (deg C): <input type="number" name="hotendtemp" value="200" min="160" max="450"></label>
<label>Bed temperature (deg C): <input type="number" name="bedtemp" value="60" min="0" max="150"></label> (use 0 for a non heated bed)<br />
<h4>Part Cooling Fan</h4>
<p>Printing with PLA typically has the part cooling fan come on from layer 2. Alter this default behaviour here. A zero speed value disables the fan apart from bridging.</p>
<label>Part cooling fan speed:</label> <input type="number" name="fanSpeed" value="100" min="0" max="100" step="5"> % </label><label for="fanLayer">starting on: </label>
<select name="fanLayer">
<option value="2">layer 2</option>
<option value="3">layer 3</option>
<option value="5">layer 5</option>
</select>
<h4>Auto Bed Levelling</h4>
<label for="abl">Select which method of ABL is in place.</label>
<select name="abl">
<option value="0">No ABL</option>
<option value="1">Probe new mesh at the start of print - G29 (BLtouch,EZABL,etc)</option>
<option value="2">Restore saved ABL/manual mesh - M420 S1</option>
<option value="3">Prusa MK3 - G28 W followed by G80</option>
<option value="4">Prusa Mini - Only heat nozzle to 170, then G29</option>
<option value="5">Unified Bed Leveling - Load Saved Mesh (slot 1) then 3 Probe Tilt </option>
</select>
<h4>Retraction</h4>
<p>For initial tests, you can leave the retraction speed at 40 mm/sec. For a bowden tube printer, 6mm is a likely retraction distance. For direct drive, a starting value of 1mm may be suitable. If you are following this guide in order, you should already know your ideal retraction values.</p>
<p><label>Retraction distance (mm): <input type="number" name="retdist" value="5" min="0" max="20" step="0.1"></label>
<label>Retraction speed (mm/sec): <input type="number" name="retspeed" value="40" min="5" max="150" step="1"></label></p>
<p><label>Extra restart distance (mm): <input type="number" name="retdistextra" min="-10" max="10" value="0" step="0.1"></label>
<label>Z hop (mm): <input type="number" name="zhop" min="0" max="10" value="0" step="0.1"></label></p>
<h4>Base feedrate/speed</h4>
<p>You can specify the feedrate for X and Y movements. The inner perimeter will be set to this speed and the outer perimeter 50% of this speed.</p>
<label>Base feedrate (mm/sec): <input type="number" name="feedrate" value="60" min="20" max="500"></label>
<h4>Acceleration and jerk/junction deviation</h4>
<p>After entering <b>M503</b>, I have determined my 3D printer firmware uses:</p>
<label>Jerk: <input type="radio" value="jerk" name="jerk_or_jd" checked="checked" onchange="toggleJ()"></label>
<label>Junction deviation: <input type="radio" value="jd" name="jerk_or_jd" onchange="toggleJ()"></label>
<p>Based on the values you saw from <b>M503</b>, enter variables around this below.</p>
<p>Junction deviation requires a single value, whereas jerk has separate values for X and Y. You can leave them the same or enter independent values.</p>
<p>You should only change either acceleration or jerk/junction deviation for each test print, otherwise it will be impossible to know which parameter is responsible for any changes.</p>
<p><span class="sug">Suggested increments for how much to vary the value for each segment are shown in green.</span></p>
<table>
<thead>
<tr>
<th>Reference diagram</th>
<th>Segment</th>
<th>Acceleration<p class="sug">&#177; 100 (moving bed i3)</p><p class="sug">&#177; 500 (coreXY / delta)</p></th>
<th class="jerktd">Jerk X<p class="sug">&#177; 1</p></th>
<th class="jerktd">Jerk Y<p class="sug">&#177; 1</p></th>
<th class="jerktd">Jerk Z (delta only)<p class="sug">&#177; 1</p></th>
<th class="jdtd">Junction deviation<p class="sug">&#177; 0.01 - 0.05</p></th>
</tr>
</thead>
<tbody>
<tr>
<td rowspan="6" style="text-align: center;"><img src="img/accelerationdiagram.jpg" /></td>
<td style="text-align: center;">F</td>
<td><input type="number" name="accel_f1" value="500" min="10" max="50000" step="10"></td>
<td class="jerktd"><input type="number" name="accel_f2" value="8" min="1" max="30" step="1"></td>
<td class="jerktd"><input type="number" name="accel_f3" value="8" min="1" max="30" step="1"></td>
<td class="jerktd"><input type="number" name="accel_f5" value="8" min="1" max="30" step="1"></td>
<td class="jdtd"><input type="number" name="accel_f4" value="0.050" min="0.01" max="20" step="0.001"></td>
</tr>
<tr>
<td style="text-align: center;">E</td>
<td><input type="number" name="accel_e1" value="500" min="10" max="50000" step="10"></td>
<td class="jerktd"><input type="number" name="accel_e2" value="8" min="1" max="30" step="1"></td>
<td class="jerktd"><input type="number" name="accel_e3" value="8" min="1" max="30" step="1"></td>
<td class="jerktd"><input type="number" name="accel_e5" value="8" min="1" max="30" step="1"></td>
<td class="jdtd"><input type="number" name="accel_e4" value="0.050" min="0.01" max="20" step="0.001"></td>
</tr>
<tr>
<td style="text-align: center;">D</td>
<td><input type="number" name="accel_d1" value="500" min="10" max="50000" step="10"></td>
<td class="jerktd"><input type="number" name="accel_d2" value="8" min="1" max="30" step="1"></td>
<td class="jerktd"><input type="number" name="accel_d3" value="8" min="1" max="30" step="1"></td>
<td class="jerktd"><input type="number" name="accel_d5" value="8" min="1" max="30" step="1"></td>
<td class="jdtd"><input type="number" name="accel_d4" value="0.050" min="0.01" max="20" step="0.001"></td>
</tr>
<tr>
<td style="text-align: center;">C</td>
<td><input type="number" name="accel_c1" value="500" min="10" max="50000" step="10"></td>
<td class="jerktd"><input type="number" name="accel_c2" value="8" min="1" max="30" step="1"></td>
<td class="jerktd"><input type="number" name="accel_c3" value="8" min="1" max="30" step="1"></td>
<td class="jerktd"><input type="number" name="accel_c5" value="8" min="1" max="30" step="1"></td>
<td class="jdtd"><input type="number" name="accel_c4" value="0.050" min="0.01" max="20" step="0.001"></td>
</tr>
<tr>
<td style="text-align: center;">B</td>
<td><input type="number" name="accel_b1" value="500" min="10" max="50000" step="10"></td>
<td class="jerktd"><input type="number" name="accel_b2" value="8" min="1" max="30" step="1"></td>
<td class="jerktd"><input type="number" name="accel_b3" value="8" min="1" max="30" step="1"></td>
<td class="jerktd"><input type="number" name="accel_b5" value="8" min="1" max="30" step="1"></td>
<td class="jdtd"><input type="number" name="accel_b4" value="0.050" min="0.01" max="20" step="0.001"></td>>
</tr>
<tr>
<td style="text-align: center;">A</td>
<td><input type="number" name="accel_a1" value="500" min="10" max="50000" step="10"></td>
<td class="jerktd"><input type="number" name="accel_a2" value="8" min="1" max="30" step="1"></td>
<td class="jerktd"><input type="number" name="accel_a3" value="8" min="1" max="30" step="1"></td>
<td class="jerktd"><input type="number" name="accel_a5" value="8" min="1" max="30" step="1"></td>
<td class="jdtd"><input type="number" name="accel_a4" value="0.050" min="0.01" max="20" step="0.001"></td>
</tr>
</tbody>
</table>
<h4>Additional end gcode</h4>
<p>If you have additional end commands, tick the box and enter the gcode.</p>
<label>Additional end gcode:<input name="end" type="checkbox" onchange="toggle(!this.checked, '#accelerationEnd')" value="extraEnd"></label>
<div id="accelerationEnd" class="endExp">
<p>For the majority of users, you can skip this section. Any gcode entered here will be inserted at the very end of the file.</p>
<textarea name="endgcode"></textarea>
</div>
<script>
if(document.accelerationForm.start.checked == false){
$("#accelerationEnd").hide();
}
</script> </script>
<p><input type="button" onclick="processAcceleration()" value="Download Gcode"></p> <p><input type="button" onclick="processAcceleration()" value="Download Gcode"></p>
<p><input type="button" onclick="resetFormToDefaults(form)" value="Reset parameters"> <input type="button" onclick="outputSettings(form)" value="Output Settings Summary"></p> <p><input type="button" onclick="resetFormToDefaults(form)" value="Reset parameters"> <input type="button" onclick="outputSettings(form)" value="Output Settings Summary"></p>

View File

@ -12,7 +12,8 @@ G28 ; home all axes
;G29 ; probe ABL ;G29 ; probe ABL
;M420 S1 ; restore ABL mesh ;M420 S1 ; restore ABL mesh
;customstart ;customstart
G0 Z1; fix for delta printers that home at max`; G0 Z3; fix for delta printers that home at max
`;
var commonEnd = `G28 X0 ; home X axis var commonEnd = `G28 X0 ; home X axis
M106 S0 ; turn off cooling fan M106 S0 ; turn off cooling fan
@ -20,4 +21,5 @@ M104 S0 ; turn off extruder
M140 S0 ; turn off bed M140 S0 ; turn off bed
M84 ; disable motors M84 ; disable motors
M501 ; restore previous EEPROM values M501 ; restore previous EEPROM values
;customend`; ;customend
`;

324
js/createform.js Normal file
View File

@ -0,0 +1,324 @@
function displayCustom(){
if($(tab+' input[name="start"]').is(':checked')){
$('.startExp').show();
} else {
$('.startExp').hide();
}
if($(tab+' input[name="centre"]').is(':checked')){
$('.dia').show();
$('.XY').hide();
} else {
$('.dia').hide();
$('.XY').show();
}
if($(tab+' input[name="end"]').is(':checked')){
$('.endExp').show();
} else {
$('.endExp').hide();
}
}
var nozzleLayer = `
<h4>Nozzle Diameter / Layer Height</h4>
<p>Select your nozzle diameter and layer height. If you have not changed your nozzle, it will likely be 0.4 mm. 0.2 mm is a typical layer height for this nozzle.</p>
<label for="nozzleLayer">Select nozzle diameter / layer height:</label>
<select name="nozzleLayer">
<option value="40_20">0.4 mm nozzle / 0.2 mm layer height</option>
<option value="40_16">0.4 mm nozzle / 0.16 mm layer height</option>
<option value="40_12">0.4 mm nozzle / 0.12 mm layer height</option>
<option value="30_15">0.3 mm nozzle / 0.15 mm layer height</option>
</select>`;
var startGcode = `
<h4>Additional start gcode</h4>
<p>If you have additional start commands, tick the box and enter the gcode. This can be used for an extruder prime sequence, overwriting the standard flow rate, compensating for 2.85/3.00 mm filament, setting K factor and more. Tick the box for more details.</p>
<label>Additional start gcode:<input name="start" type="checkbox" onchange="displayCustom();" value="extraStart"></label>
<label>Add M80 to turn PSU on:<input name="psuon" type="checkbox" value="on"></label>
<label>Remove <b>T0</b> from gcode (advanced users with MMU)<input name="removet0" type="checkbox"></label>
<div class="startExp">
<p>For the majority of users, you can skip this section. Any gcode entered here will be inserted after temperatures are set and homing is complete. Start gcode is saved by the browser, you should only have to enter it once. Example uses include:</p>
<ul>
<li>Copying gcode commands from your slicer to draw an intro/prime/purge line. By default this is left out to accommodate delta printers.</li>
<li>Telling the firmware to alter the flow rate of the gcode to follow. This does not mean the exact flow rate you have set in your own slicer. For example, using <b><a href="https://marlinfw.org/docs/gcode/M221.html" target="_blank">M221</a> S120</b> would set the flow rate to 120% of what it was originally sliced as in Simpilfy3D. Use this to compensate for obvious over or under extrusion you may encounter with these tests. Additional information available at the base of the <a href="#flow">Flow Rate</a> tab.</li>
<li><b>M221 S38</b> can also be used to compensate for 2.85 mm filament and <b>M221 S34</b> for 3.00 mm filament instead of the default 1.75 mm.</li>
<li>Setting the K factor for linear advance. For example, <b>M900 K0.11</b></li>
<li>Custom ABL sequence. By default, only G28 is present. This gcode will be inserted immediately afer that so custom commands can be used here.</li>
<li>Anything else you have in your start gcode, such as setting acceleration values, E-steps, etc.</li>
</ul>
<textarea name="startgcode"></textarea>
</div>`;
var bedDims = `
<h4>Bed dimensions</h4>
<p>Inputting the correct number will attempt to move the print into the centre of the bed. If the 0,0 at centre button is checked for a delta, also enter your bed diameter. Please check the gcode to ensure it will fit on your bed.</p>
<label>0,0 at centre of bed (most deltas):<input name="centre" type="checkbox" onchange="displayCustom();" value="centre"></label>
<span class="XY"><label>Bed X dimension (mm): <input type="number" name="bedx" value="100" min="100" max="600" step="1"></label>
<label>Bed Y dimension (mm): <input type="number" name="bedy" value="100" min="100" max="600" step="1"></label><br /></span>
<span class="dia"><label>Bed diameter dimension (mm): <input type="number" name="beddia" value="100" min="100" max="600" step="1"></label></span>`;
var extraMargin = `
<p>You may add extra margin for clearing bed clips, etc. Caution! If this is too large on small printers the squares will overlap.</p>
<label>Extra margin from edge (mm): <input type="number" name="margin" value="0" min="0" max="100" step="1"></label>`;
var tempReg = `<h4>Temperatures</h4>
<p>For the hot end and bed respectively, typical PLA temperatures are 200 and 60, PETG 235 and 80, ABS 250 and 100, TPU 230 and 5 (effectively off).</p>
<label>Hot end temperature (deg C): <input type="number" name="hotendtemp" value="200" min="160" max="450"></label>
<label>Bed temperature (deg C): <input type="number" name="bedtemp" value="60" min="0" max="150"></label> (use 0 for a non heated bed)<br />`;
var tempTower = `<h4>Bed Temperature</h4>
<p>For bed, typical PLA temperatures are 60, PETG 80, ABS 100, TPU 5 (effectively off).</p>
<label>Bed temperature (deg C): <input type="number" name="bedtemp" value="60" min="0" max="150"></label> (use 0 for a non heated bed)
<h4>Hot end temperature</h4>
<p>Typically, filament comes with a recommended hot end temperature. It is recommended to use values either side of this. For instance, if a PLA filament asked for 200 degrees, you may vary the temperature from 190, 195, 200, 205, 210 (the default values of the form). Typically, the first layer temperature will be elevated to increase adhesion with the bed, especially if a lower than usual temperature is being trialled for segment A. <span class="sug">Suggested increments for how much to vary the value for each segment are shown in green.</span></p>
<table>
<thead>
<tr>
<th>Reference Diagram</th>
<th>Segment</th>
<th>Hot end temperature<p class="sug">&#177; 5 - 10</p></th>
</tr>
</thead>
<tbody>
<tr>
<td rowspan="6" style="text-align: center;">
<img src="img/temperaturediagram.jpg" />
</td>
<td style="text-align: center;">E</td>
<td><input type="number" min="150" max="450" name="temp_e1" value="210"></td>
</tr>
<tr>
<td style="text-align: center;">D</td>
<td><input type="number" min="150" max="450" name="temp_d1" value="205"></td>
</tr>
<tr>
<td style="text-align: center;">C</td>
<td><input type="number" min="150" max="450" name="temp_c1" value="200"></td>
</tr>
<tr>
<td style="text-align: center;">B</td>
<td><input type="number" min="150" max="450" name="temp_b1" value="195"></td>
</tr>
<tr>
<td style="text-align: center;">A</td>
<td><input type="number" min="150" max="450" name="temp_a1" value="190"></td>
</tr>
<tr>
<td style="text-align: center;">First layer</td>
<td><input type="number" min="150" max="450" name="temp_a0" value="200"></td>
</tr>
</tbody>
</table>`;
var pcReg = `<h4>Part Cooling Fan</h4>
<p>Printing with PLA typically has the part cooling fan come on from layer 2. Alter this default behaviour here. A zero speed value disables the fan apart from bridging.</p>
<label>Part cooling fan speed:</label> <input type="number" name="fanSpeed" value="100" min="0" max="100" step="5"> % </label><label for="fanLayer">starting on: </label>
<select name="fanLayer">
<option value="2">layer 2</option>
<option value="3">layer 3</option>
<option value="5">layer 5</option>
</select>`;
var pcFirstlayer = `<h4>Part Cooling Fan</h4>
<p>Part cooling fans typically don't activate until at least layer 2. Since this print is only one layer thick, part cooling is not applicable.</p>`;
var abl = `<h4>Auto Bed Levelling</h4>
<label for="abl">Select which method of ABL is in place.</label>
<select name="abl">
<option value="0">No ABL</option>
<option value="1">Probe new mesh at the start of print - G29 (BLtouch,EZABL,etc)</option>
<option value="2">Restore saved ABL/manual mesh - M420 S1</option>
<option value="3">Prusa MK3 - G28 W followed by G80</option>
<option value="4">Prusa Mini - Only heat nozzle to 170, then G29</option>
<option value="5">Unified Bed Leveling - Load Saved Mesh (slot 1) then 3 Probe Tilt </option>
</select>`;
var retractionReg = `<h4>Retraction</h4>
<p>If you don't know what to enter here, you can leave the retraction speed at 40 mm/sec. For a bowden tube printer, 6mm is a likely retraction distance. For direct drive, a starting value of 1mm may be suitable. If you are not sure about extra restart distance, leave this as 0.</p>
<p><label>Retraction distance (mm): <input type="number" name="retdist" value="5" min="0" max="20" step="0.1"></label>
<label>Retraction speed (mm/sec): <input type="number" name="retspeed" value="40" min="5" max="150" step="1"></label></p>
<p><label>Extra restart distance (mm): <input type="number" name="retdistextra" min="-10" max="10" value="0" step="0.1"></label>
<label>Z hop (mm): <input type="number" name="zhop" min="0" max="10" value="0" step="0.1"></label></p>`;
var retractionTower = `<h4>Retraction</h4>
<p>For initial tests, you can leave the retraction speed at 40 mm/sec. For a bowden tube printer, 6mm is a likely retraction distance. For direct drive, a starting value of 1mm may be suitable. Vary either side of this for each segment. <span class="sug">Suggested increments for how much to vary the value for each segment are shown in green.</span>.</p>
<table>
<thead>
<tr>
<th>Reference Diagram</th>
<th>Segment</th>
<th>Retraction distance (mm)<p class="sug">&#177; 0.5 - 1</p></th>
<th>Retraction speed (mm/sec)<p class="sug">&#177; 5</p></th>
<th>Extra restart distance (mm)<p class="sug">&#177; 0.2</p></th>
<th>Prime (unretract) speed (mm/sec)<p class="sug">&#177; 5</p></th>
<th>Z hop (mm)<p class="sug">&#177; 0.1</p></th>
</tr>
</thead>
<tbody>
<tr>
<td rowspan="6">
<img src="img/retractiondiagram.jpg" />
</td>
<td style="text-align: center;">F</td>
<td><input type="number" min="0" max="20" name="ret_f1" value="6" step="0.1"></td>
<td><input type="number" min="5" max="200" name="ret_f2" value="40" step="1"></td>
<td><input type="number" min="-10" max="10" name="ret_f3" value="0" step="0.1"></td>
<td><input type="number" min="5" max="200" name="ret_f4" value="40" step="1"></td>
<td><input type="number" min="0" max="5" name="ret_f5" value="0" step="0.1"></td>
</tr>
<tr>
<td style="text-align: center;">E</td>
<td><input type="number" min="0" max="20" name="ret_e1" value="6" step="0.1"></td>
<td><input type="number" min="5" max="200" name="ret_e2" value="40" step="1"></td>
<td><input type="number" min="-10" max="10" name="ret_e3" value="0" step="0.1"></td>
<td><input type="number" min="5" max="200" name="ret_e4" value="40" step="1"></td>
<td><input type="number" min="0" max="5" name="ret_e5" value="0" step="0.1"></td>
</tr>
<tr>
<td style="text-align: center;">D</td>
<td><input type="number" min="0" max="20" name="ret_d1" value="6" step="0.1"></td>
<td><input type="number" min="5" max="200" name="ret_d2" value="40" step="1"></td>
<td><input type="number" min="-10" max="10" name="ret_d3" value="0" step="0.1"></td>
<td><input type="number" min="5" max="200" name="ret_d4" value="40" step="1"></td>
<td><input type="number" min="0" max="5" name="ret_d5" value="0" step="0.1"></td>
</tr>
<tr>
<td style="text-align: center;">C</td>
<td><input type="number" min="0" max="20" name="ret_c1" value="6" step="0.1"></td>
<td><input type="number" min="5" max="200" name="ret_c2" value="40" step="1"></td>
<td><input type="number" min="-10" max="10" name="ret_c3" value="0" step="0.1"></td>
<td><input type="number" min="5" max="200" name="ret_c4" value="40" step="1"></td>
<td><input type="number" min="0" max="5" name="ret_c5" value="0" step="0.1"></td>
</tr>
<tr>
<td style="text-align: center;">B</td>
<td><input type="number" min="0" max="20" name="ret_b1" value="6" step="0.1"></td>
<td><input type="number" min="5" max="200" name="ret_b2" value="40" step="1"></td>
<td><input type="number" min="-10" max="10" name="ret_b3" value="0" step="0.1"></td>
<td><input type="number" min="5" max="200" name="ret_b4" value="40" step="1"></td>
<td><input type="number" min="0" max="5" name="ret_b5" value="0" step="0.1"></td>
</tr>
<tr>
<td style="text-align: center;">A</td>
<td><input type="number" min="0" max="20" name="ret_a1" value="6" step="0.1"></td>
<td><input type="number" min="5" max="200" name="ret_a2" value="40" step="1"></td>
<td><input type="number" min="-10" max="10" name="ret_a3" value="0" step="0.1"></td>
<td><input type="number" min="5" max="200" name="ret_a4" value="40" step="1"></td>
<td><input type="number" min="0" max="5" name="ret_a5" value="0" step="0.1"></td>
</tr>
</tbody>
</table>`;
var accel = `<h4>Base feedrate/speed</h4>
<p>You can specify the feedrate for X and Y movements. The inner perimeter will be set to this speed and the outer perimeter 50% of this speed.</p>
<label>Base feedrate (mm/sec): <input type="number" name="feedrate" value="60" min="20" max="500"></label>
<h4>Acceleration and jerk/junction deviation</h4>
<p>After entering <b>M503</b>, I have determined my 3D printer firmware uses:</p>
<label>Jerk: <input type="radio" value="jerk" name="jerk_or_jd" checked="checked" onchange="toggleJ()"></label>
<label>Junction deviation: <input type="radio" value="jd" name="jerk_or_jd" onchange="toggleJ()"></label>
<p>Based on the values you saw from <b>M503</b>, enter variables around this below.</p>
<p>Junction deviation requires a single value, whereas jerk has separate values for X and Y. You can leave them the same or enter independent values.</p>
<p>You should only change either acceleration or jerk/junction deviation for each test print, otherwise it will be impossible to know which parameter is responsible for any changes.</p>
<p><span class="sug">Suggested increments for how much to vary the value for each segment are shown in green.</span></p>
<table>
<thead>
<tr>
<th>Reference diagram</th>
<th>Segment</th>
<th>Acceleration<p class="sug">&#177; 100 (moving bed i3)</p><p class="sug">&#177; 500 (coreXY / delta)</p></th>
<th class="jerktd">Jerk X<p class="sug">&#177; 1</p></th>
<th class="jerktd">Jerk Y<p class="sug">&#177; 1</p></th>
<th class="jerktd">Jerk Z (delta only)<p class="sug">&#177; 1</p></th>
<th class="jdtd">Junction deviation<p class="sug">&#177; 0.01 - 0.05</p></th>
</tr>
</thead>
<tbody>
<tr>
<td rowspan="6" style="text-align: center;"><img src="img/accelerationdiagram.jpg" /></td>
<td style="text-align: center;">F</td>
<td><input type="number" name="accel_f1" value="500" min="10" max="50000" step="10"></td>
<td class="jerktd"><input type="number" name="accel_f2" value="8" min="1" max="30" step="1"></td>
<td class="jerktd"><input type="number" name="accel_f3" value="8" min="1" max="30" step="1"></td>
<td class="jerktd"><input type="number" name="accel_f5" value="8" min="1" max="30" step="1"></td>
<td class="jdtd"><input type="number" name="accel_f4" value="0.050" min="0.01" max="20" step="0.001"></td>
</tr>
<tr>
<td style="text-align: center;">E</td>
<td><input type="number" name="accel_e1" value="500" min="10" max="50000" step="10"></td>
<td class="jerktd"><input type="number" name="accel_e2" value="8" min="1" max="30" step="1"></td>
<td class="jerktd"><input type="number" name="accel_e3" value="8" min="1" max="30" step="1"></td>
<td class="jerktd"><input type="number" name="accel_e5" value="8" min="1" max="30" step="1"></td>
<td class="jdtd"><input type="number" name="accel_e4" value="0.050" min="0.01" max="20" step="0.001"></td>
</tr>
<tr>
<td style="text-align: center;">D</td>
<td><input type="number" name="accel_d1" value="500" min="10" max="50000" step="10"></td>
<td class="jerktd"><input type="number" name="accel_d2" value="8" min="1" max="30" step="1"></td>
<td class="jerktd"><input type="number" name="accel_d3" value="8" min="1" max="30" step="1"></td>
<td class="jerktd"><input type="number" name="accel_d5" value="8" min="1" max="30" step="1"></td>
<td class="jdtd"><input type="number" name="accel_d4" value="0.050" min="0.01" max="20" step="0.001"></td>
</tr>
<tr>
<td style="text-align: center;">C</td>
<td><input type="number" name="accel_c1" value="500" min="10" max="50000" step="10"></td>
<td class="jerktd"><input type="number" name="accel_c2" value="8" min="1" max="30" step="1"></td>
<td class="jerktd"><input type="number" name="accel_c3" value="8" min="1" max="30" step="1"></td>
<td class="jerktd"><input type="number" name="accel_c5" value="8" min="1" max="30" step="1"></td>
<td class="jdtd"><input type="number" name="accel_c4" value="0.050" min="0.01" max="20" step="0.001"></td>
</tr>
<tr>
<td style="text-align: center;">B</td>
<td><input type="number" name="accel_b1" value="500" min="10" max="50000" step="10"></td>
<td class="jerktd"><input type="number" name="accel_b2" value="8" min="1" max="30" step="1"></td>
<td class="jerktd"><input type="number" name="accel_b3" value="8" min="1" max="30" step="1"></td>
<td class="jerktd"><input type="number" name="accel_b5" value="8" min="1" max="30" step="1"></td>
<td class="jdtd"><input type="number" name="accel_b4" value="0.050" min="0.01" max="20" step="0.001"></td>>
</tr>
<tr>
<td style="text-align: center;">A</td>
<td><input type="number" name="accel_a1" value="500" min="10" max="50000" step="10"></td>
<td class="jerktd"><input type="number" name="accel_a2" value="8" min="1" max="30" step="1"></td>
<td class="jerktd"><input type="number" name="accel_a3" value="8" min="1" max="30" step="1"></td>
<td class="jerktd"><input type="number" name="accel_a5" value="8" min="1" max="30" step="1"></td>
<td class="jdtd"><input type="number" name="accel_a4" value="0.050" min="0.01" max="20" step="0.001"></td>
</tr>
</tbody>
</table>`;
var endGcode = `<h4>Additional end gcode</h4>
<p>If you have additional end commands, tick the box and enter the gcode.</p>
<label>Additional end gcode:<input name="end" type="checkbox" onchange="displayCustom();" value="extraEnd"></label>
<div class="endExp">
<p>For the majority of users, you can skip this section. Any gcode entered here will be inserted at the very end of the file.</p>
<textarea name="endgcode"></textarea>
</div>`;
function createForm(n){
document.write(nozzleLayer);
document.write(startGcode);
document.write(abl);
document.write(bedDims);
if(n == "firstlayer"){
document.write(extraMargin);
}
if(n == "temperature"){
document.write(tempTower)
} else {
document.write(tempReg)
}
if(n == "firstlayer"){
document.write(pcFirstlayer);
} else {
document.write(pcReg);
}
if(n == "retraction"){
document.write(retractionTower);
} else {
document.write(retractionReg);
}
if(n == "acceleration"){
document.write(accel);
}
document.write(endGcode);
}

View File

@ -1,6 +1,7 @@
var pages = ["Home", "Calibration", "Troubleshooting", "Upgrade Guides", "Review Policy", "Sponsors", "Contact"] var pages = ["Home", "Calibration", "Troubleshooting", "Upgrade Guides", "Review Policy", "Sponsors", "Contact"]
var urls = ["index.html", "calibration.html", "troubleshooting.html", "upgrades.html", "reviewpolicy.html", "sponsors.html", "contact.html"] var urls = ["index.html", "calibration.html", "troubleshooting.html", "upgrades.html", "reviewpolicy.html", "sponsors.html", "contact.html"]
var menu = '<img src="img/ttwhite.png" />'; var menu = '<img src="img/ttwhite.png" />';
var tab;
for(var i = 0; i < pages.length; i++){ for(var i = 0; i < pages.length; i++){
menu += '<a href="'+urls[i]+'" target="_self"'; menu += '<a href="'+urls[i]+'" target="_self"';
if(pages[i] == pageName){ if(pages[i] == pageName){
@ -60,4 +61,5 @@ $(document).ready(function(){
$(window).resize(function(){ $(window).resize(function(){
sizeBody(); sizeBody();
}); });
tab = $(location).attr('hash');
}); });

View File

@ -8,6 +8,7 @@ var scripts = `
<script src="js/videobox.js"></script> <script src="js/videobox.js"></script>
<script src="js/featherlight.js"></script> <script src="js/featherlight.js"></script>
<script src="js/commongcode.js"></script> <script src="js/commongcode.js"></script>
<script src="js/createform.js"></script>
<script src="js/firstlayer.js"></script> <script src="js/firstlayer.js"></script>
<script src="js/baseline.js"></script> <script src="js/baseline.js"></script>
<script src="js/retraction.js"></script> <script src="js/retraction.js"></script>