Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using a tool offset for probing offcenter tools #386

Open
T4KUUY4 opened this issue Jun 11, 2024 · 7 comments
Open

Using a tool offset for probing offcenter tools #386

T4KUUY4 opened this issue Jun 11, 2024 · 7 comments

Comments

@T4KUUY4
Copy link

T4KUUY4 commented Jun 11, 2024

Hi,
Im unable to find out if its possible to use tool diameter offsets for toolchanging touch off´s so you can automatically touch off face mills etc.

Tools that are "deeper" in the center like face mills.

Is this possible in IoSender?

@terjeio
Copy link
Owner

terjeio commented Jun 17, 2024

Is this in combination with touch off @ G59.3?
FYI the toolchange workflow is run on the controller side, the sender is basically waiting for a cycle start to be issued (while allowing jog commands).

@T4KUUY4
Copy link
Author

T4KUUY4 commented Jun 18, 2024

Hi,
yea it is in combination with the automatic touch off at G59.3.

When using a normal size endmill, everything works out great. I hit M6 T5 for example, toolhead raises up, i change tool, click start and it moves over to the pin + touches off. All good for normal style endmills.
But facemills for example, are deeper in the center than on the outside (where the inserts are), so the measurement is not right.

These would require a different touch off position so the inserts touch the probe and not the center deeper dish of the facemill.
See examples below:
normal endmill
Offset FaceMill

Thanks in advance,
Tom

@terjeio
Copy link
Owner

terjeio commented Jun 19, 2024

In the next commit I will change the signature of an event and where it is called from to allow plugin code to modify the G59.3 target. A simple plugin will be something like this:

#include "grbl/hal.h"
#include "grbl/protocol.h"

static on_probe_toolsetter_ptr on_probe_toolsetter;
static on_report_options_ptr on_report_options;

bool probeToolSetter (tool_data_t *tool, coord_data_t *position, bool at_g59_3, bool on)
{
    if(on && tool && position) {

        if(tool->tool_id == 5)
            position->y += 5;
    }

    if(on_probe_toolsetter)
        on_probe_toolsetter(tool, position, at_g59_3, on);

    return true;
}

static void report_options (bool newopt)
{
    on_report_options(newopt);

    if(!newopt)
        hal.stream.write("[PLUGIN:Toolsetter tool offset v0.01]" ASCII_EOL);
}

void my_plugin_init (void)
{
    on_probe_toolsetter = grbl.on_probe_toolsetter;
    grbl.on_probe_toolsetter = probeToolSetter;

    on_report_options = grbl.on_report_options;
    grbl.on_report_options = report_options;
}

A more complete plugin should be made that allows setting the offset(s) for multiple tools and store them in EEPROM. And maybe later incorporate the code into the core itself.

@T4KUUY4
Copy link
Author

T4KUUY4 commented Jun 19, 2024

This sounds great. Cant wait for it to happen.
Thanks a bunch

@terjeio
Copy link
Owner

terjeio commented Jul 8, 2024

Here is a plugin for you to test:
my_plugin.zip

It has five slots (compile time configurable) for specifying tool offset (radius), applied in the X direction (should be configurable via setting?). Configuring a slot is via M102: M102 P<slot> T<tool> R<tool radius>

I do not know if this plugin cover the needs for probing odd tools, feedback is required before I add it as an option in the Web Builder.

@T4KUUY4
Copy link
Author

T4KUUY4 commented Jul 9, 2024

Thanks, Ill give it a spin soon and then ill let you know if any issues come up.

@m-basov
Copy link

m-basov commented Jul 23, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants