View Full Version : Auto Tool Zero


Moondog
06-14-2006, 05:44 AM
On the main screen of Mach2 there is a button & DRO called Auto Tool Zero?... how does this work?... I cannot find anything relating to this in the documentation.

I am wanting to use an electric tool touch switch for setting Z 0.

How best to achieve this.

cheers


Frans

Moondog
08-15-2006, 04:07 AM
Thought I would bring this to the top again.... anybody have any ideads... I am sure the Button is there for a reason.



On the main screen of Mach2 there is a button & DRO called Auto Tool Zero?... how does this work?... I cannot find anything relating to this in the documentation.

I am wanting to use an electric tool touch switch for setting Z 0.

How best to achieve this.

cheers


Frans

mikkojay
12-18-2006, 09:50 PM
OK, My turn...
I have 2 machines- a home-built benchtop mill running Mach2 (see pic) and a Techno-Isel gantry wood router.
My Techno machine has a great software feature, MS Dos no less, that allows for auto tool touchoff.
Here is how it works-
1) place a board in the X-Y pivot point. This lines up to X & Y = zero.
2) place the metallic touchswitch on top of the board
3) start software touchoff process, z axis starts to drop
4) at the instant the tool touches the switch, z backs off a predetermined amount.
5) z height/position is calculated to be touchoff point - switch thickness - distance backed off

It is VERY simple, and works like clockwork, a real no-brainer.

Is there ANY way to do anything comparable with Mach software?

Thanks, Mike

powerr
12-18-2006, 10:36 PM
yes but you have to write your own scipt for the button. i've done a couple of the for setting zero and tool length. and when i find them i will post example. if you go to the yahoo mach group you can find examples to get you started under files and probes.

mikkojay
12-18-2006, 11:05 PM
Hey powerr,
If you can dig up a sample, that would be right on!
It sux having a machine that is accurate to .0001, but when you try to set zero on your material, you hold up your thumb, squint, and eyeball it to around .01 or so (if that). That just goes beyond ridiculous man! I want to do some really micro milling now that I have this thing all put together.
Did you notice the touchswitch in my earlier post? It is a spongy base with a metal plate on top. This allows about .5" of "give" so that if the Z axis continues to drop, it won't try to drive the bit down into the switch/work.

Thanks, Mike

turmite
12-19-2006, 12:19 AM
Hey guys the Auto tool set button in Mach is just that. I have my machine set up with a permanent switch under the z axis while the machine is homed. My sequence starts like this. I reference the machine when I power up, hit the go to zero's and then place what bit I need for the job in the collet, hit auto tool set and the z axis will lower till the switch is tripped then move 2" above the switch which gives me a know distance above either my table or my 4th axis centerline. Now the newer versions of mach may require tweaking for your own needs but it can be done quite easily.

Mike

Syil_Australia
12-19-2006, 02:35 AM
I didn't think the Auto Tool Zero on the main screen worked.... Even Art said it wasn't implemented.

However you can use the Z home switch function to Zero your Z axis. If you set up a switch such as a limit switch that is moveable you can position it under your tool and hit the Z reference button. The Z then lowers until it touches the switch and backs off. If your switch is say 20mm you enter this amount in the Home Switch Offset in diagnostics.

Works brilliantly.

cheers

Frans

turmite
12-19-2006, 09:18 AM
I'm still using Mach 2 and it for sure works in 2. I have run 3 but do not remember if I copied my script over from 2 or not. I have a very unique situation that requires I use G92 and my tool set function is scripted using that rather than the tool offsets that I "think" they are trying to implement for the current version. The best way to get a direct answer on this is go to either the mach support site or the yahoo users group. I sometimes don't bother answering questions related to this because of my special use of the function but Moondog sounded desperate!;)

Mike

mikkojay
12-19-2006, 10:08 AM
I like the idea of combining the Z home switch with determining tool height to work surface zero. Last night I wondered about using my Z axis' "bottom" limit switch somehow, since the TRUE bottom limit consists of a tool bit grinding into your table surface! Arghhhhh! My current Z home switch is located about 2/3 towards the top of the Z axis. Why? For lack of a better idea at the time I was mounting it... Thanks for the ideas thus far- I will let you know what happens. I will most likely use a metallic touch switch similar to the one I use on my Isel machine. The +5v will ground on the home switch when the tool bit touches the switch. Then it will back off a reasonable amount. Sounds like a plan. I'll let you know how it goes.
I would like to try cutting a PCB or two, with minimum depth cuts- so accurate Z zero will be very important.
Thanks, Mike

InspirationTool
12-19-2006, 10:40 AM
Mikko, I don't have a switch, but I use a gauge block to set the Z...

Test by sliding block under bit... if it slides, drop .001, if it doesn't, raise .001... lather rinse, repeat.

Much better than by eye :)

-Jeff

mikkojay
12-19-2006, 06:30 PM
Hey Syil,
I see "origin offset" and "axis offset" in the diagnostics screen, but I do not see one called "Home Switch Offset". Are we talking about Mach 2? I tried the ones I mentioned, and they did not seem to do anything.
I reversed the logic on my Z axis home switch, so now it starts to creep downward while looking for a ground (like I want it to). I am currently faking it out by waving something thru the light sensor to make it stop. It just stops, which is a good start, but I have yet to get it to back off & calculate the "fudge factor" for switch thickness. I am going to splice into my home sensor in order to ground the line with a touch-switch as planned.
Thanks, Mike

powerr
12-21-2006, 07:05 PM
here i one for machine zero. i use this to set the spindle and then apply tool off sets. i would not try to use this on a diffrent machine its just a example that works for me. your best bet is to goto mach home page and look up and read the cutomizing wiki.

feed = getdro(18) 'gets feedrate

If issuchsignal(22) Then 'checks for probe signal

code "g31 z-7 f35" ' fast move to probe/height sensor set z move to your height
While ismoving()
Wend

sensor = getoemdro(85) 'machine z refrence

pullback = sensor + .1 'add .1 to sensor height


code "g53 g01 z" & pullback 'moves the z axis away from sensor
While ismoving()
Wend

nextmove = getoemdro(85) 'get machine z axis

move = nextmove -.11 ' adds .11 to machine axis for slow move down


code "f1" 'changes feed rate
code "g31 z" & move 'moves the z axis to sensor slow
While ismoving()
Wend

ofst = getoemdro(1001) ' dro that i added for the tool height sensor
code "G4P.10" 'pause 10
While ismoving()
Wend

Call SetDRO(2,ofst) ' sets z axis for program

code "g01 z" & ofst + .25 'sets z axis .25 above sensor
While ismoving()
Wend

code "f " & feed 'feedrate back to normal

End If

End

to find the height of my sensor i take the spindle all the way down to the table and use a guage block to set machine zero then set the sensor up and use another set of code to find the sensor height. there is also another set of probe variblesx=(2000),y=(2001),z=(2002) this gets the actual probe point of contact because the spindle will move past this point while it is coming to a stop. i found out about this after i did the code above and just never went back to change it. (thats why i did a fast probe and a slow probe) you guys really need to read the Wiki and look at the files on the mach group under probing. if i felt it was safe i would write some files for you but you never know how others have their machines set up and it's not a risk i want to take with your equipment. play around and keep you e-stop close.
by tha way i can't remember how many times i crash my machine into the probe.

mikkojay
12-22-2006, 12:20 AM
Hey Man,
Thanks for the scripts- it gets me thinking.
Looks like a homegrown type of script that I am not 100% fluent in.
The handy e-stop is oh so gospel!
Looks like it is time to experiment!
Thanks to everyone for all the great input on this one.
I have seen a few people here and there ask similar questions, but for such fundamental functionality, you would think that there would be a little bit more noise on the subject.
Happy holidays by the way- health and happiness to you all!
(peel away from the project for a minute and remember what Xmas is about- I'm doing my best)
Thanks, Mike

powerr
12-22-2006, 06:02 PM
it's visual basic, easy learn