Questions for setting up Z tool probing during homing and tool change

More
05 Aug 2024 06:14 #306968 by RyanB
Hi, I am kind of buried in different articles and threads for Z tool probing and was hoping someone could help me out with a few questions.

My goal is to set up a probe script that that moves the machine to a set XY location and runs the Zaxis down until it hits a contact plate and sets that as the machine's Z axis 0. I want this done during initial homing and during manual tool changes (after hooking up an alligator clip) when linuxcnc prompts to continue.

I understand that running the pncconf wizard will wipe out any changes made manually to the ini files, so I've been avoiding doing anything outside of the config wizard for fear of losing work. How would I create a gcode script that isn't overwritten?

When linuxCNC prompts for a tool change, is there a way to run said script when you confirm before it continues its job?

Is there a way to do this using the Halui command section of the pncconf wizard? As I mentioned I am a bit leery about forgetting to back up my work and loosing it.

I am using linuxcnc 2.9.0 and the Axis Gui.

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

More
21 Aug 2024 15:18 #308300 by Todd Zuercher
I don't think trying to make this part of the machine homing is a good idea. The main problem I see with trying to do this is: How could Linuxcnc know if the current Z position at switch on is high enough to safely move the XY over the probe position? There would be other difficulties that I don't see any good answer to as well but that one is might be the most insurmountable.

I think it would be better to configure the Z axis with a regular limit/home switch at the top of Z travel and home the machine in a conventional fashion. Then use your probe routine to set your tool and or workspace offsets for the Z.

There are multiple ways to configure your machine to automatically probe the Z at tool changes. One of the ways that is well documented is to remap the M6 code to do your probing routine. Another very simple option would be to simply write an o-code subroutine that you insert immediately after tool changes in your g-code files.

You can specify subroutine storage directories in the ini file of your config. And since they are simply ordinary computer files, you can protect them with the usual file write protection settings and file permissions available in Linux.

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

Moderators: cmorley
Time to create page: 0.185 seconds
Powered by Kunena Forum