Implemented a probe continuity test before probing

This commit is contained in:
David Carley
2021-03-02 10:16:24 -08:00
parent a0ae0a4e30
commit 4a23455621
3 changed files with 47 additions and 15 deletions

View File

@@ -359,13 +359,13 @@ module.exports = new Vue({
// }, // },
get_ip_address : function() { get_ip_address : function() {
console.debug('get_ip>', this.ipAddress); console.debug('get_ip>', this.ipAddress);
return this.ipAddress; return this.ipAddress;
}, },
get_ssid : function() { get_ssid : function() {
console.debug('get_ssid>', this.wifiSSID); console.debug('get_ssid>', this.wifiSSID);
return this.wifiSSID; return this.wifiSSID;
}, },
// get_disk_space : function() { // get_disk_space : function() {
@@ -408,6 +408,11 @@ module.exports = new Vue({
} }
update_object(this.state, e.data, false); update_object(this.state, e.data, false);
if (this.state.pw === 0) {
Vue.set(this.state, "probe_connected", true);
}
this.$broadcast('update'); this.$broadcast('update');
}.bind(this) }.bind(this)

View File

@@ -67,6 +67,7 @@ module.exports = {
deleteGCode: false, deleteGCode: false,
tab: 'auto', tab: 'auto',
jog_incr: 1.0, jog_incr: 1.0,
probe_test: false,
tool_msg: false, tool_msg: false,
tool_diameter: 6.35, tool_diameter: 6.35,
toolpath_msg: {x: false, y: false, z: false, a: false, b: false, c: false}, toolpath_msg: {x: false, y: false, z: false, a: false, b: false, c: false},
@@ -259,8 +260,27 @@ module.exports = {
}, },
set_tool_diameter : function (new_diameter) { start_probe_test: function(on_finish) {
this.probe_test = true;
Vue.set(this.state, "probe_connected", false);
Vue.set(this.state, "on_probe_finish", on_finish);
},
finish_probe_test: function() {
this.probe_test = false;
Vue.set(this.state, "probe_connected", false);
const on_finish = this.state.on_probe_finish;
Vue.set(this.state, "on_probe_finish", undefined);
on_finish();
},
show_tool_diameter_prompt: function() {
this.tool_msg = true;
},
set_tool_diameter : function (new_diameter) {
if(isNaN(new_diameter)) if(isNaN(new_diameter))
return; return;
@@ -269,7 +289,6 @@ module.exports = {
this.tool_diameter = parseFloat(new_diameter); this.tool_diameter = parseFloat(new_diameter);
this.probe_xyz(); this.probe_xyz();
}, },
set_jog_incr: function(newValue) { set_jog_incr: function(newValue) {
@@ -334,7 +353,6 @@ module.exports = {
var zoffset = this.config.probe["probe-zdim"]; var zoffset = this.config.probe["probe-zdim"];
var fastSeek = this.config.probe["probe-fast-seek"]; var fastSeek = this.config.probe["probe-fast-seek"];
var slowSeek = this.config.probe["probe-slow-seek"]; var slowSeek = this.config.probe["probe-slow-seek"];
debugger;
if(this.mach_units == "METRIC") { if(this.mach_units == "METRIC") {
@@ -442,8 +460,6 @@ module.exports = {
var slowSeek = this.config.probe["probe-slow-seek"]; var slowSeek = this.config.probe["probe-slow-seek"];
var zoffset = this.config.probe["probe-zdim"]; var zoffset = this.config.probe["probe-zdim"];
debugger;
if(this.mach_units == "METRIC") { if(this.mach_units == "METRIC") {
fastSeek = "F" + fastSeek; fastSeek = "F" + fastSeek;
slowSeek = "F" + slowSeek; slowSeek = "F" + slowSeek;
@@ -488,9 +504,6 @@ module.exports = {
var zcmd = "Z" + z_jog * this.jog_incr; var zcmd = "Z" + z_jog * this.jog_incr;
var acmd = "A" + a_jog * this.jog_incr; var acmd = "A" + a_jog * this.jog_incr;
console.log("Jog command: " + this.jog_incr);
//debugger;
this.send('G91\nG0' + xcmd + ycmd + zcmd + acmd + '\n'); this.send('G91\nG0' + xcmd + ycmd + zcmd + acmd + '\n');
}, },

View File

@@ -308,7 +308,21 @@ script#control-view-template(type="text/x-template")
.bar(:style="'width:' + (progress || 0) * 100 + '%'") .bar(:style="'width:' + (progress || 0) * 100 + '%'")
tr tr
td(style="white-space: nowrap;text-align:center") td(style="white-space: nowrap;text-align:center")
button(:class="state['pw'] ? '' : 'load-on'",style="height:100px;width:200px",@click="tool_msg = true",) Probe XYZ message(:show.sync=`probe_test`)
h3(slot="header") Test probe connection
div(slot="body")
.pure-form
p Attach the probe magnet to the collet.
p Touch the probe block to the bit.
div(slot="footer")
button.pure-button(@click=`probe_test = false`)
| Cancel
button.pure-button.button-success(
:disabled=`!state.probe_connected`
@click=`finish_probe_test()`) Continue
message(:show.sync=`tool_msg`) message(:show.sync=`tool_msg`)
h3(slot="header") Enter probe tool information h3(slot="header") Enter probe tool information
@@ -328,9 +342,9 @@ script#control-view-template(type="text/x-template")
button.pure-button.button-success( button.pure-button.button-success(
@click=`set_tool_diameter(tool_diameter)`) Set @click=`set_tool_diameter(tool_diameter)`) Set
button(:class="state['pw'] ? '' : 'load-on'", style="height:100px;width:200px", @click=`start_probe_test(show_tool_diameter_prompt)`) Probe XYZ
button(:class="state['pw'] ? '' : 'load-on'", style="height:100px;width:200px", @click=`start_probe_test(probe_z)`) Probe Z
button(:class="state['pw'] ? '' : 'load-on'",style="height:100px;width:200px",@click="probe_z()") Probe Z
.tabs .tabs