You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i know there is probbebly a ton of awnsers but i realy cant find it.
i found this script somewhere a while back and in general it works fine, but i want to change 1 thing in its routine and i know absolutely nothing about programming or writing scripts,
idealy i want to fast find with 250mm min, pull back 2mm and slow find with 15mm sec for acuracy, then fast find the other side etc..
the script works fine. but i have no idea where to start. anyone able and willing to help me out here?
function findCircleCenter(approxCircleDia, endmillDiameter, probeFeed) {
// var approxCircleDia = 60;
// var endmillDiameter = 2
// var probeFeed = 200;
<small>This is the approximate diameter of the circle, or the maximum width between edges of the rectangular/square hole you are probing inside</small>
<hr>
<div class="row mb-0">
<label class="cell-sm-6">Endmill Diameter</label>
<div class="cell-sm-6">
<input id="centerProbeEndmill" type="number" value="2" data-role="input" data-append="mm" data-prepend="<i class='fas fa-arrows-alt-h'></i>" data-clear-button="false">
</div>
</div>
<small>Enter the Endmill Diameter</small>
<hr>
<div class="row mb-0">
<label class="cell-sm-6">Probe Feedrate</label>
<div class="cell-sm-6">
<input id="centerProbeFeedrate" type="number" value="100" data-role="input" data-append="mm/min" data-prepend="<i class='fas fa-running'></i>" data-clear-button="false">
</div>
</div>
<small>How fast the probe will move - slower is safer/more accurate</small>
`,
i know there is probbebly a ton of awnsers but i realy cant find it.
i found this script somewhere a while back and in general it works fine, but i want to change 1 thing in its routine and i know absolutely nothing about programming or writing scripts,
idealy i want to fast find with 250mm min, pull back 2mm and slow find with 15mm sec for acuracy, then fast find the other side etc..
the script works fine. but i have no idea where to start. anyone able and willing to help me out here?
// var approxCircleDia = 60;
// var endmillDiameter = 2
// var probeFeed = 200;
var step = 0;
var rightside = 0,
leftside = 0,
farside = 0,
nearside = 0,
centerXdistance = 0,
centerYdistance = 0;
socket.off('prbResult'); // Disable old listeners
var holefindermacroStep1 = `
; Header
G21 ; mm mode
G10 P1 L20 X0 Y0 Z0 ; zero out current location
G38.2 X
+ approxCircleDia / 2 +
F+ probeFeed +
; Probe X` // find right side of circlesocket.emit('runJob', {
data: holefindermacroStep1,
isJob: false,
completedMsg: false,
fileName: ""
});
socket.on('prbResult', function(prbdata) {
if (prbdata.state > 0) {
step++;
console.log("Step " + step, prbdata);
})
}
Metro.dialog.create({
title: "Center Finding Macro",
content: `
Maximum Distance between edges
actions: [{
caption: "Run center finding Probe",
cls: "js-dialog-close success",
onclick: function() {
var approxCircleDia = parseFloat($("#centerProbeDistance").val())
var endmillDiameter = parseFloat($("#centerProbeEndmill").val())
var probeFeed = parseInt($("#centerProbeFeedrate").val())
findCircleCenter(approxCircleDia, endmillDiameter, probeFeed)
}
},
{
caption: "Cancel",
cls: "js-dialog-close alert",
onclick: function() {
//
}
}
]
});
The text was updated successfully, but these errors were encountered: