ok so first off thanks for all the help so far even if I just joined I have been reading and looking through here for a while.
anyway to the point.
I have a Taig cnc mill and I got it with an Auto tool setter or so Deepgroove1 calls it. pretty much from what I have learned it's a 5 way switch. My machine doesn't currently have home switches (next project after I get this figured out. What I'm trying to do is get the machine to auto set the tool length after I do a manual tool change. But the script I came up with seams to give me a compiling error every time. Originally I started with a script I found online to use the auto tool zero button on the mach3 program run tab it worked but it resets Z zero for the work offset rather than setting the tools length in the register. which is not what I wanted and with that macro I had to place the tool setter on the work piece I want to mount it to my table and give it a location Say (g59p200) any way heres where I got the first macro
https://drive.google.com/file/d/0B2hPzRSbcroXSU9veTVwUjhfbjQ/edit so over time I came up with a complete from scratch macro and can't get it to work either. I was giving it it's own Mcode 901 and then I just add it to my normal gcode.
So here's what I'm wanting the macro to do.
be assigned it's own M code (currently 901)
Not affect the work offset
Set the tool length in the register for the requested tool#
Pause to give time to change the tool (ideal would be a message box where the ok button would allow the macro to move forward)
Once tool is measured continue with the program without any more input from me.
I'm attaching my own macro in txt document file form. I wrote it on notepad as I read that word and all cause problems.
any help would greatly be appreciated. In the end I want this to work but I would also like to know where I went wrong so I could change it later if I change my setup. I really I really want to add home switches and I have everything Just wanted to use the auto tool setter with everything I make on this mill.