Machsupport Forum
Mach Discussion => General Mach Discussion => Topic started by: woodguy7777 on March 24, 2010, 06:24:59 PM
-
I am having a problem using my zero plate
when the bit goes down and touch the plate it stops and does not go back up.
i then have to go and press the reset button, send the bit up and down again.
then it works.
never on the first try
paul
-
Hi Paul,
Could you attach the macro/script you have linked to your 'Auto tool Zero' button.
Tweakie.
-
Hi this is the
script i am using
CODE: M3_ZZERO_PLT
' DESC: Mach3 Z-Plate, Z Zeroing Routine
'
' DATE: Tuesday, June 05, 2007
' AUTHOR: Todd M. Reith <todd@customluthier.com>
' VERSION: 1.5.0
' WEB: http://www.customluthier.com
'
' REQUIRES: MACH3 V2.0.075+
' K2-CNC SCREEN SET
' K2-CNC Z TOUCH PLATE w/ASSEMBLY
' K2-CNC CONTROL BOX w/Z TOUCH PLATE DIN
' PROBE ENABLED - PORT 1, PIN 15 INPUT - N.O.
'
' SUPPORT: K2 DEVICES, INC., 790 E. DEBRA LN, ANAHEIM, CA 92805
' WEB: http://www.k2cnc.com
'
' DECLARE USER DEFINED VALUES ==============================
' ==========================================================
' DO NOT CHANGE VALUES =====================================
' ==========================================================
Dim PlateThickness As Double
Dim ProbeFeed As Double
Dim ZaxisPullBack As Double
Dim MaxZaxisTravel As Double
Dim Debounce As Double
Dim CurrentFeed As Double
' USER DEFINED VALUES ======================================
PlateThickness = 0.062 'Z-plate thickness.
ProbeFeed = 10 'Probing feedrate.
ZaxisPullBack = .50 'Z axis retraction after zero
MaxZaxisTravel = 5.0 'Z axis full travel
Debounce = 2500 'Debounce (Each count is approc 40us in debounce)
' FIXED VALUES =============================================
CurrentFeed = GetOemDRO(818) 'Get the current feedrate.
' PROGRAM LOGIC=============================================
Response = MsgBox ("Ready to Z Zero?", 4 , "Auto Tool Zero")
If (Response = 6) Then 'User chose Yes
Code "M61P0000"
Code "G90 F" & ProbeFeed
Code "(CAUTION: Z axis is preparing to move.)"
Code "G4 P2" 'Pause.
If GetOemLed (825)=0 Then
Code "(Z axis is moving toward Z-plate.)"
Code "G4 P1" 'Pause
Code "G31Z-" & MaxZaxisTravel & " F" & ProbeFeed 'Straight probe Z
While IsMoving()
Wend
Code "G4 P0.25" 'Pause
ZProbePos = GetVar(2002)
Code "G0 Z" & ZProbePos
While IsMoving ()
Wend
Call SetDro (2, PlateThickness)
Sleep(200)
Code "G4 P0.5" 'Pause, DRO update
Code "G0 Z" & ZaxisPullBack 'Change the Z, Retract height
Code "(Z axis has been zeroed.)"
Code "F" & CurrentFeed 'Return to original feed rate
Else
Code "(Z-plate is grounded. Check connection and try again.)"
Response = MsgBox ("Z-plate is grounded. Check connection and try again.", 16 , "Auto Tool Zero")
Exit Sub
End If
Code "G4 P1" 'Pause
Code "M61P" & Debounce
Response = MsgBox ("Return to Work XY Zeros?", 4 , "Auto Tool Zero")
If (Response = 6) Then 'User chose Yes
Code "(Returning to Work Zeros.)"
Code "G4 P1" 'Pause
Code "G0 X0 Y0" 'Return to XY Zeros
End If
Else 'User chose No
Code "(Z axis routine terminated.)"
Code "M61P" & Debounce
End If
thanks
-
Hi Paul,
Tried it and it worked OK on my machine ????.
I have attached a modified version of the script which you may like to try.
Make and save a copy of your existing script before deleting it and pasting the modified one into the auto tool zero VB button box. (that way nothing is lost and you can always revert back if the modified version is no good).
Hope this helps,
Tweakie.
-
Hi Paul,
One important point I forgot to mention - It pays to use a piece of alloy welding wire (or similar) in place of the cutter when experimenting with this routine, that way no expensive tooling is damaged if it goes pear shaped.
Once reliability is established then go for it with the proper tooling.
Tweakie.
-
thanks tweakie
i used your script and it worked only you have the z axis retract as 5inches
i change this on the script but it still goes to 5 inches
eg go z0 2" retract hight is set here.
paul
-
Hi Paul,
Strange - Only retracts 0.5 on my machine.
Which version of Mach3 are you using please ?.
Tweakie.
-
Hi Paul,
After further testing I think you may have missed out the decimal point. To retract 1/2 inch the relevant line should read :-
Code "G0 Z 0.5" 'Z-Axis retract height is set here
Tweakie.
-
Hi Tweakie
mach 3 R3.042.035
i had the setting correct Go Z 0.5"
what i did was reinstalled your file.
this is what is going on.
the bit comes down touch the plate then retract 5.25 inches
from the top of the plate.
this is with your settings.
i am very new to mach3
paul
-
Hi Paul,
There are just so many settings within Mach3 that I am not certain about this but....
In the menu bar click 'Config' then select 'General Config' and in the pop-up screen, un-check 'Include TLO in Z from G31'
That should do it.
Tweakie.
-
Hi
got the problem solved added a debonce in general config to 1000
and it worked.
thanks for taking the time to help
paul
-
Way to go Paul.
Glad you got it sorted.
Tweakie.