From 13ed1a90836bc69e6fe69eb1e91ce173dcdb8c74 Mon Sep 17 00:00:00 2001 From: openbuilds-engineer Date: Tue, 8 Jan 2019 18:50:24 +0200 Subject: [PATCH] Added Steps-per-mm File Tuning Calibration Widget #28 --- app/index.html | 5 ++ app/js/calibrate-x.js | 118 +++++++++++++++++++++++++++++ app/js/calibrate-y.js | 119 +++++++++++++++++++++++++++++ app/js/calibrate-z.js | 116 ++++++++++++++++++++++++++++ app/js/calibrate.js | 18 +---- app/js/grblsettings.js | 167 ++++++++++++++++++++++++++++------------- package.json | 2 +- 7 files changed, 476 insertions(+), 69 deletions(-) diff --git a/app/index.html b/app/index.html index 85017a9..27126a4 100644 --- a/app/index.html +++ b/app/index.html @@ -941,6 +941,11 @@ + + + + + \ No newline at end of file diff --git a/app/js/calibrate-x.js b/app/js/calibrate-x.js index e69de29..6abe810 100644 --- a/app/js/calibrate-x.js +++ b/app/js/calibrate-x.js @@ -0,0 +1,118 @@ +var xcaltemplate = ` + +
+ + + + + +
+ + + Step 1: Mark Initial Position
+ This wizard, will allow you to fine-tune your steps-per-mm for the X-Axis
+ To get started, jog your X-Axis until its near the X- position.
+
+ + +
+
+ Then, place a physical mark + on your machine to mark where the X-Carriage currently is +
+
+ +
+
+
+ + + +` + +function applycalibrationx() { + var actualdist = $('#xcaltraveldist').val(); + var currentstepspermm = parseFloat(grblParams['$100']); + // var currentstepspermm = 199.9; + // newstepsval = currentsteps * (intended distance / actual distance) + var newsteps = currentstepspermm * (100 / actualdist); + // alert("New Steps Per MM Value: " + newsteps); + $('#val-100-input').val(newsteps) + checkifchanged(); +} + + +function xstepscalibrate() { + Metro.dialog.create({ + title: "Calibrate Steps per mm for X-Axis ($100)", + content: xcaltemplate, + width: 750, + actions: [{ + caption: "Cancel", + cls: "js-dialog-close", + onclick: function() { + // + } + }] + }); +} + + +function slide1() { + $('#xcalstep1').show(); + $('#xcalstep2').hide(); + $('#xcalstep3').hide(); +} + +function slide2() { + $('#xcal100mm').attr('disabled', false); + $('#xcalcontinue2').attr('disabled', true); + $('#xcalstep1').hide(); + $('#xcalstep2').show(); + $('#xcalstep3').hide(); +} + +function slide3() { + $('#xcalstep1').hide(); + $('#xcalstep2').hide(); + $('#xcalstep3').show(); +} \ No newline at end of file diff --git a/app/js/calibrate-y.js b/app/js/calibrate-y.js index e69de29..6f47b48 100644 --- a/app/js/calibrate-y.js +++ b/app/js/calibrate-y.js @@ -0,0 +1,119 @@ +var ycaltemplate = ` + +
+ + + + + +
+ + + Step 1: Mark Initial Position
+ This wizard, will allow you to fine-tune your steps-per-mm for the Y-Axis
+ To get started, jog your Y-Axis until its near the Y- position.
+
+ + +
+
+ Then, place a physical mark + on your machine to mark where the Y-Carriage currently is +
+
+ +
+
+
+ + + +` + +function applycalibrationy() { + var actualdist = $('#ycaltraveldist').val(); + var currentstepspermm = parseFloat(grblParams['$101']); + // var currentstepspermm = 199.9; + // newstepsval = currentsteps * (intended distance / actual distance) + var newsteps = currentstepspermm * (100 / actualdist); + // alert("New Steps Per MM Value: " + newsteps); + $('#val-101-input').val(newsteps) + checkifchanged(); +} + + + +function ystepscalibrate() { + Metro.dialog.create({ + title: "Calibrate Steps per mm for Y-Axis ($101)", + content: ycaltemplate, + width: 750, + actions: [{ + caption: "Cancel", + cls: "js-dialog-close", + onclick: function() { + // + } + }] + }); +} + + +function ycalslide1() { + $('#ycalstep1').show(); + $('#ycalstep2').hide(); + $('#ycalstep3').hide(); +} + +function ycalslide2() { + $('#ycal100mm').attr('disabled', false); + $('#ycalcontinue2').attr('disabled', true); + $('#ycalstep1').hide(); + $('#ycalstep2').show(); + $('#ycalstep3').hide(); +} + +function ycalslide3() { + $('#ycalstep1').hide(); + $('#ycalstep2').hide(); + $('#ycalstep3').show(); +} \ No newline at end of file diff --git a/app/js/calibrate-z.js b/app/js/calibrate-z.js index e69de29..0ab5f63 100644 --- a/app/js/calibrate-z.js +++ b/app/js/calibrate-z.js @@ -0,0 +1,116 @@ +var zcaltemplate = ` +
+ + + + + +
+ + + Step 1: Mark Initial Position
+ This wizard, will allow you to fine-tune your steps-per-mm for the Z-Axis
+ To get started, jog your Z-Axis until its near the Z- position.
+
+ + +
+
+ Then, place a physical mark + on your machine to mark where the Z-Carriage currently is +
+
+ +
+
+
+ + + +` + +function applycalibrationz() { + var actualdist = $('#zcaltraveldist').val(); + var currentstepspermm = parseFloat(grblParams['$102']); + // var currentstepspermm = 199.9; + // newstepsval = currentsteps * (intended distance / actual distance) + var newsteps = currentstepspermm * (50 / actualdist); + // alert("New Steps Per MM Value: " + newsteps); + $('#val-102-input').val(newsteps) + checkifchanged(); +} + +function zstepscalibrate() { + Metro.dialog.create({ + title: "Calibrate Steps per mm for Z-Axis ($102)", + content: zcaltemplate, + width: 750, + actions: [{ + caption: "Cancel", + cls: "js-dialog-close", + onclick: function() { + // + } + }] + }); +} + + +function zcalslide1() { + $('#zcalstep1').show(); + $('#zcalstep2').hide(); + $('#zcalstep3').hide(); +} + +function zcalslide2() { + $('#zcal50mm').attr('disabled', false); + $('#zcalcontinue2').attr('disabled', true); + $('#zcalstep1').hide(); + $('#zcalstep2').show(); + $('#zcalstep3').hide(); +} + +function zcalslide3() { + $('#zcalstep1').hide(); + $('#zcalstep2').hide(); + $('#zcalstep3').show(); +} \ No newline at end of file diff --git a/app/js/calibrate.js b/app/js/calibrate.js index 185cf76..fa4ee4f 100644 --- a/app/js/calibrate.js +++ b/app/js/calibrate.js @@ -1,10 +1,4 @@ var grblcalctemplate = `
- - -
@@ -75,12 +69,6 @@ var grblcalctemplate = `
- -
- -
- -
` function xstepspermm() { @@ -88,7 +76,7 @@ function xstepspermm() { Metro.dialog.create({ width: 600, toTop: true, - title: "Calibrate Steps per mm for X-Axis ($100)", + title: "Calculate Steps per mm for X-Axis ($100)", content: grblcalctemplate, actions: [{ caption: "Apply", @@ -118,7 +106,7 @@ function ystepspermm() { Metro.dialog.create({ width: 600, toTop: true, - title: "Calibrate Steps per mm for Y-Axis ($101)", + title: "Calculate Steps per mm for Y-Axis ($101)", content: grblcalctemplate, actions: [{ caption: "Apply", @@ -147,7 +135,7 @@ function zstepspermm() { Metro.dialog.create({ width: 600, toTop: true, - title: "Calibrate Steps per mm for Z-Axis ($102)", + title: "Calculate Steps per mm for Z-Axis ($102)", content: grblcalctemplate, actions: [{ caption: "Apply", diff --git a/app/js/grblsettings.js b/app/js/grblsettings.js index 77845d4..c55c836 100644 --- a/app/js/grblsettings.js +++ b/app/js/grblsettings.js @@ -91,7 +91,7 @@ function grblPopulate() {
- +
@@ -104,58 +104,57 @@ function grblPopulate() {
-
- +
+
- - - - + + + + - - - + + + - - - - - + + + - - - + + + - - - - + + + - - - - + + + + - - - + + + - - - + + + + + + - - - + + + + + + - - - + + + + + + - - - + + + + + + + + + + +
Key - ParameterValueKeyParameterValueUtility
$0Step pulse time, microseconds
$1Step idle delay, milliseconds
$2
$0Step pulse time, microseconds
$1Step idle delay, milliseconds
$2 Step pulse invert - +
$3Step direction invert +
$3Step direction invert

$4Invert step enable pin
$5Invert limit pins
$6Invert probe pin
$10Status report options
$4Invert step enable pin
$5Invert limit pins
$6Invert probe pin
$10Status report options
$11Junction deviation, millimeters
$12Arc tolerance, millimeters
$13Report in inches
$11Junction deviation, millimeters
$12Arc tolerance, millimeters
$13Report in inches
$20Soft limits enable (Enable and Save Homing first before enabling)
$21Hard limits enable
$22Homing cycle enable
$23Homing direction invert
$20Soft limits enable
(Enable and Save Homing first before enabling)
$21Hard limits enable
$22Homing cycle enable
$23Homing direction invert
$24Homing locate feed rate, mm/min
$25Homing search seek rate, mm/min
$26Homing switch debounce delay, milliseconds
$27Homing switch pull-off distance, millimeters
$24Homing locate feed rate, mm/min
$25Homing search seek rate, mm/min
$26Homing switch debounce delay, milliseconds
$27Homing switch pull-off distance, millimeters
$30Maximum spindle speed, RPM
$31Minimum spindle speed, RPM
$32Laser-mode enable
$30Maximum spindle speed, RPM
$31Minimum spindle speed, RPM
$32Laser-mode enable
$100X-axis steps per millimeter
$101Y-axis steps per millimeter
$102Z-axis steps per millimeter
$100X-axis steps per millimeter + + +
$110X-axis maximum rate, mm/min
$111Y-axis maximum rate, mm/min
$112Z-axis maximum rate, mm/min
$101Y-axis steps per millimeter + + +
$120X-axis acceleration, mm/sec2
$121Y-axis acceleration, mm/sec2
$122Z-axis acceleration, mm/sec2
$102Z-axis steps per millimeter + + +
$130X-axis maximum travel, millimeters
$131Y-axis maximum travel, millimeters
$132Z-axis maximum travel, millimeters
$110X-axis maximum rate, mm/min
$111Y-axis maximum rate, mm/min
$112Z-axis maximum rate, mm/min
$120X-axis acceleration, mm/sec2
$121Y-axis acceleration, mm/sec2
$122Z-axis acceleration, mm/sec2
$130X-axis maximum travel, millimeters
$131Y-axis maximum travel, millimeters
$132Z-axis maximum travel, millimeters
@@ -215,7 +276,7 @@ function grblPopulate() { $("#val-10-input").val(parseInt(grblParams['$10'])).trigger("change"); }, 100);; - $('#grblSettingsTable').on('keyup paste click', 'input, select', function() { + $('#grblSettingsTable').on('keyup paste click change', 'input, select', function() { checkifchanged() }); diff --git a/package.json b/package.json index c9ad3bb..31bcb53 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "OpenBuildsCONTROL", - "version": "1.0.126", + "version": "1.0.127", "license": "AGPL-3.0", "description": "Machine Interface Driver for OpenBuilds", "author": "github.com/openbuilds ",