Multi nozzle/layer pt 1

Baseline and first layer working. Retraction code testing, new STL needed.
This commit is contained in:
lawgicau
2021-07-06 20:23:34 +10:00
parent b23c48cecb
commit 80ec6f0f18
9 changed files with 5533 additions and 5075 deletions

View File

@ -152,9 +152,17 @@
<p>Another advantage of some ABL systems is that once the Z offset is set, you can interchange build surfaces of various thicknesses, with no changes needed for a successful first layer. Assuming the probe is triggered the same way on the bed surface, the Z offset is applied to this trigger point and the first layer height should be the same. On a manually levelled bed, the four corner knobs would need to be turned in unison to raise or lower the bed in accounting for thickness of the new build surface.</p>
<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>This test uses a <b>0.2mm</b> first layer height.</p>
<a href="#" data-featherlight="img/firstlayerpreview.jpg"><img class="thumb" src="img/firstlayerpreview.jpg" /></a>
<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>
@ -212,9 +220,10 @@
</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>
<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>
<label>Extra restart distance (mm): <input type="number" name="retdistextra" min="-10" max="10" value="0" step="0.1"></label>
<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>
<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>
@ -238,6 +247,15 @@
<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>
<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>
@ -270,16 +288,12 @@
<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="5" max="150"></label><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:</p>
<label for="pc">Select part cooling fan behaviour:</label>
<select name="pc">
<option value="0">100% fan from layer 2</option>
<option value="1">100% fan from layer 3</option>
<option value="2">100% fan from layer 5</option>
<option value="3">50% fan from layer 2</option>
<option value="4">50% fan from layer 3</option>
<option value="5">50% fan from layer 5</option>
<option value="6">No constant fan (bridging only)</option>
<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>
@ -293,10 +307,10 @@
</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>
<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>
<label>Extra restart distance (mm): <input type="number" name="retdistextra" min="-10" max="10" value="0" step="0.1"></label>
<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>
<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>
</form>
@ -685,6 +699,15 @@
<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/retractiontest.stl">retractiontest.stl</a></p>
<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>
@ -717,16 +740,12 @@
<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="5" max="150"></label><br />
<h4>Part Cooling Fan</h4>
<p>PLA typically has the part cooling fan come on from layer 2. Alter this default behaviour here:</p>
<label for="pc">Select part cooling fan behaviour:</label>
<select name="pc">
<option value="0">100% fan from layer 2</option>
<option value="1">100% fan from layer 3</option>
<option value="2">100% fan from layer 5</option>
<option value="3">50% fan from layer 2</option>
<option value="4">50% fan from layer 3</option>
<option value="5">50% fan from layer 5</option>
<option value="6">No constant fan (bridging only)</option>
<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>

BIN
files/flatsquare.stl Normal file

Binary file not shown.

File diff suppressed because it is too large Load Diff

21
js/commongcode.js Normal file
View File

@ -0,0 +1,21 @@
var commonStart =`; G-Code originally generated by Simplify3D(R) Version 4.1.2
This calibration test gcode modified by the Teaching Tech Calibration website: https://teachingtechyt.github.io/calibration.html
;M80 ; power supply on
G90
M82
M106 S0
M140 S60
M190 S60
M104 S210 T0
M109 S210 T0
G28 ; home all axes
;G29 ; probe ABL
;M420 S1 ; restore ABL mesh
;customstart
G0 Z1; fix for delta printers that home at max`;
var commonEnd = `G28 X0 ; home X axis
M106 S0 ; turn off cooling fan
M104 S0 ; turn off extruder
M140 S0 ; turn off bed
M84 ; disable motors`

View File

@ -1,27 +1,12 @@
var originalFirstlayerStart = `; G-Code originally generated by Simplify3D(R) Version 4.1.2, based on proposed code by vector76
;M80 ; power supply on
G90
M82
M106 S0
M140 S60
M190 S60
M104 S210 T0
M109 S210 T0
G28 ; home all axes
;G29 ; probe ABL
;M420 S1 ; restore ABL mesh
;customstart
; process Color1
; layer 1, Z = 0.200
var originalSquare = `;process Process1
;layer 1, Z = 0.200
T0
G92 E0.0000
G1 E-5.0000 F2400
`
var originalskirt =`G1 Z0.400 F1200
G1 X34.636 Y36.314 F6000
;retract1
;fan1;
G1 Z0.200 F1200
G1 E0.0000 F2400
G1 X34.636 Y36.314 F6000
;unretract1
G92 E0.0000
G1 X36.314 Y34.636 E0.1023 F1800
G1 X63.686 Y34.636 E1.2822
@ -32,11 +17,11 @@ G1 X36.314 Y65.364 E3.8465
G1 X34.636 Y63.686 E3.9487
G1 X34.636 Y36.314 E5.1286
G92 E0.0000
G1 E-5.0000 F2400
G1 Z0.600 F1200
;retract1
G1 Z0.300 F1200
G1 X35.212 Y36.552 F6000
G1 Z0.200 F1200
G1 E0.0000 F2400
;unretract1
G92 E0.0000
G1 X36.552 Y35.212 E0.0817 F1800
G1 X63.448 Y35.212 E1.2410
@ -47,15 +32,13 @@ G1 X36.552 Y64.788 E3.7231
G1 X35.212 Y63.448 E3.8048
G1 X35.212 Y36.552 E4.9641
G92 E0.0000
G1 E-5.0000 F2400
`
var originalSquare = `; feature inner perimeter
G1 Z0.600 F1200
;retract1
G1 Z0.300 F1200
G1 X37.788 Y37.788 F6000
G1 X37.788 Y38.202
G1 X38.940 Y38.940
G1 Z0.200 F1200
G1 E0.0000 F2400
;unretract1
G92 E0.0000
G1 X61.060 Y38.940 E0.9535 F1350
G1 X61.060 Y61.060 E1.9069
@ -67,14 +50,12 @@ G1 X61.636 Y38.364 E1.0031 F1350
G1 X61.636 Y61.636 E2.0063
G1 X38.364 Y61.636 E3.0094
G1 X38.364 Y38.364 E4.0125
; feature outer perimeter
G1 X37.788 Y37.788 F6000
G92 E0.0000
G1 X62.212 Y37.788 E1.0528 F900
G1 X62.212 Y62.212 E2.1056
G1 X37.788 Y62.212 E3.1584
G1 X37.788 Y37.788 E4.2111
; feature solid layer
G1 X60.465 Y39.286 F6000
G92 E0.0000
G1 X60.714 Y39.535 E0.0152 F1440
@ -183,12 +164,5 @@ G1 X39.286 Y59.650 E36.1489
G1 X39.286 Y60.465 E36.1840
G1 X39.535 Y60.714 E36.1992
G92 E0.0000
G1 E-5.0000 F2400
`
var originalFirstlayerEnd = `; layer end
G28 X0 ; home X axis
M106 S0 ; turn off cooling fan
M104 S0 ; turn off extruder
M140 S0 ; turn off bed
M84 ; disable motors
;retract1
`

View File

@ -104,6 +104,7 @@ function toggleJ() {
}
function processFirstlayer(){
var nozzleLayer = document.firstlayerForm.nozzleLayer.value;
var hotendTemp = document.firstlayerForm.hotendtemp.value;
var bedTemp = document.firstlayerForm.bedtemp.value;
var centre = document.firstlayerForm.centre.checked;
@ -113,13 +114,12 @@ function processFirstlayer(){
var retDist = document.firstlayerForm.retdist.value;
var retDistExtra = document.firstlayerForm.retdistextra.value;
var retSpeed = document.firstlayerForm.retspeed.value*60;
var zhop = document.firstlayerForm.zhop.value;
var abl = document.firstlayerForm.abl.value;
var customStart = document.firstlayerForm.startgcode.value;
var firstlayer = "";
var firstlayerStart = originalFirstlayerStart;
var firstlayerStart = commonStart;
var skirts = "";
var squares = "";
var firstlayerEnd = originalFirstlayerEnd;
var offsets = [0,0,0,0,0,0,0,0,0,0];
var delt = 30;
var xy = 30;
@ -186,24 +186,6 @@ function processFirstlayer(){
}
for(var i = 0; i <= 4; i++){
var skirt = "; skirt "+(i+1)+"\n"+originalskirt;
var firstlayerArray = skirt.split(/\n/g);
var regexp = /X[0-9\.]+/;
firstlayerArray.forEach(function(index, item){
if(firstlayerArray[item].search(/X/) > -1){
var value = parseFloat(firstlayerArray[item].match(regexp)[0].substring(1)) + offsets[i*2];
firstlayerArray[item] = firstlayerArray[item].replace(regexp, "X"+String(value));
}
});
var regexp = /Y[0-9\.]+/;
firstlayerArray.forEach(function(index, item){
if(firstlayerArray[item].search(/Y/) > -1){
var value = parseFloat(firstlayerArray[item].match(regexp)[0].substring(1)) + offsets[i*2+1];
firstlayerArray[item] = firstlayerArray[item].replace(regexp, "Y"+String(value))
}
});
skirt = firstlayerArray.join("\n");
skirts += skirt;
var square = "; square "+(i+1)+"\n"+originalSquare;
var firstlayerArray = square.split(/\n/g);
var regexp = /X[0-9\.]+/;
@ -223,9 +205,14 @@ function processFirstlayer(){
square = firstlayerArray.join("\n");
squares += square;
}
var firstlayer = firstlayerStart+skirts+squares+firstlayerEnd;
firstlayer = firstlayer.replace(/G1 E-5.0000 F2400/g, "G1 E-"+retDist+" F"+retSpeed+" ; custom retraction");
firstlayer = firstlayer.replace(/G1 E0.0000 F2400/g, "G1 E"+retDistExtra+" F"+retSpeed+" ; custom un-retraction/prime");
var firstlayer = firstlayerStart+squares+commonEnd;
firstlayer = firstlayer.replace(/;retract1\nG1 Z[0-9\.]+ F1200/g, ";retract1\n;zhop1");
if(zhop > 0){
firstlayer = firstlayer.replace(/;zhop1/g, "G91;\nG1 Z"+zhop+" F1200; custom z hop\nG90;");
}
firstlayer = firstlayer.replace(/;retract1/g, "G1 E-"+retDist+" F"+retSpeed+" ; custom retraction");
firstlayer = firstlayer.replace(/;unretract1/g, "G1 E"+retDistExtra+" F"+retSpeed+" ; custom un-retraction/prime");
if(document.firstlayerForm.psuon.checked == true) {
firstlayer = firstlayer.replace(/;M80/, "M80");
}
@ -239,6 +226,7 @@ function processFirstlayer(){
}
function processBaseline(){
var nozzleLayer = document.baselineForm.nozzleLayer.value;
var hotendTemp = document.baselineForm.hotendtemp.value;
var bedTemp = document.baselineForm.bedtemp.value;
var centre = document.baselineForm.centre.checked;
@ -247,38 +235,35 @@ function processBaseline(){
var retDist = document.baselineForm.retdist.value;
var retDistExtra = document.baselineForm.retdistextra.value;
var retSpeed = document.baselineForm.retspeed.value*60;
var zhop = document.baselineForm.zhop.value;
var abl = document.baselineForm.abl.value;
var pc = document.baselineForm.pc.value;
var pcResume = 255;
var fanLayer = document.baselineForm.fanLayer.value;
var fanPercentage = document.baselineForm.fanSpeed.value;
var fanSpeed = Math.round(fanPercentage*2.55);
var customStart = document.baselineForm.startgcode.value;
var baseline = originalBaseline;
switch(pc){
case '0':
baseline = baseline.replace(/;fan2/, "M106 S255 ; custom fan 100% from layer 2");
var baseline = commonStart;
switch(nozzleLayer){
case '40_20':
baseline += baseline_40_20;
break;
case '1':
baseline = baseline.replace(/;fan3/, "M106 S255 ; custom fan 100% from layer 3");
break;
case '2':
baseline = baseline.replace(/;fan5/, "M106 S255 ; custom fan 100% from layer 5");
break;
case '3':
baseline = baseline.replace(/;fan2/, "M106 S130 ; custom fan 50% from layer 2");
pcResume = 130;
break;
case '4':
baseline = baseline.replace(/;fan3/, "M106 S130 ; custom fan 50% from layer 3");
pcResume = 130;
break;
case '5':
baseline = baseline.replace(/;fan5/, "M106 S130 ; custom fan 50% from layer 5");
pcResume = 130;
break;
case '6':
baseline = baseline.replace(/;fan2/, "; custom fan off");
pcResume = 0;
case '40_16':
baseline += baseline_40_16;
break;
}
baseline += commonEnd;
baseline = baseline.replace(/M106 S3/, ";");
switch(fanLayer){
case '2':
baseline = baseline.replace(/;fan2;/, "M106 S"+fanSpeed+"; custom fan "+fanPercentage+"% from layer 2");
break;
case '3':
baseline = baseline.replace(/;fan3;/, "M106 S"+fanSpeed+"; custom fan "+fanPercentage+"% from layer 3");
break;
case '5':
baseline = baseline.replace(/;fan5;/, "M106 S"+fanSpeed+"; custom fan "+fanPercentage+"% from layer 5");
break;
}
baseline = baseline.replace(/M106 S3/g, "M106 S"+fanSpeed+"; custom fan "+fanSpeed+"%");
baseline = baseline.replace(/M140 S60/g, "M140 S"+bedTemp+" ; custom bed temp");
baseline = baseline.replace(/M190 S60/g, "M190 S"+bedTemp+" ; custom bed temp");
if(abl != 4){
@ -288,8 +273,12 @@ function processBaseline(){
baseline = baseline.replace(/M104 S210 T0/g, "; Prusa Mini");
baseline = baseline.replace(/M109 S210 T0/g, "; Prusa Mini");
}
baseline = baseline.replace(/G1 E-5.0000 F2400/g, "G1 E-"+retDist+" F"+retSpeed+" ; custom retraction");
baseline = baseline.replace(/G1 E0.0000 F2400/g, "G1 E"+retDistExtra+" F"+retSpeed+" ; custom un-retraction/prime");
baseline = baseline.replace(/;retract1\nG1 Z[0-9\.]+ F1200/g, ";retract1\n;zhop1");
if(zhop > 0){
baseline = baseline.replace(/;zhop1/g, "G91;\nG1 Z"+zhop+" F1200 ; custom z hop\nG90;");
}
baseline = baseline.replace(/;retract1/g, "G1 E-"+retDist+" F"+retSpeed+" ; custom retraction");
baseline = baseline.replace(/;unretract1/g, "G1 E"+retDistExtra+" F"+retSpeed+" ; custom un-retraction/prime");
if(abl == 1){
baseline = baseline.replace(/;G29 ; probe ABL/, "G29 ; probe ABL");
}
@ -369,8 +358,9 @@ function processRetraction(){
var bedX = Math.round((document.retractionForm.bedx.value-100)/2);
var bedY = Math.round((document.retractionForm.bedy.value-100)/2);
var abl = document.retractionForm.abl.value;
var pc = document.retractionForm.pc.value;
var pcResume = 255;
var fanLayer = document.retractionForm.fanLayer.value;
var fanPercentage = document.retractionForm.fanSpeed.value;
var fanSpeed = Math.round(fanPercentage*2.55);
var a1 = document.retractionForm.ret_a1.value;
var a2 = document.retractionForm.ret_a2.value*60;
var a3 = document.retractionForm.ret_a3.value;
@ -402,34 +392,30 @@ function processRetraction(){
var f4 = document.retractionForm.ret_f4.value*60;
var f5 = document.retractionForm.ret_f5.value;
var customStart = document.retractionForm.startgcode.value;
var retraction = originalRetraction;
switch(pc){
case '0':
retraction = retraction.replace(/;fan2/, "M106 S255 ; custom fan 100% from layer 2");
var retraction = commonStart;
switch(nozzleLayer){
case "40_20":
retraction += retraction_40_20;
break;
case '1':
retraction = retraction.replace(/;fan3/, "M106 S255 ; custom fan 100% from layer 3");
break;
case '2':
retraction = retraction.replace(/;fan5/, "M106 S255 ; custom fan 100% from layer 5");
break;
case '3':
retraction = retraction.replace(/;fan2/, "M106 S130 ; custom fan 50% from layer 2");
pcResume = 130;
break;
case '4':
retraction = retraction.replace(/;fan3/, "M106 S130 ; custom fan 50% from layer 3");
pcResume = 130;
break;
case '5':
retraction = retraction.replace(/;fan5/, "M106 S130 ; custom fan 50% from layer 5");
pcResume = 130;
break;
case '6':
retraction = retraction.replace(/;fan2/, "; custom fan off");
pcResume = 0;
case: "40_16":
retraction += retraction_40_16;
break;
}
retraction += commonEnd;
retraction = retraction.replace(/M106 S3/, ";");
switch(fanLayer){
case '2':
retraction = retraction.replace(/;fan2;/, "M106 S"+fanSpeed+"; custom fan "+fanPercentage+"% from layer 2");
break;
case '3':
retraction = retraction.replace(/;fan3;/, "M106 S"+fanSpeed+"; custom fan "+fanPercentage+"% from layer 3");
break;
case '5':
retraction = retraction.replace(/;fan5;/, "M106 S"+fanSpeed+"; custom fan "+fanPercentage+"% from layer 5");
break;
}
retraction = retraction.replace(/M106 S3/g, "M106 S"+fanSpeed+"; custom fan "+fanSpeed+"%");
retraction = retraction.replace(/M140 S60/g, "M140 S"+bedTemp+" ; custom bed temp");
retraction = retraction.replace(/M190 S60/g, "M190 S"+bedTemp+" ; custom bed temp");
if(abl != 4){
@ -500,11 +486,13 @@ function processRetraction(){
}
}
// A section
retraction = retraction.replace(/;retractionA/g, "G1 E-"+a1+" F"+a2+" ; custom retraction - A");
retraction = retraction.replace(/;unretractionA/g, "G1 E"+a3+" F"+a4+" ; custom un-retraction/prime - A");
retraction = retraction.replace(/;retract1\nG1 Z[0-9\.]+ F1200/g, ";retract1\n;zhop1");
if(a5 > 0){
retraction = retraction.replace(/;zhopupA/g, "G91\nG1 Z"+a5+" F1200 ; custom z hop - A\nG90");
retraction = retraction.replace(/;zhop1/g, "G91\nG1 Z"+a5+" F1200 ; custom z hop - A\nG90");
}
retraction = retraction.replace(/;retract1/g, "G1 E-"+a1+" F"+a2+" ; custom retraction - A");
retraction = retraction.replace(/;unretract1/g, "G1 E"+a3+" F"+a4+" ; custom un-retraction/prime - A");
// B section
retraction = retraction.replace(/;retractionB/g, "G1 E-"+b1+" F"+b2+" ; custom retraction - B");
retraction = retraction.replace(/;unretractionB/g, "G1 E"+b3+" F"+b4+" ; custom un-retraction/prime - B");
@ -887,7 +875,8 @@ function outputSettings(formName) {
break;
}
string += " form\n_________________________________________________________________________\n\n";
string += "All changes are marked in the gcode with 'custom' at the end of each line. Open the gcode in a text editor and search for this to your inputs if needed.\n\n";
string += "G-Code originally generated by Simplify3D(R) Version 4.1.2\nThis calibration test gcode modified by the Teaching Tech Calibration website: https://teachingtechyt.github.io/calibration.html\n";
string += "All changes are marked in the gcode with 'custom' at the end of each line. Open the gcode in a text editor and search for this to your check inputs if needed.\n\n";
if(formName.psuon.checked == true) {
string += "Turn on PSU with M80 active\n"
}
@ -924,8 +913,9 @@ function outputSettings(formName) {
string += "Hot end: "+formName.hotendtemp.value+" deg C\n";
}
if(formName.name != "firstlayerForm") {
var pcSelected = formName.pc.value;
string += "\n\nPart Cooling: "+formName.pc[pcSelected].text;
var fanSpeed = formName.fanSpeed.value;
var fanLayer = formName.fanLayer.value
string += "\n\nPart Cooling: "+fanSpeed+"% from layer "+fanLayer+"\n";
}
var ablSelected = formName.abl.value;
string += "\n\nABL: "+formName.abl[ablSelected].text;
@ -940,7 +930,8 @@ function outputSettings(formName) {
} else {
string += "\n\nRetraction distance: "+formName.retdist.value+" mm\n";
string += "Retraction speed: "+formName.retspeed.value+" mm/sec\n";
//string += "Extra restart distance: "+formName.hotendtemp.value+" mm\n";
string += "Extra restart distance: "+formName.retdistextra.value+" mm\n";
string += "Z hop: "+formName.zhop.value+" mm\n";
}
if(formName.name == "accelerationForm") {
string += "\nBase feedrate: "+formName.feedrate.value+" mm/s\n\n";

View File

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

View File

@ -1,16 +1,4 @@
var originalRetraction = `; G-Code originally generated by Simplify3D(R) Version 4.1.2
;M80 ; power supply on
G90
M82
M106 S0
M140 S60
M190 S60
M104 S210 T0
M109 S210 T0
G28 ; home all axes
;G29 ; probe ABL
;M420 S1 ; restore ABL mesh
;customstart
var retraction_40_20 = `
; process Color1-2
; layer 1, Z = 0.200
T0
@ -72398,10 +72386,4 @@ G1 X77.387 Y49.766 E1.5740
G1 X75.775 Y51.377 E1.6558
G92 E0.0000
;retractionF
; layer end
G28 X0 ; home X axis
M106 S0 ; turn off cooling fan
M104 S0 ; turn off extruder
M140 S0 ; turn off bed
M84 ; disable motors
`

View File

@ -30,7 +30,7 @@
<p>Watch the video, read this tab, prepare yourself with the appropriate tools and then work through relevant tabs.</p>
<h4>Understand your machine before attempting modification</h4>
<p>Perhaps you have arrived at this page with a standard printer that has broken down. In this case, ignore this heading. Many people, however, will arrive at this page after performing modifications to their machine. When they try to turn it back on, something doesn't work as expected.</p>
<p>Often people fall into the trap of modifying a 3D printer as a beginner, immediately after purchase. This can be quite risky. Firstly, they do not have a good working knowlegde of how their printer functions. They have not seen it in action long enough to what the purpose of each component is, which increases the chance of components being reinstalled incorrectly.</p>
<p>Often people fall into the trap of modifying a 3D printer as a beginner, immediately after purchase. This can be quite risky. Firstly, they do not have a good working knowledge of how their printer functions. They have not seen it in action long enough to know what the purpose of each component is, which increases the chance of components being reinstalled incorrectly.</p>
<p>Another potential problem is that the user will not appreciate the benefits of the upgrade because they have not worked with the printer in its 'inferior' standard state. In some cases something like an ABL probe will be fitted immediately, before the user understands how to manually level the bed. The rush to upgrade deprives the user of learning the fundamentals necessary for efficient and effective long term operation. I am a fan of using ABL for the added convenience and the ability to compensate for a warped bed, but this is because I spent many years without ABL on a less than precise printer.</p>
<h4>Be methodical: only test/change/modify one aspect at a time</h4>
<p>Beginners often tear down a printer and upgrade multiple things at once, which means when it goes back together and doesn't work they have no idea which new component is the problem.</p>