Auto Tool Zero button fixed position???
-
- Posts: 9
- Joined: Sun May 03, 2015 9:55 pm
- Model of CNC Machine: CRP4896
Auto Tool Zero button fixed position???
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!!!
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!!!
-
- Vectric Wizard
- Posts: 1592
- Joined: Sun Sep 16, 2007 2:59 pm
- Model of CNC Machine: Custom DIY
- Location: Lake St Clair, MI, USA
- Contact:
Re: Auto Tool Zero button fixed position???
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?
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
-
- Posts: 9
- Joined: Sun May 03, 2015 9:55 pm
- Model of CNC Machine: CRP4896
Re: Auto Tool Zero button fixed position???
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
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
-
- Vectric Wizard
- Posts: 1592
- Joined: Sun Sep 16, 2007 2:59 pm
- Model of CNC Machine: Custom DIY
- Location: Lake St Clair, MI, USA
- Contact:
Re: Auto Tool Zero button fixed position???
Yes, change it at PlateX=10.
The other lines scale the values if the machine is in metric mode.
The other lines scale the values if the machine is in metric mode.
Gerry - http://www.thecncwoodworker.com
-
- Vectric Craftsman
- 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???
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.
-
- Posts: 9
- Joined: Sun May 03, 2015 9:55 pm
- Model of CNC Machine: CRP4896
Re: Auto Tool Zero button fixed position???
The code worked Perfect! Thank you for all your Help! Have a Wonderful Christmas!
-
- Posts: 9
- Joined: Sun May 03, 2015 9:55 pm
- Model of CNC Machine: CRP4896
Re: Auto Tool Zero button fixed position???
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
Thanks for your help Guyz n Galz!
aka - HeadZombie
- mtylerfl
- Vectric Archimage
- Posts: 5896
- Joined: Thu Jan 29, 2009 3:54 am
- Model of CNC Machine: -CarveWright CNC -ShopBot Buddy PRSAlpha
- Location: Brunswick, GA
Re: Auto Tool Zero button fixed position???
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".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
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
facebook.com/carvebuddy
-CarveWright CNC
-ShopBot Buddy PRSAlpha CNC
facebook.com/carvebuddy
-CarveWright CNC
-ShopBot Buddy PRSAlpha CNC
- Adrian
- Vectric Archimage
- Posts: 14690
- 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???
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.
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.
- adze_cnc
- Vectric Wizard
- Posts: 4382
- 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???
I'd alter the:ger21 wrote:The other lines scale the values if the machine is in metric mode.
Code: Select all
PlateX = PlateX * 25.4
PlateY = PlateY * 25.4
Code: Select all
PlateX = PlateX * ConversionFactor
PlateY = PlateY * ConversionFactor
Steven