Yeah! I got it working...
I am using this script below but 2 questions:
I have my plate thickness at .7874 and the retract to .10 which should = 8874 but it = 8875 on the DRO? Is there a thousandth offset in the code or something?
Also, in the code, is there something that keeps the Z axis jog rate hard coded as I set the Z zero or do I have to manually hit the TAB key and reduce the jog rate each time and then manually reset the jog rate back? I am nervouse thet if I do not manually hit TAB and reduce the jog rate from 100% to .3% that it is just going to go flying down to the touch plate... I would like to have the TAB jog rate be at 100% all the time but when I hit Auto Z Zero in mach 3 it over ride that in the code and go down slow such as .3% for the auto zero.
CurrentFeed = GetOemDRO(818) 'Get the current feedrate to return to later
PlateThickness = GetOemDRO(1151)
Retract = 0.10
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-1 F4" '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 Z" &Retract+PlateThickness '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 aplicable
Exit Sub
End If