. .

Thread: g31 code probe

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Sorry, I had no time last night. Will try again tonight.

  2. #2
    Quote Originally Posted by A_Camera View Post
    Sorry, I had no time last night. Will try again tonight.
    its no problem..im greatful of any help

  3. #3
    Here is the code I use for the auto Z zero. Use it at your own risk.

    Short explanation:

    You need to add this code to a button macro. When the code is added and the button is pushed, assuming you have done the configuration right, the Z axis will start moving down at 400mm/min. When the probe touches the touch plate it will stop, back off 0.5mm and will make a new probing at 4mm/min. When probing is done the probe will move up 2mm and the DRO will display the touch probe height + 2mm. This way the probing is extremely accurate. The touch plate height is critical, you have to measure and enter your own value in ZOffset.

    Good luck in using it, but please note, use it at your own risk, I take no responsibility for any damage or injury. Test well before the first use, and every time you attach the probe before running the code. You must test it to see if the electrical contact is OK. The probe must be placed less than 20mm above the touch plate, the execution stops if no contact made within 20mm. If you want to change that then change the value of ZMove.

    Code:
    CurrentFeed = GetOemDRO(818)
    
    ZMove = 20.00 'Total lenght of Probe to move before stop or no contact made.
    ZOffset = 1.47 ' Plate Hight. Replace the value with your touch plate height 
    ZSal = ZOffset + 2.00 '+ Free Hight. Will position the probe 2 mm over the material.
    
    StopZmove = 0
    If GetOemLed (825)=0 Then
     DoOEMButton (1010)
     Code "G31 Z-"& ZMove & "F400"
     While IsMoving()
      Sleep(200)
     Wend
     Probepos = GetVar(2002)
     
    
    ' Improve accuracy
    
     Code "G0 Z" & Probepos + 0.5 ' Move back a bit to get a new reading
     While IsMoving()
      Sleep(200)
     Wend
     Code "G31 Z-" & ZMove & "F4" ' Move very slow for greater accuracy
     While IsMoving()
      Sleep(200)
     Wend
    
     Probepos = GetVar(2002) ' Z var for probe 
      
     If Probepos = - ZMove Then
      responce = MsgBox ("**ERROR** " , 4 , "Probe **ERROR**" )
      Code "G0 Z10"
      StopZmove = 1
      Code "F" &CurrentFeed
     End If
     If StopZmove = 0 Then
      Code "G0 Z" & Probepos
      While IsMoving ()
       Sleep (200)
      Wend
      Call SetDro (2, ZOffset)
      Code "G0 Z" & ZSal
      While IsMoving()
       Sleep(200)
      Wend
      Code "(Z zeroed)"
      Code "F" &CurrentFeed
     End If
    Else
     Code "(Check Ground Probe)"
    End If
    Exit Sub
    '-------------------

  4. #4
    thanks for your help yet again chaps.thankyou

  5. #5
    Quote Originally Posted by warwick View Post
    thanks for your help yet again chaps.thankyou
    Good luck. I hope this was what you had in mind. Just be careful, the values above are only suitable for my machine and you should be careful before you are comfortable with it. Make sure you are using millimeters, or change the units in the code for inches. If you'd lower the Z with 400in/min, as opposed to 400mm/min which is what I am doing, you'd crash your machine and the probe or the probe plate or the CNC would get some serious damage.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Edge Probe + tool length probe on same input
    By Noplace in forum General Electronics
    Replies: 1
    Last Post: 18-06-2016, 11:12 AM
  2. CNC Probe - Tried this one?
    By Davek0974 in forum Machine Discussion
    Replies: 13
    Last Post: 03-06-2016, 02:58 PM
  3. Probe-it / any users ?
    By dudz in forum CAD & CAM Software
    Replies: 8
    Last Post: 02-11-2015, 11:51 PM
  4. RFQ: Cooler probe
    By DAHammond in forum Projects, Jobs & Requests
    Replies: 0
    Last Post: 10-06-2015, 05:18 PM
  5. Cambium Code Web Tools – Parametric G-code Generation
    By CambiumMachines in forum Manufacturer News
    Replies: 0
    Last Post: 09-01-2013, 04:56 AM

Bookmarks

Posting Permissions

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