PDA

View Full Version : Z axis zero indicator switch



cnc rider
09-28-2006, 06:17 AM
Hello all

I´m trying to get Mach3 work with a zero tool indicator with a built in switch that connects to the Mach 3 inputs. I want to slowly lower the Z axis util it touches a plate and triggers the microswitch. Then it should back off until the switch opens again (like homing) and write this value plus the hight of the zero indicator device directly into the Z DRO. This will give me z zero between tool changes. Preferably it should do three "probings" on a row, calculate the mean value and use this for setting the Z DRO. Using G31 will write the values to a file, and it doesn´t back off like homing does. Is there a way to do this? Many thanks ye all!

:banana:

ger21
09-28-2006, 07:12 AM
This might get you started.
http://www.cnczone.com/forums/showthread.php?t=19855

cnc rider
09-28-2006, 09:14 AM
It work a treat! Thanks!
Just have to do some additioal lines to get it to touch a couple of times. Haven´t figured out yet how to store three measurements and do the average of them, but i think that will be solved soon.

manyhanks for your quick reply!

Pete

spalm
09-28-2006, 10:07 PM
Pete,

Please share your solution once you got it all figured out.

Steve

ger21
09-29-2006, 12:00 AM
Instead of using SetDRO, I think there's a GetDRO that will let you get the current Z position. Store it in a variable, and repeat two more times and take your average. Now how does the average relate to the switch?