diff --git a/src/pug/templates/control-view.pug b/src/pug/templates/control-view.pug index 69abb8c..17f13de 100644 --- a/src/pug/templates/control-view.pug +++ b/src/pug/templates/control-view.pug @@ -100,7 +100,7 @@ script#control-view-template(type="text/x-template") tr(v-if="config.motors[2]['axis'] == 'A'") td(style="height:100px", align="center", colspan="1") - button() + button(@click="showProbeDialog('a')") | Probe br | Rotary diff --git a/src/svelte-components/src/dialogs/ProbeDialog.svelte b/src/svelte-components/src/dialogs/ProbeDialog.svelte index 84cae65..f4979c8 100644 --- a/src/svelte-components/src/dialogs/ProbeDialog.svelte +++ b/src/svelte-components/src/dialogs/ProbeDialog.svelte @@ -70,7 +70,7 @@ ]; export let open; - export let probeType: "xyz" | "z"; + export let probeType: "xyz" | "z" | "a"; let currentStep: Step = "None"; let cutterDiameterString: string = ""; let cutterDiameterMetric: number; @@ -154,6 +154,7 @@ switch (probeType) { case "xyz": case "z": + case "a": break; default: @@ -239,6 +240,10 @@ const yOffset = probeBlockLength + cutterDiameterMetric / 2.0; const zOffset = probeBlockHeight; + const fastSeekRotary = $Config["probe-rotary"]["probe-fast-seek"]; + const slowSeekRotary = $Config["probe-rotary"]["probe-slow-seek"]; + const zOffsetRotary = $Config["probe-rotary"]["probe-zdim"]; + if (probeType === "z") { ControllerMethods.send(` G21 @@ -251,6 +256,20 @@ G91 G0 Z 25 + M2 + `); + } else if(probeType === "a") { + ControllerMethods.send(` + G21 + G92 Z0 + + G38.2 Z -25.4 F${fastSeekRotary} + G91 G1 Z 1 + G38.2 Z -2 F${slowSeekRotary} + G92 Z ${zOffsetRotary} + + G91 G0 Z 25 + M2 `); } else { @@ -323,7 +342,7 @@ Attach the probe magnet to the collet, then touch the probe block to the bit.

- + {:else if currentStep === "PlaceProbeBlock"} +

{#if probeType === "xyz"} Place the probe block face up, on the lower-left corner @@ -382,7 +402,7 @@

{:else}

Don't forget to put away the probe!

- +