Auto Z-check

More
23 Feb 2018 06:45 - 23 Feb 2018 06:59 #106375 by dannym
Auto Z-check was created by dannym
I built a CNC router at our community shop. People keep gouging the spoilboard. We allow top or bottom Z datum.

So, what I'd LIKE to do is permanently mount a tool sensor like, say, 1.3" above the spoilboard, outside the normal work area (it's got enough extra y width). Whenever a job is started, lift to max Z, jog off to the side location of the tool sensor, drop down until it detects the tool tip. If the lowest Z anywhere in the g-code is lower than 1.4" from there, just refuse to start the G-code.

Here's an additional rub- the tool sensor should be outside the allowable Y-travel. So you can't mill into it. But it needs to be able to go there.

Additionally, the UI should have a "Auto Bottom Datum" button that, if checked, will set the new work coordinate Z=0 to be 1.3" below the tool sensor, AND refuse to run a job with work coords below z=-0.1".

I do see LinuxCNC scans the file when loaded and shows what the lowest Z is, but I don't see where that's accessible to g-code. Nor do I see any way to move the limits temporarily so it can get to the tool sensor in an out-of-bounds area.

I did note some oddities in the graphical display not updating when work offsets changed until reloaded, but it didn't actually affect the run. Any way to fix that?

How would this work? Can it go within a g-code script or would it need to be compiled code or Python? It does sound basically the same thing as touching off new tool height after an ATC tool change.
Last edit: 23 Feb 2018 06:59 by dannym.

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

More
23 Feb 2018 14:35 #106386 by Todd Zuercher
Replied by Todd Zuercher on topic Auto Z-check
I am afraid that you are going to find that nothing you do is going to totally prevent things like this from happening. It is going to happen when you just let anyone run or program a machine like this. Even if you can get a perfect set up, that will prevent any programed milling too deep, some idiot will put in a tool improperly in a collet (too loose, dirty or use a worn out collet) and the tool will walk out of the collet and gouge the table anyway.

Here is how I would try to create your auto probe routine:
Set up a script that inserts the tool probe sub at the start of every g-code file when it is started.
Set up an offset using a hal offset component that adds the nessisary amount to the y-axis joint motor position command use a mux to turn on/off the offset. (you might also need to use a limit3 in there to control the speed to prevent following errors).
And the probe routine, would G53 to the end of normal travel where the probe is (Y0 or Ymax which ever it is) then either command a hal bit with M62-M65 turn on, or custom M code to setp the Y-probe offset to move over the touch probe, probe the tool, and G10 what ever setting you choose to use, then turn off the Y-probe offset by reversing what ever method you used to set it.

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

More
23 Feb 2018 14:48 #106388 by Todd Zuercher
Replied by Todd Zuercher on topic Auto Z-check
I still don't see how you could totally prevent programming errors in the G-code from wrecking your table. For example simple mistakes using G43, G43.1, or G43.2 could easily circumvent your best efforts to prevent this problem.

I'm not saying that trying to do this is a bad idea, it's a great idea, and could easily prevent 75% or more of your problems. Just don't get your hopes up for a perfect idiot proof solution.

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

More
24 Feb 2018 03:17 #106420 by dannym
Replied by dannym on topic Auto Z-check
Nobody uses complicated G-code, just CAM-generated G0/G1 and maybe arcs. Aside from mechanical failure this should be fine.

My question here is HOW to do it!

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

More
01 Mar 2018 14:29 #106807 by andypugh
Replied by andypugh on topic Auto Z-check

Nobody uses complicated G-code, just CAM-generated G0/G1 and maybe arcs. Aside from mechanical failure this should be fine.!


Adding a probe to the start of every G-code file could be done with an input filter:
linuxcnc.org/docs/2.7/html/config/ini-co...html#_filter_section

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

Time to create page: 0.171 seconds
Powered by Kunena Forum