Home
Downloads
Mach3
Plugins
CAM Post Processors
Screensets
Purchase
Support
Forum
Tutorial Videos
Documentation
Yahoo Group
Mach Wiki
Resources
Contact Us
Links
CNCZone
German Forum
Italian Forum
Korean Forum
Portuguese (Brazil) Forum
Russian Forum (RSK CNCROUTER)
Thai Forum
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email?
May 21, 2013, 04:40:39 PM
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
Search:
Advanced search
Select from and to languages
Chinese-simp to English
Chinese-trad to English
English to Chinese-simp
English to Chinese-trad
English to Dutch
English to French
English to German
English to Greek
English to Italian
English to Japanese
English to Korean
English to Portuguese
English to Russian
English to Spanish
Dutch to English
Dutch to French
French to English
French to German
French to Greek
French to Italian
French to Portuguese
French to Dutch
French to Spanish
German to English
German to French
Greek to English
Greek to French
Italian to English
Italian to French
Japanese to English
Korean to English
Portuguese to English
Portuguese to French
Russian to English
Spanish to English
Spanish to French
Machsupport Forum
Mach Discussion
General Mach Discussion
Auto Zero
Pages:
«
1
2
3
4
»
Go Down
« previous
next »
Author
Topic: Auto Zero (Read 4672 times)
0 Members and 1 Guest are viewing this topic.
Chaoticone
South Carolina, US
Administrator
Offline
Posts: 4,295
Precision Chaos
Re: Auto Zero
«
Reply #10 on:
November 01, 2009, 08:45:11 AM »
This looks like a good place to start. It is the latest update I saw to yours in the thread at the zone.
Quote
1) Returns the probe to the original starting postion once contact is made. This was somewhat problematic if the "Machine Coordinates" button was activated. Finally go it solved.
2) If no contact is made while plunging the probe to the maximum distance, probe is NOT retracted and the Z-DRO shows the current position. This allows for sequential movements until the probe reaches the contact plate.
3) Put the parameters that you may want to fiddle with at the top and added comments to remind me what I did and why.
Here is the modified script:
' Program to automatically zero the Z-axis using a contact plate of known thickness positioned
' on top of the X-Y plane at the Z zero position. Cutting tool acts as a probe.
' Program moves the Z-axis downward at plunge speed defined by parameter "ProbeFeed" until
' the tool touches the contact plate. At this point, the Z-DRO is set to zero, adjusted for
' the thickness of the contact plate. Z-axis then retracts to the starting position.
' Last updated: 10/13/09
' Define fixed parameters
ProbeDist = "-1.0" 'Set the maximum distance to move the Z-axis before probe touches contact plate.
ProbeFeed = "10" 'Set the plunge speed for the probe
DelayTime = "1" 'Set the delay time in seconds from button push to start of Z-motion
' Obtain current state values so that they can be restored upon completion.
CurrentFeed = GetOemDRO(818) ' Get the current feedrate to return to later
CurrentAbsInc = GetOemLED(48) ' Get the current G90/G91 state
CurrentGmode = GetOemDRO(819) ' Get the current G0/G1 state
PlateThickness = GetUserDRO(1151) ' Read contact plate thickness DRO
StartingPoint = GetOemDRO(85) - GetOemDRO(832) ' Get starting Z position in work coordinates
If GetOemLed (825)=0 Then ' Check to see if the probe is already grounded or faulty
Code "G4 P" &DelayTime ' This delay gives me time to get from computer to hold probe in place
Code "F" &ProbeFeed ' Set the probe plunge speed
Code "G91 G31Z" &ProbeDist ' Probing move using incremental move mode.
While IsMoving() ' Wait while it happens
Wend
ZProbePos = GetVar(2002) ' Get the axact point the probe was hit
If (ProbeDist+StartingPoint = ZProbePos) Then GoTo NoContact ' No contact was made during plunge
Code "G90 G0 Z" &ZProbePos ' Go back to that point. Always a very small amount of overrun.
While IsMoving ()
Wend
Call SetDro (2, PlateThickness) ' Set the Z axis DRO to whatever is set as plate thickness
Sleep 500 ' For some reason unknown to me,need this pause or retract goes to wrong place
Retract=Val(PlateThickness)+Val(StartingPoint)-Val(ZProbePos) ' Calculate retract position
Code "G0 Z" &Retract ' Retract to original position
While IsMoving ()
Wend
Code "(Z axis is now zeroed)" ' Puts this message in the status bar
GoTo Finish
NoContact:
Code "(No contact made within probing distance, try again!)" 'Puts this messge in the status bar
Finish:
Code "F" &CurrentFeed ' Returns to prior feed rate
Else
Code "(Z-Plate is grounded, check connection and try again)" 'this goes in the status bar if aplicable
End If
' Reset the machine state
If CurrentAbsInc = 0 Then Code "G91" ' If G91 was in effect before then return to it
If CurrentGMode = 0 Then Code "G0" ' If G0 was in effect before then return to it
Exit Sub
Logged
If you could see the things I have in my head, you would be laughing too.
www.precisionchaos1.com
My guard dog is not what you need to worry about!
m1911bldr
Active Member
Offline
Posts: 18
Re: Auto Zero Quit working after .029 install!
«
Reply #11 on:
November 08, 2009, 05:03:32 AM »
I was using the Auto Tool Zero and very happy with it unti I installed build .029. Now it is so unpredicatble I can't use it anymore. Sometimes it retracts over an inch, or feeds down an inch after touching the probe plate. Other times it doesn't advance more that .o1 or so the stops and reprots "Z is now zeroed." Anyone know what's different between the old version and the new version that caused this? Anyone got a new VB script that works reliably with the newer versions?
Logged
ruzter
Active Member
Offline
Posts: 4
Re: Auto Zero
«
Reply #12 on:
November 11, 2009, 01:13:50 AM »
I had the same issue. I took the above code and modified it to the following and now it works great, thanks for the help!
' Program to automatically zero the Z-axis using a contact plate of known thickness positioned
' on top of the X-Y plane at the Z zero position. Cutting tool acts as a probe.
' Program moves the Z-axis downward at plunge speed defined by parameter "ProbeFeed" until
' the tool touches the contact plate. At this point, the Z-DRO is set to zero, adjusted for
' the thickness of the contact plate. Z-axis then retracts to the starting position.
' Last updated: 10/13/09
' Define fixed parameters
ProbeDist = "-1.0" 'Set the maximum distance to move the Z-axis before probe touches contact plate.
ProbeFeed = "10" 'Set the plunge speed for the probe
PlateThickness = 0.040
' Obtain current state values so that they can be restored upon completion.
CurrentFeed = GetOemDRO(818) ' Get the current feedrate to return to later
CurrentAbsInc = GetOemLED(48) ' Get the current G90/G91 state
CurrentGmode = GetOemDRO(819) ' Get the current G0/G1 state
If MsgBox("Ready to auto-detect z zero" & Chr(13) & Chr(13) & "Auto-height pad in place?",1) =1 Then
If GetOemLed (825)=1 Then ' Check to see if the probe is already grounded or faulty
MsgBox("Touch-Plate is grounded, check connection and try again")
Code "Z-Plate is grounded, check connection and try again" 'this goes in the status bar if aplicable
Else
StartingPoint = GetOemDRO(85) - GetOemDRO(832) ' Get starting Z position in work coordinates
Code "F" &ProbeFeed ' Set the probe plunge speed
Code "G91 G31Z" &ProbeDist ' Probing move using incremental move mode.
While IsMoving() ' Wait while it happens
Wend
ZProbePos = GetVar(2002) ' Get the axact point the probe was hit
If Val(ProbeDist)+Val(StartingPoint) >= Val(ZProbePos) Then ' No contact was made during plunge
Code "G90 G0 Z" & StartingPoint ' Go back to that point. Always a very small amount of overrun.
While IsMoving ()
Wend
Else
Call SetDro (2, PlateThickness) ' Set the Z axis DRO to whatever is set as plate thickness
Sleep 500 ' For some reason unknown to me,need this pause or retract goes to wrong place
Code "G90 G0 Z0.25" '&Retract .25 inches up ' Retract to original position
While IsMoving ()
Wend
Code "(Z axis zeroed)" ' Puts this message in the status bar
End If
End If
End If
' Reset the machine state
Code "F" &CurrentFeed ' Returns to prior feed rate
If CurrentAbsInc = 0 Then Code "G91" ' If G91 was in effect before then return to it
If CurrentGMode = 0 Then Code "G0" ' If G0 was in effect before then return to it
Exit Sub
Logged
It's not what you can buy, it's what you can build.
bowber
Active Member
Offline
Posts: 197
Kirkby Stephen,Cumbria, UK
Re: Auto Zero
«
Reply #13 on:
November 11, 2009, 06:26:16 AM »
Does this code work for sensible units (mm
) and just change the -1.0 to -25 and the plate thickness in mm.
Steve
Logged
ruzter
Active Member
Offline
Posts: 4
Re: Auto Zero
«
Reply #14 on:
November 11, 2009, 12:51:09 PM »
One way to find out! (I think it should)
Logged
It's not what you can buy, it's what you can build.
bowber
Active Member
Offline
Posts: 197
Kirkby Stephen,Cumbria, UK
Re: Auto Zero
«
Reply #15 on:
November 12, 2009, 04:44:37 AM »
Quote from: ruzter on November 11, 2009, 12:51:09 PM
One way to find out! (I think it should)
I could mount the touch plate on a spring then it would just give when the tool caries on.
I could call it Zebedy ;-)
Steve
Logged
ruzter
Active Member
Offline
Posts: 4
Re: Auto Zero
«
Reply #16 on:
November 12, 2009, 10:02:08 AM »
I wouldn't worry about damaging bit due to the over run, here is a youtube video showing that it won't damage even a tiny bit
http://www.youtube.com/watch?v=DOBxt9MIbFo&feature=channel
Logged
It's not what you can buy, it's what you can build.
bowber
Active Member
Offline
Posts: 197
Kirkby Stephen,Cumbria, UK
Re: Auto Zero
«
Reply #17 on:
November 12, 2009, 10:48:07 AM »
Yes I'd seen that.
I was just joking about changing it to metric "should" be ok.
Steve
Logged
ruzter
Active Member
Offline
Posts: 4
Re: Auto Zero
«
Reply #18 on:
November 12, 2009, 11:13:06 AM »
Yes, I think mm is the sensible type of units too. Being in Canada, I work in both inches and mm.
«
Last Edit: November 12, 2009, 11:18:43 AM by ruzter
»
Logged
It's not what you can buy, it's what you can build.
Toad
Active Member
Offline
Posts: 32
Re: Auto Zero
«
Reply #19 on:
November 14, 2009, 02:01:14 PM »
OK, I re-loaded mach 3 and now it works. How do I change the Dwell time? It is taking 6 minutes before it begins to move.
When to goes down and touches the plate,( which I have the thickness set @ .375) it backs off .25 above the plate and resets Z DRO to .25 . How do I get it to allow for the plate thickness so when I go to 0.000 it is touching the piece I am working on?
Toad
Logged
Pages:
«
1
2
3
4
»
Go Up
« previous
next »
Jump to:
Please select a destination:
-----------------------------
Mach Discussion
-----------------------------
=> General Mach Discussion
=> Mach3 under Vista
=> Mach SDK plugin questions and answers.
===> Finished Plugins for Download
=> VB and the development of wizards
=> Brains Development
=> Video P*r*o*b*i*n*g
=> Mach Screens
===> Screen designer tips and tutorials
===> Works in progress
===> Finished Screens
===> Flash Screens
===> JetCam screen designer
===> Machscreen Screen Designer
===> CVI MachStdMill (MSM)
=> Feature Requests
=> Non English Forums
===> Italian
===> French
===> Spanish
===> Chinese
===> German
===> Russian
===> Romanian
===> Japanese
===> Vietnamese
=> FAQs
-----------------------------
*****VIDEOS*****
-----------------------------
=> *****VIDEOS*****
-----------------------------
General CNC Chat
-----------------------------
=> Share Your GCode
=> Show"N"Tell ( What you have made with your CNC machine.)
=> Building or Buying a Wood routing table.. Beginnners guide..
=> Show"N"Tell ( Your Machines)
-----------------------------
G-Code, CAD, and CAM
-----------------------------
=> G-Code, CAD, and CAM discussions
=> LazyCam (Beta)
-----------------------------
Third party software and hardware support forums.
-----------------------------
=> LazyTurn
=> GearoticMotion Preliminary testing
=> Tempest Trajectory Planner
=> Contec
=> CS-Lab
=> dspMC/IP Motion Controller
=> HiCON Motion Controller
=> Third party software and hardware support forums.
=> Galil
=> Newfangled Solutions Mach3 Wizards
=> Newfangled Mill Wizard
=> Mach3 and G-Rex
=> Mesa
=> Modbus
=> NC Pod
=> PoKeys
=> SmoothStepper USB
=> Sieg Machines
=> Promote and discuss your product
-----------------------------
Tangent Corner
-----------------------------
=> Tangent Corner
=> Competitions
=> Polls
=> Bargain Basement
-----------------------------
Support
-----------------------------
=> Downloads
===> XML files
===> Post Processors
===> Macros
===> Tutorials
===> Others
===> Beta Brains
===> Screen Sets
===> Documents
===> MACH TOOL BOX
=> One on one phone support.
=> Forum suggestions and report forum problems.
-----------------------------
Mach4
-----------------------------
=> Mach4 pre-Alpha Testing
Loading...