Custom probe using G38.3 failing contact freezes all controls

I have recently bought the probe “CNC 3D Touch Probe Edge Finder” (https://www.amazon.de/dp/B0BG4MDNXW/ref=pe_27091401_487027711_TE_SCE_3p_dp_1).

I am developing a program to automate calibration when cutting mulitple angles on a part. My problem is that when I issue the command G38.3 and the probe doesn’t get any contact… it results in permanently disabled controls.
Description of the command:

Machine photo:

Resulting screen:

Whats the deal with the controller not taking any more commands? I litterally have to restart the machine before it will accept any more commands, but it should just stop and do nothing further. Is there any commands to reenable controls?

Never mind… just as I ask the question I realize that issuing the “stop” command reenables controls

1 Like

I have been wanting to use a touch probe like this, but had some questions:

  1. When I want to probe just one of the axis, I have been issuing the following G-code which works without issue, but I am not seeing where I am issuing a “stop” command like you mentioned?
    G91 G21 G38.2Y-15F100

  2. How did you wire the touch probe to the Onefinity? I have a pretty good idea in my head but would be grateful for exactly how you did it? Also regarding the wiring, can you confirm the Onefinity is supplying 5v which the touch probe requires?

-Cheers

1 Like

Hey Patrick,

Sure G38.3 does not abort program with an error when probing fails (as G38.2 does), but what do you want to do with such a result? Usually proceeding with the program makes no sense when probing failed (except if you like workpieces destroyed).

It’s only after successful probing that parameters #5061 to #5069 will be set to the X, Y, Z, A, B, C, U, V, W coordinates determined by probing and can be made the new active coordinate system with G92.

  1. If your probe makes contact, it will work, but if it fails to make contact then you will have to issue a STOP before it will allow further gcode commands (or jogging/movements).
  2. I measured a 3.3V voltage so I connected an 5v usb adapter where I united ground (GND on picture below and black cable of USB cable going to probe) and connected the 5V line to the probe (red wire to probe), I then connected the yellow wire (probe) to pin 22 of the following picture. Apparently pin22 can accept 5V without breaking, but I have also verified that the probe also works when you add a 1K resistor before reaching pin 22.
2 Likes

Well, I am not running any program here. I have written a console application that communicates with the onefinity the same way the web interface does. I made it in order to automate calibration. It will measure my stock, add some holes that it can later probe when the stock is flipped in order to save me time aligning the part. I have even made it so that it can provide a skew along the x axis that I can then insert in fusion 360 to rotate the part before starting CAM. I add the probing results to fusion 360 because last I tried, the buildbotics controller of the onefinity machine doesn’t understand G92 with an angle.

Anyway the reason I would like to use a G38.3 that doesn’t touch anything is to protect the probe. Imagine a hole added in the stock for calibration, but the probe isn’t inside the hole before lowering the probe into it… in this case I am using G38.3 to probe into the hole and cancel the calibration procedure if the probe hits anything unexpectedly.

Looking at the Onefinity index.html page code where the probing routine is located, the last G-code command issued after probing is M2 which I see defined as “Program End” and could be performing this “stop” action/command as mentioned?

      } else {
        this.send(`
          ${metric ? "G21" : "G20"}
          G92 X0 Y0 Z0
          
          G38.2 Z ${mm(-25.4)} ${speed(fastSeek)}
          G91 G1 Z ${mm(1)}
          G38.2 Z ${mm(-2)} ${speed(slowSeek)}
          G92 Z ${mm(zoffset)}
        
          G91 G0 Z ${mm(zlift)}
          G91 G0 X ${mm(20)}
          G91 G0 Z ${mm(-plunge)}
          G38.2 X ${mm(-20)} ${speed(fastSeek)}
          G91 G1 X ${mm(1)}
          G38.2 X ${mm(-2)} ${speed(slowSeek)}
          G92 X ${mm(xoffset)}

          G91 G0 X ${mm(1)}
          G91 G0 Y ${mm(20)}
          G91 G0 X ${mm(-20)}
          G38.2 Y ${mm(-20)} ${speed(fastSeek)}
          G91 G1 Y ${mm(1)}
          G38.2 Y ${mm(-2)} ${speed(slowSeek)}
          G92 Y ${mm(yoffset)}

          G91 G0 Y ${mm(3)}
          G91 G0 Z ${mm(25.4)}

          M2
        `);
      }

Hey Patrick,

Interesting. The last time I thought of doing this, it was when I was thinking of implementing a hardware-based pause button (useful to be triggered by an emergency circuit). But since I don’t plan to use that controller, I didn’t pursue it.

Could you describe how you implemented this console command and possibly share the code? I assume you are plugged into the machine via ssh?

No, the only way I found for communicating with the machine was with the same protocol the onefinity controller website communicates in the MDI tab.

I have pushed my source code for that here: patr0805/BuildBotics_OnefinityProbeAutoCalibration (github.com)

The code isn’t really made with beuty in mind… as I had to rewrite things over and over as I found out what worked for me… take a look around and see if you can use any of it for your needs. I won’t work any further on it as I will need to rework it entirely for the onefinity elite once I get the upgrade.

1 Like