Machsupport Forum

Mach Discussion => General Mach Discussion => Topic started by: PerE on September 13, 2006, 09:50:55 AM

Title: Macro for Z-axis probe
Post by: PerE on September 13, 2006, 09:50:55 AM
I want a simple macro that lower the z-axis down until i hits the probe and then the thickness (that i know) of the probe get into the z-axis DRO.
Do i have to put the thickness of the probe in the macro or can the macro ask me if i want to set another thickness of the probe and save it even if i switch the computer off ?
Best regards from
Per
Title: Re: Macro for Z-axis probe
Post by: Brian Barker on September 13, 2006, 07:04:32 PM
I think if you look there is a tool probe macro on the forum that will do just that! It is a few messages down and if you can't find it post here and I will help you :)

Thanks
Brian
Title: Re: Macro for Z-axis probe
Post by: PerE on September 14, 2006, 04:17:37 AM
Thanks Brian.
I have read it before and i thought it was just a toolchanger macro but i will read it again and try to write my own code.
When i think i am done so will i post it here.  :)
Per
Title: Re: Macro for Z-axis probe
Post by: Brian Barker on September 14, 2006, 07:10:47 AM
if you have any trouble please feel free to post your questions
Title: Re: Macro for Z-axis probe
Post by: PerE on September 14, 2006, 07:19:19 AM
Thank you again.
Ihave made this one and it is working now for me. Maybe you can do this better but it works.
Code”G31 Z-100 F25” ’Down with Z
While IsMoving()
Wend
GetVar(2002)’Hit the probe
Call SetDRO(2,2.000)’Sets the probehigh
Code”G00 Z10.000"’Safehigh

Per
Title: Re: Macro for Z-axis probe
Post by: PerE on September 14, 2006, 08:03:25 AM
To clear this what i am doing:
I have an isolated plate that is 2.000 mm thick that i put on the surface of my workingpiece and it is connected to pin 13 at port 2.
Its a very simple macro but it helps me to set the tool more accurate then a piece of paper  ;)
Per
Title: Re: Macro for Z-axis probe
Post by: Brian Barker on September 15, 2006, 10:15:09 PM
Great job! Nice to see that you got there data on the forum to work for you...

Keep up the good work
Brian
Title: Re: Macro for Z-axis probe
Post by: rem300wm on September 24, 2006, 06:58:09 PM
I will like to ask when You write a macro How and where do You actually put the code? at the beginning of the gcode? or is this a separated issue? I have just started with Mach  so patience will be appreciated.
Thank You,Marco.
Title: Re: Macro for Z-axis probe
Post by: PerE on September 25, 2006, 03:47:52 AM
Hi Marco.
This macro is in the Mach3 screen "program run" - "tool information" and i put it in the button "auto tool zero".
You have to write the macro in notepad or word then copy it.
After that you have to open Mach3Screen and double clic on the "auto tool zero" button then paste the macro you have in there.
Hope this will help you a little bit.
Good luck.
Per
Title: Re: Macro for Z-axis probe
Post by: rem300wm on September 25, 2006, 02:47:39 PM
Thank You for the fast responce Per,Marco.
Title: Re: Macro for Z-axis probe
Post by: jldesigns on March 24, 2007, 05:01:40 PM
I keep trying to auto z and the machine goes up does not z out first
Title: Re: Macro for Z-axis probe
Post by: Brian Barker on March 24, 2007, 11:37:22 PM
Put in a G91 to make the move incremental

Also be sure to put a G90 at the end of the macro