Auto Tool Zero button config problems in Mach3


Results 1 to 6 of 6

Thread: Auto Tool Zero button config problems in Mach3

  1. #1
    Member jlmort's Avatar
    Join Date
    Feb 2019
    Posts
    9
    Downloads
    0
    Uploads
    0

    Default 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

    Similar Threads:


  2. #2
    Member ger21's Avatar
    Join Date
    Mar 2003
    Location
    Shelby Township
    Posts
    35538
    Downloads
    1
    Uploads
    0

    Default 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
    [URL]http://www.thecncwoodworker.com/2017.html[/URL]

    Mach3 2010 Screenset
    [URL]http://www.thecncwoodworker.com/2010.html[/URL]

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

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


  3. #3
    Member jlmort's Avatar
    Join Date
    Feb 2019
    Posts
    9
    Downloads
    0
    Uploads
    0

    Default

    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
    Member ger21's Avatar
    Join Date
    Mar 2003
    Location
    Shelby Township
    Posts
    35538
    Downloads
    1
    Uploads
    0

    Default 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
    [URL]http://www.thecncwoodworker.com/2017.html[/URL]

    Mach3 2010 Screenset
    [URL]http://www.thecncwoodworker.com/2010.html[/URL]

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

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


  5. #5
    Member jlmort's Avatar
    Join Date
    Feb 2019
    Posts
    9
    Downloads
    0
    Uploads
    0

    Default

    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
    Gold Member Mr.Chips's Avatar
    Join Date
    Sep 2003
    Location
    Gilbert Az
    Posts
    1469
    Downloads
    0
    Uploads
    0

    Default 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

    Attached Thumbnails Attached Thumbnails Auto Tool Zero button config problems in Mach3-ceb88a98-f47e-4eac-ae2f-92699606482a-jpg  


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
  •  


About CNCzone.com

    We are the largest and most active discussion forum for manufacturing industry. The site is 100% free to join and use, so join today!

Follow us on


Our Brands

Auto Tool Zero button config problems in Mach3

Auto Tool Zero button config problems in Mach3