Automatic touchoff of face mill

More
7 years 8 months ago #126721 by cahlfors
I am having another go with this:

andypugh wrote: G53 G0 X[100 - #5410] Y100

It turns out that #5410 is always zero for me. I have added a non-zero diameter in the tool table for a specific tool, reload the tool table and change to that tool. Still zero.
Ideas?

/Chris

Please Log in or Create an account to join the conversation.

More
7 years 8 months ago #127187 by andypugh
Odd, it works for me in a simulator.

Please Log in or Create an account to join the conversation.

More
7 years 5 months ago #133557 by cahlfors
Had some more time to tinker with this. It turns out that #5410 et al contain information about the *current* tool, not the one we are changing *to* and so cannot be used in the remap code. I suppose that enabling cutter compensation would suffer from the same problem. Is there a way to find out the tool diameter in the remap code?

Please Log in or Create an account to join the conversation.

More
7 years 5 months ago #134174 by andypugh

cahlfors wrote: Had some more time to tinker with this. It turns out that #5410 et al contain information about the *current* tool, not the one we are changing *to* and so cannot be used in the remap code.


G43 takes an optional H parameter, so you can issue a G43 to load the offsets for the next tool and read out the diameter from #5410 without physically changing tool.
You probably then want to zero-out the offsets (G49) before probing and finally load the new offsets at the same time as issuing the M6.

Please Log in or Create an account to join the conversation.

More
7 years 5 months ago - 7 years 5 months ago #134997 by cahlfors

andypugh wrote: G43 takes an optional H parameter, so you can issue a G43 to load the offsets for the next tool and read out the diameter from #5410 without physically changing tool.
You probably then want to zero-out the offsets (G49) before probing and finally load the new offsets at the same time as issuing the M6.


I think we are OK on the G49. It is already in the remap code, but #<_selected_tool> still refers to the old tool. Where do I have the value for the new tool? It doesn't seem to be set until after M6 is complete?

Thanks,
/Chris
Last edit: 7 years 5 months ago by cahlfors.

Please Log in or Create an account to join the conversation.

More
7 years 5 months ago #135065 by andypugh

cahlfors wrote:

andypugh wrote: but #<_selected_tool> still refers to the old tool.


Which prolog are you using? The one I just looked at uses #<selected_tool> without the _

You need to do the M6 in your remap at some point anyway, why not do it early in the routine so the numeric parameters are accurate?

The following user(s) said Thank You: cahlfors

Please Log in or Create an account to join the conversation.

Time to create page: 0.313 seconds
Powered by Kunena Forum