Auto Tool Zero button fixed position???

Post Reply
pontiac1978
Vectric Apprentice
Posts: 9
Joined: Sun May 03, 2015 9:55 pm
Model of CNC Machine: CRP4896

Auto Tool Zero button fixed position???

Post by pontiac1978 »

Hello Everyone. Its been a while since I've been on.

I have been racking my small brain on trying to get my "Auto Tool Zero" button in Mach3 to goto a "Fixed" position to zero the tool. I have a permanent "Zero plate" fixed to the machine. Right now I basically have to move the Spindle over to the fixed plate and then hit the button to zero. I would like to be able to hit the button and it goes from wherever the spindle is to the location (fixed plate) I set to Zero the tool. Here is the Generic code I have now:

Dim Zprobe, Zretract, ZfeedRate

'Note: TouchPlateHeight represents the actual height of the
' Auto Z Touch Plate from the work surface.
' Minor adjustments can be made for calibration purposes (use caution)
TouchPlateHeight = .089

Message( "Auto Tool Zeroing..." )

If IsSuchSignal (22) Then
isMetric = GetOEMLED(801)
Zprobe = -3
Zretract = 1.5
ZfeedRate = 10
If isMetric = 0 Then
Zprobe = Zprobe * 25.4
Zretract = Zretract * 25.4
ZfeedRate = ZfeedRate *25.4
TouchPlateHeight = TouchPlateHeight * 25.4
End If
Call SetDRO( 2, 0.00 )
code "G31 Z" & Zprobe & " F" & ZfeedRate
While IsMoving()
Wend
Call SetDRO( 2, TouchPlateHeight )
code "G1 Z" & Zretract
End If


I would appreciate it if you could add to this simple code to have the machine goto a specific X,Y,Z location to Zero the tool when the "Auto Zero Tool" button is pressed.

Thank You and have a SAFE & Happy Thanksgiving! Gobble Gobble!!! :-)

ger21
Vectric Wizard
Posts: 1542
Joined: Sun Sep 16, 2007 2:59 pm
Model of CNC Machine: Custom DIY
Location: Shelby Township, MI, USA
Contact:

Re: Auto Tool Zero button fixed position???

Post by ger21 »

The following code should do it. You need to change the values for PlateX and PLate Y to your fixed plate coordinates, in Machine Coordinates, and you need to home your machine before running this. Homing is required so that Mach3 knows where your plate is.

Is your fixed plate on your spoilboard? And are you zeroing to the spoilboard? If not, then I don't know how this works?

Code: Select all

Dim Zprobe, Zretract, ZfeedRate
Dim PlateX, PlateY

'Note: TouchPlateHeight represents the actual height of the
' Auto Z Touch Plate from the work surface.
' Minor adjustments can be made for calibration purposes (use caution)
TouchPlateHeight = .089

Message( "Auto Tool Zeroing..." )

If IsSuchSignal (22) Then
isMetric = GetOEMLED(801)
Zprobe = -3
Zretract = 1.5
ZfeedRate = 10
PlateX = 10
PlateY = 10
If isMetric = 0 Then
Zprobe = Zprobe * 25.4
Zretract = Zretract * 25.4
ZfeedRate = ZfeedRate *25.4
TouchPlateHeight = TouchPlateHeight * 25.4
PlateX = PlateX * 25.4
PlateY = PlateY * 25.4
End If
Code "G53 G0 X" & PlateX & " Y" & PlateY
Call SetDRO( 2, 0.00 )
code "G31 Z" & Zprobe & " F" & ZfeedRate
While IsMoving()
Wend
Call SetDRO( 2, TouchPlateHeight )
code "G1 Z" & Zretract
End If
Gerry - http://www.thecncwoodworker.com

pontiac1978
Vectric Apprentice
Posts: 9
Joined: Sun May 03, 2015 9:55 pm
Model of CNC Machine: CRP4896

Re: Auto Tool Zero button fixed position???

Post by pontiac1978 »

Thank You and I will give it a Try and let you know how it does. Yes the plate is located on the spoilboard and yes I am zeroing Z from the spoilboard. Which PlateX & PlateY are you meaning to change?

PlateX = 10
PlateY = 10

-OR-

PlateX = PlateX * 25.4
PlateY = PlateY * 25.4


I figure its the top PlateX PlateY, its always better to ask Questions, versus buying parts after a crash :-)

Thank You

ger21
Vectric Wizard
Posts: 1542
Joined: Sun Sep 16, 2007 2:59 pm
Model of CNC Machine: Custom DIY
Location: Shelby Township, MI, USA
Contact:

Re: Auto Tool Zero button fixed position???

Post by ger21 »

Yes, change it at PlateX=10.

The other lines scale the values if the machine is in metric mode.
Gerry - http://www.thecncwoodworker.com

bravesoul
Vectric Apprentice
Posts: 198
Joined: Thu Sep 11, 2014 8:53 pm
Model of CNC Machine: ShopBot PRT ALPHA 48"x96"
Location: Cleveland, TN
Contact:

Re: Auto Tool Zero button fixed position???

Post by bravesoul »

You could enter this into your post processor at the 'End of File' area. That would be my preference as you wouldn't have to do anything special at the end of each file.. I have 2 post processors, one without the return to home and one with a specific location. Hope that helps.

pontiac1978
Vectric Apprentice
Posts: 9
Joined: Sun May 03, 2015 9:55 pm
Model of CNC Machine: CRP4896

Re: Auto Tool Zero button fixed position???

Post by pontiac1978 »

The code worked Perfect! Thank you for all your Help! Have a Wonderful Christmas!

pontiac1978
Vectric Apprentice
Posts: 9
Joined: Sun May 03, 2015 9:55 pm
Model of CNC Machine: CRP4896

Re: Auto Tool Zero button fixed position???

Post by pontiac1978 »

Here is what I am doing, so its not such a mystery. I am cutting shapes out of the same thickness of plywood (1/2") every time. Since plywood can arch up slightly, I was noticing that I would get an incorrect Zero after changing the bit. This would cause me to have to stop in mid-program and adjust the Z accordingly (could take 2-3 times get right). Whenever I get the bit to where its just cutting thru the Plywood i took a measurement at the spindle to get the length of bit sticking out. Since I use the same bits, and same plywood thickness this helps tremendously. I just thought that having a "Fixed" spot would keep me from having to get out the calipers and measuring every time on a bit change.

Thanks for your help Guyz n Galz!

aka - HeadZombie :D

User avatar
mtylerfl
Vectric Wizard
Posts: 4447
Joined: Thu Jan 29, 2009 3:54 am
Model of CNC Machine: -CarveWright CNC -ShopBot Buddy PRSAlpha
Location: Brunswick, GA
Contact:

Re: Auto Tool Zero button fixed position???

Post by mtylerfl »

pontiac1978 wrote:Here is what I am doing, so its not such a mystery. I am cutting shapes out of the same thickness of plywood (1/2") every time. Since plywood can arch up slightly, I was noticing that I would get an incorrect Zero after changing the bit. This would cause me to have to stop in mid-program and adjust the Z accordingly (could take 2-3 times get right). Whenever I get the bit to where its just cutting thru the Plywood i took a measurement at the spindle to get the length of bit sticking out. Since I use the same bits, and same plywood thickness this helps tremendously. I just thought that having a "Fixed" spot would keep me from having to get out the calipers and measuring every time on a bit change.

Thanks for your help Guyz n Galz!

aka - HeadZombie :D
If you are setting your Z-Zero to the spoilboard surface (aka the Bottom of your material), I would think you should be getting clean cut-throughs 100% of the time regardless whether the material is slightly "arched".

Naturally, your spoilboard must be surfaced flat and be perpendicular to the bit over the entire machining area. Unless I'm missing something or misunderstanding you, then you can set your Z-Zero at the same spot and have consistent cut-throughs.
Michael Tyler

carvebuddy.com

facebook.com/carvebuddy

-CarveWright CNC
-ShopBot Buddy PRSAlpha CNC

User avatar
Adrian
Vectric Archimage
Posts: 10238
Joined: Thu Nov 23, 2006 2:19 pm
Model of CNC Machine: ShopBot PRS Alpha 96x48
Location: Surrey, UK

Re: Auto Tool Zero button fixed position???

Post by Adrian »

I was just typing out the same reply as Michael when he posted.

If you're zeroing to the table surface it would cut through every time regardless of the variations in thickness. It's how I've worked for years with an adjustable (to take account of spoilboard resurfacing) fixed z-zero point.

User avatar
adze_cnc
Vectric Apprentice
Posts: 845
Joined: Sat Jul 27, 2013 10:08 pm
Model of CNC Machine: AXYZ 4008
Location: Vancouver, BC, Canada

Re: Auto Tool Zero button fixed position???

Post by adze_cnc »

ger21 wrote:The other lines scale the values if the machine is in metric mode.
I'd alter the:

Code: Select all

PlateX = PlateX * 25.4
PlateY = PlateY * 25.4
to

Code: Select all

PlateX = PlateX * ConversionFactor
PlateY = PlateY * ConversionFactor
plus setting ConversionFactor to either 1 or 25.4 for inches or mm earlier.

Steven

Post Reply