Calculating Tool Offset - CNC

  • I use RRF3 to control a CNC router that I've built (printNC) and I've recently purchased a setting probe.
    The probe allows me to find the edges of a workpiece as well as the top of the workpiece. I also have a CNC touch plate

    What I'm looking to do with probe the top of the workpiece with the setting probe and using the touch plate to calculate the offset for each tool.
    So far, I have a macro setup which probes the top of the workpiece, the spoil board and the top of the touch plate and another macro to probe the top of the touch plate with the cutting tool fitted. Each coordinate is saved into a workpiece coordinate using G10 L2 PX.

    My question is, how do I recall those workpiece coordinates to allow a simple calculation to be carried out? Are they stored in the object model? Is there a gcode I can use to get them?

  • administrators

    There are two ways to use a Z probe to set the Z offset of a tool:

    1. Use G30 S-2. This has been implemented for some time.

    2. In RRF 3.2beta you can query sensors.probes[n].lastStopHeight and then use the result to calculate a new G10 Z parameter. I can't remember whether lastStopHeight is in 3.2beta1 or whether I added it subsequently, but the whatsnew file should mention it if it is in beta1.

  • administrators

    PS - you can also recall the workplace coordinates, you will find them within move.axes[n].

Log in to reply