XYZ probe routine location

Since I have a CNC (the Onefinity :), I made my own probe pad. The problem is that it’s thinner than the stock pad sold by Onefinity. The canned XYZ probe routine probes Z just fine but then moves to the X axis and drops the probe too far. My pad is 8.75mm thick and I think the position for the X probe starting point is lower than that by about 1mm.

Where is the probe routine in the software? Is it intended to be user configurable? If not, I’m happy to dig into the python if I can get a pointer to where it might reside.

There are actually a number of things I’d want to change in the BB software, and may engage in the open source project. The other major one is reading the download directory when queried, not just at boot time.

GitHub - OneFinityCNC/onefinity-firmware - here’s the code repository. OF have basically said development is black-boxed. I had the same idea, and was going to take on some UI tweaks, but it doesn’t seem like they are interested so any tweaks will end up being in your own fork. Good luck!

@RandysView - looks like you can easily adjust this value in the machine config json as well - post here outlines that (obviously edit the probe-zdim to your needs) - Woodworker Default Configuration Files

It’s in the settings of the controller under the probe section. Just edit your size and hit save:

Nice find! I hadn’t done the search but I just need to change the value -12.7 in this line:
pcmd += “G91 G0 Z -12.7\n”;

To -11.5 in my setup and it should just work.

Of course, I could also just write the same routine as a separate program and not have to fiddle with the code. Too bad this is not an encapsulated routine for the user, since “Probe XYZ” should not have to be duplicated.

1 Like

I think your deleted post was the key. The value of the z drop prior to X probing is hardwired and not accessible through the Probe Dimension menu. That was where I started and set my value for, but the hardwired -12.7 is too deep for my plate. The routine does NOT check to make sure probe-zdim is larger than the -12.7 offset in the probe XYZ routine.

Good catch, I automatically assumed it’d simply take the probe-zdim, and create proper offsets. But yes, if zoffset is < the default -12.7 drop, you’ll crash every time. These values should be more like zoffset * 0.75 or something (75% of height) instead of hard coded values.

(edit) putting back the probing routine for future reference:

probe_xyz()

probe_xyz() {
var pcmd = “”;
var xoffset = this.config.probe[“probe-xdim”];
var yoffset = this.config.probe[“probe-ydim”];
var zoffset = this.config.probe[“probe-zdim”];
var fastSeek = this.config.probe[“probe-fast-seek”];
var slowSeek = this.config.probe[“probe-slow-seek”];
debugger;

if(this.mach_units == “METRIC”) {

fastSeek = "F" + fastSeek;
slowSeek = "F" + slowSeek;

//Metric Probing
pcmd += "G92 X0\n";
pcmd += "G92 Y0\n";
pcmd += "G92 Z0\n";
pcmd += "G21\n";
pcmd += "G38.2 Z-25.4 " + fastSeek + "\n";
pcmd += "G91 G0 Z1.5\n";
pcmd += "G38.2 Z-2.5 " + slowSeek + "\n";

//var zoffset = 16.383;
pcmd += "G92 Z " + zoffset + "\n";

pcmd += "G91 G0 Z 3.175\n";
pcmd += "G91 G0 X 19.05\n";
pcmd += "G91 G0 Z -12.7\n";
pcmd += "G38.2 X -19.05 " + fastSeek + "\n";
pcmd += "G91 G1 X 1.27 " + fastSeek +"\n";
pcmd += "G38.2 X -4 " + slowSeek + "\n";

xoffset += this.tool_diameter/2.0;
xoffset = xoffset.toFixed(5);
pcmd += "G92 X " + xoffset + "\n";

pcmd += "G91 G0 X 2.5\n";
pcmd += "G91 G0 Y 17\n";
pcmd += "G91 G0 X -13\n";
pcmd += "G38.2 Y -17 " + fastSeek + "\n";
pcmd += "G91 G0 Y 1.27\n";
pcmd += "G38.2 Y -4 " + slowSeek +"\n";

yoffset += this.tool_diameter/2.0;
yoffset = yoffset.toFixed(5);
pcmd += "G92 Y " + yoffset + "\n";

pcmd += "G91 G0 Y2.54\n";
pcmd += "G91 G0 Z 25.4\n";
pcmd += "G90 G0 X0 Y0\n";

} else {

//Imperial Probing

xoffset = xoffset / 25.4;
yoffset = yoffset / 25.4;
zoffset = zoffset / 25.4;
slowSeek = slowSeek / 25.4;
slowSeek = slowSeek.toFixed(5);
slowSeek = "F" + slowSeek;
fastSeek = fastSeek / 25.4;
fastSeek = fastSeek.toFixed(5);
fastSeek = "F" + fastSeek;

pcmd += "G92 X0\n";
pcmd += "G92 Y0\n";
pcmd += "G92 Z0\n";
pcmd += "G20\n";
pcmd += "G38.2 Z-1.0 " + fastSeek + "\n";
pcmd += "G91 G0 Z0.06\n";
pcmd += "G38.2 Z-0.1 " + slowSeek + "\n";

//var zoffset = 0.645;
zoffset = zoffset.toFixed(5);
pcmd += "G92 Z " + zoffset + "\n";


pcmd += "G91 G0 Z 0.125\n";
pcmd += "G91 G0 X 0.75\n";
pcmd += "G91 G0 Z -0.5\n";
pcmd += "G38.2 X -0.75 " + fastSeek + "\n";
pcmd += "G91 G1 X 0.05 " + fastSeek + "\n";
pcmd += "G38.2 X -0.15 " + slowSeek + "\n";

xoffset +=  this.tool_diameter/2.0;
xoffset = xoffset.toFixed(5);
pcmd += "G92 X " + xoffset + "\n";

pcmd += "G91 G0 X 0.1\n";
pcmd += "G91 G0 Y 0.75\n";
pcmd += "G91 G0 X -0.5\n";
pcmd += "G38.2 Y -0.75 " + fastSeek + "\n";
pcmd += "G91 G0 Y 0.05\n";
pcmd += "G38.2 Y -0.15 " + slowSeek +"\n";

yoffset += this.tool_diameter/2.0;
yoffset = yoffset.toFixed(5);
pcmd += "G92 Y " + yoffset + "\n";

pcmd += "G91 G0 Y0.1\n";
pcmd += "G91 G0 Z1\n";
pcmd += "G90 G0 X0 Y0\n";

}

this.send(pcmd);

},

And what is the location of this routine? I can’t seem to find it or the rest of the source.

1 Like

FYI - I opened an issue of on the github repo for OF - A probe block configured with a thickness less than 12.7mm will crash the spindle · Issue #1 · OneFinityCNC/onefinity-firmware · GitHub (in case you want to provide testing support or additional feedback).

Just to document my solution to this problem, I just created a routine called ProbeXYZ.nc to do probing for my alignment plate. Pretty simple. I wish it were possible to customize the Probe command on the control panel.

Code below and it works great. I’m retrofitting to my MPCNC.

ProbeXYZ.nc (522 Bytes)

Looks like v1.0.7 will have a fix. They’ve merged in quite a few upgrades, probe height was one of them.

If we’d like to modify the .js files do we need to recreate the build environment outlined in the bbdev-chroot.md file?