584,837 active members*
4,934 visitors online*
Register for free
Login
IndustryArena Forum > WoodWorking Machines > DIY CNC Router Table Machines > Auto Tool Zero button config problems in Mach3
Results 1 to 6 of 6

Hybrid View

  1. #1
    Join Date
    Feb 2019
    Posts
    9

    Auto Tool Zero button config problems in Mach3

    So I have been trying to set up my Auto Tool Zero button in Mach3. I am using the standard code found online. When I push the button the Z axis travels down and touches the touch plate as it should but then retracts and continues to go up out of the limits of the machine. It does not stop at specified location. I am not good at gcode and was hoping someone can help me sort this out. I will attach the code I am using.

    Thanks


    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 GetOemLed (825)=0 Then 'Check to see if the probe is already grounded or faulty
    DoOEMButton (1010) 'zero the Z axis so the probe move will start from here
    Code "G4 P3" ' this delay gives me time to get from computer to hold probe in place
    Code "G90 G31Z-1. F4" 'probing move, can set the feed rate here as well as how far to move
    While IsMoving() 'wait while it happens
    Wend
    ZProbePos = GetVar(2002) 'get the exact point the probe was hit
    Code "G0 Z" &ZProbePos 'go back to that point, always a very small amount of overrun
    While IsMoving ()
    Wend
    Call SetDro (2, .123) ' change .060 to your plate thickness and then adjust for final accuracy
    Sleep 200 'Pause for Dro to update.
    Code "G1 Z.5 F50" 'put the Z retract height you want here, must be greater than the touch plate thickness
    While IsMoving ()
    Wend
    Code "(Z axis is now zeroed)" 'puts this message in the status bar
    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 applicable
    End If
    If CurrentAbsInc = 0 Then 'if G91 was in effect before then return to it
    Code "G91"
    End If
    If CurrentGMode = 0 Then 'if G0 was in effect before then return to it
    Code "G0"
    End If

  2. #2
    Join Date
    Mar 2003
    Posts
    35538

    Re: Auto Tool Zero button config problems in Mach3

    Are you using the parallel port, or a motion controller?
    If you have a Chinese motion controller, that code probably will not work.
    Gerry

    UCCNC 2017 Screenset
    http://www.thecncwoodworker.com/2017.html

    Mach3 2010 Screenset
    http://www.thecncwoodworker.com/2010.html

    JointCAM - CNC Dovetails & Box Joints
    http://www.g-forcecnc.com/jointcam.html

    (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)

  3. #3
    Join Date
    Feb 2019
    Posts
    9
    Quote Originally Posted by ger21 View Post
    Are you using the parallel port, or a motion controller?
    If you have a Chinese motion controller, that code probably will not work.
    Its a motion controller. Is there any code that will work for it? I am just looking at capturing the z axis zero. Like I said I'm not good with gcode

    Thanks for your reply

  4. #4
    Join Date
    Mar 2003
    Posts
    35538

    Re: Auto Tool Zero button config problems in Mach3

    Try getting rid of the GetVAR functions.

    Replace ZProbePos = GetVar(2002)
    with ZProbePos = GetOEMDRO(802)

    and then see if it works.
    Gerry

    UCCNC 2017 Screenset
    http://www.thecncwoodworker.com/2017.html

    Mach3 2010 Screenset
    http://www.thecncwoodworker.com/2010.html

    JointCAM - CNC Dovetails & Box Joints
    http://www.g-forcecnc.com/jointcam.html

    (Note: The opinions expressed in this post are my own and are not necessarily those of CNCzone and its management)

  5. #5
    Join Date
    Feb 2019
    Posts
    9
    Quote Originally Posted by ger21 View Post
    Try getting rid of the GetVAR functions.

    Replace ZProbePos = GetVar(2002)
    with ZProbePos = GetOEMDRO(802)

    and then see if it works.
    That was the ticket. Works perfect now. Thanks for the help, I woulda never figured that out on my own

  6. #6
    Join Date
    Sep 2003
    Posts
    1469

    Re: Auto Tool Zero button config problems in Mach3

    Glad to see that the Z zero is now working.
    Will this code work on the Mach3 Version I recently downloaded, in the lower center of the screen there is a Zero utility, would this code work with it? Here’s a photo
    Thanks

Similar Threads

  1. Auto Tool Zero button
    By Richster in forum Mach Mill
    Replies: 3
    Last Post: 09-01-2019, 07:49 PM
  2. Question about Auto Tool Zero button.
    By jgomez in forum Mach Wizards, Macros, & Addons
    Replies: 0
    Last Post: 03-07-2019, 02:14 PM
  3. Auto tool zero doesn't stop in Auto Tool Zero routine on Mach3
    By Flintstone in forum WoodWorking Topics
    Replies: 0
    Last Post: 09-05-2017, 07:00 PM
  4. auto tool zero button not visible
    By Tonyi in forum Mach Software (ArtSoft software)
    Replies: 2
    Last Post: 03-09-2017, 11:02 PM
  5. Auto Tool Setter Button IH taylored !
    By Cruiser in forum Charter Oak Automation Support Forum
    Replies: 7
    Last Post: 08-06-2009, 03:25 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •