Auto Tool Zero button fixed position???

Auto Tool Zero button fixed position???

Postby pontiac1978 » Thu Nov 23, 2017 5:41 am

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!!! :-)
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???

Postby ger21 » Thu Nov 23, 2017 5:54 am

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
ger21
Vectric Wizard
 
Posts: 1029
Joined: Sun Sep 16, 2007 2:59 pm
Location: Shelby Township, MI, USA

Re: Auto Tool Zero button fixed position???

Postby pontiac1978 » Fri Nov 24, 2017 9:22 am

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
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???

Postby ger21 » Fri Nov 24, 2017 12:22 pm

Yes, change it at PlateX=10.

The other lines scale the values if the machine is in metric mode.
Gerry
ger21
Vectric Wizard
 
Posts: 1029
Joined: Sun Sep 16, 2007 2:59 pm
Location: Shelby Township, MI, USA

Re: Auto Tool Zero button fixed position???

Postby bravesoul » Fri Nov 24, 2017 1:08 pm

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.
bravesoul
Vectric Apprentice
 
Posts: 147
Joined: Thu Sep 11, 2014 8:53 pm
Location: Cleveland, TN
Model of CNC Machine: ShopBot PRT ALPHA 48"x96"

Re: Auto Tool Zero button fixed position???

Postby pontiac1978 » Mon Nov 27, 2017 11:15 am

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???

Postby pontiac1978 » Wed Feb 14, 2018 3:09 pm

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
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???

Postby mtylerfl » Wed Feb 14, 2018 3:34 pm

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
mtylerfl
Vectric Wizard
 
Posts: 2974
Joined: Thu Jan 29, 2009 3:54 am
Location: Brunswick, GA
Model of CNC Machine: -CarveWright CNC -ShopBot Buddy PRSAlpha

Re: Auto Tool Zero button fixed position???

Postby Adrian » Wed Feb 14, 2018 3:37 pm

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
Adrian
Vectric Archimage
 
Posts: 8159
Joined: Thu Nov 23, 2006 2:19 pm
Location: Surrey, UK
Model of CNC Machine: ShopBot PRS Alpha 96x48

Re: Auto Tool Zero button fixed position???

Postby adze_cnc » Wed Feb 14, 2018 5:45 pm

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
User avatar
adze_cnc
Vectric Apprentice
 
Posts: 390
Joined: Sat Jul 27, 2013 10:08 pm
Location: Vancouver, BC, Canada
Model of CNC Machine: AXYZ 4008


Return to Control Software related questions

Who is online

Users browsing this forum: No registered users and 4 guests