From 527f1df87261245ec7d0574d9c9431646942025d Mon Sep 17 00:00:00 2001 From: lawgicau Date: Tue, 18 Aug 2020 10:53:53 +1000 Subject: [PATCH] Intial addition of custom start gcode --- calibration.html | 36 ++++++++++++++++++++++++++++++++++++ css/styles.css | 7 +++++++ js/acceleration.js | 1 + js/baseline.js | 1 + js/gcodeprocessing.js | 16 ++++++++++++++++ js/retraction.js | 1 + js/temperature.js | 1 + 7 files changed, 63 insertions(+) diff --git a/calibration.html b/calibration.html index 29f660e..81b9406 100644 --- a/calibration.html +++ b/calibration.html @@ -134,6 +134,15 @@

The form below will create a customised version of the XYZ 20mm calibration cube by iDig3Dprinting. It is fast to print and gives a good indication if there is any fundamental problem with the printer.

+

Additional start gcode

+

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.

+ + +

Bed dimensions

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.

@@ -509,6 +518,15 @@

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.

Here is the STL if you would like to slice a similar test yourself: retractiontest.stl

+

Additional start gcode

+

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.

+ + +

Bed dimensions

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.

@@ -622,6 +640,15 @@

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.

Here is the STL if you would like to slice a similar test yourself: temperaturetower.stl

+

Additional start gcode

+

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.

+ + +

Bed dimensions

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.

@@ -784,6 +811,15 @@

Use the following form to customise the gcode to your liking:

+

Additional start gcode

+

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.

+ + +

Bed dimensions

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.

diff --git a/css/styles.css b/css/styles.css index 93c211c..7240e3d 100644 --- a/css/styles.css +++ b/css/styles.css @@ -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; } diff --git a/js/acceleration.js b/js/acceleration.js index 5be362a..82b3055 100644 --- a/js/acceleration.js +++ b/js/acceleration.js @@ -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 diff --git a/js/baseline.js b/js/baseline.js index 3244f64..bba9ac5 100644 --- a/js/baseline.js +++ b/js/baseline.js @@ -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 diff --git a/js/gcodeprocessing.js b/js/gcodeprocessing.js index aafaea4..ef19427 100644 --- a/js/gcodeprocessing.js +++ b/js/gcodeprocessing.js @@ -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"); } diff --git a/js/retraction.js b/js/retraction.js index d78c816..17c005c 100644 --- a/js/retraction.js +++ b/js/retraction.js @@ -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 diff --git a/js/temperature.js b/js/temperature.js index 7049de9..a23331b 100644 --- a/js/temperature.js +++ b/js/temperature.js @@ -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