Origin Movement after Probing

This commit is contained in:
sanjayk03-dev
2025-05-15 22:30:24 +05:30
parent 19d0694b6c
commit 4a0f4d52e1

View File

@@ -169,9 +169,13 @@
await stepCompleted("Probe", probingComplete, probingFailed);
await stepCompleted("Done", userAcknowledged);
if (probeType === "xyz" && !isRotaryActive) {
if (probeType === "xyz" ) {
if(isRotaryActive){
executeYOrigin();
} else {
ControllerMethods.gotoZero("xy");
}
}
} catch (err) {
if (err.message !== "cancelled") {
console.error("Error during probing:", err);
@@ -280,8 +284,6 @@
const xOffset = probeBlockWidth + cutterDiameter / 2.0;
const yOffset = probeBlockLength + cutterDiameter / 2.0;
const zOffset = probeBlockHeight;
console.log("probeBlock: ",probeBlockLength, probeBlockWidth, probeBlockHeight);
console.log("cutterDiameterRotaryMetric",cutterDiameterRotaryMetric,cutterDiameter)
if (probeType === "z") {
ControllerMethods.send(`
@@ -373,6 +375,14 @@
}
}
}
function executeYOrigin(){
ControllerMethods.send(`
G53 G0 Z0
G0 Y0
M2
`);
}
</script>
<Dialog
@@ -499,8 +509,16 @@
/>
{/if}
{#if probeType === "xyz" || isRotaryActive}
<p>The machine will now move to the XY origin.</p>
{#if probeType === "xyz"}
{#if isRotaryActive}
<p>
The machine will now move to the Y origin.
</p>
{:else}
<p>
The machine will now move to the XY origin.
</p>
{/if}
<p>Watch your hands!</p>
{/if}