Hello Guest it is April 20, 2021, 10:30:38 AM

Author Topic: Tool Height Touch Probe  (Read 26090 times)

0 Members and 1 Guest are viewing this topic.

vmax549

*
Tool Height Touch Probe
« on: June 20, 2007, 06:27:15 PM »
OK I had a moment and I put together a tool touch probe. Now you fellows have to help me figure out the best way to use it. Does anyone have a macro already setup to use it?? That would really help.

5 test runs @ 1 IPM and it returned a measurement with less than .0001 error each time, not bad for hardware/RShack parts.


The NEW Screen Page is complete just need to finish up some of the Scripting and it will be done.



« Last Edit: June 23, 2007, 02:55:27 PM by vmax549 »

Offline Chaoticone

*
  • *
  •  5,626 5,626
  • Precision Chaos
    • View Profile
Re: Tool Height Touch Probe
« Reply #1 on: June 20, 2007, 08:26:04 PM »
CurrentFeed = GetOemDRO(818) 'Get the current feedrate.
PlateThickness =0.062
ProbeFeed = 5


Code "G90 F" &ProbeFeed

If GetOemLed (825)=0 Then
'Code "G4 P5" 'Time to get to the z-plate
Code "G31Z-5 F" &ProbeFeed
While IsMoving()
Wend
Code "G4 P0.25"
ZProbePos = GetVar(2002)
Code "G0 Z" &ZProbePos
While IsMoving ()
Wend
Call SetDro (2, PlateThickness)
Code "G4 P0.5" 'Pause for Dro to update.
Code "G0 Z2.0" 'Change the Z retract height here
Code "(Z axis is now zeroed)"
Code "F" &CurrentFeed
Else
Code "(Z-Plate is grounded, check connection and try again)"
Exit Sub
End If   

I hope this helps.
Brett
;D If you could see the things I have in my head, you would be laughing too. ;D

My guard dog is not what you need to worry about!

vmax549

*
Re: Tool Height Touch Probe
« Reply #2 on: June 20, 2007, 09:17:51 PM »
Thanks THat will get me started. Does anyone have a macro that allows me to test all the tool heights and reset the tool table values for each tool??  I believe I said that right(;-)

Or something to get me started in the right direction, Perhaps help make this page work

(;-) TP
« Last Edit: June 21, 2007, 10:52:34 AM by vmax549 »

Offline Scott

*
  •  139 139
    • View Profile
Re: Tool Height Touch Probe
« Reply #3 on: June 21, 2007, 06:52:27 PM »
Don't know if this helps, but heres a touch probe macro that finds the difference between lengths during a manual tool change and sets the new tool to the same height as the one that was removed.  It was made for someone else so your mileage may vary.   ;)

Take note that it has some user DRO's that are used.

ChX = GetUserDRO(1200)
ChY = GetUserDRO(1201)
ChZ = GetUserDRO(1202)
Swposx = GetUserDRO(1203)
Swposy = GetUserDRO(1204)
SwError = GetUserDro(1205)
CurrentFeed = GetOemDRO(818)

If GetOemLed (23) Then DoOemButton (119) 'Turn soft limits off

Code "G20" 'Set to inch units

Code "G53 G00 Z" &ChZ 'Move the tool all the way up
While IsMoving()
Wend
ZOld = Getdro(2)

Code "G53 G00 X" &Swposx & "Y" &Swposy 'Move to the switch position
While IsMoving()
Wend

MsgBox ("Jog Z axis down close to switch then hit Cycle Start to resume")
SystemWaitFor (Start) 'Pause macro to jog the Z axis close to the switch

Code "G31 Z-7 F10" 'Move Z down until switch is triggered
While IsMoving()
Wend
Code "G4 P0.1"
HitOld = GetVar(2002) 'Get the position where the switch was triggered
Code "G53 G00 Z" &ChZ 'Z move all way up
Code "G53 G00 X" &ChX & "Y" &ChY 'Move to change tool position
While IsMoving()
Wend

MsgBox ("Insert the new tool")

Code "G53 G00 X" &Swposx & "Y" &Swposy 'Move to the switch position
While IsMoving()
Wend

MsgBox ("Jog Z axis down close to switch then hit Cycle Start to resume")
SystemWaitFor (Start) 'Pause macro to jog the Z axis close to the switch

Code "G31 Z-7 F10" 'Z move down until switch is triggered
While IsMoving()
Wend
Code "G4 P0.1"
HitNew = GetVar(2002) 'Get the position where the switch was triggered
Code "F" &CurrentFeed

Diff = HitOld - HitNew
DiffABS =Abs(Diff)

If DiffABS=0 Then
Code "G53 G00 Z" &ChZ
Code "G53 X0Y0"
While Ismoving()
Wend
DoOemButton (119) 'Turn soft limits on
Code "(New tool is now ready for use)"
Exit Sub
End If

ZNew=0

If HitOld < HitNew Then ZNew = ZOld - DiffABS :A=1
If HitOld > HitNew Then ZNew = ZOld + DiffABS :A=2

Code "G53 G00 Z" &ChZ
While IsMoving()
Wend
Call setdro(2,ZNew - SwError)
Code "G53 X0Y0"
While Ismoving()
Wend
DoOemButton (119) 'Turn soft limits on
Code "(New tool is now ready for use)"
End   

Scott

vmax549

*
Re: Tool Height Touch Probe
« Reply #4 on: June 21, 2007, 07:25:29 PM »
Thanks SCOTT, I believe I have a use for that one also (;-) TP
Re: Tool Height Touch Probe
« Reply #5 on: June 19, 2009, 07:49:56 AM »
this works best wile you are in program

code "g90"

ChX = GetUserDRO( 1200 )
ChY = GetUserDRO( 1201 )
ChZ = GetUserDRO( 1202 )

Code "G53 G00 Z-0.1" 'Move the tool all the way up
Code "G53 G00 X" & ChX & "Y" & ChY 'Move to the probe position
While IsMoving()
Wend

Code "G31 Z-7 F10" 'Z move down untill hit
While IsMoving()
Wend
ZposOld = GetVar(2002) 'Get the Position that the Porbe hit at
Code "G53 G00 Z-0.1"'Z move all way up
While IsMoving()
Wend

MsgBox ("Insert the new tool")
MsgBox ("Ok to finish tool change")

Code "G53 G00 Z-0.1" 'Move the tool all the way up
Code "G53 G00 X" & ChX & "Y" & ChY 'Move to the probe position
While IsMoving()
Wend

Code "G31 Z-7 F10" 'Z move down untill hit
While IsMoving()
Wend
ZposNew = GetVar(2002) 'Get the Position that the Porbe hit at
Offs = ZposOld - ZposNew
Call setdro (2,&Offs)   'Set the value of the DRO to the value that is in "Offs"
Code "G53 G00 Z-0.1"   'or hoever high you want to go to get up safely off the probe
MsgBox ("Ok to return to program")

Code "G00 x0 y0"
« Last Edit: June 30, 2009, 09:04:57 PM by (nater) »
Re: Tool Height Touch Probe
« Reply #6 on: June 19, 2009, 07:51:34 AM »
you copy and past this into your m6start. file and it will perform this through out your program perfectly the others dont seem to work so well