Intial addition of custom start gcode

This commit is contained in:
lawgicau
2020-08-18 10:53:53 +10:00
parent 4f56e4ee61
commit 527f1df872
7 changed files with 63 additions and 0 deletions

View File

@ -134,6 +134,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>Additional start gcode</h4>
<p>If you have additional start commands, tick the box and enter the gcode. This will be inserted after temperatures are set and homing/ABL is complete. For the majority of users, you can skip this section.</p>
<label>Additional start gcode:<input name="start" type="checkbox" onchange="toggle(!this.checked, '#baselineStart')" value="extraStart"></label>
<textarea id="baselineStart" name="startgcode"></textarea>
<script>
if(document.baselineForm.start.checked == false){
$("#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 (Delta):<input name="centre" type="checkbox" onchange="toggle(this.checked, '#baselineXY')" value="centre"></label>
@ -509,6 +518,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>Additional start gcode</h4>
<p>If you have additional start commands, tick the box and enter the gcode. This will be inserted after temperatures are set and homing/ABL is complete. For the majority of users, you can skip this section.</p>
<label>Additional start gcode:<input name="start" type="checkbox" onchange="toggle(!this.checked, '#retractionStart')" value="extraStart"></label>
<textarea id="retractionStart" name="startgcode"></textarea>
<script>
if(document.retractionForm.start.checked == false){
$("#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 (Delta):<input name="centre" type="checkbox" onchange="toggle(this.checked, '#retractionXY')" value="centre"></label>
@ -622,6 +640,15 @@
<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/temperaturetower.stl">temperaturetower.stl</a></p>
<form name="temperatureForm" id="temperatureForm" onsubmit="return false;">
<h4>Additional start gcode</h4>
<p>If you have additional start commands, tick the box and enter the gcode. This will be inserted after temperatures are set and homing/ABL is complete. For the majority of users, you can skip this section.</p>
<label>Additional start gcode:<input name="start" type="checkbox" onchange="toggle(!this.checked, '#temperatureStart')" value="extraStart"></label>
<textarea id="temperatureStart" name="startgcode"></textarea>
<script>
if(document.temperatureForm.start.checked == false){
$("#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 (Delta):<input name="centre" type="checkbox" onchange="toggle(this.checked, '#tempXY')" value="centre"></label>
@ -784,6 +811,15 @@
<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>
<form name="accelerationForm" id="accelerationForm" onsubmit="return false;">
<h4>Additional start gcode</h4>
<p>If you have additional start commands, tick the box and enter the gcode. This will be inserted after temperatures are set and homing/ABL is complete. For the majority of users, you can skip this section.</p>
<label>Additional start gcode:<input name="start" type="checkbox" onchange="toggle(!this.checked, '#accelerationStart')" value="extraStart"></label>
<textarea id="accelerationStart" name="startgcode"></textarea>
<script>
if(document.accelerationForm.start.checked == false){
$("#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 (Delta):<input name="centre" type="checkbox" onchange="toggle(this.checked, '#accelerationXY')" value="centre"></label>

View File

@ -40,6 +40,13 @@ p {
line-height: 1.5em;
}
textarea {
display: block;
margin: 0 20px;
width: 80%;
font-size: 1.2em;
}
input {
font-size: 1.2em;
}

View File

@ -9,6 +9,7 @@ M109 S210 T0
G28 ; home all axes
;G29 ; probe ABL
;M420 S1 ; restore ABL mesh
;customstart
; process Color1-6-5
; layer 1, Z = 0.200
raise

View File

@ -9,6 +9,7 @@ M109 S210 T0
G28 ; home all axes
;G29 ; probe ABL
;M420 S1 ; restore ABL mesh
;customstart
; process Color1
; layer 1, Z = 0.200
T0

View File

@ -90,7 +90,11 @@ function processBaseline(){
var retSpeed = document.baselineForm.retspeed.value*60;
var abl = document.baselineForm.abl.value;
var pc = document.baselineForm.pc.value;
var customStart = document.baselineForm.startgcode.value;
var baseline = originalBaseline;
if(document.baselineForm.start.checked == true) {
baseline = baseline.replace(/;customstart/, customStart);
}
if(pc == 1){
baseline = baseline.replace(/M106 S255/, "M106 S130");
}
@ -197,7 +201,11 @@ function processRetraction(){
var f1 = document.retractionForm.ret_f1.value;
var f2 = document.retractionForm.ret_f2.value*60;
var f3 = document.retractionForm.ret_f3.value;
var customStart = document.retractionForm.startgcode.value;
var retraction = originalRetraction;
if(document.retractionForm.start.checked == true) {
retraction = retraction.replace(/;customstart/, customStart);
}
if(pc == 1){
retraction = retraction.replace(/M106 S255/, "M106 S130");
}
@ -308,7 +316,11 @@ function processTemperature(){
var c1 = document.temperatureForm.temp_c1.value;
var d1 = document.temperatureForm.temp_d1.value;
var e1 = document.temperatureForm.temp_e1.value;
var customStart = document.temperatureForm.startgcode.value;
var temperature = originalTemperature;
if(document.temperatureForm.start.checked == true) {
temperature = temperature.replace(/;customstart/, customStart);
}
if(pc == 1){
temperature = temperature.replace(/M106 S255/, "M106 S130");
}
@ -430,7 +442,11 @@ function processAcceleration(){
var f2 = document.accelerationForm.accel_f2.value;
var f3 = document.accelerationForm.accel_f3.value;
var f4 = document.accelerationForm.accel_f4.value;
var customStart = document.accelerationForm.startgcode.value;
var acceleration = originalAcceleration;
if(document.accelerationForm.start.checked == true) {
acceleration = acceleration.replace(/;customstart/, customStart);
}
if(pc == 1){
acceleration = acceleration.replace(/M106 S255/, "M106 S130");
}

View File

@ -9,6 +9,7 @@ M109 S210 T0
G28 ; home all axes
;G29 ; probe ABL
;M420 S1 ; restore ABL mesh
;customstart
; process Color1-2
; layer 1, Z = 0.200
T0

View File

@ -9,6 +9,7 @@ temp1b
G28 ; home all axes
;G29 ; probe ABL
;M420 S1 ; restore ABL mesh
;customstart
; process Color1-6-1
; layer 1, Z = 0.200
T0