Tool probe after tool change - while running program

More
08 Jan 2021 17:28 - 08 Jan 2021 17:37 #194520 by risfutile
Hi there,

what I'm trying to do: running a g-code subroutine right after a tool change even when a g-code program has been started.

What I've done so far:
I've "branched" my own version of the hal_manualtoolchange.py that does an MDI subroutine call that does the actual probing.
It all works fine as long as I call the subroutine in MDI mode where no other g-code program is running.
I figure that's a given. It would make sense to me that LinuxCNC won't run "2 programs" at once.

Also I need to touch off the newly inserted tool before the hal_manualtoolchange.py sets the "changed" pin. So LinuxCNC still thinks it's touching off the old tool. I could do a workaround for that, but it all doesn't seem pretty.


What I'm wondering now: am I even on the right path? Or is there no other way than to probe all tools before I start my program?
Or should I try to stop the current program, run the subroutine and continue the program?
Should I do it all in the post-processor of CAM?

Cheers,
Michael
Last edit: 08 Jan 2021 17:37 by risfutile.

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

More
09 Jan 2021 21:44 #194652 by aleksamc
Try to look G-code remap doc

I think it will help to solve your problem.
The following user(s) said Thank You: risfutile

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

More
10 Jan 2021 13:54 #194725 by andypugh

What I'm wondering now: am I even on the right path?


I don't think that you are (but it's an imaginative approach).
There is a provided sample config that probes the tool after tool change using G-code remapping.

Look at sim->axis->remap->manual_toochange_with_tool_length_switch
The following user(s) said Thank You: risfutile

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

More
31 Jan 2021 19:24 #197238 by risfutile
Thanks Andy and Aleksamc!
Terribly sorry, the mail notification wasn't working.
I'll have a look at g-code remapping. Sounds exactly like the pointer I needed.

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

Time to create page: 0.071 seconds
Powered by Kunena Forum