help with z touch off macro
-
Hello,
I'm looking for some guidance for adding my tool length sensor on my CNC router. I have a plate that closes a circuit when the tool touches it and it is 42mm tall. I want to write a probing macro that will take the spindle down until it touches the plate and then set the work coordinate system to Z=42mm.
My first thought was to use a G31 command and set the plate up as a Z probe, but there seems to be snag in that plan as the H parameter would need to be a very large number so I don't need to manually jog the spindle to within a few mm of the plate, and with a large value it retracts a large number and hits the max limit of axis and throws an error.So am I better off setting up the plate as a minimum z limit and use the G1 command with an H parameter? But then won't I change the G53 Z minimum rather than my work coordinate (G54)?
I need some guidance please.
Thanks.
-
I figured it out. It is the G38.2 command that I need.
-
@baird1fa said in help with z touch off macro:
G38.2
Do you mind sharing what your final config or setup for this was?