586,096 active members*
3,109 visitors online*
Register for free
Login
IndustryArena Forum > MetalWorking Machines > Dyna Mechtronics > Z axis Auto zeroing intermittent
Results 1 to 2 of 2
  1. #1
    Join Date
    Sep 2003
    Posts
    1469

    Z axis Auto zeroing intermittent

    DIY 13 year old CNC, Mach3, Gecko 540, ESS Smoothstepper, C25S BOB. The last month or so was running out of paper to set the Z zero height (LOL) and decided to find some mach3 Z auto zero code.
    Here is the Z axis code that I found after installing it worked as expected, but the next time after hitting AUTO TOOL ZERO it woukd pause doe aproximately 5 seconds and raise about 1/4" and the Z display woud change to +1.000.

    This is a single touch code, I would prefer a double touch, but at this point ill settle for a single touch.
    Any Suggestions.
    Thanks
    Hager

    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-4. 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, .756) ' change .060 to your plate thickness and then adjust for final accuracy
    Sleep 200 'Pause for Dro to update.
    Code "G1 Z1. 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
    Nov 2012
    Posts
    367

    Re: Z axis Auto zeroing intermittent

    I'm thinking that you may have intended to post this in a different forum. The one you have selected here is for Dyna Mechtronics machines. Most of these machines, except for the smaller ones, are probably still using the original controls, not Mach. The code you are running looks like it is probably some Mach specific macro language, which most of us here will probably not natively know.

    I am sure there is a Mach forum here on cnczone that can probably net you more/better answers to your question than you'll get here.... Best of luck in your search and I hope you solve your problem.

Similar Threads

  1. Auto Tool Zeroing
    By -Sliver- in forum Dynomotion/Kflop/Kanalog
    Replies: 9
    Last Post: 10-03-2016, 08:56 PM
  2. Properly zeroing axis on 4th axis setups
    By bebob1 in forum CNC Tooling
    Replies: 1
    Last Post: 04-16-2012, 02:27 PM
  3. Zeroing A Axis
    By findor in forum G-Code Programing
    Replies: 3
    Last Post: 10-30-2009, 11:59 AM

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
  •