Hey guys I need some help with this auto-z macro. I want to use input 1 instead of probe and I do not know what to change. Here is the macro I use now using a probe input. And I know there is alot of discussion about auto-z macro's but I have not had any luck making this work myself.
'Auto tool calibration to fixture z field Sept 10/2015
'input probe pin15 port 1
CurrentFeed = GetOemDRO(818) 'Get the current feedrate.
PlateThickness = GetUserDRO(1151) 'You could put your z-plate thickness here instead
'ProbeFeed = GetUserDRO(1152) 'You could put a probing feedrate here instead.
If GetOemLed (825)=0 Then
DoOEMButton (1010)
Code "G4 P3" 'Time to get to the z-plate, 3 seconds
Code "G90 G31 Z-2 F4." 'probing move, can set the feed rate here as well as how far to move
While IsMoving()
Wend
ZProbePos = GetVar(2002)
Code "G1 Z" &ZProbePos
While IsMoving ()
Wend
'Call SetDro (2, PlateThickness)
Call SetDRO(2, Abs(GetOEMDRO(1001)))
Code "G4 P1.0" 'Pause for Dro to update.
Code "G0 G91 Z1.0" 'Change the Z retract height here to what you want, must be higher than touch plate
Code "(Z axis is now zeroed)"
Code "F" &CurrentFeed 'returns to prior feedrate
Else
Code "(Z-Plate is grounded, check connection and try again)"
End If
Exit Sub
As always I appreciate your help and time.