Merge pull request #15 from dacarley/probing-slower-fast-seek
Slowed the probe-fast-seek from 100 to 75
This commit is contained in:
@@ -346,68 +346,54 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
probe_xyz() {
|
probe_xyz() {
|
||||||
let xoffset = this.config.probe["probe-xdim"];
|
const xdim = this.config.probe["probe-xdim"];
|
||||||
let yoffset = this.config.probe["probe-ydim"];
|
const ydim = this.config.probe["probe-ydim"];
|
||||||
let zoffset = this.config.probe["probe-zdim"];
|
const zdim = this.config.probe["probe-zdim"];
|
||||||
let fastSeek = this.config.probe["probe-fast-seek"];
|
const slowSeek = this.config.probe["probe-slow-seek"];
|
||||||
let slowSeek = this.config.probe["probe-slow-seek"];
|
const fastSeek = this.config.probe["probe-fast-seek"];
|
||||||
|
|
||||||
xoffset += this.tool_diameter / 2.0;
|
|
||||||
yoffset += this.tool_diameter / 2.0;
|
|
||||||
|
|
||||||
if (this.mach_units !== "METRIC") {
|
|
||||||
xoffset /= 25.4;
|
|
||||||
yoffset /= 25.4;
|
|
||||||
zoffset /= 25.4;
|
|
||||||
slowSeek /= 25.4;
|
|
||||||
fastSeek /= 25.4;
|
|
||||||
}
|
|
||||||
|
|
||||||
const zlift = 1;
|
const zlift = 1;
|
||||||
|
const xoffset = xdim + (this.tool_diameter / 2.0);
|
||||||
|
const yoffset = ydim + (this.tool_diameter / 2.0);
|
||||||
|
const zoffset = zdim;
|
||||||
|
|
||||||
|
const metric = this.mach_units == "METRIC";
|
||||||
|
const mm = n => (metric ? n : n / 25.4).toFixed(5);
|
||||||
|
const speed = s => `F${mm(s)}`;
|
||||||
|
|
||||||
// After probing Z, we want to drop the bit down:
|
// After probing Z, we want to drop the bit down:
|
||||||
// Ideally, 12.7mm/0.5in
|
// Ideally, 12.7mm/0.5in
|
||||||
// And we don't want to be more than 75% down on the probe block
|
// And we don't want to be more than 75% down on the probe block
|
||||||
let plunge = Math.min(12.7, zoffset * 0.75);
|
// Also, add zlift to compensate for the fact that we lift after probing Z
|
||||||
plunge += zlift; // Compensate for the fact that we lift after probing Z
|
const plunge = Math.min(12.7, zoffset * 0.75) + zlift;
|
||||||
|
|
||||||
xoffset = xoffset.toFixed(5);
|
|
||||||
yoffset = yoffset.toFixed(5);
|
|
||||||
zoffset = zoffset.toFixed(5);
|
|
||||||
slowSeek = slowSeek.toFixed(5);
|
|
||||||
fastSeek = fastSeek.toFixed(5);
|
|
||||||
plunge = plunge.toFixed(5);
|
|
||||||
|
|
||||||
slowSeek = `F${slowSeek}`;
|
|
||||||
fastSeek = `F${fastSeek}`;
|
|
||||||
|
|
||||||
this.send(`
|
this.send(`
|
||||||
G21
|
${metric ? "G21" : "G20"}
|
||||||
G92 X0 Y0 Z0
|
G92 X0 Y0 Z0
|
||||||
|
|
||||||
G38.2 Z -25.4 ${fastSeek}
|
G38.2 Z ${mm(-25.4)} ${speed(fastSeek)}
|
||||||
G91 G1 Z 1
|
G91 G1 Z ${mm(1)}
|
||||||
G38.2 Z -2 ${slowSeek}
|
G38.2 Z ${mm(-2)} ${speed(slowSeek)}
|
||||||
G92 Z ${zoffset}
|
G92 Z ${mm(zoffset)}
|
||||||
|
|
||||||
G91 G0 Z ${zlift}
|
G91 G0 Z ${mm(zlift)}
|
||||||
G91 G0 X 20
|
G91 G0 X ${mm(20)}
|
||||||
G91 G0 Z -${plunge}
|
G91 G0 Z ${mm(-plunge)}
|
||||||
G38.2 X -20 ${fastSeek}
|
G38.2 X ${mm(-20)} ${speed(fastSeek)}
|
||||||
G91 G1 X 1
|
G91 G1 X ${mm(1)}
|
||||||
G38.2 X -2 ${slowSeek}
|
G38.2 X ${mm(-2)} ${speed(slowSeek)}
|
||||||
G92 X ${xoffset}
|
G92 X ${mm(xoffset)}
|
||||||
|
|
||||||
G91 G0 X 1
|
G91 G0 X ${mm(1)}
|
||||||
G91 G0 Y 20
|
G91 G0 Y ${mm(20)}
|
||||||
G91 G0 X -20
|
G91 G0 X ${mm(-20)}
|
||||||
G38.2 Y -20 ${fastSeek}
|
G38.2 Y ${mm(-20)} ${speed(fastSeek)}
|
||||||
G91 G1 Y 1
|
G91 G1 Y ${mm(1)}
|
||||||
G38.2 Y -2 ${slowSeek}
|
G38.2 Y ${mm(-2)} ${speed(slowSeek)}
|
||||||
G92 Y ${yoffset}
|
G92 Y ${mm(yoffset)}
|
||||||
|
|
||||||
G91 G0 Y 3
|
G91 G0 Y ${mm(3)}
|
||||||
G91 G0 Z 25.4
|
G91 G0 Z ${mm(25.4)}
|
||||||
G90 G0 X0 Y0
|
G90 G0 X0 Y0
|
||||||
|
|
||||||
M2
|
M2
|
||||||
@@ -415,33 +401,28 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
probe_z() {
|
probe_z() {
|
||||||
let fastSeek = this.config.probe["probe-fast-seek"];
|
const xdim = this.config.probe["probe-xdim"];
|
||||||
let slowSeek = this.config.probe["probe-slow-seek"];
|
const ydim = this.config.probe["probe-ydim"];
|
||||||
let zoffset = this.config.probe["probe-zdim"];
|
const zdim = this.config.probe["probe-zdim"];
|
||||||
|
const slowSeek = this.config.probe["probe-slow-seek"];
|
||||||
if (this.mach_units !== "METRIC") {
|
const fastSeek = this.config.probe["probe-fast-seek"];
|
||||||
zoffset /= 25.4;
|
|
||||||
slowSeek /= 25.4;
|
|
||||||
fastSeek /= 25.4;
|
|
||||||
}
|
|
||||||
|
|
||||||
zoffset = zoffset.toFixed(5);
|
const zoffset = zdim;
|
||||||
slowSeek = slowSeek.toFixed(5);
|
|
||||||
fastSeek = fastSeek.toFixed(5);
|
|
||||||
|
|
||||||
slowSeek = `F${slowSeek}`;
|
const metric = this.mach_units == "METRIC";
|
||||||
fastSeek = `F${fastSeek}`;
|
const mm = n => (metric ? n : n / 25.4).toFixed(5);
|
||||||
|
const speed = s => `F${mm(s)}`;
|
||||||
|
|
||||||
this.send(`
|
this.send(`
|
||||||
G21
|
${metric ? "G21" : "G20"}
|
||||||
G92 Z0
|
G92 Z0
|
||||||
|
|
||||||
G38.2 Z -25.4 ${fastSeek}
|
G38.2 Z ${mm(-25.4)} ${speed(fastSeek)}
|
||||||
G91 G1 Z 1
|
G91 G1 Z ${mm(1)}
|
||||||
G38.2 Z -2 ${slowSeek}
|
G38.2 Z ${mm(-2)} ${speed(slowSeek)}
|
||||||
G92 Z ${zoffset}
|
G92 Z ${mm(zoffset)}
|
||||||
|
|
||||||
G91 G0 Z3
|
G91 G0 Z ${mm(3)}
|
||||||
|
|
||||||
M2
|
M2
|
||||||
`);
|
`);
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
"probe": {
|
"probe": {
|
||||||
"probe-ydim": 53.975,
|
"probe-ydim": 53.975,
|
||||||
"probe-slow-seek": 25,
|
"probe-slow-seek": 25,
|
||||||
"probe-fast-seek": 100,
|
"probe-fast-seek": 75,
|
||||||
"probe-zdim": 15.4,
|
"probe-zdim": 15.4,
|
||||||
"probe-xdim": 53.975
|
"probe-xdim": 53.975
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
"probe": {
|
"probe": {
|
||||||
"probe-ydim": 53.975,
|
"probe-ydim": 53.975,
|
||||||
"probe-slow-seek": 25,
|
"probe-slow-seek": 25,
|
||||||
"probe-fast-seek": 100,
|
"probe-fast-seek": 75,
|
||||||
"probe-zdim": 15.4,
|
"probe-zdim": 15.4,
|
||||||
"probe-xdim": 53.975
|
"probe-xdim": 53.975
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user