Hello Guest it is April 19, 2024, 08:07:44 AM

Author Topic: Tool zeroing macro help  (Read 25846 times)

0 Members and 1 Guest are viewing this topic.

Tool zeroing macro help
« on: November 08, 2012, 08:01:40 PM »
Hi everyone,

I need some help on writing a macro for zeroing the tool. I always zero the tool by the center of the work piece, so I touch one side of the piece with the tool or edge finder, then zero it, go to the other side and touch the piece again; then I divide the DRO value by 2 and that's it. same procedure for both x & y axis.
So, here's my idea: a macro that would get the DRO value, divide it by two, move the axis to this new value and zero the tool.
Can anyone help me writing this?

Thanks
Re: Tool zeroing macro help
« Reply #1 on: March 15, 2013, 11:09:25 AM »
Did you find out how to do this?  Should be very easy, I have written macros to set tool zero using a probe and it's trivial.
Re: Tool zeroing macro help
« Reply #2 on: March 15, 2013, 11:38:18 AM »
Did you find out how to do this?  Should be very easy, I have written macros to set tool zero using a probe and it's trivial.

Thank you John.
Hood gave me some help on this. It was a pretty simple code actually. Now I save some time on zeroing.
Re: Tool zeroing macro help
« Reply #3 on: March 15, 2013, 12:04:41 PM »
OK, glad you're sorted!
Re: Tool zeroing macro help
« Reply #4 on: November 01, 2013, 05:47:09 PM »
Hello Everyone!!!!
a newbine  here. please help with  script for Autozeroing. my touch plate is .1250 inc.  it was working fine but suddenly stop working now I can't autozero. I thanks a million in advance.
Re: Tool zeroing macro help
« Reply #5 on: November 02, 2013, 06:18:34 AM »
Can you be more specific?  What script were you using?  What are the symptoms? Can you attach the script? Have you checked the probe input is working using the diagnostics screen?
Re: Tool zeroing macro help
« Reply #6 on: November 17, 2013, 05:30:18 PM »
hey JohnHaine, thanks so much for your prompt help, I did no answer earlier because I have been too busy at work but anyway.
yes I have tested  and double checked the probe and is working fine, the pin light illuminates when touching the probe to my bit.  this is the original script I was using and the second one I have tried after the first one stop working but also without any positive outcome.
Message ( "Auto zeroing...:)
If  IsSuchSignal (22)Then
code "G31 Z-3 F20"
While IsMoving()
Wend
Call SetDRO( 2, .125)
code "G1 Z1"
End If

and the second one

PlateThickness =GetUserDRO (.125)
If GetOeled (825)<>0 Then
DoOEMButton (1010)
Code "G4 P5"
Code G31 Z-.75 F10"
While IsMoving()
Wend
ZProbePos =GetVar(2002)
Code"G0 Z" &ZProbepos
While IsMoving()
Wend
Call SetDro (.125)
Code "G4 P0. 125"
Code "G0 Z1"
Code"(Z axis is now zeroed)"
Code "(Z-Plate is grounded, check connection and try again)"


I hope that you can help with a good one.   and thanks a million in advance

good luck
Re: Tool zeroing macro help
« Reply #7 on: November 18, 2013, 06:54:02 AM »
Apart from "it doesn't work", what are the symptoms?  Does it not start when called, or does it not stop when the probe contacts?  I'm happy to send you a copy of my macro (which I know works, or did last time I used it on Saturday!) but the fact that your initial one used to work but doesn't now indicates that something has changed.
Re: Tool zeroing macro help
« Reply #8 on: November 18, 2013, 08:20:22 AM »
doesn't do anything at all but an script error appears in the status line.
as always!!!!!  thanks a million in advance
 Godspeed
Re: Tool zeroing macro help
« Reply #9 on: November 18, 2013, 08:24:57 AM »
ohhh, and also I must mention that I have taken my cnc all apart to rebuilded which is now completed however, I'am 100% sure everything was connected in the same way I originally built it meaning that all the pin #s outputs and inputs are the same as in the former cnc.

thanks and
Godspeed