2834
« on: August 26, 2008, 01:41:43 PM »
Yup, Jim is right. I use my probe input. I have a piece of printed circuit board with a wire soldered to one side of the copper clad. This is landed on the input I assigned my probe to. So, it is hot and my tool in my spindle is the ground that sinks the voltage on the printed circuit board to 0. The probe pin is set up as active low so when it sees the change from 5V to 0, Mach considers it made. Adding a VB button in screen 4 is not bad at all to do. Once you have that you can make code to do as you wish. I have posted my Auto tool touch off button code below.
'Auto Tool Touchoff
CurrentFeed = GetOemDRO(818) 'Get the current feedrate.
PlateThickness =0.059
ProbeFeed = 5
Code "G90 F" &ProbeFeed
If GetOemLed (825)=0 Then
Code "G4 P2" '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 Z0.25" '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
Brett