587,172 active members*
3,078 visitors online*
Register for free
Login
Results 1 to 4 of 4
  1. #1
    Join Date
    Sep 2006
    Posts
    4

    Problems with auto tool zero

    Hi there,
    I'm using this script:
    Zmove = 10 'amount the tool will move down to hit the probe
    Zpos = GetDRO(2)
    Tool = GetDRO (24)
    ZOffset = 33.32 'enter height of probe here

    OldZpos = Zpos
    ZPos = Zpos - ZMove
    Code "G31 Z" & ZPos & " F40.0"
    While IsMoving()
    Wend
    Zpos = GetVar (2002)
    If Zpos = OldZpos - ZMove Then
    responce = MsgBox ("ERROR! The tool did not hit the probe and DRO was not set" , 4 , "Probe ERROR!" )
    Else
    SetDRO (2,ZOffset)
    End If

    Code "G00 G53 Z-.1"

    couple of times, after touching the probe, Z proceedes downward instead of upward causing "injuries" to the blade. Why does it happen?? Where is the the mistake? Help me please...

  2. #2
    Join Date
    Dec 2008
    Posts
    13
    I'm guessing its the G53 that is causing you problems.
    Since it is referencing machine coordinates while your DRO's are showing whatever coordinate system you are using when the routine started

  3. #3
    Join Date
    Sep 2006
    Posts
    4
    So how can I change this script in order not to be scare every time I want to zero my tool?

  4. #4
    Join Date
    Oct 2006
    Posts
    51
    I can't explain why the machine continues down after the G53 but try adding a pause statement after the SetDRO command.
    The machine is executing the rapid move before the DRO is fully updated.
    Try something like this..

    Code "G4 P0.25" 'Pause for Dro to update

    The P0.25 is a 1/4 second pause

    Here is a complete script that others are using with much success.
    Of course you would need to change some of the values to suit your needs.

    CurrentFeed = GetOemDRO(818) 'Get the current feedrate to return to later
    PlateThickness = GetUserDRO(1151) 'Z-plate thickness DRO

    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 P2" ' this delay gives me time to get from computer to hold probe in place
    Code "G31Z-20 F100" '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 axact 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, PlateThickness) 'set the Z axis DRO to whatever is set as plate thickness
    Code "G4 P0.25" 'Pause for Dro to update.
    Code "G0 Z20" 'put the Z retract height you want here
    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
    Exit Sub
    End If

Similar Threads

  1. Auto tool zero
    By kentavv in forum Mach Mill
    Replies: 30
    Last Post: 10-08-2010, 05:03 PM
  2. Need help badly Auto tool Zero
    By native34 in forum CNC Machine Related Electronics
    Replies: 12
    Last Post: 09-22-2008, 10:56 PM
  3. Auto Tool Zero VB problem
    By Normsthename in forum Mach Wizards, Macros, & Addons
    Replies: 0
    Last Post: 11-23-2007, 05:15 PM
  4. Auto Tool Zero
    By Moondog in forum Machines running Mach Software
    Replies: 13
    Last Post: 12-23-2006, 01:02 AM
  5. Auto cut problems
    By harvard5 in forum BobCad-Cam
    Replies: 2
    Last Post: 05-06-2006, 04:23 PM

Posting Permissions

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